From 8b9876f109df31a276f9583393d6eb73cd8f1d49 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 5 Aug 2009 17:02:36 -0600 Subject: [PATCH] Remove $services and $types vars from API interface. --- ansel/lib/Api.php | 203 ----------------------------------- chora/lib/Api.php | 17 --- crumb/lib/Api.php | 7 -- fima/lib/Api.php | 15 --- folks/lib/Api.php | 139 ++---------------------- gollem/lib/Api.php | 98 ----------------- imp/lib/Api.php | 197 +--------------------------------- ingo/lib/Api.php | 69 ++---------- jeta/lib/Api.php | 7 -- kastalia/lib/Api.php | 7 -- kronolith/lib/Api.php | 170 ++---------------------------- nag/lib/Api.php | 180 +------------------------------ news/lib/Api.php | 32 ------ skeleton/lib/Api.php | 7 -- skoli/lib/Api.php | 7 -- timeobjects/lib/Api.php | 27 ++--- turba/lib/Api.php | 275 +++--------------------------------------------- 17 files changed, 47 insertions(+), 1410 deletions(-) diff --git a/ansel/lib/Api.php b/ansel/lib/Api.php index 810846f80..e9e881594 100644 --- a/ansel/lib/Api.php +++ b/ansel/lib/Api.php @@ -16,209 +16,6 @@ class Ansel_Api extends Horde_Registry_Api { public $version = 'H4 (2.0-git)'; - public $services = array( - 'perms' => array( - 'args' => array(), - 'type' => '{urn:horde}stringArray' - ), - - 'prefsHandle' => array( - 'args' => array( - 'item' => 'string', - 'updated' => 'boolean' - ), - 'type' => 'boolean' - ), - - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ), - - 'browse' => array( - 'args' => array('path' => 'string'), - 'type' => '{urn:horde}hashHash', - ), - - 'put' => array( - 'args' => array('path' => 'string', 'content' => 'string', 'content_type' => 'string'), - 'type' => '{urn:horde}stringArray', - ), - - // 'path_delete' => array( - // 'args' => array('path' => 'string'), - // 'type' => 'boolean', - // ), - - 'commentCallback' => array( - 'args' => array('image_id' => 'string'), - 'type' => 'string' - ), - - 'hasComments' => array( - 'args' => array(), - 'type' => 'boolean' - ), - - 'saveImage' => array( - 'args' => array('app' => 'string', - 'gallery_id' => 'string', - 'image' => '{urn:horde}hashHash', - 'default' => 'boolean', - 'gallery_data' => '{urn:horde}hashHash', - 'encoding' => 'string', - 'slug' => 'string', - 'compression' => 'string', - 'skiphook' => 'boolean'), - 'type' => '{urn:horde}stringArray' - ), - - 'postBatchUpload' => array( - 'args' => array('image_ids' => '{urn:horde}hash'), - 'type' => 'int' - ), - - 'createGallery' => array( - 'args' => array('app' => 'string', - 'attributes' => '{urn:horde}hashHash', - 'perm' => '{urn:horde}hashHash'), - 'type' => 'int' - ), - - 'removeImage' => array( - 'args' => array('app' => 'string', - 'gallery_id' => 'integer', - 'image_id' => 'integer'), - 'type' => 'int' - ), - - 'removeGallery' => array( - 'args' => array('app' => 'string', - 'gallery_id' => 'integer'), - 'type' => 'int' - ), - - 'getImageUrl' => array( - 'args' => array('app' => 'string', - 'image_id' => 'integer', - 'view' => 'string', - 'full' => 'boolean', - 'style' => 'string'), - 'type' => 'string' - ), - - 'getImageContent' => array( - 'args' => array('image_id' => 'integer', - 'view' => 'string', - 'style' => 'string', - 'app' => 'string'), - 'type' => 'string' - ), - - 'count' => array( - 'args' => array('app' => 'string', - 'gallery_id' => 'integer'), - 'type' => 'int' - ), - - 'getDefaultImage' => array( - 'args' => array('app' => 'string', - 'gallery_id' => 'integer', - 'style' => 'string'), - 'type' => 'string' - ), - - 'listGalleries' => array( - 'args' => array('app' => 'string', - 'perm' => 'integer', - 'parent' => 'string', - 'allLevels' => 'string', - 'from' => 'integer', - 'count' => 'integer'), - 'type' => 'string' - ), - - 'getGalleries' => array( - 'args' => array('ids' => '{urn:horde}hash', - 'app' => 'string'), - 'type' => '{urn:horde}hash' - ), - - 'selectGalleries' => array( - 'args' => array('app' => 'string', - 'perm' => 'integer', - 'parent' => 'string', - 'allLevels' => 'string', - 'from' => 'integer', - 'count' => 'integer'), - 'type' => 'string' - ), - - 'listImages' => array( - 'args' => array('app' => 'string', - 'gallery_id' => 'integer', - 'perm' => 'integer', - 'view' => 'string', - 'full' => 'boolean', - 'from' => 'integer', - 'count' => 'integer', - 'style' => 'string'), - 'type' => 'string' - ), - - 'getRecentImages' => array( - 'args' => array('app' => 'string', - 'galleries' => '{urn:horde}hash', - 'perms' => 'integer', - 'view' => 'string', - 'full' => 'boolean', - 'limit' => 'integer', - 'style' => 'string', - 'slugs' => '{urn:horde}hashHash'), - 'type' => '{urn:horde}hash' - ), - - 'countGalleries' => array( - 'args' => array('app' => 'string', - 'perm' => 'string', - 'attributes' => '{urn:horde}hash', - 'parent' => 'string', - 'allLevels' => 'boolean'), - 'type' => 'int' - ), - - 'listTagInfo' => array( - 'args' => array('tags' => '{urn:horde}stringArray'), - 'type' => '{urn:horde}hash' - ), - - 'searchTags' => array( - 'args' => array('tags' => '{urn:horde}stringArray', - 'resource_type' => 'string', - 'count' => 'int', - 'user' => 'string'), - 'type' => '{urn:horde}hash' - ), - - 'galleryExists' => array( - 'args' => array('app' => 'string', - 'gallery_name' => 'string'), - 'type' => 'boolean' - ), - - 'renderView' => array( - 'args' => array('parameters' => '{urn:horde]stringArray', - 'app' => 'string', - 'view' => 'string'), - 'type' => 'string' - ), - - 'getGalleryStyles' => array( - 'args' => array(), - 'type' => '{urn:horde}hash' - ) - ); - /** * Returns a list of available permissions. * diff --git a/chora/lib/Api.php b/chora/lib/Api.php index 0cf7af28e..729ee11a1 100644 --- a/chora/lib/Api.php +++ b/chora/lib/Api.php @@ -16,23 +16,6 @@ class Chora_Api extends Horde_Registry_Api */ public $version = 'H4 (3.0-git)'; - /** - * The services provided by this application. - * - * @var array - */ - public $services = array( - 'perms' => array( - 'args' => array(), - 'type' => '{urn:horde}hashHash' - ), - - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ) - ); - public function perms() { static $perms = array(); diff --git a/crumb/lib/Api.php b/crumb/lib/Api.php index 7d72e6824..c6d331939 100644 --- a/crumb/lib/Api.php +++ b/crumb/lib/Api.php @@ -3,13 +3,6 @@ class Crumb_Api extends Horde_Registry_Api { public $version = 'H4 (0.1-git)'; - public $services = array( - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ) - ); - /** * Generate the menu to use on the prefs page. * diff --git a/fima/lib/Api.php b/fima/lib/Api.php index 814d17841..d06de8f7f 100644 --- a/fima/lib/Api.php +++ b/fima/lib/Api.php @@ -3,21 +3,6 @@ class Fima_Api extends Horde_Regsitry_Api { public $version = '1.0.1'; - public $services = array( - 'prefsHandle' => array( - 'args' => array( - 'item' => 'string', - 'updated' => 'boolean' - ), - 'type' => 'boolean' - ), - - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ) - ); - /** * TODO */ diff --git a/folks/lib/Api.php b/folks/lib/Api.php index dd1762796..279ff3b14 100644 --- a/folks/lib/Api.php +++ b/folks/lib/Api.php @@ -16,142 +16,19 @@ class Folks_Api extends Horde_Registry_Api { public $version = 'H4 (0.1-git)'; - public $services = array( - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ), - - 'commentCallback' => array( - 'args' => array('id' => 'string'), - 'type' => 'string' - ), - - 'removeUserData' => array( - 'args' => array('user' => 'string'), - 'type' => 'boolean' - ), - - 'hasComments' => array( - 'args' => array(), - 'type' => 'boolean' - ), - - 'getOnlineUsers' => array( - 'args' => array(), - 'type' => 'array' - ), - - 'getProfile' => array( - 'args' => array(), - 'type' => 'array' - ), - - 'getFriends' => array( - 'args' => array('user' => 'string'), - 'type' => 'array' - ), - - 'addFriend' => array( - 'args' => array('friend' => 'string'), - 'type' => 'boolean' - ), - - 'getBlacklist' => array( - 'args' => array('user' => 'string'), - 'type' => 'array' - ), - - 'addBlacklisted' => array( - 'args' => array('user' => 'string'), - 'type' => 'boolean' - ), - - 'removeBlacklisted' => array( - 'args' => array('user' => 'string'), - 'type' => 'boolean' - ), - - 'isBlacklisted' => array( - 'args' => array('user' => 'string'), - 'type' => 'boolean' - ), - - 'show' => array( - 'link' => '%application%/user.php?user=|user|' - ), - - 'listTimeObjectCategories' => array( - 'type' => '{urn:horde}stringArray' - ), - - 'listTimeObjects' => array( - 'args' => array('start' => 'int', 'end' => 'int'), - 'type' => '{urn:horde}hashHash' - ), - - 'logActivity' => array( - 'args' => array('activity_message' => 'string', - 'scope' => 'string', - 'user' => 'string'), - 'type' => 'boolean' - ), - - 'getActivity' => array( - 'args' => array('user' => 'string'), - 'type' => 'boolean' - ), - - 'setStatus' => array( - 'args' => array('status' => 'boolean'), - 'args' => array('user' => 'string'), - 'type' => 'array' - ), - - 'getStatus' => array( - 'args' => array('user' => 'string'), - 'type' => 'array' - ), - - 'authenticate' => array( - 'args' => array('userID' => 'string', - 'credentials' => '{urn:horde}hash', - 'params' => '{urn:horde}hash'), - 'checkperms' => false, - 'type' => 'boolean' - ), - - 'userExists' => array( - 'args' => array('userId' => 'string'), - 'type' => 'boolean' - ), - - 'addUser' => array( - 'args' => array('userId' => 'string') - ), - - 'getImageUrl' => array( - 'args' => array( - 'user' => 'string', - 'view' => 'string', - 'full' => 'boolean' - ), - 'type' => 'string' - ), - - 'userList' => array( - 'type' => '{urn:horde}stringArray' - ), - - 'removeUser' => array( - 'args' => array('userId' => 'string') - ) + /** + * Links. + * + * @var array + */ + public $links = array( + 'show' => '%application%/user.php?user=|user|' ); public function __construct() { if (!Horde_Auth::isAdmin()) { - unset($this->services['userList'], $this->services['removeUser']); + $this->disabled = array('removeUser', 'userList'); } } diff --git a/gollem/lib/Api.php b/gollem/lib/Api.php index 69acc5edd..e00d37c15 100644 --- a/gollem/lib/Api.php +++ b/gollem/lib/Api.php @@ -20,104 +20,6 @@ class Gollem_Api extends Horde_Registry_Api public $version = 'H4 (5.0-git)'; /** - * The services provided by this application. - * - * @var array - */ - public $services = array( - 'perms' => array( - 'args' => array(), - 'type' => '{urn:horde}hashHash' - ), - - 'prefsHandle' => array( - 'args' => array( - 'item' => 'string', - 'updated' => 'boolean' - ), - 'type' => 'boolean' - ), - - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ), - - 'browse' => array( - 'args' => array('path' => 'string'), - 'type' => '{urn:horde}hashHash', - ), - - 'put' => array( - 'args' => array( - 'path' => 'string', - 'content' => 'string', - 'content_type' => 'string' - ), - 'type' => 'int', - ), - - 'mkcol' => array( - 'args' => array('path' => 'string'), - 'type' => 'int', - ), - - 'move' => array( - 'args' => array( - 'path' => 'string', - 'dest' => 'string' - ), - 'type' => 'int', - ), - - 'path_delete' => array( - 'args' => array('path' => 'string'), - 'type' => 'int', - ), - - 'selectlistLink' => array( - 'args' => array( - 'link_text' => 'string', - 'link_style' => 'string', - 'formid' => 'string', - 'icon' => 'boolean', - 'selectid' => 'string' - ), - 'type' => 'string' - ), - - 'selectlistResults' => array( - 'args' => array('selectid' => 'string'), - 'type' => 'array' - ), - - 'returnFromSelectlist' => array( - 'args' => array( - 'selectid' => 'string', - 'index' => 'string' - ), - 'type' => 'string' - ), - - 'setSelectList' => array( - 'args' => array( - 'selectid' => 'string', - 'files' => 'array' - ), - 'type' => 'string' - ), - - 'getViewLink' => array( - 'args' => array( - 'dir' => 'string', - 'file' => 'string', - 'backend' => 'string' - ), - 'type' => 'string' - ) - ); - - /** * TODO */ public function perms() diff --git a/imp/lib/Api.php b/imp/lib/Api.php index c5e47d5eb..3a30de9e1 100644 --- a/imp/lib/Api.php +++ b/imp/lib/Api.php @@ -27,200 +27,13 @@ class IMP_Api extends Horde_Registry_Api public $version = 'H4 (5.0-git)'; /** - * The services provided by this application. + * The listing of API calls that do not require permissions checking. * * @var array */ - public $services = array( - 'perms' => array( - 'args' => array(), - 'type' => '{urn:horde}hashHash' - ), - - 'authCredentials' => array( - 'args' => array(), - 'type' => '{urn:horde}hashHash' - ), - - 'compose' => array( - 'args' => array( - 'args' => '{urn:horde}hash', - 'extra' => '{urn:horde}hash' - ), - 'type' => 'string' - ), - - 'batchCompose' => array( - 'args' => array( - 'args' => '{urn:horde}hash', - 'extra' => '{urn:horde}hash' - ), - 'type' => 'string' - ), - - 'folderlist' => array( - 'args' => array(), - 'type' => '{urn:horde}stringArray' - ), - - 'createFolder' => array( - 'args' => array('folder' => 'string'), - 'type' => 'string' - ), - - 'deleteMessages' => array( - 'args' => array( - 'mailbox' => 'string', - 'indices' => '{urn:horde}integerArray' - ), - 'type' => 'integer' - ), - - 'copyMessages' => array( - 'args' => array( - 'mailbox' => 'string', - 'indices' => '{urn:horde}integerArray', - 'target' => 'string' - ), - 'type' => 'boolean' - ), - - 'moveMessages' => array( - 'args' => array( - 'mailbox' => 'string', - 'indices' => '{urn:horde}integerArray', - 'target' => 'string' - ), - 'type' => 'boolean' - ), - - 'flagMessages' => array( - 'args' => array( - 'mailbox' => 'string', - 'indices' => '{urn:horde}integerArray', - 'flags' => '{urn:horde}stringArray', - 'set' => 'boolean' - ), - 'type' => 'boolean' - ), - - 'msgEnvelope' => array( - 'args' => array( - 'mailbox' => 'string', - 'indices' => '{urn:horde}integerArray' - ), - 'type' => '{urn:horde}hashHash' - ), - - 'searchMailbox' => array( - 'args' => array( - 'mailbox' => 'string', - 'query' => 'object' - ), - 'type' => '{urn:horde}integerArray' - ), - - 'mailboxCacheId' => array( - 'args' => array( - 'mailbox' => 'string' - ), - 'type' => 'string' - ), - - 'server' => array( - 'args' => array(), - 'type' => '{urn:horde}hashHash' - ), - - 'favouriteRecipients' => array( - 'args' => array( - 'limit' => 'int' - ), - 'type' => '{urn:horde}stringArray' - ), - - 'changeLanguage' => array( - 'args' => array() - ), - - /* Cache display method. */ - 'cacheOutput' => array( - 'args' => array( - '{urn:horde}hashHash' - ), - 'type' => '{urn:horde}hashHash' - ), - - /* Horde_Auth_Application methods. */ - 'authLoginParams' => array( - 'args' => array(), - 'checkperms' => false, - 'type' => '{urn:horde}hashHash' - ), - - 'authAuthenticate' => array( - 'args' => array( - 'userID' => 'string', - 'credentials' => '{urn:horde}hash', - 'params' => '{urn:horde}hash' - ), - 'checkperms' => false, - 'type' => 'boolean' - ), - - 'authAuthenticateCallback' => array( - 'args' => array(), - 'checkperms' => false - ), - - 'authTransparent' => array( - 'args' => array(), - 'checkperms' => false, - 'type' => 'boolean' - ), - - 'authAddUser' => array( - 'args' => array( - 'userId' => 'string', - 'credentials' => '{urn:horde}stringArray' - ) - ), - - 'authRemoveUser' => array( - 'args' => array( - 'userId' => 'string' - ) - ), - - 'authUserList' => array( - 'type' => '{urn:horde}stringArray' - ), - - /* Prefs_UI methods. */ - 'prefsInit' => array( - 'args' => array() - ), - - 'prefsHandle' => array( - 'args' => array( - 'item' => 'string', - 'updated' => 'boolean' - ), - 'type' => 'boolean' - ), - - 'prefsCallback' => array( - 'args' => array() - ), - - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ), - - 'prefsStatus' => array( - 'args' => array() - ) + public $noPerms = array( + 'authLoginParams', 'authAuthenticate', 'authAuthenticateCallback', + 'authTransparent' ); /** @@ -230,7 +43,7 @@ class IMP_Api extends Horde_Registry_Api { /* Only available if admin config is set for this server/login. */ if (empty($_SESSION['imp']['admin'])) { - unset($this->services['authAddUser'], $this->services['authRemoveUser'], $this->services['authUserList']); + $this->disabled = array('authAddUser', 'authRemoveUser', 'authUserList'); } } diff --git a/ingo/lib/Api.php b/ingo/lib/Api.php index ab7cab855..4516794df 100644 --- a/ingo/lib/Api.php +++ b/ingo/lib/Api.php @@ -18,72 +18,15 @@ class Ingo_Api extends Horde_Registry_Api public $version = 'H4 (2.0-git)'; /** - * The services provided by this application. - * TODO: Describe structure. + * Links. * * @var array */ - public $services = array( - 'perms' => array( - 'args' => array(), - 'type' => '{urn:horde}stringArray' - ), - - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ), - - 'removeUserData' => array( - 'args' => array('user' => 'string'), - 'type' => 'boolean' - ), - - 'blacklistFrom' => array( - 'args' => array('addresses' => '{urn:horde}stringArray'), - 'type' => 'boolean', - ), - - 'showBlacklist' => array( - 'link' => '%application%/blacklist.php', - ), - - 'whitelistFrom' => array( - 'args' => array('addresses' => '{urn:horde}stringArray'), - 'type' => 'boolean', - ), - - 'showWhitelist' => array( - 'link' => '%application%/whitelist.php', - ), - - 'canApplyFilters' => array( - 'args' => array(), - 'type' => 'boolean', - ), - - 'applyFilters' => array( - 'args' => array('params' => '{urn:horde}stringArray'), - 'type' => 'boolean', - ), - - 'showFilters' => array( - 'link' => '%application%/filters.php', - ), - - 'showVacation' => array( - 'link' => '%application%/vacation.php', - ), - - 'setVacation' => array( - 'args' => array('info' => '{urn:horde}stringArray'), - 'type' => 'boolean', - ), - - 'disableVacation' => array( - 'args' => array(), - 'type' => 'boolean', - ), + public $links = array( + 'showBlacklist' => '%application%/blacklist.php', + 'showWhitelist' => '%application%/whitelist.php', + 'showFilters' => '%application%/filters.php', + 'showVacation' => '%application%/vacation.php' ); /** diff --git a/jeta/lib/Api.php b/jeta/lib/Api.php index 5ffa6901b..a2bd7b667 100644 --- a/jeta/lib/Api.php +++ b/jeta/lib/Api.php @@ -3,13 +3,6 @@ class Jeta_Api extends Horde_Registry_Api { public $version = 'H4 (2.0-git)'; - public $services = array( - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ) - ); - /** * Generate the menu to use on the prefs page. * diff --git a/kastalia/lib/Api.php b/kastalia/lib/Api.php index b99a6d53e..b8807e53e 100644 --- a/kastalia/lib/Api.php +++ b/kastalia/lib/Api.php @@ -3,13 +3,6 @@ class Kastalia_Api extends Horde_Registry_Api { public $version = '1.0.1'; - public $services = array( - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ) - ); - /** * Generate the menu to use on the prefs page. * diff --git a/kronolith/lib/Api.php b/kronolith/lib/Api.php index 3ff3e9738..ba5101740 100644 --- a/kronolith/lib/Api.php +++ b/kronolith/lib/Api.php @@ -11,169 +11,13 @@ class Kronolith_Api extends Horde_Registry_Api { public $version = 'H3 (3.0-git)'; - public $services = array( - 'perms' => array( - 'args' => array(), - 'type' => '{urn:horde}hashHash' - ), - - 'prefsInit' => array( - 'args' => array(), - 'type' => '{urn:horde}hashHash' - ), - - 'prefsHandle' => array( - 'args' => array( - 'item' => 'string', - 'updated' => 'boolean' - ), - 'type' => 'boolean' - ), - - 'prefsCallback' => array( - 'args' => array() - ), - - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ), - - 'show' => array( - 'link' => '%application%/event.php?calendar=|calendar|&eventID=|event|&uid=|uid|' - ), - - 'removeUserData' => array( - 'args' => array('user' => 'string'), - 'type' => 'boolean' - ), - - 'shareHelp' => array( - 'args' => array(), - 'type' => 'string' - ), - - 'modified' => array( - 'args' => array('uid' => 'string'), - 'type' => 'int', - ), - - 'browse' => array( - 'args' => array('path' => 'string', 'properties' => '{urn:horde}stringArray'), - 'type' => '{urn:horde}hashHash', - ), - - 'put' => array( - 'args' => array('path' => 'string', 'content' => 'string', 'content_type' => 'string'), - 'type' => '{urn:horde}stringArray', - ), - - 'path_delete' => array( - 'args' => array('path' => 'string'), - 'type' => 'boolean', - ), - - 'getFreeBusy' => array( - 'args' => array('startstamp' => 'int', 'endstamp' => 'int', 'calendar' => 'string'), - 'type' => '{urn:horde}stringArray' - ), - - 'listCalendars' => array( - 'args' => array('owneronly' => 'boolean', 'permission' => 'int'), - 'type' => '{urn:horde}stringArray' - ), - - 'listEvents' => array( - 'args' => array('startstamp' => 'int', 'endstamp' => 'int', 'calendar' => 'string', 'showRecurrence' => 'string', 'alarmsOnly' => 'boolean'), - 'type' => '{urn:horde}hashHash' - ), - - 'listAlarms' => array( - 'args' => array('time' => 'int', 'user' => 'string'), - 'type' => '{urn:horde}hashHash' - ), - - 'listUids' => array( - 'args' => array(), - 'type' => '{urn:horde}stringArray' - ), - - 'listBy' => array( - 'args' => array('action' => 'string', 'timestamp' => 'int'), - 'type' => '{urn:horde}stringArray' - ), - - 'getActionTimestamp' => array( - 'args' => array('uid' => 'string', 'action' => 'string', 'calendar' => 'string'), - 'type' => 'int', - ), - - 'import' => array( - 'args' => array('content' => 'string', 'contentType' => 'string', 'calendar' => 'string'), - 'type' => 'string' - ), - - 'export' => array( - 'args' => array('uid' => 'string', 'contentType' => 'string'), - 'type' => 'string' - ), - - 'exportCalendar' => array( - 'args' => array('calendar' => 'string', 'contentType' => 'string'), - 'type' => 'string' - ), - - 'delete' => array( - 'args' => array('uid' => 'string'), - 'type' => 'boolean' - ), - - 'replace' => array( - 'args' => array('uid' => 'string', 'content' => 'string', 'contentType' => 'string'), - 'type' => 'boolean' - ), - - // FIXME: create complex type definition for SOAP calls. - 'eventFromUID' => array( - 'args' => array('uid' => 'string'), - 'type' => 'object' - ), - - // FIXME: create complex type definition for SOAP calls. - 'updateAttendee' => array( - 'args' => array('response' => 'object', 'sender' => 'string'), - 'type' => 'boolean' - ), - - 'subscribe' => array( - 'args' => array('calendar' => '{urn:horde}stringArray'), - 'type' => 'boolean', - ), - - 'unsubscribe' => array( - 'args' => array('calendar' => '{urn:horde}stringArray'), - 'type' => 'boolean', - ), - - 'lock' => array( - 'args' => array('calendar' => 'string', 'event' => 'string'), - 'type' => 'string' - ), - - 'unlock' => array( - 'args' => array('calendar' => 'string', 'lockid' => 'string'), - 'type' => 'string' - ), - - 'checkLocks' => array( - 'args' => array('calendar' => 'string', 'event' => 'string'), - 'type' => 'string' - ), - - 'getFbCalendars' => array( - 'args' => array(), - 'type' => '{urn:horde}stringArray' - ) + /** + * Links. + * + * @var array + */ + public $links = array( + 'show' => '%application%/event.php?calendar=|calendar|&eventID=|event|&uid=|uid|' ); /** diff --git a/nag/lib/Api.php b/nag/lib/Api.php index 4e2a0150f..dd9f043e2 100644 --- a/nag/lib/Api.php +++ b/nag/lib/Api.php @@ -17,186 +17,12 @@ class Nag_Api extends Horde_Registry_Api public $version = 'H4 (3.0-git)'; /** - * The services provided by this application. + * Links. * * @var array */ - public $services = array( - 'perms' => array( - 'args' => array(), - 'type' => '{urn:horde}hashHash' - ), - - 'prefsHandle' => array( - 'args' => array( - 'item' => 'string', - 'updated' => 'boolean' - ), - 'type' => 'boolean' - ), - - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ), - - 'removeUserData' => array( - 'args' => array('user' => 'string'), - 'type' => 'boolean' - ), - - 'show' => array( - 'link' => '%application%/view.php?tasklist=|tasklist|&task=|task|&uid=|uid|', - ), - - 'browse' => array( - 'args' => array('path' => 'string'), - 'type' => '{urn:horde}hashHash', - ), - - 'put' => array( - 'args' => array( - 'path' => 'string', - 'content' => 'string', - 'content_type' => 'string' - ), - 'type' => 'int', - ), - - 'path_delete' => array( - 'args' => array('path' => 'string'), - 'type' => 'boolean', - ), - - 'addTasklist' => array( - 'args' => array( - 'name' => 'string', - 'description' => 'string' - ), - 'type' => 'string', - ), - - 'listTasklists' => array( - 'args' => array( - 'owneronly' => 'boolean', - 'permission' => 'int' - ), - 'type' => '{urn:horde}stringArray', - ), - - 'listTasks' => array( - 'args' => array( - 'sortby' => 'string', - 'sortdir' => 'int', - 'altsortby' => 'string', - 'tasklists' => '{urn:horde}stringArray', - 'completed' => 'string', - 'json' => 'boolean' - ), - 'type' => '{urn:horde}stringArray', - ), - - 'listAlarms' => array( - 'args' => array( - 'time' => 'int', - 'user' => 'string' - ), - 'type' => '{urn:horde}hashHash' - ), - - 'list' => array( - 'args' => array(), - 'type' => '{urn:horde}stringArray', - ), - - 'listBy' => array( - 'args' => array( - 'action' => 'string', - 'timestamp' => 'int' - ), - 'type' => '{urn:horde}stringArray', - ), - - 'getActionTimestamp' => array( - 'args' => array( - 'uid' => 'string', - 'action' => 'string', - 'tasklist' => 'string' - ), - 'type' => 'int', - ), - - 'import' => array( - 'args' => array( - 'content' => 'string', - 'contentType' => 'string', - 'tasklist' => 'string' - ), - 'type' => 'string', - ), - - 'quickAdd' => array( - 'args' => array( - 'content' => 'string', - 'tasklist' => 'string' - ), - 'type' => '{urn:horde}stringArray', - ), - - 'export' => array( - 'args' => array( - 'uid' => 'string', - 'contentType' => '{urn:horde}stringArray' - ), - 'type' => 'string', - ), - - 'exportTasklist' => array( - 'args' => array( - 'tasklist' => 'string', - 'contentType' => 'string' - ), - 'type' => 'string' - ), - - 'delete' => array( - 'args' => array('uid' => '{urn:horde}stringArray'), - 'type' => 'boolean', - ), - - 'replace' => array( - 'args' => array( - 'uid' => 'string', - 'content' => 'string', - 'contentType' => 'string' - ), - 'type' => 'boolean', - ), - - 'listCostObjects' => array( - 'args' => array('criteria' => '{urn:horde}hash'), - 'type' => '{urn:horde}stringArray' - ), - - 'listTimeObjectCategories' => array( - 'type' => '{urn:horde}stringArray' - ), - - 'listTimeObjects' => array( - 'args' => array( - 'start' => 'int', - 'end' => 'int' - ), - 'type' => '{urn:horde}hashHash' - ), - - 'toggleCompletion' => array( - 'args' => array( - 'task_id' => 'string', - 'tasklist_id' => 'string' - ), - 'type' => 'boolean' - ) + public $links = array( + 'show' => '%application%/view.php?tasklist=|tasklist|&task=|task|&uid=|uid|' ); /** diff --git a/news/lib/Api.php b/news/lib/Api.php index 14f7d8b1f..49d52433d 100644 --- a/news/lib/Api.php +++ b/news/lib/Api.php @@ -14,38 +14,6 @@ class News_Api extends Horde_Registry_Api { public $version = 'H4 (0.1-git)'; - public $services = array( - 'perms' => array( - 'args' => array(), - 'type' => '{urn:horde}hashHash' - ), - - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ), - - 'commentCallback' => array( - 'args' => array('id' => 'string'), - 'type' => 'string' - ), - - 'hasComments' => array( - 'args' => array(), - 'type' => 'boolean' - ), - - 'listNews' => array( - 'args' => array('perms' => 'string', 'criteria' => 'array', 'from' => 'int', 'count' => 'int'), - 'type' => 'array' - ), - - 'countNews' => array( - 'args' => array('perms' => 'string', 'criteria' => 'array'), - 'type' => 'int' - ) - ); - /** * Categories/Permissions */ diff --git a/skeleton/lib/Api.php b/skeleton/lib/Api.php index 78ec45d46..acb0842e6 100644 --- a/skeleton/lib/Api.php +++ b/skeleton/lib/Api.php @@ -3,13 +3,6 @@ class Skeleton_Api extends Horde_Registry_Api { public $version = 'H4 (0.1-git)'; - public $services = array( - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ) - ); - /** * Generate the menu to use on the prefs page. * diff --git a/skoli/lib/Api.php b/skoli/lib/Api.php index 3b4ebf95a..0f5009844 100644 --- a/skoli/lib/Api.php +++ b/skoli/lib/Api.php @@ -3,13 +3,6 @@ class Skoli_Api extends Horde_Registry_Api { public $version = 'H4 (0.1-git)'; - public $services = array( - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ) - ); - /** * Generate the menu to use on the prefs page. * diff --git a/timeobjects/lib/Api.php b/timeobjects/lib/Api.php index 5573d96dc..fbe7e4db2 100644 --- a/timeobjects/lib/Api.php +++ b/timeobjects/lib/Api.php @@ -5,30 +5,15 @@ class Timeobjects_Api extends Horde_Registry_Api { /** - * The services provided by this application. + * Links. * * @var array */ - public $services = array( - 'listTimeObjectCategories' => array( - 'type' => '{urn:horde}stringArray' - ), - - 'listTimeObjects' => array( - 'args' => array( - 'categories' => '{urn:horde}stringArray', - 'start' => 'integer', - 'end' => 'integer' - ), - 'type' => '{urn:horde}hashHash' - ), - - // @TODO: Probably implement a URL endpoint or something so we can link - // to the correct external site depending on what time object category - // we are referring to. - 'show' => array( - 'link' => '#', - ) + public $links = array( + // @TODO: Probably implement a URL endpoint or something so we can + // link to the correct external site depending on what time object + // category we are referring to. + 'show' => '#' ); /** diff --git a/turba/lib/Api.php b/turba/lib/Api.php index 839077d9d..1419a5a64 100644 --- a/turba/lib/Api.php +++ b/turba/lib/Api.php @@ -17,272 +17,21 @@ class Turba_Api extends Horde_Registry_Api public $version = 'H3 (3.0-git)'; /** - * The services provided by this application. - * TODO: Describe structure. + * Links. * * @var array */ - public $services = array( - 'perms' => array( - 'args' => array(), - 'type' => '{urn:horde}hashHash' - ), - - 'prefsInit' => array( - 'args' => array(), - 'type' => '{urn:horde}hashHash' - ), - - 'prefsHandle' => array( - 'args' => array( - 'item' => 'string', - 'updated' => 'boolean' - ), - 'type' => 'boolean' - ), - - 'prefsMenu' => array( - 'args' => array(), - 'type' => 'object' - ), - - 'removeUserData' => array( - 'args' => array('user' => 'string'), - 'type' => 'boolean' - ), - - 'show' => array( - 'link' => '%application%/contact.php?source=|source|&key=|key|&uid=|uid|', - ), - - 'browse' => array( - 'args' => array( - 'path' => 'string', - 'properties' => '{urn:horde}stringArray' - ), - 'type' => '{urn:horde}hashHash', - ), - - 'path_delete' => array( - 'args' => array('path' => 'string'), - 'type' => 'boolean', - ), - - 'sources' => array( - 'args' => array('writeable' => 'boolean'), - 'type' => '{urn:horde}stringArray', - ), - - 'fields' => array( - 'args' => array('source' => '{urn:horde}stringArray'), - 'type' => '{urn:horde}stringArray', - ), - - 'list' => array( - 'args' => array(), - 'type' => '{urn:horde}stringArray', - ), - - 'listBy' => array( - 'args' => array( - 'action' => 'string', - 'timestamp' => 'int' - ), - 'type' => '{urn:horde}stringArray', - ), - - 'getActionTimestamp' => array( - 'args' => array( - 'uid' => 'string', - 'action' => 'string', - 'sources' => '{urn:horde}stringArray' - ), - 'type' => 'int', - ), - - 'import' => array( - 'args' => array( - 'content' => 'string', - 'contentType' => 'string', - 'source' => 'string' - ), - 'type' => 'string', - ), - - 'export' => array( - 'args' => array( - 'uid' => 'string', - 'contentType' => 'string' - ), - 'type' => 'string', - ), - - 'ownVCard' => array( - 'args' => array(), - 'type' => 'string', - ), - - 'ownContact' => array( - 'args' => array(), - 'type' => '{urn:horde}stringArray', - ), - - 'delete' => array( - 'args' => array('uid' => 'string'), - 'type' => 'boolean', - ), - - 'replace' => array( - 'args' => array( - 'uid' => 'string', - 'content' => 'string', - 'contentType' => 'string' - ), - 'type' => 'boolean', - ), - - 'search' => array( - 'args' => array( - 'names' => '{urn:horde}stringArray', - 'sources' => '{urn:horde}stringArray', - 'fields' => '{urn:horde}stringArray', - 'matchBegin' => 'boolean', - 'forceSource' => 'boolean' - ), - 'type' => '{urn:horde}stringArray', - ), - - 'getContact' => array( - 'args' => array( - 'source' => 'string', - 'objectId' => 'string' - ), - 'type' => '{urn:horde}stringArray', - ), - - 'getContacts' => array( - 'args' => array( - 'source' => 'string', - 'objectIds' => '{urn:horde}stringArray' - ), - 'type' => '{urn:horde}stringArray', - ), - - 'addField' => array( - 'args' => array( - 'address' => 'string', - 'name' => 'string', - 'field' => 'string', - 'value' => 'string', - 'source' => 'string' - ), - 'type' => '{urn:horde}stringArray', - ), - - 'deleteField' => array( - 'args' => array( - 'address' => 'string', - 'field' => 'string', - 'sources' => '{urn:horde}stringArray' - ), - 'type' => '{urn:horde}stringArray', - ), - - 'getField' => array( - 'args' => array( - 'address' => 'string', - 'field' => 'string', - 'sources' => '{urn:horde}stringArray', - 'strict' => 'boolean', - 'multiple' => 'boolean' - ), - 'type' => '{urn:horde}stringArray', - ), - - 'getAllAttributeValues' => array( - 'args' => array( - 'field' => 'string', - 'sources' => '{urn:horde}stringArray' - ), - 'type' => '{urn:horde}stringArray', - ), - - 'listTimeObjectCategories' => array( - 'type' => '{urn:horde}stringArray' - ), - - 'listTimeObjects' => array( - 'args' => array( - 'categories' => '{urn:horde}stringArray', - 'start' => 'int', - 'end' => 'int' - ), - 'type' => '{urn:horde}hashHash' - ), - - 'getClientSource' => array( - 'checkperms' => false, - 'args' => array(), - 'type' => 'string', - ), - - 'clientFields' => array( - 'args' => array(), - 'type' => '{urn:horde}stringArray', - ), - - 'getClient' => array( - 'checkperms' => false, - 'args' => array('objectId' => 'string'), - 'type' => '{urn:horde}stringArray', - ), - - 'getClients' => array( - 'checkperms' => false, - 'args' => array('objectIds' => '{urn:horde}stringArray'), - 'type' => '{urn:horde}stringArray', - ), - - 'addClient' => array( - 'args' => array('attributes' => '{urn:horde}stringArray'), - 'type' => 'string', - ), - - 'updateClient' => array( - 'args' => array( - 'objectId' => 'string', - 'attributes' => '{urn:horde}stringArray' - ), - 'type' => 'string', - ), - - 'deleteClient' => array( - 'args' => array('objectId' => 'string'), - 'type' => '{urn:horde}stringArray', - ), - - 'searchClients' => array( - 'checkperms' => false, - 'args' => array('names' => '{urn:horde}stringArray', - 'fields' => '{urn:horde}stringArray', - 'matchBegin' => 'boolean'), - 'type' => '{urn:horde}stringArray', - ), - - 'commentCallback' => array( - 'args' => array('id' => 'string'), - 'type' => 'string' - ), - - 'hasComments' => array( - 'args' => array(), - 'type' => 'boolean' - ), - - 'getDefaultShare' => array( - 'args' => array(), - 'type' => 'string' - ) + public $links = array( + 'show' => '%application%/contact.php?source=|source|&key=|key|&uid=|uid|' + ); + + /** + * The listing of API calls that do not require permissions checking. + * + * @var array + */ + public $noPerms = array( + 'getClientSource', 'getClient', 'getClients', 'searchClients' ); /** -- 2.11.0