Please take for granted that I am using at the most just one alljoyn service in each device
From what I have got so far this is how you locate other devices:
- You set a well known prefix which is the name of the service and everybody knows about
- You set a unique suffix for each device
Well because all of the elements in a dbus name have certain restrictions, for example US-ASCII, how could you name a device with french or greek or chinese?
Goal is to have a list of all surrounding devices with their names. This is easy if all devices have a plain english name but what about other languages or even special characters and spaces?
In case the strings you are referring to are simple names I guess their length is relatively small and therefore performance is not a issue.
Using the code below you can encode-decode any utf8 string to and from English letters.
Therefore let's say you have the prefix:
com.pligor.serviceTherefore having a non english name name let's say:
Γιώργοςthis would be translated to something like that:
fmaiefoiafmaiofaAnd you may just append that to get:
com.pligor.service.fmaiefoiafmaiofaAfter receiving the name on the client part you may extract the postfix
fmaiefoiafmaiofaand by decoding it you get back the original greek nameΓιώργοςEnjoy!