5 #ifndef CMR_SERVICE_INCLUDED
6 #define CMR_SERVICE_INCLUDED
50 Impl*
get()
const {
return impl_; }
54 long publish(
const PService& service);
58 long unpublish(
const PService& service);
62 bool add_listener(
const AChar* spec);
66 bool add_listener(
const PListener& listener);
71 bool remove_listener(
const AChar* spec);
76 bool remove_listener(
const PListener& listener);
89 PService getMyService(
const char* className,
const char* name);
101 static PService getService(
const char* className,
const char* name);
191 const AString& get_name()
const;
195 void set_name(
const AChar* name);
199 const AString& get_class_name()
const;
203 virtual long connect(
const AChar* user_name,
const AChar* password);
209 AString get_session_id()
const;
213 void set_session_id(
const AChar* session_id);
219 Tuple* get_session_context_ptr(
bool createIfNeeded =
false);
225 virtual bool get_session_context(
Tuple& t);
229 virtual void set_session_context(
const Tuple& sessionContext);
235 virtual bool get_self_session_context(
Tuple& t)
const;
236 virtual void set_self_session_context();
263 virtual long call(
const Tuple& inArgs,
Tuple& outArgs);
267 virtual long call(
const AChar* interface_name,
const Tuple& inArgs,
Tuple& outArgs);
271 virtual long call(
const AChar* interface_name,
const Tuple& inArgs,
Tuple& outArgs,
const Tuple* param);
276 long call(
Tuple& sessionContext,
const AChar* interface_name,
const Tuple& inArgs,
Tuple& outArgs);
345 virtual long call(
const Tuple& inArgs,
Tuple& outArgs);
346 virtual long call(
const AChar* interface_name,
const Tuple& inArgs,
Tuple& outArgs);
347 virtual long call(
const AChar* interface_name,
const Tuple& inArgs,
Tuple& outArgs,
const Tuple* param);
357 bool check_connection();
415 service->set_name(name);
const AString & get_class_name() const
Definition: Service.h:378
Definition: Interface.h:117
AutoRef< Interface > PInterface
Definition: Interface.h:14
Definition: Service.h:133
A commore::Service is an object that mimics an object in an object oriented system : it has a class n...
Definition: Service.h:122
Definition: Interface.h:31
AutoRef< ProxyService > PProxyService
Definition: Service.h:359
bool is_proxy() const
Definition: Service.h:343
Definition: Service.h:405
virtual bool is_oneway()
Definition: Service.h:147
AutoRef< Service > PService
Definition: Interface.h:18
Definition: AutoRefBase.h:18
char AChar
Definition: Type.h:65
ServiceFactory * PServiceFactory
Definition: Service.h:22
#define CMREXD
Definition: Compiler.h:22
Impl * get_impl() const
Definition: Service.h:49
Definition: ServiceManager.h:26
Definition: Service.h:338
InterfaceFactory * PInterfaceFactory
Definition: Service.h:24
PService create(const AChar *class_name, const AChar *name, const AChar *args)
Definition: Service.h:412
Definition: Service.h:365
AutoRef is a smart pointer on RefObject objects. AutoRef is templatized with the type of the pointed ...
Definition: AutoRef.h:86
DefaultServiceFactory(bool noregister=false)
Definition: Service.h:408
PService get_service()
Definition: Service.h:187
Definition: AutoRef.h:270
CMREXD int init()
Definition: Commore.cpp:17