summaryrefslogtreecommitdiff
path: root/StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/wp8/ParsePlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/wp8/ParsePlugin.cs')
-rw-r--r--StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/wp8/ParsePlugin.cs90
1 files changed, 0 insertions, 90 deletions
diff --git a/StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/wp8/ParsePlugin.cs b/StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/wp8/ParsePlugin.cs
deleted file mode 100644
index 58d1c42e..00000000
--- a/StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/wp8/ParsePlugin.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Parse;
-using WPCordovaClassLib.Cordova;
-
-namespace WPCordovaClassLib.Cordova.Commands
-{
- public class ParsePlugin : BaseCommand
- {
-
-
- public async void initialize(string args)
- {
-
- PluginResult result;
-
- try
- {
- var appId = JSON.JsonHelper.Deserialize<string[]>(args)[0].ToString();
- var clientKey = JSON.JsonHelper.Deserialize<string[]>(args)[1].ToString();
-
- ParseClient.Initialize(appId, clientKey);
-
-
- await ParseInstallation.CurrentInstallation.SaveAsync();
-
-
- DispatchCommandResult( new PluginResult(PluginResult.Status.OK, true));
- }
- catch (Exception e)
- {
- DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, false));
- }
-
-
-
-
- }
-
- public void getInstallationId(string args)
- {
-
- String installationId = ParseInstallation.CurrentInstallation.InstallationId.ToString();
- var result = new PluginResult(PluginResult.Status.OK, installationId);
- DispatchCommandResult(result);
-
- }
-
- public void getInstallationObjectId(string args)
- {
-
- String objectId = ParseInstallation.CurrentInstallation.ObjectId.ToString();
- var result = new PluginResult(PluginResult.Status.OK, objectId);
- DispatchCommandResult(result);
-
- }
-
- public void getSubscriptions(string args)
- {
-
-
- var installation = ParseInstallation.CurrentInstallation;
- IEnumerable<string> subscribedChannels = installation.Channels;
- var result = new PluginResult(PluginResult.Status.OK, subscribedChannels);
- DispatchCommandResult(result);
-
- }
-
- public void subscribe(string args)
- {
- var topic = JSON.JsonHelper.Deserialize<string[]>(args)[0].ToString();
- ParsePush.SubscribeAsync(topic);
-
- DispatchCommandResult( new PluginResult(PluginResult.Status.OK, true));
-
-
- }
-
- public void unsubscribe(string args)
- {
- var topic = JSON.JsonHelper.Deserialize<string[]>(args)[0].ToString();
- ParsePush.UnsubscribeAsync(topic);
-
- DispatchCommandResult(new PluginResult(PluginResult.Status.OK, true));
- }
-
-
-
- }
-} \ No newline at end of file