summaryrefslogtreecommitdiff
path: root/doc/tag-api.txt
blob: 768c75fa70db7dbd81a8ad3d280cea6bee95e5eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
Tag hierarchy
================

Service		org.neard
Interface	org.neard.Tag
Object path	[variable prefix]/{nfc0}/{tag0, tag1...}

Method		void Write(dict attributes)

			Creates an NDEF record from the attributes dictionary.

			The attribute argument should at least contain a
			record type and is described by the Record properties.
			For example, one would add a type, a Language, an
			Encoding and a Representation for a text record.
			To push raw NDEF, one should use the NDEF key and use
			an array of bytes for the NDEF stream.

			Possible Errors: org.neard.Error.PermissionDenied
					 org.neard.Error.InvalidArguments
					 org.neard.Error.InProgress


Properties	string Type [readonly]

			The NFC tag type.
			Possible values are "Type 1", "Type 2", "Type 3",
			"Type 4" and "NFC-DEP".

		string Protocol [readonly]

			The tag radio protocol.
			Possible values are "Felica", "MIFARE", "Jewel",
			and "ISO-DEP".

		boolean ReadOnly [readonly]

			Give the current status of tag's read mode.

		object Adapter [readonly]

			The object path of the adapter the tag belongs to.


Record hierarchy
================

Service		org.neard
Interface	org.neard.Record
Object path	[variable prefix]/{nfc0}/{tag0|device}/{record0,record1,...}

Properties	string Type [readonly]

			The NDEF record type name.

			Possible values are "SmartPoster", "Text", "URI",
			"HandoverRequest", "HandoverSelect", "HandoverCarrier",
			"AAR" for Android Application Record and "MIME" for
			RFC 2046 MIME types.

		string Encoding [readonly]

			The character encoding.

			Possible values are "UTF-8" or "UTF-16".
			This property is only valid for Text and SmartPoster's
			title records.

		string Language [readonly]

			The ISO/IANA language code (For example "en" or "jp").

			This property is only valid for Text and SmartPoster's
			title records.

		string Representation [readonly]

			The human readable representation of a text or
			title record.

			This property is only valid for Text and SmartPoster's
			title records.

		string URI [readonly]

			The record URI (for example https://nfc-forum.org).

			This is the complete URI, including the scheme and
			the resource.
			This property is only valid for SmartPoster's URI
			records.

		string MIMEType [readonly]

			The URI object MIME type.

			This is a description of the MIME type of the object
			the URI points at.
			This is not a mandatory field and is only valid for
			Smart Posters carrying a URI record.

		uint32 Size [readonly]

			The URI object size.

			This is the size of the object the URI points at.
			It should be used by applications to decide if they can
			afford to fetch the object or not.
			This is not a mandatory field and is only valid for
			Smart Posters carrying a URI record.

		string Action [readonly]

			The suggested course of action.

			This one is only valid for Smart Posters and is a
			suggestion only. It can be ignored, and the possible
			values are "Do" (for example launch the browser),
			"Save" (for example save the URI in the bookmarks
			folder, or "Edit" (for example open the URI in an URI
			editor for the user to modify it.

		string AndroidPackage [readonly]

		        This is the Android Package Name contained in an
			Android Application Record (AAR). It hints the reader
			towards launching an Android specific application.

			It is only valid for AAR NDEFs.