From 54f3be883693d8f928491a134faddf3a96e355bd Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Mon, 16 Jan 2006 02:34:51 +0000 Subject: [PATCH] Working toward integration with Congregation git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@237 06cd67b6-e706-0410-b29e-9de616bca6e9 --- lib/api.php | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/lib/api.php b/lib/api.php index 92c583f2a..0afedbacb 100644 --- a/lib/api.php +++ b/lib/api.php @@ -14,7 +14,12 @@ require_once SHOUT_BASE . "/lib/defines.php"; $_services['perms'] = array( 'args' => array(), - 'type' => '{urn:horde}stringArray' + 'type' => '{urn:horde}stringArray', +); + +$_services['attributes'] = array( + 'args' => array(), + 'type' => '{urn:horde}stringArray', ); function _shout_perms() @@ -46,4 +51,94 @@ function _shout_perms() // $filterperms = null) +} + +function _shout_attributes() +{ + // Attribute Layout: + // object type = array( + // description = Longer human description of the attributes this + // application provides for this object, NOT of the object + // itself + // attributes = array( The attributes themselves + // name = short name of this attribute (used as a key for the Help + // system as well) + // description = Longer description of this attribute + // type = field datatype, one of the objects exported by Horde_Form + // size = maximum size of this data + // keys = array( Mapping of this attribute to all possible backends + // ldap = ldapAttribute + // sql = table.column + // ) + // limit = Maxmimum number of these attributes to store, 0 = unlimited + // required = boolean, true means form will not process without a value + // infoset = one of 'basic', 'advanced' or 'restricted'. This is used + // to help keep the forms simple for non-power-users. If + // 'required' is true and 'infoset' is anything other than + // 'basic' then 'default' MUST be specified + // 'default' = the default value of the field. + // ) + // ) + // + + $shoutAttributes = array( + 'description' => 'Phone System User Settings', + 'attributes' => array( + 'extension' => array( + 'name' => 'Extension', + 'description' => 'Phone System Extension (doubles as Voice Mailbox Number', + 'type' => 'int', + 'size' => 3, + 'keys' => array( + 'ldap' => 'asteriskVoiceMailbox', + ), + 'limit' => 1, + 'required' => true, + 'infoset' => 'basic', + ), + + 'mailboxpin' => array( + 'name' => 'Mailbox PIN', + 'description' => 'Voice Mailbox PIN', + 'type' => 'int', + 'size' => 12, + 'keys' => array( + 'ldap' => 'asteriskVoiceMailboxPIN', + ), + 'limit' => 1, + 'required' => true, + 'infoset' => 'basic', + ), + + 'phonenumbers' => array( + 'name' => 'Telephone Numbers', + 'description' => 'Dialout phone numbers', + 'type' => 'cellphone', // WHY does Horde have cellphone but NOT + // telephone or just phonenumber??? + 'size' => 12, + 'keys' => array( + 'ldap' => 'telephoneNumber', + ), + 'limit' => 5, + 'required' => true, + 'infoset' => 'basic', + ), + + 'dialstring' => array( + 'name' => 'Dial String', + 'description' => 'Asterisk raw dial string', + 'type' => 'cellphone', // WHY does Horde have cellphone but NOT + // telephone or just phonenumber??? + 'size' => 12, + 'keys' => array( + 'ldap' => 'telephoneNumber', + ), + 'limit' => 5, + 'required' => true, + 'infoset' => 'restricted', + ), + ), + ); + + return $shoutAttributes; } \ No newline at end of file -- 2.11.0