bool success = false;
if (getUid() == SYSTEM_UID) {
+ _D("Call %s.%s", action->getInterface().c_str(), action->getMethodName().c_str());
success = caller.call(action->getBusName(), action->getObjectPath(),
action->getInterface(), action->getMethodName(), action->getParameters());
} else {
+ _D("Call %s.%s of %u", action->getInterface().c_str(), action->getMethodName().c_str(), static_cast<unsigned>(getUid()));
success = caller.call(action->getBusName(), action->getObjectPath(),
action->getInterface(), action->getMethodName(), action->getParameters(),
getUid());
void ContextPublisher::addObserver(IContextObserver* observer, void* userData)
{
+ _D("%p observes %s", observer, getUri());
+
if (__observers.empty()) {
read();
subscribe();
void ContextPublisher::removeObserver(IContextObserver* observer)
{
+ _D("%p stops observing %s", observer, getUri());
+
__observers.remove_if(
[&](const ObserverInfo& info)->bool {
return (info.observer == observer);
void ContextPublisher::notifyObservers()
{
+ _D("%s notifies", getUri());
+
auto observers = __observers;
for (auto& info : observers) {
#include <IClient.h>
#include <JobInfo.h>
-#define _ENTER _I("ENTER: Job-%d of '%s'", getJobId(), getOwner().c_str())
-#define _EXIT _D("EXIT : Job-%d of '%s'", getJobId(), getOwner().c_str())
+#define _ENTER _I("Create State %p: Job-%d of '%s'", this, getJobId(), getOwner().c_str())
+#define _EXIT _D("Destroy State %p: Job-%d of '%s'", this, getJobId(), getOwner().c_str())
namespace ctx {