Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _VMTOOLSINT_H_
00020 #define _VMTOOLSINT_H_
00021
00028 #include "vmware.h"
00029 #include "vmware/tools/utils.h"
00030
00031
00032
00033
00034
00035 void
00036 VMToolsMsgCleanup(void);
00037
00038
00039
00040
00041
00042 #define LOGGING_GROUP "logging"
00043
00044 struct LogHandlerData;
00045
00046 typedef void (*LogErrorFn)(const gchar *domain,
00047 GLogLevelFlags level,
00048 const gchar *fmt,
00049 ...);
00050 typedef gboolean (*VMToolsLogFn)(const gchar *domain,
00051 GLogLevelFlags level,
00052 const gchar *message,
00053 struct LogHandlerData *data,
00054 LogErrorFn errfn);
00055 typedef void (*LogHandlerDestroyFn)(struct LogHandlerData *data);
00056 typedef void (*LogHandlerCopyFn)(struct LogHandlerData *current,
00057 struct LogHandlerData *old);
00058
00059 typedef struct LogHandlerData {
00060 VMToolsLogFn logfn;
00061
00062
00063
00064 gboolean convertToLocal;
00065
00066 gboolean timestamp;
00067
00068 gboolean shared;
00069
00070 LogHandlerCopyFn copyfn;
00071
00072
00073
00074 LogHandlerDestroyFn dtor;
00075
00076 guint type;
00077 gchar *domain;
00078 GLogLevelFlags mask;
00079 guint handlerId;
00080 gboolean inherited;
00081 } LogHandlerData;
00082
00083
00084 LogHandlerData *
00085 VMFileLoggerConfig(const gchar *defaultDomain,
00086 const gchar *domain,
00087 const gchar *name,
00088 GKeyFile *cfg);
00089
00090 LogHandlerData *
00091 VMStdLoggerConfig(const gchar *defaultDomain,
00092 const gchar *domain,
00093 const gchar *name,
00094 GKeyFile *cfg);
00095
00096 #if defined(_WIN32)
00097 LogHandlerData *
00098 VMDebugOutputConfig(const gchar *defaultDomain,
00099 const gchar *domain,
00100 const gchar *name,
00101 GKeyFile *cfg);
00102 #else
00103 LogHandlerData *
00104 VMSysLoggerConfig(const gchar *defaultDomain,
00105 const gchar *domain,
00106 const gchar *name,
00107 GKeyFile *cfg);
00108 #endif
00109
00110 LogHandlerData *
00111 VMXLoggerConfig(const gchar *defaultDomain,
00112 const gchar *domain,
00113 const gchar *name,
00114 GKeyFile *cfg);
00115
00116
00117
00118
00119
00120 gint
00121 VMToolsAsprintf(gchar **string,
00122 gchar const *format,
00123 ...) PRINTF_DECL(2, 3);
00124
00125 #endif
00126