00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _REMOTEVOBJECT_HH_
00024 #define _REMOTEVOBJECT_HH_
00025
00026
00027
00028
00029
00030 #include <vos/corelibs/vos/vosdefs.hh>
00031 #include <vos/corelibs/vos/vobject.hh>
00032
00033 namespace VOS
00034 {
00035 class Message;
00036 class RemoteSite;
00037 class LocalSite;
00038
00039
00040
00041
00042
00043 class VOS_API RemoteVobject : public virtual VobjectImplementation
00044 {
00045 private:
00046 void addChildUpdateHandler(Message* m);
00047 void addParentUpdateHandler(Message* m);
00048 void removeChildUpdateHandler(Message* m);
00049 void removeParentUpdateHandler(Message* m);
00050 void typeUpdateHandler(Message* m);
00051 void addListenerReplyHandler(Message* m);
00052
00053 bool resetChildren;
00054 protected:
00055 RemoteVobject(const string& name, RemoteSite* remotesite);
00056 public:
00057 virtual ~RemoteVobject();
00058
00059 virtual void sendMessage(Message* m);
00060 virtual void sendMessage(MessageBlock* m);
00061 virtual void sendUpdateMessage(Message* m);
00062 virtual const ChildList& getChildren()
00063 throw (AccessControlError, RemoteError);
00064 virtual const ParentSet& getParents()
00065 throw (AccessControlError, RemoteError);
00066 virtual const TypeSet& getTypes()
00067 throw (AccessControlError, RemoteError);
00068
00069 virtual Vobject& findObject(const string& path)
00070 throw (NoSuchSiteError, NoSuchObjectError, URL::BadURLError, AccessControlError, RemoteError);
00071
00072 virtual Vobject::ParentChildRelation& findChild(const string& path)
00073 throw (NoSuchObjectError, AccessControlError, RemoteError);
00074 virtual void setChild(int position, const string& contextual_name, Vobject* child)
00075 throw (AccessControlError, RemoteError);
00076 virtual void insertChild(int position, const string& contextual_name, Vobject* child)
00077 throw (AccessControlError, RemoteError);
00078 virtual void removeChild(int position)
00079 throw (AccessControlError, RemoteError);
00080 virtual void addType(const string& type);
00081
00082 virtual void addTypeListener(TypeChangeListener* tl, bool notifyImmediately = true);
00083 virtual void addParentListener(ParentChangeListener* pl, bool notifyImmediately = true);
00084 virtual void addChildListener(ChildChangeListener* cl, bool notifyImmediately = true);
00085 virtual void removeTypeListener(TypeChangeListener* tl);
00086 virtual void removeParentListener(ParentChangeListener* pl);
00087 virtual void removeChildListener(ChildChangeListener* cl);
00088
00089 virtual void acquire();
00090 virtual void release();
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 static LocalSite& initFields(Vobject* v, Message* m, const string& method, bool withnonce);
00122 };
00123 }
00124
00125 #endif