00001 #ifndef ROC_AbbContext 00002 #define ROC_AbbContext 00003 00004 #ifndef DABC_Object 00005 #include "dabc/Object.h" 00006 #endif 00007 00008 namespace abbdaemon { 00009 class ABBdaemonClient; 00010 } 00011 00012 00013 namespace roc { 00014 00015 class AbbContextRef; 00016 00017 class AbbContext : public dabc::Object { 00018 00019 friend class AbbContextRef; 00020 00021 protected: 00022 00023 abbdaemon::ABBdaemonClient* fDaemon; 00024 00025 AbbContext(); 00026 00027 public: 00028 00029 virtual ~AbbContext(); 00030 }; 00031 00032 00033 class AbbContextRef : public dabc::Reference { 00034 00035 static bool transient_refs() { return false; } 00036 00037 DABC_REFERENCE(AbbContextRef, dabc::Reference, AbbContext) 00038 00039 public: 00040 00041 bool CreateDaemon(); 00042 00043 abbdaemon::ABBdaemonClient* daemon() const { return GetObject() ? GetObject()->fDaemon : 0; } 00044 }; 00045 00046 00047 } 00048 00049 #endif