Tizen 2.0 Release
[framework/connectivity/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                         To push raw NDEF, one should use the NDEF key and use
33                         an array of bytes for the NDEF stream.
34
35                         Possible Errors: org.neard.Error.PermissionDenied
36                                          org.neard.Error.InvalidArguments
37                                          org.neard.Error.InProgress
38
39                 array{byte} GetRawNDEF()
40
41                         Return the tag's NDEF as a raw bytes stream.
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      string Type [readonly]
51
52                         The NFC tag type.
53                         Possible values are "Type 1", "Type 2", "Type 3",
54                         "Type 4" and "NFC-DEP"
55
56                 string Protocol [readonly]
57
58                         The tag radio protocol.
59                         Possible values are "Felica", "MIFARE", "Jewel",
60                         and "ISO-DEP".
61
62                 array{object} Records [readonly]
63
64                         List of NDEF records object paths.
65
66                 boolean ReadOnly [readonly]
67
68                         Give the current status of tag's read mode
69
70
71 Record hierarchy
72 ================
73
74 Service         org.neard
75 Interface       org.neard.Record
76 Object path     [variable prefix]/{nfc0}/{tag0|device}/{record0,record1,...}
77
78 Method          dict GetProperties()
79
80                         Returns all properties for the record. Each record
81                         has it's type and properties.
82
83                         If type has "Text", possible properties are "Encoding",
84                         "Language" and "Representation".
85
86                         See the properties section for available properties.
87
88                         Possible Errors: org.neard.Error.DoesNotExist
89
90 Properties      string Type [readonly]
91
92                         The NDEF record type name.
93
94                         Possible values are "SmartPoster", "Text", "URI",
95                         "HandoverRequest", "HandoverSelect", "HandoverCarrier".
96
97                 string Encoding [readonly]
98
99                         The character encoding.
100
101                         Possible values are "UTF-8" or "UTF-16".
102                         This property is only valid for Text and SmartPoster's
103                         title records.
104
105                 string Language [readonly]
106
107                         The ISO/IANA language code (For example "en" or "jp").
108
109                         This property is only valid for Text and SmartPoster's
110                         title records.
111
112                 string Representation [readonly]
113
114                         The human readable representation of a text or
115                         title record.
116
117                         This property is only valid for Text and SmartPoster's
118                         title records.
119
120                 string URI [readonly]
121
122                         The record URI (for example https://nfc-forum.org).
123
124                         This is the complete URI, including the scheme and
125                         the resource.
126                         This property is only valid for SmartPoster's URI records.
127
128                 string MIMEType [readonly]
129
130                         The URI object MIME type.
131
132                         This is a description of the MIME type of the object
133                         the URI points at.
134                         This is not a mandatory field and is only valid for
135                         Smart Posters carrying a URI record.
136
137                 uint32 Size [readonly]
138
139                         The URI object size.
140
141                         This is the size of the object the URI points at.
142                         It should be used by applications to decide if they can
143                         afford to fetch the object or not.
144                         This is not a mandatory field and is only valid for
145                         Smart Posters carrying a URI record.
146
147                 string Action [readonly]
148
149                         The suggested course of action.
150
151                         This one is only valid for Smart Posters and is a
152                         suggestion only. It can be ignored, and the possible
153                         values are "Do" (for example launch the browser),
154                         "Save" (for example save the URI in the bookmarks folder,
155                         or "Edit" (for example open the URI in an URI editor for
156                         the user to modify it.