• Main Page
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libvmtools/vmtoolsInt.h

Go to the documentation of this file.
00001 /*********************************************************
00002  * Copyright (C) 2010 VMware, Inc. All rights reserved.
00003  *
00004  * This program is free software; you can redistribute it and/or modify it
00005  * under the terms of the GNU Lesser General Public License as published
00006  * by the Free Software Foundation version 2.1 and no later version.
00007  *
00008  * This program is distributed in the hope that it will be useful, but
00009  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00010  * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
00011  * License for more details.
00012  *
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this program; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
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  * Internationalization.                                                      *
00033  * ************************************************************************** */
00034 
00035 void
00036 VMToolsMsgCleanup(void);
00037 
00038 /* ************************************************************************** *
00039  * Logging.                                                                   *
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    /* Fields below managed by the common code. */
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  * Miscelaneous.                                                              *
00118  * ************************************************************************** */
00119 
00120 gint
00121 VMToolsAsprintf(gchar **string,
00122                 gchar const *format,
00123                 ...)  PRINTF_DECL(2, 3);
00124 
00125 #endif /* _VMTOOLSINT_H_ */
00126 

Generated on Tue Nov 9 2010 for open-vm-tools 2010.09.19 by  doxygen 1.7.1