Commit 470e483e authored by Jacob Gladish's avatar Jacob Gladish

Merge pull request #3 from brendanlong/blong/finish-alljoyn

Expose AllJoyn devices
parents b0429f75 786e4704
#include "Adapters/MockAdapter/MockAdapter.h" #include "MockAdapter.h"
#include "Adapters/MockAdapter/MockDevices.h"
#include "Adapters/MockAdapter/MockAdapterDevice.h" #include "MockDevices.h"
#include "MockAdapterDevice.h"
#include "Common/Log.h"
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
namespace namespace
{ {
DSB_DECLARE_LOGNAME(MockAdapter);
bridge::IAdapter::RegistrationHandle nextHandle = 0; bridge::IAdapter::RegistrationHandle nextHandle = 0;
bridge::IAdapter::RegistrationHandle GetNextRegistrationHandle() bridge::IAdapter::RegistrationHandle GetNextRegistrationHandle()
{ {
...@@ -26,6 +29,7 @@ adapters::mock::MockAdapter::MockAdapter() ...@@ -26,6 +29,7 @@ adapters::mock::MockAdapter::MockAdapter()
adapters::mock::MockAdapter::~MockAdapter() adapters::mock::MockAdapter::~MockAdapter()
{ {
Shutdown();
} }
std::string std::string
...@@ -82,7 +86,18 @@ adapters::mock::MockAdapter::Initialize() ...@@ -82,7 +86,18 @@ adapters::mock::MockAdapter::Initialize()
int32_t int32_t
adapters::mock::MockAdapter::Shutdown() adapters::mock::MockAdapter::Shutdown()
{ {
return ER_NOT_IMPLEMENTED; m_vendor.clear();
m_adapterName.clear();
m_version.clear();
m_exposedAdapterPrefix.clear();
m_exposedApplicationName.clear();
m_exposedApplicationGuid.clear();
m_devices.clear();
m_signals.clear();
m_signalListeners.clear();
return ER_OK;
} }
......
...@@ -322,13 +322,12 @@ bridge::AllJoynHelper::EncodeStringForInterfaceName(std::string const& s, std::s ...@@ -322,13 +322,12 @@ bridge::AllJoynHelper::EncodeStringForInterfaceName(std::string const& s, std::s
t = TrimChar(t, '.'); t = TrimChar(t, '.');
} }
void std::string
bridge::AllJoynHelper::EncodeStringForServiceName(std::string const& s, std::string &t) bridge::AllJoynHelper::EncodeStringForServiceName(std::string const& s)
{ {
std::string t;
std::string temp; std::string temp;
t.clear();
for (char ch : s) for (char ch : s)
{ {
if (std::isalpha(ch)) if (std::isalpha(ch))
...@@ -341,15 +340,15 @@ bridge::AllJoynHelper::EncodeStringForServiceName(std::string const& s, std::str ...@@ -341,15 +340,15 @@ bridge::AllJoynHelper::EncodeStringForServiceName(std::string const& s, std::str
t += '_'; t += '_';
t += temp; t += temp;
} }
return t;
} }
void std::string
bridge::AllJoynHelper::EncodeStringForRootServiceName(std::string const& s, std::string &t) bridge::AllJoynHelper::EncodeStringForRootServiceName(std::string const& s)
{ {
std::string t;
char curr = '\0'; char curr = '\0';
t.clear();
for (char ch : s) for (char ch : s)
{ {
if (std::isalpha(ch) || ch == '.') if (std::isalpha(ch) || ch == '.')
...@@ -367,18 +366,19 @@ bridge::AllJoynHelper::EncodeStringForRootServiceName(std::string const& s, std: ...@@ -367,18 +366,19 @@ bridge::AllJoynHelper::EncodeStringForRootServiceName(std::string const& s, std:
} }
t = TrimChar(t, '.'); t = TrimChar(t, '.');
return t;
} }
void std::string
bridge::AllJoynHelper::EncodeStringForAppName(std::string const& s, std::string &t) bridge::AllJoynHelper::EncodeStringForAppName(std::string const& s)
{ {
t.clear(); std::string t;
for (char ch : s) for (char ch : s)
{ {
if (std::isalnum(ch)) if (std::isalnum(ch))
t += ch; t += ch;
} }
return t;
} }
std::string std::string
......
...@@ -33,9 +33,9 @@ namespace bridge ...@@ -33,9 +33,9 @@ namespace bridge
static void EncodeBusObjectName(std::string const& s, std::string &builtName); static void EncodeBusObjectName(std::string const& s, std::string &builtName);
static void EncodePropertyOrMethodOrSignalName(std::string const& s, std::string &builtName); static void EncodePropertyOrMethodOrSignalName(std::string const& s, std::string &builtName);
static void EncodeStringForInterfaceName(std::string const& s, std::string& encoded); static void EncodeStringForInterfaceName(std::string const& s, std::string& encoded);
static void EncodeStringForServiceName(std::string const& s, std::string &encoded); static std::string EncodeStringForServiceName(std::string const&);
static void EncodeStringForRootServiceName(std::string const& s, std::string &encoded); static std::string EncodeStringForRootServiceName(std::string const&);
static void EncodeStringForAppName(std::string const& s, std::string &encodeString); static std::string EncodeStringForAppName(std::string const&);
static std::string TrimChar(std::string const& s, char c); static std::string TrimChar(std::string const& s, char c);
}; };
......
...@@ -46,7 +46,7 @@ bridge::DeviceSystemBridge::Initialize() ...@@ -46,7 +46,7 @@ bridge::DeviceSystemBridge::Initialize()
st = AllJoynInit(); st = AllJoynInit();
if (st != ER_OK) if (st != ER_OK)
{ {
DSBLOG_WARN("Failed to initialize AllJoyn: 0x%x", st); DSBLOG_WARN("Failed to initialize AllJoyn: %s", QCC_StatusText(st));
goto Leave; goto Leave;
} }
m_alljoynInitialized = true; m_alljoynInitialized = true;
...@@ -77,7 +77,7 @@ bridge::DeviceSystemBridge::InitializeInternal() ...@@ -77,7 +77,7 @@ bridge::DeviceSystemBridge::InitializeInternal()
st = InitializeAdapter(); st = InitializeAdapter();
if (st != ER_OK) if (st != ER_OK)
{ {
DSBLOG_WARN("Failed to intialize adapter: 0x%x", st); DSBLOG_WARN("Failed to intialize adapter: %s", QCC_StatusText(st));
goto Leave; goto Leave;
} }
...@@ -90,14 +90,14 @@ bridge::DeviceSystemBridge::InitializeInternal() ...@@ -90,14 +90,14 @@ bridge::DeviceSystemBridge::InitializeInternal()
st = InitializeDevices(); st = InitializeDevices();
if (st != ER_OK) if (st != ER_OK)
{ {
DSBLOG_WARN("Failed to initialize devices: 0x%x", st); DSBLOG_WARN("Failed to initialize devices: %s", QCC_StatusText(st));
goto Leave; goto Leave;
} }
st = RegisterAdapterSignalHandlers(true); st = RegisterAdapterSignalHandlers(true);
if (st != ER_OK) if (st != ER_OK)
{ {
DSBLOG_WARN("Failed to register adapter signal handlers: 0x%x", st); DSBLOG_WARN("Failed to register adapter signal handlers: %s", QCC_StatusText(st));
goto Leave; goto Leave;
} }
...@@ -113,7 +113,7 @@ bridge::DeviceSystemBridge::Shutdown() ...@@ -113,7 +113,7 @@ bridge::DeviceSystemBridge::Shutdown()
st = ShutdownInternal(); st = ShutdownInternal();
if (st != ER_OK) if (st != ER_OK)
{ {
DSBLOG_WARN("failed to shutdown internal: 0x%x", st); DSBLOG_WARN("failed to shutdown internal: %s", QCC_StatusText(st));
return st; return st;
} }
...@@ -234,7 +234,7 @@ bridge::DeviceSystemBridge::RegisterAdapterSignalHandlers(bool isRegister) ...@@ -234,7 +234,7 @@ bridge::DeviceSystemBridge::RegisterAdapterSignalHandlers(bool isRegister)
int ret = m_adapter->RegisterSignalListener((*itr)->GetName(), m_adapterSignalListener, NULL, handle); int ret = m_adapter->RegisterSignalListener((*itr)->GetName(), m_adapterSignalListener, NULL, handle);
if (ret != 0) if (ret != 0)
{ {
DSBLOG_WARN("failed to register signal listener on adapter: 0x%x", st); DSBLOG_WARN("failed to register signal listener on adapter: %s", QCC_StatusText(st));
if (st == ER_OK) if (st == ER_OK)
ret = st; ret = st;
} }
...@@ -253,7 +253,7 @@ bridge::DeviceSystemBridge::RegisterAdapterSignalHandlers(bool isRegister) ...@@ -253,7 +253,7 @@ bridge::DeviceSystemBridge::RegisterAdapterSignalHandlers(bool isRegister)
int ret = m_adapter->UnregisterSignalListener(*begin); int ret = m_adapter->UnregisterSignalListener(*begin);
if (ret != 0) if (ret != 0)
{ {
DSBLOG_WARN("failed to unregister signal listener on adapter: 0x%x", st); DSBLOG_WARN("failed to unregister signal listener on adapter: %s", QCC_StatusText(st));
if (st == ER_OK) if (st == ER_OK)
st = ER_FAIL; st = ER_FAIL;
} }
...@@ -296,7 +296,7 @@ bridge::DeviceSystemBridge::UpdateDevice(shared_ptr<IAdapterDevice> const& dev, ...@@ -296,7 +296,7 @@ bridge::DeviceSystemBridge::UpdateDevice(shared_ptr<IAdapterDevice> const& dev,
{ {
m_deviceList.erase(itr); m_deviceList.erase(itr);
if ((st = itr->second->Shutdown()) != ER_OK) if ((st = itr->second->Shutdown()) != ER_OK)
DSBLOG_WARN("failed to shutdown BridgeDevice: 0x%x", st); DSBLOG_WARN("failed to shutdown BridgeDevice: %s", QCC_StatusText(st));
} }
return st; return st;
...@@ -305,9 +305,12 @@ bridge::DeviceSystemBridge::UpdateDevice(shared_ptr<IAdapterDevice> const& dev, ...@@ -305,9 +305,12 @@ bridge::DeviceSystemBridge::UpdateDevice(shared_ptr<IAdapterDevice> const& dev,
QStatus QStatus
bridge::DeviceSystemBridge::CreateDevice(shared_ptr<IAdapterDevice> const& dev) bridge::DeviceSystemBridge::CreateDevice(shared_ptr<IAdapterDevice> const& dev)
{ {
shared_ptr<BridgeDevice> newDevice(new BridgeDevice()); if (!dev.get())
return ER_BAD_ARG_1;
shared_ptr<BridgeDevice> newDevice(new BridgeDevice(dev, m_adapter));
QStatus st = newDevice->Initialize(dev); QStatus st = newDevice->Initialize();
if (st == ER_OK) if (st == ER_OK)
m_deviceList.insert(std::make_pair(GetKey(dev), newDevice)); m_deviceList.insert(std::make_pair(GetKey(dev), newDevice));
......
#include "Bridge/BridgeDevice.h" #include "BridgeDevice.h"
#include "AllJoynHelper.h"
bridge::BridgeDevice::BridgeDevice(const shared_ptr<IAdapterDevice>& dev, const shared_ptr<IAdapter>& adapter)
: m_parent(dev)
, m_busAttachment(AllJoynHelper::EncodeStringForAppName(adapter->GetExposedApplicationName()).c_str(), true)
{
}
bridge::BridgeDevice::~BridgeDevice()
{
Shutdown();
}
QStatus QStatus
bridge::BridgeDevice::Shutdown() bridge::BridgeDevice::Shutdown()
...@@ -8,7 +21,7 @@ bridge::BridgeDevice::Shutdown() ...@@ -8,7 +21,7 @@ bridge::BridgeDevice::Shutdown()
} }
QStatus QStatus
bridge::BridgeDevice::Initialize(shared_ptr<IAdapterDevice> const&) bridge::BridgeDevice::Initialize()
{ {
QStatus st = ER_OK; QStatus st = ER_OK;
return st; return st;
......
#pragma once #pragma once
#include "Bridge/IAdapter.h" #include "Bridge/IAdapter.h"
#include <alljoyn/Status.h> #include <alljoyn/BusAttachment.h>
namespace bridge namespace bridge
{ {
class BridgeDevice class BridgeDevice
{ {
public: public:
BridgeDevice(const shared_ptr<IAdapterDevice>&, const shared_ptr<IAdapter>&);
virtual ~BridgeDevice();
QStatus Shutdown(); QStatus Shutdown();
QStatus Initialize(shared_ptr<IAdapterDevice> const& dev); QStatus Initialize();
ajn::BusAttachment& GetBusAttachment()
{
return m_busAttachment;
}
shared_ptr<IAdapterDevice> GetAdapterDevice()
{
return m_parent;
}
private:
shared_ptr<IAdapterDevice> m_parent;
ajn::BusAttachment m_busAttachment;
}; };
} }
#include "Bridge/ConfigManager.h" #include "ConfigManager.h"
#include "Bridge/IAdapter.h"
#include "AllJoynHelper.h"
#include "IAdapter.h"
#include "Common/Log.h" #include "Common/Log.h"
using namespace bridge; using namespace bridge;
...@@ -90,29 +92,29 @@ ConfigManager::ConnectToAllJoyn() ...@@ -90,29 +92,29 @@ ConfigManager::ConnectToAllJoyn()
st = m_busAttachment->Connect(); st = m_busAttachment->Connect();
if (st != ER_OK) if (st != ER_OK)
{ {
DSBLOG_WARN("Failed to connect to AllJoyn bus: %d", st); DSBLOG_WARN("Failed to connect to AllJoyn bus: %s", QCC_StatusText(st));
return st; return st;
} }
st = m_busAttachment->RequestName(m_serviceName.c_str(), DBUS_NAME_FLAG_REPLACE_EXISTING | DBUS_NAME_FLAG_DO_NOT_QUEUE); st = m_busAttachment->RequestName(m_serviceName.c_str(), DBUS_NAME_FLAG_REPLACE_EXISTING | DBUS_NAME_FLAG_DO_NOT_QUEUE);
if (st != ER_OK) if (st != ER_OK)
{ {
DSBLOG_WARN("Failed to get name %s on AllJoyn bus: %d", m_serviceName.c_str(), st); DSBLOG_WARN("Failed to get name %s on AllJoyn bus: %s", m_serviceName.c_str(), QCC_StatusText(st));
return st; return st;
} }
ajn::SessionOpts sessionOpts(ajn::SessionOpts::TRAFFIC_MESSAGES, true, ajn::SessionOpts::PROXIMITY_ANY, ajn::TRANSPORT_ANY); ajn::SessionOpts sessionOpts(ajn::SessionOpts::TRAFFIC_MESSAGES, true, ajn::SessionOpts::PROXIMITY_ANY, ajn::TRANSPORT_ANY);
st = m_busAttachment->BindSessionPort(m_sessionPort, sessionOpts, *this); st = m_busAttachment->BindSessionPort(m_sessionPort, sessionOpts, *this);
if (!st) if (st != ER_OK)
{ {
DSBLOG_WARN("Failed to bind session port: %d", st); DSBLOG_WARN("Failed to bind session port: %s", QCC_StatusText(st));
return st; return st;
} }
st = m_busAttachment->AdvertiseName(m_serviceName.c_str(), sessionOpts.transports); st = m_busAttachment->AdvertiseName(m_serviceName.c_str(), sessionOpts.transports);
if (!st) if (st != ER_OK)
{ {
DSBLOG_WARN("Failed to advertise service name: %d", st); DSBLOG_WARN("Failed to advertise service name: %s", QCC_StatusText(st));
return st; return st;
} }
...@@ -124,7 +126,24 @@ ConfigManager::ConnectToAllJoyn() ...@@ -124,7 +126,24 @@ ConfigManager::ConnectToAllJoyn()
QStatus QStatus
ConfigManager::BuildServiceName() ConfigManager::BuildServiceName()
{ {
return ER_NOT_IMPLEMENTED; m_serviceName.clear();
std::string tmp = AllJoynHelper::EncodeStringForRootServiceName(m_adapter.GetExposedAdapterPrefix());
if (tmp.empty()) {
return ER_BUS_BAD_BUS_NAME;
}
m_serviceName = tmp + ".DeviceSystemBridge";
tmp = AllJoynHelper::EncodeStringForServiceName(m_adapter.GetAdapterName());
if (tmp.empty()) {
m_serviceName.empty();
return ER_BUS_BAD_BUS_NAME;
}
m_serviceName += ".";
m_serviceName += tmp;
return ER_OK;
} }
bool bool
...@@ -140,7 +159,7 @@ ConfigManager::SessionJoined(ajn::SessionPort, ajn::SessionId id, const char*) ...@@ -140,7 +159,7 @@ ConfigManager::SessionJoined(ajn::SessionPort, ajn::SessionId id, const char*)
QStatus st = m_busAttachment->SetSessionListener(id, this); QStatus st = m_busAttachment->SetSessionListener(id, this);
if (st != ER_OK) if (st != ER_OK)
{ {
DSBLOG_WARN("Failed to set session listener: %d", st); DSBLOG_WARN("Failed to set session listener: %s", QCC_StatusText(st));
return; return;
} }
...@@ -148,7 +167,7 @@ ConfigManager::SessionJoined(ajn::SessionPort, ajn::SessionId id, const char*) ...@@ -148,7 +167,7 @@ ConfigManager::SessionJoined(ajn::SessionPort, ajn::SessionId id, const char*)
st = m_busAttachment->SetLinkTimeout(id, timeout); st = m_busAttachment->SetLinkTimeout(id, timeout);
if (st != ER_OK) if (st != ER_OK)
{ {
DSBLOG_WARN("Failed to set session link timeout to %" PRIu32 ": %d", timeout, st); DSBLOG_WARN("Failed to set session link timeout to %" PRIu32 ": %s", timeout, QCC_StatusText(st));
return; return;
} }
} }
......
#include "DeviceMain.h" #include "DeviceMain.h"
bridge::DeviceMain::DeviceMain() #include "AllJoynHelper.h"
: m_indexForSignal(1) #include "Common/Log.h"
namespace
{
DSB_DECLARE_LOGNAME(DeviceMain);
}
static std::string BuildBusObjectPath(const std::string& name)
{
std::string encodedName;
bridge::AllJoynHelper::EncodeBusObjectName(name, encodedName);
return "/" + encodedName;
}
bridge::DeviceMain::DeviceMain(BridgeDevice& parent)
: ajn::BusObject(BuildBusObjectPath(m_parent.GetAdapterDevice()->GetName()).c_str(), false)
, m_parent(parent)
, m_indexForSignal(1)
, m_indexForMethod(1) , m_indexForMethod(1)
, m_registeredOnAllJoyn(false) , m_registeredOnAllJoyn(false)
{ {
...@@ -18,9 +35,46 @@ bridge::DeviceMain::Shutdown() ...@@ -18,9 +35,46 @@ bridge::DeviceMain::Shutdown()
} }
QStatus QStatus
bridge::DeviceMain::Initialize(shared_ptr<BridgeDevice> const&) bridge::DeviceMain::Initialize()
{ {
QStatus st = ER_OK; QStatus st = ER_OK;
st = CreateMethodsAndSignals();
if (st != ER_OK)
return st;
st = AddInterface(*m_interfaceDescription);
if (st != ER_OK)
{
DSBLOG_WARN("Failed to add interface to bus object: %s", QCC_StatusText(st));
return st;
}
for (std::map<std::string, DeviceMethod*>::iterator i = m_deviceMethods.begin(); i != m_deviceMethods.end(); ++i)
{
const char* methodName = i->first.c_str();
const ajn::InterfaceDescription::Member* member = m_interfaceDescription->GetMember(methodName);
if (!member) {
DSBLOG_WARN("Failed to find InterfaceDescriptionMember for %s", methodName);
return ER_INVALID_DATA;
}
st = AddMethodHandler(member, static_cast<ajn::MessageReceiver::MethodHandler>(&DeviceMain::AJMethod));
if (st != ER_OK)
{
DSBLOG_WARN("Failed to add method handler: %s", QCC_StatusText(st));
return st;
}
}
st = m_parent.GetBusAttachment().RegisterBusObject(*this);
if (st != ER_OK)
{
DSBLOG_WARN("Failed to register bus object: %s", QCC_StatusText(st));
return st;
}
m_registeredOnAllJoyn = true;
return st; return st;
} }
...@@ -37,3 +91,15 @@ bridge::DeviceMain::IsSignalNameUnique(std::string const&) ...@@ -37,3 +91,15 @@ bridge::DeviceMain::IsSignalNameUnique(std::string const&)
return false; return false;
} }
QStatus
bridge::DeviceMain::CreateMethodsAndSignals()
{
// TODO
DSBLOG_NOT_IMPLEMENTED();
return ER_NOT_IMPLEMENTED;
}
void
bridge::DeviceMain::AJMethod(const ajn::InterfaceDescription::Member*, ajn::Message&)
{
}
...@@ -12,20 +12,17 @@ namespace bridge ...@@ -12,20 +12,17 @@ namespace bridge
class DeviceMethod; class DeviceMethod;
class DeviceSignal; class DeviceSignal;
class DeviceMain class DeviceMain : private ajn::BusObject
{ {
DeviceMain(); DeviceMain(BridgeDevice& parent);
virtual ~DeviceMain(); virtual ~DeviceMain();
QStatus Initialize(shared_ptr<BridgeDevice> const& parent); QStatus Initialize();
bool IsMethodNameUnique(std::string const& name); bool IsMethodNameUnique(std::string const& name);
bool IsSignalNameUnique(std::string const& name); bool IsSignalNameUnique(std::string const& name);
void HandleSignal(IAdapterSignal const& adapterSignal); void HandleSignal(IAdapterSignal const& adapterSignal);
inline shared_ptr<ajn::BusObject> GetBusObject() const
{ return m_busObject; }
inline int GetIndexForMethod() inline int GetIndexForMethod()
{ return m_indexForMethod++; } { return m_indexForMethod++; }
...@@ -34,15 +31,15 @@ namespace bridge ...@@ -34,15 +31,15 @@ namespace bridge
private: private:
void Shutdown(); void Shutdown();
QStatus CreateMethodsAndSignals();
void AJMethod(const ajn::InterfaceDescription::Member*, ajn::Message&);
private: private:
BridgeDevice& m_parent;
int m_indexForSignal; int m_indexForSignal;
int m_indexForMethod; int m_indexForMethod;
shared_ptr<ajn::BusObject> m_busObject; std::unique_ptr<ajn::InterfaceDescription> m_interfaceDescription;
std::unique_ptr<ajn::InterfaceDescription> m_interfaceDescrtipion;
std::string m_busObjectPath;
std::string m_interfaceName; std::string m_interfaceName;
std::shared_ptr<BridgeDevice> m_parent;
std::map<std::string, DeviceMethod* > m_deviceMethods; std::map<std::string, DeviceMethod* > m_deviceMethods;
std::map<std::string, DeviceSignal* > m_deviceSignals; std::map<std::string, DeviceSignal* > m_deviceSignals;
bool m_registeredOnAllJoyn; bool m_registeredOnAllJoyn;
......
#include "DeviceMethod.h" #include "DeviceMethod.h"
bridge::DeviceMethod::DeviceMethod() #include "Common/Log.h"
namespace
{
DSB_DECLARE_LOGNAME(DeviceMethod);
}
bridge::DeviceMethod::DeviceMethod(DeviceMain& dev)
: m_parent(dev)
{ {
} }
...@@ -15,20 +23,23 @@ bridge::DeviceMethod::InvokeMethod(ajn::Message const&, ajn::MsgArg*, size_t) ...@@ -15,20 +23,23 @@ bridge::DeviceMethod::InvokeMethod(ajn::Message const&, ajn::MsgArg*, size_t)
} }
QStatus QStatus
bridge::DeviceMethod::Initialize(shared_ptr<DeviceMain> const&, shared_ptr<IAdapterMethod> const&) bridge::DeviceMethod::Initialize(shared_ptr<IAdapterMethod> const&)
{ {
DSBLOG_NOT_IMPLEMENTED();
return ER_NOT_IMPLEMENTED; return ER_NOT_IMPLEMENTED;
} }
QStatus QStatus
bridge::DeviceMethod::SetName(std::string const&) bridge::DeviceMethod::SetName(std::string const&)
{ {
DSBLOG_NOT_IMPLEMENTED();
return ER_NOT_IMPLEMENTED; return ER_NOT_IMPLEMENTED;
} }
QStatus QStatus
bridge::DeviceMethod::BuildSignature(AdapterValueVector const&, std::string&, std::string&) bridge::DeviceMethod::BuildSignature(AdapterValueVector const&, std::string&, std::string&)
{ {
DSBLOG_NOT_IMPLEMENTED();
return ER_NOT_IMPLEMENTED; return ER_NOT_IMPLEMENTED;
} }
...@@ -14,10 +14,10 @@ namespace bridge ...@@ -14,10 +14,10 @@ namespace bridge
class DeviceMethod class DeviceMethod
{ {
public: public:
DeviceMethod(); DeviceMethod(DeviceMain&);
virtual ~DeviceMethod(); virtual ~DeviceMethod();
QStatus Initialize(shared_ptr<DeviceMain> const& parent, shared_ptr<IAdapterMethod> const& adapterMethod); QStatus Initialize(shared_ptr<IAdapterMethod> const& adapterMethod);
uint32_t InvokeMethod(ajn::Message const& msg, ajn::MsgArg* outArgs, size_t numOutArgs); uint32_t InvokeMethod(ajn::Message const& msg, ajn::MsgArg* outArgs, size_t numOutArgs);
inline std::string const& GetName() const inline std::string const& GetName() const
...@@ -28,11 +28,11 @@ namespace bridge ...@@ -28,11 +28,11 @@ namespace bridge
QStatus BuildSignature(AdapterValueVector const& valueList, std::string& sig, std::string& parameterNames); QStatus BuildSignature(AdapterValueVector const& valueList, std::string& sig, std::string& parameterNames);