Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
portabledsb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
App_Technologies
portabledsb
Commits
e9166608
Commit
e9166608
authored
Dec 30, 2015
by
Brendan Long
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fill in ConfigManager::BuildServiceName()
parent
40e02f25
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
15 deletions
+33
-15
Bridge/AllJoynHelper.cpp
Bridge/AllJoynHelper.cpp
+8
-8
Bridge/AllJoynHelper.h
Bridge/AllJoynHelper.h
+3
-3
Bridge/ConfigManager.cpp
Bridge/ConfigManager.cpp
+22
-4
No files found.
Bridge/AllJoynHelper.cpp
View file @
e9166608
...
...
@@ -322,13 +322,12 @@ bridge::AllJoynHelper::EncodeStringForInterfaceName(std::string const& s, std::s
t
=
TrimChar
(
t
,
'.'
);
}
void
bridge
::
AllJoynHelper
::
EncodeStringForServiceName
(
std
::
string
const
&
s
,
std
::
string
&
t
)
std
::
string
bridge
::
AllJoynHelper
::
EncodeStringForServiceName
(
std
::
string
const
&
s
)
{
std
::
string
t
;
std
::
string
temp
;
t
.
clear
();
for
(
char
ch
:
s
)
{
if
(
std
::
isalpha
(
ch
))
...
...
@@ -341,15 +340,15 @@ bridge::AllJoynHelper::EncodeStringForServiceName(std::string const& s, std::str
t
+=
'_'
;
t
+=
temp
;
}
return
t
;
}
void
bridge
::
AllJoynHelper
::
EncodeStringForRootServiceName
(
std
::
string
const
&
s
,
std
::
string
&
t
)
std
::
string
bridge
::
AllJoynHelper
::
EncodeStringForRootServiceName
(
std
::
string
const
&
s
)
{
std
::
string
t
;
char
curr
=
'\0'
;
t
.
clear
();
for
(
char
ch
:
s
)
{
if
(
std
::
isalpha
(
ch
)
||
ch
==
'.'
)
...
...
@@ -367,6 +366,7 @@ bridge::AllJoynHelper::EncodeStringForRootServiceName(std::string const& s, std:
}
t
=
TrimChar
(
t
,
'.'
);
return
t
;
}
std
::
string
...
...
Bridge/AllJoynHelper.h
View file @
e9166608
...
...
@@ -33,9 +33,9 @@ namespace bridge
static
void
EncodeBusObjectName
(
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
EncodeStringForServiceName
(
std
::
string
const
&
s
,
std
::
string
&
encoded
);
static
void
EncodeStringForRootServiceName
(
std
::
string
const
&
s
,
std
::
string
&
encoded
);
static
std
::
string
EncodeStringForAppName
(
std
::
string
const
&
s
);
static
std
::
string
EncodeStringForServiceName
(
std
::
string
const
&
);
static
std
::
string
EncodeStringForRootServiceName
(
std
::
string
const
&
);
static
std
::
string
EncodeStringForAppName
(
std
::
string
const
&
);
static
std
::
string
TrimChar
(
std
::
string
const
&
s
,
char
c
);
};
...
...
Bridge/ConfigManager.cpp
View file @
e9166608
#include "Bridge/ConfigManager.h"
#include "Bridge/IAdapter.h"
#include "ConfigManager.h"
#include "AllJoynHelper.h"
#include "IAdapter.h"
#include "Common/Log.h"
using
namespace
bridge
;
...
...
@@ -124,8 +126,24 @@ ConfigManager::ConnectToAllJoyn()
QStatus
ConfigManager
::
BuildServiceName
()
{
DSBLOG_NOT_IMPLEMENTED
();
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment