From 8f03316d04ba3a51ce16d90ffe94d7611c013652 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 19 Feb 2017 04:22:43 +0100 Subject: get rid of old parse plugin --- .../src/wp8/ParsePlugin.cs | 90 ---------------------- 1 file changed, 90 deletions(-) delete mode 100644 StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/wp8/ParsePlugin.cs (limited to 'StoneIsland/plugins/com.parse.cordova.core.pushplugin/src/wp8/ParsePlugin.cs') 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(args)[0].ToString(); - var clientKey = JSON.JsonHelper.Deserialize(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 subscribedChannels = installation.Channels; - var result = new PluginResult(PluginResult.Status.OK, subscribedChannels); - DispatchCommandResult(result); - - } - - public void subscribe(string args) - { - var topic = JSON.JsonHelper.Deserialize(args)[0].ToString(); - ParsePush.SubscribeAsync(topic); - - DispatchCommandResult( new PluginResult(PluginResult.Status.OK, true)); - - - } - - public void unsubscribe(string args) - { - var topic = JSON.JsonHelper.Deserialize(args)[0].ToString(); - ParsePush.UnsubscribeAsync(topic); - - DispatchCommandResult(new PluginResult(PluginResult.Status.OK, true)); - } - - - - } -} \ No newline at end of file -- cgit v1.2.3-70-g09d2