Revert "Remove $services and $types vars from API interface."
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 5 Aug 2009 23:08:39 +0000 (17:08 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 5 Aug 2009 23:08:39 +0000 (17:08 -0600)
This reverts commit 8b9876f109df31a276f9583393d6eb73cd8f1d49.

17 files changed:
ansel/lib/Api.php
chora/lib/Api.php
crumb/lib/Api.php
fima/lib/Api.php
folks/lib/Api.php
gollem/lib/Api.php
imp/lib/Api.php
ingo/lib/Api.php
jeta/lib/Api.php
kastalia/lib/Api.php
kronolith/lib/Api.php
nag/lib/Api.php
news/lib/Api.php
skeleton/lib/Api.php
skoli/lib/Api.php
timeobjects/lib/Api.php
turba/lib/Api.php

index e9e8815..810846f 100644 (file)
@@ -16,6 +16,209 @@ 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.
      *
index 729ee11..0cf7af2 100644 (file)
@@ -16,6 +16,23 @@ 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();
index c6d3319..7d72e68 100644 (file)
@@ -3,6 +3,13 @@ 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.
      *
index d06de8f..814d178 100644 (file)
@@ -3,6 +3,21 @@ 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
      */
index 279ff3b..dd17627 100644 (file)
@@ -16,19 +16,142 @@ class Folks_Api extends Horde_Registry_Api
 {
     public $version = 'H4 (0.1-git)';
 
-    /**
-     * Links.
-     *
-     * @var array
-     */
-    public $links = array(
-        'show' => '%application%/user.php?user=|user|'
+    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')
+        )
     );
 
     public function __construct()
     {
         if (!Horde_Auth::isAdmin()) {
-            $this->disabled = array('removeUser', 'userList');
+            unset($this->services['userList'], $this->services['removeUser']);
         }
     }
 
index e00d37c..69acc5e 100644 (file)
@@ -20,6 +20,104 @@ 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()
index 3a30de9..c5e47d5 100644 (file)
@@ -27,13 +27,200 @@ class IMP_Api extends Horde_Registry_Api
     public $version = 'H4 (5.0-git)';
 
     /**
-     * The listing of API calls that do not require permissions checking.
+     * The services provided by this application.
      *
      * @var array
      */
-    public $noPerms = array(
-        'authLoginParams', 'authAuthenticate', 'authAuthenticateCallback',
-        'authTransparent'
+    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()
+        )
     );
 
     /**
@@ -43,7 +230,7 @@ class IMP_Api extends Horde_Registry_Api
     {
         /* Only available if admin config is set for this server/login. */
         if (empty($_SESSION['imp']['admin'])) {
-            $this->disabled = array('authAddUser', 'authRemoveUser', 'authUserList');
+            unset($this->services['authAddUser'], $this->services['authRemoveUser'], $this->services['authUserList']);
         }
     }
 
index 4516794..ab7cab8 100644 (file)
@@ -18,15 +18,72 @@ class Ingo_Api extends Horde_Registry_Api
     public $version = 'H4 (2.0-git)';
 
     /**
-     * Links.
+     * The services provided by this application.
+     * TODO: Describe structure.
      *
      * @var array
      */
-    public $links = array(
-        'showBlacklist' => '%application%/blacklist.php',
-        'showWhitelist' => '%application%/whitelist.php',
-        'showFilters' => '%application%/filters.php',
-        'showVacation' => '%application%/vacation.php'
+    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',
+        ),
     );
 
     /**
index a2bd7b6..5ffa690 100644 (file)
@@ -3,6 +3,13 @@ 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.
      *
index b8807e5..b99a6d5 100644 (file)
@@ -3,6 +3,13 @@ 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.
      *
index ba51017..3ff3e97 100644 (file)
@@ -11,13 +11,169 @@ class Kronolith_Api extends Horde_Registry_Api
 {
     public $version = 'H3 (3.0-git)';
 
-    /**
-     * Links.
-     *
-     * @var array
-     */
-    public $links = array(
-        'show' => '%application%/event.php?calendar=|calendar|&eventID=|event|&uid=|uid|'
+    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'
+        )
     );
 
     /**
index dd9f043..4e2a015 100644 (file)
@@ -17,12 +17,186 @@ class Nag_Api extends Horde_Registry_Api
     public $version = 'H4 (3.0-git)';
 
     /**
-     * Links.
+     * The services provided by this application.
      *
      * @var array
      */
-    public $links = array(
-        'show' => '%application%/view.php?tasklist=|tasklist|&task=|task|&uid=|uid|'
+    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'
+        )
     );
 
     /**
index 49d5243..14f7d8b 100644 (file)
@@ -14,6 +14,38 @@ 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
      */
index acb0842..78ec45d 100644 (file)
@@ -3,6 +3,13 @@ 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.
      *
index 0f50098..3b4ebf9 100644 (file)
@@ -3,6 +3,13 @@ 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.
      *
index fbe7e4d..5573d96 100644 (file)
@@ -5,15 +5,30 @@
 class Timeobjects_Api extends Horde_Registry_Api
 {
     /**
-     * Links.
+     * The services provided by this application.
      *
      * @var array
      */
-    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' => '#'
+    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' => '#',
+        )
     );
 
     /**
index 1419a5a..839077d 100644 (file)
@@ -17,21 +17,272 @@ class Turba_Api extends Horde_Registry_Api
     public $version = 'H3 (3.0-git)';
 
     /**
-     * Links.
+     * The services provided by this application.
+     * TODO: Describe structure.
      *
      * @var array
      */
-    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'
+    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'
+        )
     );
 
     /**