From dd432247f8fd559ea6f27368d5972cbd643638e2 Mon Sep 17 00:00:00 2001 From: John Reese Date: Thu, 6 Oct 2011 14:54:17 -0400 Subject: [PATCH] Added support for the Notify My Android service Issue #226 --- push.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/push.cpp b/push.cpp index e4f62a1..f6a5b86 100644 --- a/push.cpp +++ b/push.cpp @@ -265,6 +265,23 @@ class CPushMod : public CModule params["notification[message]"] = short_message; params["notification[source_url]"] = uri; } + else if (service == "nma") + { + if (options["secret"] == "") + { + PutModule("Error: secret not set"); + return; + } + + service_host = "www.notifymyandroid.com"; + service_url = "/publicapi/notify"; + + params["apikey"] = options["secret"]; + params["application"] = app; + params["event"] = title; + params["description"] = short_message; + params["url"] = uri; + } else if (service == "prowl") { if (options["secret"] == "") @@ -875,6 +892,10 @@ class CPushMod : public CModule { PutModule("Note: Boxcar requires setting the 'username' option"); } + else if (value == "nma") + { + PutModule("Note: NMA requires setting the 'secret' option"); + } else if (value == "prowl") { PutModule("Note: Prowl requires setting the 'secret' option");