InstantiateComponent.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2005 Palmsource, Inc.
00003  * 
00004  * This software is licensed as described in the file LICENSE, which
00005  * you should have received as part of this distribution. The terms
00006  * are also available at http://www.openbinder.org/license.html.
00007  * 
00008  * This software consists of voluntary contributions made by many
00009  * individuals. For the exact contribution history, see the revision
00010  * history and logs, available at http://www.openbinder.org
00011  */
00012 
00013 #ifndef _B_SUPPORT_INSTANTIATECOMPONENT
00014 #define _B_SUPPORT_INSTANTIATECOMPONENT
00015 
00021 #include <support/IBinder.h>
00022 #include <support/String.h>
00023 #include <support/Context.h>
00024 
00029 #if TARGET_HOST == TARGET_HOST_PALMOS
00030 #include <CmnLaunchCodes.h>
00031 #else
00032 #define sysPackageLaunchGetInstantiate          72
00033 #endif
00034 
00035 #if _SUPPORTS_NAMESPACE
00036 namespace palmos {
00037 namespace support {
00038 #endif
00039 
00040 typedef sptr<IBinder> (*instantiate_component_func)(const SString& component,
00041                                                     const SContext& context,
00042                                                     const SValue &args);
00043 
00044 struct SysPackageLaunchGetInstantiateType
00045 {
00046     size_t                      size;
00047     instantiate_component_func  out_instantiate;
00048 };
00049 
00050 #if _SUPPORTS_NAMESPACE
00051 } } // namespace palmos::support
00052 #endif
00053 
00055 extern "C"
00056 BNS(palmos::support::) sptr<BNS(palmos::support::)IBinder>
00057 InstantiateComponent(   const BNS(palmos::support::) SString& component,
00058                         const BNS(palmos::support::) SContext& context,
00059                         const BNS(palmos::support::) SValue& args);
00060 
00061 
00064 #endif // _B_SUPPORT_INSTANTIATECOMPONENT