plugins: Do not compare expression against NULL
[platform/upstream/neard.git] / doc / tag-api.txt
1 Tag hierarchy
2 ================
3
4 Service         org.neard
5 Interface       org.neard.Tag
6 Object path     [variable prefix]/{nfc0}/{tag0, tag1...}
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 SetProperty(string name, variant value)
16
17                         Changes the value of the specified property. Only
18                         properties that are listed a read-write are changeable.
19                         On success this will emit a PropertyChanged signal.
20
21                         Possible Errors: org.neard.Error.DoesNotExist
22                                          org.neard.Error.InvalidArguments
23
24                 void Write(dict attributes)
25
26                         Creates an NDEF record from the attributes dictionary.
27
28                         The attribute argument should at least contain a
29                         record type and is described by the Record properties.
30                         For example, one would add a type, a Language, an
31                         Encoding and a Representation for a text record.
32
33                         Possible Errors: org.neard.Error.PermissionDenied
34                                          org.neard.Error.InvalidArguments
35                                          org.neard.Error.InProgress
36
37
38 Signals         PropertyChanged(string name, variant value)
39
40                         This signal indicates a changed value of the given
41                         property.
42
43
44 Properties      string Type [readonly]
45
46                         The NFC tag type.
47                         Possible values are "Type 1", "Type 2", "Type 3",
48                         "Type 4" and "NFC-DEP"
49
50                 string Protocol [readonly]
51
52                         The tag radio protocol.
53                         Possible values are "Felica", "MIFARE", "Jewel",
54                         and "ISO-DEP".
55
56                 array{object} Records [readonly]
57
58                         List of NDEF records object paths.
59
60                 boolean ReadOnly [readonly]
61
62                         Give the current status of tag's read mode
63
64
65 Record hierarchy
66 ================
67
68 Service         org.neard
69 Interface       org.neard.Record
70 Object path     [variable prefix]/{nfc0}/{tag0|device}/{record0,record1,...}
71
72 Method          dict GetProperties()
73
74                         Returns all properties for the record. Each record
75                         has it's type and properties.
76
77                         If type has "Text", possible properties are "Encoding",
78                         "Language" and "Representation".
79
80                         See the properties section for available properties.
81
82                         Possible Errors: org.neard.Error.DoesNotExist
83
84 Properties      string Type [readonly]
85
86                         The NDEF record type name.
87
88                         Possible values are "SmartPoster", "Text", "URI",
89                         "HandoverRequest", "HandoverSelect", "HandoverCarrier".
90
91                 string Encoding [readonly]
92
93                         The character encoding.
94
95                         Possible values are "UTF-8" or "UTF-16".
96                         This property is only valid for Text and SmartPoster's
97                         title records.
98
99                 string Language [readonly]
100
101                         The ISO/IANA language code (For example "en" or "jp").
102
103                         This property is only valid for Text and SmartPoster's
104                         title records.
105
106                 string Representation [readonly]
107
108                         The human readable representation of a text or
109                         title record.
110
111                         This property is only valid for Text and SmartPoster's
112                         title records.
113
114                 string URI [readonly]
115
116                         The record URI (for example https://nfc-forum.org).
117
118                         This is the complete URI, including the scheme and
119                         the resource.
120                         This property is only valid for SmartPoster's URI
121                         records.
122
123                 string MIMEType [readonly]
124
125                         The URI object MIME type.
126
127                         This is a description of the MIME type of the object
128                         the URI points at.
129                         This is not a mandatory field and is only valid for
130                         Smart Posters carrying a URI record.
131
132                 uint32 Size [readonly]
133
134                         The URI object size.
135
136                         This is the size of the object the URI points at.
137                         It should be used by applications to decide if they can
138                         afford to fetch the object or not.
139                         This is not a mandatory field and is only valid for
140                         Smart Posters carrying a URI record.
141
142                 string Action [readonly]
143
144                         The suggested course of action.
145
146                         This one is only valid for Smart Posters and is a
147                         suggestion only. It can be ignored, and the possible
148                         values are "Do" (for example launch the browser),
149                         "Save" (for example save the URI in the bookmarks
150                         folder, or "Edit" (for example open the URI in an URI
151                         editor for the user to modify it.
152
153                 string AndroidPackage [readonly]
154
155                         This is the Android Package Name contained in an
156                         Android Application Record (AAR). It hints the reader
157                         towards launching an Android specific application.
158
159                         It is only valid for AAR NDEFs.