phdc: API documentation and sample code
[platform/upstream/neard.git] / doc / device-api.txt
1 Device hierarchy
2 ================
3
4 Service         org.neard
5 Interface       org.neard.Device
6 Object path     [variable prefix]/{nfc0}/{device0, device1...}
7
8 Method          dict GetProperties()
9
10                         Returns all properties for the device. See the
11                         properties section for available properties.
12
13                         Possible Errors: org.neard.Error.DoesNotExist
14
15                 void Push(dict attributes)
16
17                         Creates an NDEF record from the attributes dictionary.
18
19                         The attributes argument should at least contain a
20                         record type. The rest of the attributes dictionary
21                         depends on the record type:
22
23                          -----------------------------------------------------
24                         |       Type     |     Additional dictionary keys     |
25                          -----------------------------------------------------
26                         |       Text     | Encoding, Language, Representation |
27                          -----------------------------------------------------
28                         |       URI      |                URI                 |
29                          -----------------------------------------------------
30                         |   SmartPoster  |                URI                 |
31                          -----------------------------------------------------
32                         |    Handover    |  Carrier (wifi or/and bluetooth)   |
33                          -----------------------------------------------------
34                         | StaticHandover |  Carrier (wifi or/and bluetooth)   |
35                          -----------------------------------------------------
36                         |       MIME     |      MIME, Payload (optional)      |
37                          -----------------------------------------------------
38
39                         Possible Errors: org.neard.Error.PermissionDenied
40                                          org.neard.Error.InvalidArguments
41                                          org.neard.Error.InProgress
42
43
44 Signals         PropertyChanged(string name, variant value)
45
46                         This signal indicates a changed value of the given
47                         property.
48
49
50 Properties      array{object} Records [readonly]
51
52                         List of NDEF records object paths.