Blame src/lib/openmj2/event.h

Packit caffb5
/*
Packit caffb5
 * The copyright in this software is being made available under the 2-clauses
Packit caffb5
 * BSD License, included below. This software may be subject to other third
Packit caffb5
 * party and contributor rights, including patent rights, and no such rights
Packit caffb5
 * are granted under this license.
Packit caffb5
 *
Packit caffb5
 * Copyright (c) 2005, Herve Drolon, FreeImage Team
Packit caffb5
 * All rights reserved.
Packit caffb5
 *
Packit caffb5
 * Redistribution and use in source and binary forms, with or without
Packit caffb5
 * modification, are permitted provided that the following conditions
Packit caffb5
 * are met:
Packit caffb5
 * 1. Redistributions of source code must retain the above copyright
Packit caffb5
 *    notice, this list of conditions and the following disclaimer.
Packit caffb5
 * 2. Redistributions in binary form must reproduce the above copyright
Packit caffb5
 *    notice, this list of conditions and the following disclaimer in the
Packit caffb5
 *    documentation and/or other materials provided with the distribution.
Packit caffb5
 *
Packit caffb5
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
Packit caffb5
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit caffb5
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit caffb5
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
Packit caffb5
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
Packit caffb5
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
Packit caffb5
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
Packit caffb5
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
Packit caffb5
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
Packit caffb5
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Packit caffb5
 * POSSIBILITY OF SUCH DAMAGE.
Packit caffb5
 */
Packit caffb5
#ifndef __EVENT_H
Packit caffb5
#define __EVENT_H
Packit caffb5
/**
Packit caffb5
@file event.h
Packit caffb5
@brief Implementation of a event callback system
Packit caffb5
Packit caffb5
The functions in EVENT.C have for goal to send output messages (errors, warnings, debug) to the user.
Packit caffb5
*/
Packit caffb5
Packit caffb5
#define EVT_ERROR   1   /**< Error event type */
Packit caffb5
#define EVT_WARNING 2   /**< Warning event type */
Packit caffb5
#define EVT_INFO    4   /**< Debug event type */
Packit caffb5
Packit caffb5
/** @defgroup EVENT EVENT - Implementation of a event callback system */
Packit caffb5
/*@{*/
Packit caffb5
Packit caffb5
/** @name Exported functions (see also openjpeg.h) */
Packit caffb5
/*@{*/
Packit caffb5
/* ----------------------------------------------------------------------- */
Packit caffb5
/**
Packit caffb5
Write formatted data to a string and send the string to a user callback.
Packit caffb5
@param cinfo Codec context info
Packit caffb5
@param event_type Event type or callback to use to send the message
Packit caffb5
@param fmt Format-control string (plus optional arguments)
Packit caffb5
@return Returns true if successful, returns false otherwise
Packit caffb5
*/
Packit caffb5
opj_bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt,
Packit caffb5
                       ...);
Packit caffb5
/* ----------------------------------------------------------------------- */
Packit caffb5
/*@}*/
Packit caffb5
Packit caffb5
/*@}*/
Packit caffb5
Packit caffb5
#endif /* __EVENT_H */