up_uploader.h

Go to the documentation of this file.
00001 #ifndef __up_uploader_h__
00002 #define __up_uploader_h__
00003 
00004 #include "ac_app_context.h"
00005 #include "application_config.h"
00006 
00007 #include "common/error_list.h"
00008 
00009 #include <glib.h>
00010 
00011 #define up_DOMAIN domain_cl2app
00012 
00013 #define up_ERR_GENERAL 1
00014 
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018 
00019   // Does global initialization.
00020   //
00021   // Additionally, you will probably want to invoke signal(SIGPIPE,
00022   // SIG_IGN) as part of the global initialization.
00023   gboolean up_global_init(GError** error);
00024 
00025   // Does global cleanup.
00026   //
00027   void up_global_cleanup();
00028 
00029   typedef struct _up_Uploader up_Uploader;
00030 
00031   up_Uploader* up_Uploader_new(ac_AppContext* aAppContext, GError** error);
00032 
00033   void up_Uploader_destroy(up_Uploader* object);
00034 
00035   // Overrides any timeout to cause a new LogDb snapshot to be taken
00036   // immediately.
00037   gboolean up_Uploader_upload_now(up_Uploader* object,
00038           GError** error);
00039 
00040   // Modifies the up_Uploader runtime configuration. Any upload that is
00041   // in progress is not interrupted.
00042   gboolean up_Uploader_reconfigure(up_Uploader* object,
00043            const gchar* key,
00044            const gchar* value,
00045            GError** error);
00046 
00047   up_Uploader* ac_get_Uploader(ac_AppContext* self);
00048 #define ac_global_Uploader ac_get_Uploader(ac_get_global_AppContext())
00049 
00050 #ifdef __cplusplus
00051 } /* extern "C" */
00052 #endif
00053 
00054 #endif /* __up_uploader_h__ */
00055 
00056 /**
00057 
00058 up_uploader.h
00059 
00060 Copyright 2009 Helsinki Institute for Information Technology (HIIT)
00061 and the authors. All rights reserved.
00062 
00063 Authors: Tero Hasu <tero.hasu@hut.fi>
00064 
00065 Permission is hereby granted, free of charge, to any person
00066 obtaining a copy of this software and associated documentation files
00067 (the "Software"), to deal in the Software without restriction,
00068 including without limitation the rights to use, copy, modify, merge,
00069 publish, distribute, sublicense, and/or sell copies of the Software,
00070 and to permit persons to whom the Software is furnished to do so,
00071 subject to the following conditions:
00072 
00073 The above copyright notice and this permission notice shall be
00074 included in all copies or substantial portions of the Software.
00075 
00076 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00077 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00078 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00079 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
00080 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
00081 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00082 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00083 SOFTWARE.
00084 
00085  **/

ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:56 2011 by Doxygen 1.6.1