/home/tetron/hack/vos/libs/vos/vos/localsite.hh
Go to the documentation of this file.00001
00002
00003 #ifndef _LOCALSITE_HH_
00004 #define _LOCALSITE_HH_
00005
00006 #include <vos/vos/localvobject.hh>
00007 #include <vos/vos/siteextension.hh>
00008 #include <vos/vos/remotesite.hh>
00009
00010 namespace VOS {
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 class VOS_API LocalSite : public LocalVobject
00021 {
00022 public:
00023 LocalSite(VobjectBase* superobject);
00024 void createVobjectHandler(Message* m);
00025 void getCurrentIdentityHandler(Message* m);
00026 void renameVobjectHandler(Message* m);
00027 };
00028
00029 class VOS_API LocalSiteExtension : public SiteExtension
00030 {
00031 private:
00032 boost::mutex antiSpoofMap_mutex;
00033 std::map<std::string, std::string> antiSpoofMap;
00034 Site* site;
00035 bool clientOnlyMode;
00036
00037 protected:
00038 VUtil::URL url;
00039
00040 public:
00041 LocalSiteExtension();
00042
00043 virtual ~LocalSiteExtension() { }
00044
00045
00046
00047
00048
00049
00050 void setAntiSpoofIDMapping(const std::string& recv, const std::string& sent);
00051
00052
00053
00054
00055
00056 const std::string& getAntiSpoofIDMapping(const std::string& recv);
00057
00058
00059 void spoofCheckHandler(Message* m);
00060
00061
00062 void errorMsgHandler(Message* m);
00063
00064 virtual void siteExtensionAttachedTo(Site* st);
00065
00066
00067 VUtil::vRef<Site> getSite() const { return VUtil::vRef<Site>(site, true); }
00068
00069
00070
00071
00072
00073 void setClientOnlyMode(bool com) { clientOnlyMode = com; }
00074
00075
00076
00077
00078
00079 bool getClientOnlyMode() { return clientOnlyMode; }
00080
00081
00082
00083
00084
00085 virtual void addRemoteSite(VOS::RemoteSiteExtension* rs) = 0;
00086
00087
00088
00089
00090
00091 virtual void removeRemoteSite(VOS::RemoteSiteExtension* rs) = 0;
00092 };
00093 }
00094
00095 #endif