• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef RTDURI_H_
2 #define RTDURI_H_
3 
4 #include "NT3H.h"
5 
6 typedef enum {
7     freeForm,       // 0x00     No prepending is done ... the entire URI is contained in the URI Field
8     httpWWW,        // 0x01     http://www.
9     httpsWWW,       // 0x02     https://www.
10     http,           // 0x03     http://
11     https,          // 0x04     https://
12     tel,            // 0x05     tel:
13     mailto,         // 0x06     mailto:
14     ftpAnonymous,   // 0x07     ftp://anonymous:anonymous@
15     ftpFtp,         // 0x08     ftp://ftp.
16     ftps,           // 0x09     ftps://
17     sftp,           // 0x0A     sftp://
18     smb,            // 0x0B     smb://
19     nfs,            // 0x0C     nfs://
20     ftp,            // 0x0D     ftp://
21     dav,            // 0x0E     dav://
22     news,           // 0x0F     news:
23     telnet,         // 0x10     telnet://
24     imap,           // 0x11     imap:
25     rtps,           // 0x12     rtsp://
26     urn,            // 0x13     urn:
27     /*
28         0x14     pop:
29         0x15     sip:
30         0x16     sips:
31         0x17     tftp:
32         0x18     btspp://
33         0x19     btl2cap://
34         0x1A     btgoep://
35         0x1B     tcpobex://
36         0x1C     irdaobex://
37         0x1D     file://
38         0x1E     urn:epc:id:
39         0x1F     urn:epc:tag:
40         0x20     urn:epc:pat:
41         0x21     urn:epc:raw:
42         0x22     urn:epc:
43         0x23     urn:nfc:
44      */
45 }UriTypeE;
46 
47 typedef struct {
48     char *body;
49     uint8_t  bodyLength;
50     void *extraData; // herre should be stored specific URI msgs
51 }RtdUriUserPayload;
52 
53 typedef struct {
54     UriTypeE            type;
55     RtdUriUserPayload   userPayload; // here should be stored specific URI msgs
56 }RTDUriTypeStr;
57 
58 uint8_t addRtdUriRecord(const NDEFDataStr *ndef, RTDUriTypeStr *typeStr);
59 
60 void prepareUrihttp(NDEFDataStr *data, RecordPosEnu position, uint8_t *text);
61 
62 #endif /* RTDURI_H_ */
63