Add more details and examples for agent API
[platform/upstream/connman.git] / doc / device-lowlevel-api.txt
1 Device hierarchy
2 ================
3
4 Service         org.moblin.connman
5 Interface       org.moblin.connman.Device
6 Object path     [variable prefix]/{device0,device1,...}
7
8 Methods         dict GetProperties()
9
10                         Returns properties for the device object. See
11                         the properties section for available properties.
12
13                         Possible Errors: [service].Error.InvalidArguments
14
15                 void SetProperty(string name, variant value)
16
17                         Changes the value of the specified property. Only
18                         properties that are listed as read-write are
19                         changeable. On success a PropertyChanged signal
20                         will be emitted.
21
22                         Possible Errors: [service].Error.InvalidArguments
23                                          [service].Error.InvalidProperty
24
25                 void ProposeScan()
26
27                         Proposes to trigger a scan transaction.
28
29                         Possible Errors: [service].Error.InvalidArguments
30
31 Signals         PropertyChanged(string name, variant value)
32
33                         This signal indicates a changed value of the given
34                         property.
35
36 Properties      string Address [readonly]
37
38                         The address of the device.
39
40                 string Name [readonly]
41
42                         The device name (for example "Wireless" etc.)
43
44                         This name can be used for directly displaying it in
45                         the application. It has pure informational purpose
46                         and there is not guarantee that it is present.
47
48                 string Type [readonly]
49
50                         The device type (for example "ethernet", "wifi" etc.)
51
52                 string Interface [readonly]
53
54                         The device interface (for example "eth0" etc.)
55
56                         This value is for pure informational purposes. It
57                         is not guaranteed that it is always present.
58
59                 boolean Powered [readwrite]
60
61                         Switch a device on or off. This will also modify
62                         the list of networks in range. All known networks
63                         will be still available via the Networks property.
64
65                         Changing this value doesn't change the value of the
66                         Policy property.
67
68                         The value of this property can be changed by other
69                         parts of the system (including the kernel). An
70                         example would be modifications via the "ifconfig"
71                         command line utility.
72
73                 uint16 ScanInterval [readwrite]
74
75                         The scan interval describes the time in seconds
76                         between automated scan attempts. Setting this
77                         value to 0 will disable the background scanning.
78
79                         The default value is 300 and so every 5 minutes
80                         a scan procedure will be triggered.
81
82                         This property is not available with all types
83                         of devices. Some might not support background
84                         scanning at all.
85
86                 boolean Scanning [readonly]
87
88                         Indicates if a device is scanning. Not all device
89                         types might support this. Also some hardware might
90                         execute background scanning without notifying the
91                         driver about it. Use this property only for visual
92                         indication.
93
94                 array{object} Networks [readonly]
95
96                         List of networks objects paths. Every object path
97                         represents a network in range or a known network.