David Blume commited on 2016-01-30 23:13:22
Showing 1 changed files, with 20 additions and 3 deletions.
... | ... |
@@ -20,15 +20,32 @@ sub showScreen(contentID As String, options As String) |
20 | 20 |
port = CreateObject("roMessagePort") |
21 | 21 |
screen.SetMessagePort(port) |
22 | 22 |
|
23 |
- screen.addParagraph("contentID = " + contentID) |
|
24 |
- screen.addParagraph("options = " + options) |
|
23 |
+ deviceInfo = CreateObject("roDeviceInfo") |
|
24 |
+ deviceID = deviceInfo.GetDeviceUniqueId() |
|
25 |
+ aaIPAddrs = deviceInfo.GetIPAddrs() |
|
26 |
+ |
|
27 |
+ screen.addParagraph("IP Tagger") |
|
28 |
+ screen.addParagraph("deviceID = " + deviceID) |
|
29 |
+ for each key in aaIPAddrs |
|
30 |
+ ipAddr = ipAddrs[key] |
|
31 |
+ if ipAddr <> invalid and ipAddr.Len() > 0 |
|
32 |
+ screen.addParagraph("IP " + key + "=" + ipAddr) |
|
33 |
+ ' screen.addParagraph("IPs = " + aaIPAddrs) |
|
34 |
+ |
|
35 |
+ request = CreateObject("roUrlTransfer") |
|
36 |
+ request.SetUrl("https://kvs.dlma.com") |
|
37 |
+ code = request.PostFromString(deviceID+"="+ipAddr+"&auth=ahov") |
|
38 |
+ screen.addParagraph("POST code = " + code) |
|
25 | 39 |
|
26 | 40 |
screen.Show() |
27 | 41 |
|
28 | 42 |
while true |
29 | 43 |
msg = wait(0, port) |
30 |
- if msg <> invalid |
|
44 |
+ if type(msg) = "roParagraphScreenEvent" |
|
45 |
+ if msg.isScreenClosed() |
|
31 | 46 |
exit while |
32 | 47 |
end if |
48 |
+ end if |
|
33 | 49 |
end while |
50 |
+ screen.Close() ' Wonder if this is needed |
|
34 | 51 |
end sub |
35 | 52 |