IProcessManager.h

Go to the documentation of this file.
00001 /*========================================================== */ 
00002 // header file automatically generated by PIDGEN - DO NOT MODIFY
00003 /*========================================================== */ 
00004 
00005 #ifndef SUPPORT_IPROCESSMANAGER_H
00006 #define SUPPORT_IPROCESSMANAGER_H
00007 
00008 #include <support/IInterface.h>
00009 #include <support/Binder.h>
00010 #include <support/Context.h>
00011 #include <support/String.h>
00012 
00013 /*
00014  * Copyright (c) 2005 Palmsource, Inc.
00015  * 
00016  * This software is licensed as described in the file LICENSE, which
00017  * you should have received as part of this distribution. The terms
00018  * are also available at http://www.openbinder.org/license.html.
00019  * 
00020  * This software consists of voluntary contributions made by many
00021  * individuals. For the exact contribution history, see the revision
00022  * history and logs, available at http://www.openbinder.org
00023  */
00024 #include <support/IProcess.h>
00025 
00026 /* ============= Forward Declarations =========================== */
00027 
00028 #if _SUPPORTS_NAMESPACE
00029 namespace palmos {
00030 namespace support {
00031 #endif /* _SUPPORTS_NAMESPACE */
00032 
00033 class INode;
00034 
00035 /* ============= Interface Class Declarations =========================== */
00036 
00038 
00051 class IProcessManager : public IInterface
00052 {
00053 public:
00054     B_DECLARE_META_INTERFACE(ProcessManager)
00055     
00056     
00057     /* ------- Methods ------------------------ */
00058     
00059     
00060 
00091     virtual sptr<IBinder>           NewIfRemote(const sptr<INode>& context, const SString& component, const SValue& args, uint32_t flags, const sptr<IProcess>& caller, SValue* componentInfo, status_t* status = NULL) = 0;
00092     
00093     /* ------- inline helpers ------------------------- */
00094     status_t LinkProcessManager(const sptr<IBinder>& to, const SValue& mappings, uint32_t flags = 0)
00095     {
00096         return AsBinder()->Link(to, mappings, flags);
00097     }
00098     status_t UnlinkProcessManager(const sptr<IBinder>& to, const SValue& mappings, uint32_t flags = 0)
00099     {
00100         return AsBinder()->Unlink(to, mappings, flags);
00101     }
00102 
00103 protected:
00104                                     IProcessManager() { }
00105     virtual                         ~IProcessManager();
00106 
00107 private:
00108     /* ------- copy/assignment protection ------------------ */
00109                                     IProcessManager(const IProcessManager& o);
00110             IProcessManager&        operator=(const IProcessManager& o);
00111 };
00112 
00113 
00114 /* ============= Local Class Declarations =============================== */
00115 
00116 class BnProcessManager : public IProcessManager, public BBinder
00117 {
00118 public:
00119     virtual SValue                  Inspect(const sptr<IBinder>& caller, const SValue& which, uint32_t flags = 0);
00120     virtual sptr<IInterface>        InterfaceFor(const SValue& descriptor, uint32_t flags = 0);
00121 
00122 protected:
00123                                     BnProcessManager();
00124                                     BnProcessManager(const SContext& context);
00125     virtual                         ~BnProcessManager();
00126     
00127     virtual sptr<IBinder>           AsBinderImpl();
00128     virtual sptr<const IBinder>     AsBinderImpl() const;
00129     
00130     /* ------- Marshalling Details ------------ */
00131     virtual status_t                HandleEffect(const SValue &, const SValue &, const SValue &, SValue *);
00132     virtual status_t                Transact(uint32_t code, SParcel& data, SParcel* reply, uint32_t flags);
00133 
00134 private:
00135                                     BnProcessManager(const BnProcessManager& o);
00136             BnProcessManager&       operator=(const BnProcessManager& o);
00137 };
00138 
00139 
00140 #if _SUPPORTS_NAMESPACE
00141 } } // namespace palmos::support
00142 #endif /* _SUPPORTS_NAMESPACE */
00143 
00144 
00145 // namespace palmos::support
00146 
00147 #endif // SUPPORT_IPROCESSMANAGER_H
00148