If available, the p2p technology will be instanciated. Note that it's fully dependant over wifi technology: wifi is the parent technology of p2p.
If present, it will be possible to run a p2p peers discovery through p2p technology's Scan() method. Results will be provided through Manager API via GetPeers() method and/or PeeersChanged() signal. --- doc/manager-api.txt | 29 ++++++++++++++++++++++++ doc/peer-api.txt | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ doc/technology-api.txt | 5 +++++ 3 files changed, 94 insertions(+) create mode 100644 doc/peer-api.txt diff --git a/doc/manager-api.txt b/doc/manager-api.txt index 8f1333c..445dd92 100644 --- a/doc/manager-api.txt +++ b/doc/manager-api.txt @@ -39,6 +39,13 @@ Methods dict GetProperties() Possible Errors: [service].Error.InvalidArguments + array{object,dict} GetPeers() + + Returns a sorted list of tuples with peer object path + and dictionary of peer properties + + Possible Errors: [peer].Error.InvalidArguments + object ConnectProvider(dict provider) [deprecated] Connect to a VPN specified by the given provider @@ -186,6 +193,28 @@ Signals TechnologyAdded(object path, dict properties) required to watch the PropertyChanged signal of the service object. + PeersChanged(array{object, dict}) + + Signals a list of peers that have been changed via the + first array. And a list of peer that have been removed + via the second array. + + The list of changed peers is sorted. The dictionary + with the properties might be empty in case none of the + properties have changed. Or only contains the + properties that have changed. + + For newly added peers the whole set of properties will + be present. + + The list of removed peers can be empty. + + This signal will only be triggered when the sort order + of the peer list or the number of peers changes. It + will not be emitted if only a property of the peer + object changes. For that it is required to watch the + PropertyChanged signal of the peer object. + PropertyChanged(string name, variant value) This signal indicates a changed value of the given diff --git a/doc/peer-api.txt b/doc/peer-api.txt new file mode 100644 index 0000000..c56ba8f --- /dev/null +++ b/doc/peer-api.txt @@ -0,0 +1,60 @@ +Peer hierarchy [EXPERIMENTAL] +============================= + +Service net.connman +Interface net.connman.Peer +Object path [variable prefix]/{peer0,peer1,...} + +Methods void Connect() + + Connect this peer. + + This method call will only return in case of an error + or when the peer is fully connected. So setting a + longer D-Bus timeout might be a really good idea. + + If we are already part of a group as the group owner, + it will invite this peer. + + Possible Errors: [service].Errori.InvalidArguments + + void Disconnect() + + Disconnect this peer. If the peer is not connected, an + error message will be generated. + + If we are already part of a group as the group owner, + it will reject this peer. + + Possible Errors: [service].Error.InvalidArguments + +Signals PropertyChanged(string name, variant value) + + This signal indicates a changed value of the given + property. + +Properties string State [readonly] + + The peer state information. + + Valid state are "idle", "failure", "association", + "configuration", "ready" and "disconnect". + + string Name [readonly] + + Name of the peer. + + string GroupName [readonly] + + Name of the group this peer belongs, as a group owner + or not. + + dict IPv4 [readonly] + + string Address [readonly] + + The current configured IPv4 address. + + string Netmask [readonly] + + The current configured IPv4 netmask. diff --git a/doc/technology-api.txt b/doc/technology-api.txt index 2da08de..f82f0bb 100644 --- a/doc/technology-api.txt +++ b/doc/technology-api.txt @@ -36,6 +36,11 @@ Methods dict GetProperties() [deprecated] Results will be signaled via the ServicesChanged signal from the manager interface. + In case of P2P technology, results will be signaled + via the PeersChanged signal from the manager + interface. A P2P scan will ran for 30 seconds and + automatically stop. + Signals PropertyChanged(string name, variant value) This signal indicates a changed value of the given -- 1.8.3.2 _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman