/usr/include/avifile-0.7/avm_output.h is in libavifile-0.7-dev 1:0.7.48~20090503.ds-18.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | #ifndef AVIFILE_AVM_OUTPUT_H
#define AVIFILE_AVM_OUTPUT_H
#include "avm_default.h"
/** Logging levels */
enum AvmLevel {
AVML_STRERROR = 128, // when or-red to level number bellow it shows (%s) strerror output
AVML_LASTFLAG = 8,
AVML_ERROR = 1 << AVML_LASTFLAG, // serious error (leads to application problem)
AVML_ERRORNO = AVML_ERROR | AVML_STRERROR,
AVML_WARN = 2 << AVML_LASTFLAG, // warning
AVML_WARNNO = AVML_WARN | AVML_STRERROR,
AVML_HINT = 3 << AVML_LASTFLAG, // useful hint for user
AVML_INFO = 4 << AVML_LASTFLAG, // useful trace for running program
AVML_DEBUG = 5 << AVML_LASTFLAG, // debug trace
AVML_DETAIL = 6 << AVML_LASTFLAG // detailed debug trace
};
#ifdef __cplusplus
#include <stdarg.h>
/**********
* WARNING - this file is meant to be used by internal avifile application
* DO NOT USE in your own project!
* the API here could change in any minute
*/
AVM_BEGIN_NAMESPACE;
//typedef void (*handlerFuncPtr) (const char* s, int opt);
class AVMEXPORT AvmOutput
{
public:
static void createAvmOutput();
static int getLevel() { return m_iLevel; }
static AvmOutput* singleton();
~AvmOutput();
void write(const char* mode, const char* format, ...) _avm_printf_attr(3, 4); // debuglevel 0
void write(const char* mode, int debuglevel, const char* format, ...) _avm_printf_attr(4, 5); // any debuglevel
void vwrite(const char* mode, const char* format, va_list va) _avm_printf_attr(3, 0);
void vwrite(const char* mode, int debuglevel, const char* format, va_list va) _avm_printf_attr(4, 0);
void setDebugLevel(const char* mode, int level);
void resetDebugLevels(int level = 0);
private:
AvmOutput(); //!< Only to be called by createAvmOutput
AvmOutput(const AvmOutput&); //!< Forbid copy constructor
AvmOutput& operator=(const AvmOutput&); //!< Forbid assignment
void vwrite(const char* format, va_list va) _avm_printf_attr(2, 0);
void flush();
struct AvmOutputPrivate;
struct AvmOutputPrivate* priv;
static AvmOutput* m_pSelf;
static int m_iLevel;
};
static AvmOutput* AvmOutput() { return AvmOutput::singleton(); }
class AVMEXPORT AvmOutputLog
{
const char* m_sOutputMode;
public:
AvmOutputLog(const char* outputMode) : m_sOutputMode(outputMode) {}
~AvmOutputLog() {}
void setOutputMode(const char* s) { m_sOutputMode = s; }
const char* getOutputMode() const { return m_sOutputMode; }
};
AVM_END_NAMESPACE;
#ifdef __GNUC__
#define AVMOUT(lev, args...) \
do { if (lev < avm::AvmOutput::getLevel()) { avm::AvmOutput()->write(getOutputMode(), (int)lev, ## args); } } while (0)
#else
#define AVMOUT(lev, ...) \
do { if (lev < avm::AvmOutput::getLevel()) { avm::AvmOutput()->write(getOutputMode(), (int)lev, __VA_ARGS__); } } while (0)
#endif
#define AVM_WRITE avm::AvmOutput()->write
#endif // __cplusplus
AVM_BEGIN_EXTERN_C;
/** C interface **/
AVMEXPORT void avm_printf(const char* mode, const char* format, ...) _avm_printf_attr(2, 3);
AVMEXPORT void avm_dprintf(const char* mode, int debuglevel, const char* format, ...) _avm_printf_attr(3, 4);
//#define avml(level, section, fmt, args...) do { if (avm_output_level >= level) avm_printf(section, fmt, ## args); } while (0)
AVM_END_EXTERN_C;
#endif // AVIFILE_AVM_OUTPUT_H
|