00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _REMOTEMETAOBJECT_HH_
00024 #define _REMOTEMETAOBJECT_HH_
00025
00026
00027
00028
00029
00030 #include <vos/corelibs/vos/vosdefs.hh>
00031 #include <vos/corelibs/vos/metaobject.hh>
00032 #include <vos/corelibs/vos/remotevobject.hh>
00033
00034 namespace VOS
00035 {
00036
00037
00038
00039
00040
00041
00042 class VOS_API RemoteMetaObject : public virtual MetaObject, public virtual RemoteVobject
00043 {
00044 protected:
00045 RemoteMetaObject(const string& name, RemoteSite* remotesite);
00046 public:
00047 virtual ~RemoteMetaObject();
00048
00049 virtual const string& getName();
00050 virtual Site& getSite();
00051 virtual const URL& getURL();
00052 virtual bool isLocal();
00053 virtual bool isRemote();
00054 virtual const TypeSet& getTypes()
00055 throw (AccessControlError, RemoteError);
00056 virtual void addType(const string& s);
00057 virtual const ParentSet& getParents()
00058 throw (AccessControlError, RemoteError);
00059 virtual const ChildList& getChildren()
00060 throw (AccessControlError, RemoteError);
00061
00062 virtual void sendMessage(Message* m);
00063 virtual void sendMessage(MessageBlock* m);
00064 virtual Message* receiveMessage() throw (MessageQueueEmptyError);
00065 virtual bool hasMessageAvailable();
00066
00067 virtual void handleNewType(const string& t);
00068
00069 virtual void sendUpdateMessage(Message* m);
00070 virtual Message* receiveUpdateMessage() throw (MessageQueueEmptyError);
00071 virtual bool hasUpdateMessageAvailable();
00072
00073 virtual Vobject& findObject(const string& path) throw (NoSuchSiteError, NoSuchObjectError,
00074 URL::BadURLError, AccessControlError, RemoteError);
00075 virtual Vobject::ParentChildRelation& findChild(const string& path)
00076 throw (NoSuchObjectError, AccessControlError, RemoteError);
00077 virtual Vobject::ParentChildRelation& findParent(Vobject& parent)
00078 throw (NoSuchObjectError, AccessControlError, RemoteError);
00079 virtual void setChild(int position, const string& contextual_name, Vobject* child)
00080 throw (AccessControlError, RemoteError);
00081 virtual void insertChild(int position, const string& contextual_name, Vobject* child)
00082 throw (AccessControlError, RemoteError);
00083 virtual void removeChild(int position)
00084 throw (AccessControlError, RemoteError);
00085
00086 virtual void addTypeListener(TypeChangeListener* tl, bool notifyImmediately = true);
00087 virtual void addParentListener(ParentChangeListener* pl, bool notifyImmediately = true);
00088 virtual void addChildListener(ChildChangeListener* cl, bool notifyImmediately = true);
00089 virtual void removeTypeListener(TypeChangeListener* tl);
00090 virtual void removeParentListener(ParentChangeListener* pl);
00091 virtual void removeChildListener(ChildChangeListener* cl);
00092
00093 virtual void saveState(MessageBlock& output, set<string>& types, bool portable);
00094
00095 virtual void addFlag(const string& flag);
00096 virtual void removeFlag(const string& flag);
00097 virtual bool checkFlag(const string& flag);
00098
00099 virtual void excise();
00100 virtual void acquire();
00101 virtual void release();
00102 virtual int getCount();
00103
00104 friend class RemoteSite;
00105 };
00106 }
00107
00108 #endif