INib.h

Go to the documentation of this file.
00001 /*========================================================== */ 
00002 // header file automatically generated by PIDGEN - DO NOT MODIFY
00003 /*========================================================== */ 
00004 
00005 #ifndef SUPPORT_INIB_H
00006 #define SUPPORT_INIB_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 
00025 /* ============= Interface Class Declarations =========================== */
00026 
00027 #if _SUPPORTS_NAMESPACE
00028 namespace palmos {
00029 namespace support {
00030 #endif /* _SUPPORTS_NAMESPACE */
00031 
00032 class INib : public IInterface
00033 {
00034 public:
00035     B_DECLARE_META_INTERFACE(Nib)
00036     
00037     
00038     /* ------- Methods ------------------------ */
00039     
00040     virtual SValue                  ListProperties() = 0;
00041     
00042     virtual SValue                  GetProperty(const SValue& values) = 0;
00043     
00044     virtual status_t                PutProperty(const SValue& values) = 0;
00045     
00046     virtual status_t                RemoveProperty(const SValue& values) = 0;
00047     
00048     /* ------- inline helpers ------------------------- */
00049     status_t LinkNib(const sptr<IBinder>& to, const SValue& mappings, uint32_t flags = 0)
00050     {
00051         return AsBinder()->Link(to, mappings, flags);
00052     }
00053     status_t UnlinkNib(const sptr<IBinder>& to, const SValue& mappings, uint32_t flags = 0)
00054     {
00055         return AsBinder()->Unlink(to, mappings, flags);
00056     }
00057 
00058 protected:
00059                                     INib() { }
00060     virtual                         ~INib();
00061 
00062 private:
00063     /* ------- copy/assignment protection ------------------ */
00064                                     INib(const INib& o);
00065             INib&                   operator=(const INib& o);
00066 };
00067 
00068 
00069 /* ============= Local Class Declarations =============================== */
00070 
00071 class BnNib : public INib, public BBinder
00072 {
00073 public:
00074     virtual SValue                  Inspect(const sptr<IBinder>& caller, const SValue& which, uint32_t flags = 0);
00075     virtual sptr<IInterface>        InterfaceFor(const SValue& descriptor, uint32_t flags = 0);
00076 
00077 protected:
00078                                     BnNib();
00079                                     BnNib(const SContext& context);
00080     virtual                         ~BnNib();
00081     
00082     virtual sptr<IBinder>           AsBinderImpl();
00083     virtual sptr<const IBinder>     AsBinderImpl() const;
00084     
00085     /* ------- Marshalling Details ------------ */
00086     virtual status_t                HandleEffect(const SValue &, const SValue &, const SValue &, SValue *);
00087     virtual status_t                Transact(uint32_t code, SParcel& data, SParcel* reply, uint32_t flags);
00088 
00089 private:
00090                                     BnNib(const BnNib& o);
00091             BnNib&                  operator=(const BnNib& o);
00092 };
00093 
00094 
00095 #if _SUPPORTS_NAMESPACE
00096 } } // namespace palmos::support
00097 #endif /* _SUPPORTS_NAMESPACE */
00098 
00099 
00100 // namespace palmos::support
00101 
00102 #endif // SUPPORT_INIB_H
00103