ITerminalView.h

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