IIterable.h

Go to the documentation of this file.
00001 /*========================================================== */ 
00002 // header file automatically generated by PIDGEN - DO NOT MODIFY
00003 /*========================================================== */ 
00004 
00005 #ifndef SUPPORT_IITERABLE_H
00006 #define SUPPORT_IITERABLE_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/IIterator.h>
00030 
00031 /* ============= Interface Class Declarations =========================== */
00032 
00033 #if _SUPPORTS_NAMESPACE
00034 namespace palmos {
00035 namespace support {
00036 #endif /* _SUPPORTS_NAMESPACE */
00037 
00039 
00056 class IIterable : public IInterface
00057 {
00058 public:
00059     B_DECLARE_META_INTERFACE(Iterable)
00060     
00061     
00062     /* ------- Methods ------------------------ */
00063     
00064     
00065 
00066 
00121     virtual sptr<IIterator>         NewIterator(const SValue& args = B_UNDEFINED_VALUE, status_t* error = NULL) = 0;
00122     
00123     /* ------- inline helpers ------------------------- */
00124     status_t LinkIterable(const sptr<IBinder>& to, const SValue& mappings, uint32_t flags = 0)
00125     {
00126         return AsBinder()->Link(to, mappings, flags);
00127     }
00128     status_t UnlinkIterable(const sptr<IBinder>& to, const SValue& mappings, uint32_t flags = 0)
00129     {
00130         return AsBinder()->Unlink(to, mappings, flags);
00131     }
00132 
00133 protected:
00134                                     IIterable() { }
00135     virtual                         ~IIterable();
00136 
00137 private:
00138     /* ------- copy/assignment protection ------------------ */
00139                                     IIterable(const IIterable& o);
00140             IIterable&              operator=(const IIterable& o);
00141 };
00142 
00143 
00144 /* ============= Local Class Declarations =============================== */
00145 
00146 class BnIterable : public IIterable, public BBinder
00147 {
00148 public:
00149     virtual SValue                  Inspect(const sptr<IBinder>& caller, const SValue& which, uint32_t flags = 0);
00150     virtual sptr<IInterface>        InterfaceFor(const SValue& descriptor, uint32_t flags = 0);
00151 
00152 protected:
00153                                     BnIterable();
00154                                     BnIterable(const SContext& context);
00155     virtual                         ~BnIterable();
00156     
00157     virtual sptr<IBinder>           AsBinderImpl();
00158     virtual sptr<const IBinder>     AsBinderImpl() const;
00159     
00160     /* ------- Marshalling Details ------------ */
00161     virtual status_t                HandleEffect(const SValue &, const SValue &, const SValue &, SValue *);
00162     virtual status_t                Transact(uint32_t code, SParcel& data, SParcel* reply, uint32_t flags);
00163 
00164 private:
00165                                     BnIterable(const BnIterable& o);
00166             BnIterable&             operator=(const BnIterable& o);
00167 };
00168 
00169 
00170 #if _SUPPORTS_NAMESPACE
00171 } } // namespace palmos::support
00172 #endif /* _SUPPORTS_NAMESPACE */
00173 
00174 
00175 // namespace palmos::support
00176 
00177 #endif // SUPPORT_IITERABLE_H
00178