ac_app_context_private.h

Go to the documentation of this file.
00001 #ifndef __ac_app_context_private_h__
00002 #define __ac_app_context_private_h__
00003 
00004 #include "ac_app_context.h"
00005 
00006 #include "kr_controller.h"
00007 
00008 #include "common/platform_config.h"
00009 
00010 //
00011 // This internal API is only for controller and application context
00012 // implementation.
00013 //
00014 
00015 #include <glib.h>
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 
00021   ac_AppContext* ac_AppContext_new(GError** error);
00022 
00023   void ac_AppContext_set_controller(ac_AppContext* self, kr_Controller* kr);
00024 
00025   // Refreshes settings from the configuration file.
00026   // Any previous settings are lost.
00027   // Should be called once the configuration file has been read.
00028   gboolean ac_AppContext_configure(ac_AppContext* self, GError** error);
00029 
00030   void ac_AppContext_destroy(ac_AppContext* self);
00031 
00032   void ac_set_global_AppContext(ac_AppContext* ac);
00033 
00034 #ifdef __cplusplus
00035 } /* extern "C" */
00036 #endif
00037 
00038 #if __SYMBIAN_CXX__
00039 
00040 class MAppContextInitObserver
00041 {
00042 public:
00043   virtual void AppContextReady(TInt aError) = 0;
00044 };
00045 
00046 class CAppContextImpl;
00047 
00048 NONSHARABLE_CLASS(CAppContext) : public CBase
00049 {
00050  public:
00051   static CAppContext* NewL(ac_AppContext* ac,
00052          MAppContextInitObserver& obs);
00053   ~CAppContext();
00054  public:
00055   CAppContextImpl* iImpl;
00056 };
00057 
00058 // Creates a platform-specific CAppContext object, and sets it as
00059 // property of the specified ac_AppContext, provided that at least
00060 // initial allocation succeeds. Notification of asynchronous
00061 // initialization completion is provided via MAppContextInitObserver.
00062 void ac_AppContext_PlatInitAsyncL(ac_AppContext* ac,
00063           MAppContextInitObserver& obs);
00064 
00065 // Returns a reference to a Symbian-specific app context object, via
00066 // which additional services are available.
00067 CAppContext& ac_AppContext_plat(ac_AppContext* ac);
00068 #endif
00069 
00070 #endif /* __ac_app_context_private_h__ */
00071 
00072 /**
00073 
00074 ac_app_context_private.h
00075 
00076 Copyright 2009 Helsinki Institute for Information Technology (HIIT)
00077 and the authors. All rights reserved.
00078 
00079 Authors: Tero Hasu <tero.hasu@hut.fi>
00080 
00081 Permission is hereby granted, free of charge, to any person
00082 obtaining a copy of this software and associated documentation files
00083 (the "Software"), to deal in the Software without restriction,
00084 including without limitation the rights to use, copy, modify, merge,
00085 publish, distribute, sublicense, and/or sell copies of the Software,
00086 and to permit persons to whom the Software is furnished to do so,
00087 subject to the following conditions:
00088 
00089 The above copyright notice and this permission notice shall be
00090 included in all copies or substantial portions of the Software.
00091 
00092 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00093 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00094 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00095 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
00096 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
00097 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00098 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00099 SOFTWARE.
00100 
00101  **/

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