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;
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:
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: