make getLocalPrefix a static GetLocalPrefix function
This commit is contained in:
1 parent
d5aec4ba14
commit
e761767944
2 files changed
+12
-2
No files matched your search
@@ -42,6 +42,14 @@ SyncAppSocket::~SyncAppSocket()
|
||||
CcnxWrapper::Destroy ();
|
||||
}
|
||||
|
||||
std::string
|
||||
SyncAppSocket::GetLocalPrefix()
|
||||
{
|
||||
// this handle is supposed to be short lived
|
||||
CcnxWrapperPtr handle = CcnxWrapper::Create();
|
||||
return handle->getLocalPrefix();
|
||||
}
|
||||
|
||||
bool
|
||||
SyncAppSocket::publishString (const string &prefix, uint32_t session, const string &dataBuffer, int freshness)
|
||||
{
|
||||
|
||||
@@ -90,8 +90,10 @@ public:
|
||||
SyncLogic &
|
||||
getLogic () { return m_syncLogic; }
|
||||
|
||||
std::string
|
||||
getLocalPrefix () { return m_ccnxHandle->getLocalPrefix (); }
|
||||
// make this a static function so we don't have to create socket instance without
|
||||
// knowing the local prefix. it's a wrong place for this function anyway
|
||||
static std::string
|
||||
GetLocalPrefix ();
|
||||
|
||||
private:
|
||||
void
|
||||
|
||||
Reference in new issue
Block a user