Service Information =================== Every service knows its name, type, url and id. The name and type are set by the service itself. The url is provided by the :ref:`Directory Services `. The id is provided by the :ref:`Local Session Service `. When developing a service you should set the service information as soon as it is known at `OTCore/ThisService.h` as shown in the example below. .. code-block:: c++ #include "OTCore/ThisService.h" void foo() { ot::ThisService::instance().setServiceName(""); ot::ThisService::instance().setServiceType(""); ot::ThisService::instance().setServiceURL(""); ot::ThisService::instance().setServiceID(); } .. note:: Note that services that use the `OTServiceFoundation` api don't have to setup the `ThisService` information.