ICatalogPermissions.h

Go to the documentation of this file.
00001 /*========================================================== */ 
00002 // header file automatically generated by PIDGEN - DO NOT MODIFY
00003 /*========================================================== */ 
00004 
00005 #ifndef SUPPORT_ICATALOGPERMISSIONS_H
00006 #define SUPPORT_ICATALOGPERMISSIONS_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  */
00029 #include <support/ICatalog.h>
00030 
00031 /* ============= Interface Class Declarations =========================== */
00032 
00033 #if _SUPPORTS_NAMESPACE
00034 namespace palmos {
00035 namespace support {
00036 #endif /* _SUPPORTS_NAMESPACE */
00037 
00039 
00049 class ICatalogPermissions : public IInterface
00050 {
00051 public:
00052     B_DECLARE_META_INTERFACE(CatalogPermissions)
00053     
00054     
00055     /* ------- Properties --------------------- */
00056     
00057     virtual bool                    Writable() const = 0;
00058     virtual void                    SetWritable(bool value) = 0;
00059     
00060     /* ------- Methods ------------------------ */
00061     
00063     virtual status_t                HideEntry(const SString& name) = 0;
00064     
00066     virtual status_t                ShowEntry(const SString& name) = 0;
00067     
00069 
00072     virtual status_t                OverlayEntry(const SString& location, const SValue& item) = 0;
00073     
00075     virtual status_t                RestoreEntry(const SString& location) = 0;
00076     
00077     virtual status_t                Merge(const sptr<ICatalog>& catalog) = 0;
00078     
00079     /* ------- inline helpers ------------------------- */
00080     status_t LinkCatalogPermissions(const sptr<IBinder>& to, const SValue& mappings, uint32_t flags = 0)
00081     {
00082         return AsBinder()->Link(to, mappings, flags);
00083     }
00084     status_t UnlinkCatalogPermissions(const sptr<IBinder>& to, const SValue& mappings, uint32_t flags = 0)
00085     {
00086         return AsBinder()->Unlink(to, mappings, flags);
00087     }
00088 
00089 protected:
00090                                     ICatalogPermissions() { }
00091     virtual                         ~ICatalogPermissions();
00092 
00093 private:
00094     /* ------- copy/assignment protection ------------------ */
00095                                     ICatalogPermissions(const ICatalogPermissions& o);
00096             ICatalogPermissions&    operator=(const ICatalogPermissions& o);
00097 };
00098 
00099 
00100 /* ============= Local Class Declarations =============================== */
00101 
00102 class BnCatalogPermissions : public ICatalogPermissions, public BBinder
00103 {
00104 public:
00105     virtual SValue                  Inspect(const sptr<IBinder>& caller, const SValue& which, uint32_t flags = 0);
00106     virtual sptr<IInterface>        InterfaceFor(const SValue& descriptor, uint32_t flags = 0);
00107     
00108     /* ------- Push Properties ---------------- */
00109 public:
00110             void                    PushWritable(bool value);
00111 
00112 protected:
00113                                     BnCatalogPermissions();
00114                                     BnCatalogPermissions(const SContext& context);
00115     virtual                         ~BnCatalogPermissions();
00116     
00117     virtual sptr<IBinder>           AsBinderImpl();
00118     virtual sptr<const IBinder>     AsBinderImpl() const;
00119     
00120     /* ------- Marshalling Details ------------ */
00121     virtual status_t                HandleEffect(const SValue &, const SValue &, const SValue &, SValue *);
00122     virtual status_t                Transact(uint32_t code, SParcel& data, SParcel* reply, uint32_t flags);
00123 
00124 private:
00125                                     BnCatalogPermissions(const BnCatalogPermissions& o);
00126             BnCatalogPermissions&   operator=(const BnCatalogPermissions& o);
00127 };
00128 
00129 
00130 #if _SUPPORTS_NAMESPACE
00131 } } // namespace palmos::support
00132 #endif /* _SUPPORTS_NAMESPACE */
00133 
00134 
00135 // namespace palmos::support
00136 
00137 #endif // SUPPORT_ICATALOGPERMISSIONS_H
00138