summaryrefslogtreecommitdiffstats
path: root/module/api/UserInteractionApi.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-06-09 18:10:22 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-06-09 18:10:23 +0200
commit16af85004c84d0d6c626b4f8424ce9647669a0c1 (patch)
tree025d479862d376dbc17e934f4ed20031c8cd97d1 /module/api/UserInteractionApi.py
parentadapted to jshint config (diff)
downloadpyload-16af85004c84d0d6c626b4f8424ce9647669a0c1.tar.xz
moved everything from module to pyload
Diffstat (limited to 'module/api/UserInteractionApi.py')
-rw-r--r--module/api/UserInteractionApi.py61
1 files changed, 0 insertions, 61 deletions
diff --git a/module/api/UserInteractionApi.py b/module/api/UserInteractionApi.py
deleted file mode 100644
index b95b7c468..000000000
--- a/module/api/UserInteractionApi.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-from module.Api import Api, RequirePerm, Permission, Interaction
-
-from ApiComponent import ApiComponent
-
-class UserInteractionApi(ApiComponent):
- """ Everything needed for user interaction """
-
- @RequirePerm(Permission.Interaction)
- def isInteractionWaiting(self, mode):
- """ Check if task is waiting.
-
- :param mode: binary or'ed output type
- :return: boolean
- """
- return self.core.interactionManager.isTaskWaiting(self.primaryUID, mode)
-
- @RequirePerm(Permission.Interaction)
- def getInteractionTasks(self, mode):
- """Retrieve task for specific mode.
-
- :param mode: binary or'ed interaction types which should be retrieved
- :rtype list of :class:`InteractionTask`
- """
- tasks = self.core.interactionManager.getTasks(self.primaryUID, mode)
- # retrieved tasks count as seen
- for t in tasks:
- t.seen = True
- if t.type == Interaction.Notification:
- t.setWaiting(self.core.interactionManager.CLIENT_THRESHOLD)
-
- return tasks
-
- @RequirePerm(Permission.Interaction)
- def setInteractionResult(self, iid, result):
- """Set Result for a interaction task. It will be immediately removed from task queue afterwards
-
- :param iid: interaction id
- :param result: result as json string
- """
- task = self.core.interactionManager.getTaskByID(iid)
- if task and self.primaryUID == task.owner:
- task.setResult(result)
-
- @RequirePerm(Permission.Interaction)
- def getAddonHandler(self):
- pass
-
- @RequirePerm(Permission.Interaction)
- def callAddonHandler(self, plugin, func, pid_or_fid):
- pass
-
- @RequirePerm(Permission.Download)
- def generateDownloadLink(self, fid, timeout):
- pass
-
-
-if Api.extend(UserInteractionApi):
- del UserInteractionApi \ No newline at end of file