• 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/tools/utils.h"
00029 
00030 /* ************************************************************************** *
00031  * Internationalization.                                                      *
00032  * ************************************************************************** */
00033 
00034 void
00035 VMToolsMsgCleanup(void);
00036 
00037 /* ************************************************************************** *
00038  * Logging.                                                                   *
00039  * ************************************************************************** */
00040 
00041 #define LOGGING_GROUP         "logging"
00042 
00043 struct LogHandlerData;
00044 
00045 typedef void (*LogErrorFn)(const gchar *domain,
00046                            GLogLevelFlags level,
00047                            const gchar *fmt,
00048                            ...);
00049 typedef gboolean (*VMToolsLogFn)(const gchar *domain,
00050                                  GLogLevelFlags level,
00051                                  const gchar *message,
00052                                  struct LogHandlerData *data,
00053                                  LogErrorFn errfn);
00054 typedef void (*LogHandlerDestroyFn)(struct LogHandlerData *data);
00055 typedef void (*LogHandlerCopyFn)(struct LogHandlerData *current,
00056                                  struct LogHandlerData *old);
00057 
00058 typedef struct LogHandlerData {
00059    VMToolsLogFn         logfn;            
00060 
00061 
00062 
00063    gboolean             convertToLocal;   
00064 
00065    gboolean             timestamp;        
00066 
00067    gboolean             shared;           
00068 
00069    LogHandlerCopyFn     copyfn;           
00070 
00071 
00072 
00073    LogHandlerDestroyFn  dtor;             
00074    /* Fields below managed by the common code. */
00075    guint                type;
00076    gchar               *domain;
00077    GLogLevelFlags       mask;
00078    guint                handlerId;
00079    gboolean             inherited;
00080 } LogHandlerData;
00081 
00082 
00083 LogHandlerData *
00084 VMFileLoggerConfig(const gchar *defaultDomain,
00085                    const gchar *domain,
00086                    const gchar *name,
00087                    GKeyFile *cfg);
00088 
00089 LogHandlerData *
00090 VMStdLoggerConfig(const gchar *defaultDomain,
00091                   const gchar *domain,
00092                   const gchar *name,
00093                   GKeyFile *cfg);
00094 
00095 #if defined(_WIN32)
00096 LogHandlerData *
00097 VMDebugOutputConfig(const gchar *defaultDomain,
00098                     const gchar *domain,
00099                     const gchar *name,
00100                     GKeyFile *cfg);
00101 #else
00102 LogHandlerData *
00103 VMSysLoggerConfig(const gchar *defaultDomain,
00104                   const gchar *domain,
00105                   const gchar *name,
00106                   GKeyFile *cfg);
00107 #endif
00108 
00109 #endif /* _VMTOOLSINT_H_ */
00110 

Generated on Tue Oct 5 2010 for open-vm-tools 2010.04.25 by  doxygen 1.7.1