diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-06-18 19:38:26 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-06-18 19:38:26 +0200 |
commit | a23ce9af199ac1631f365c144563e066f10c1514 (patch) | |
tree | dcf55e4d8d62a7ab0325f858d08ea5e46a0480a5 | |
parent | 5e47662205a982f2c487d392e6e6850824606b27 (diff) | |
download | neard-a23ce9af199ac1631f365c144563e066f10c1514.tar.gz neard-a23ce9af199ac1631f365c144563e066f10c1514.tar.bz2 neard-a23ce9af199ac1631f365c144563e066f10c1514.zip |
test: Add MIME type to the Device pushing options
Only wifi_wsc is supported for now, i.e. one can only push WSC
configuration tokens over SNEP.
-rw-r--r-- | src/device.c | 2 | ||||
-rwxr-xr-x | test/push-device | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c index af8fdf5..27fbf4f 100644 --- a/src/device.c +++ b/src/device.c @@ -234,6 +234,8 @@ static char *sn_from_message(DBusMessage *msg) return NEAR_DEVICE_SN_SNEP; else if (g_strcmp0(value, "Handover") == 0) return NEAR_DEVICE_SN_HANDOVER; + else if (g_strcmp0(value, "MIME") == 0) + return NEAR_DEVICE_SN_SNEP; else return NULL; diff --git a/test/push-device b/test/push-device index 165e33a..0f48d8f 100755 --- a/test/push-device +++ b/test/push-device @@ -9,10 +9,12 @@ def help_text(): print " If type is URI, parameters are <uri>" print " If type is SmartPoster, parameters are <uri>" print " If type is Handover, parameters are <carrier>" + print " If type is MIME, parameters are <mime_type> (only wifi_wsc)" print "e.g. < %s /org/neard/nfc0/device0 Text UTF-8 en-US hello,Type2! >" % (sys.argv[0]) print "e.g. < %s /org/neard/nfc0/device0 URI http://www.nfc-forum.com >" % (sys.argv[0]) print "e.g. < %s /org/neard/nfc0/device0 SmartPoster http://www.nfc-forum.com >" % (sys.argv[0]) print "e.g. < %s /org/neard/nfc0/device0 Handover bluetooth,wifi >" % (sys.argv[0]) + print "e.g. < %s /org/neard/nfc0/device0 MIME wifi_wsc>" % (sys.argv[0]) sys.exit(1) if len(sys.argv) < 2: @@ -42,6 +44,12 @@ elif len(sys.argv) == 4: elif sys.argv[2] in ["Handover"]: device.Push(({ "Type" : "Handover", "Carrier" : sys.argv[3] })) + elif sys.argv[2] in ["MIME"]: + if sys.argv[3] in ["wifi_wsc"]: + device.Push(({ "Type" : "MIME", + "MIME" : "application/vnd.wfa.wsc"})) + else: + help_text() else: help_text() else: |