presencefwsimpleadpt/inc/simpleplugincommon.h
branchRCL_3
changeset 18 fbd2e7cec7ef
parent 0 c8caa15ef882
equal deleted inserted replaced
17:2669f8761a99 18:fbd2e7cec7ef
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    C++ compatible definitions for PrFw SIMPLE protocol
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef SIMPLEPLUGINCOMMON_H
       
    21 #define SIMPLEPLUGINCOMMON_H
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <e32err.h>
       
    25 
       
    26 
       
    27 /**
       
    28  * common definitions for SIMPLE Plugin
       
    29  */
       
    30 
       
    31 // Simple Plugin specifications
       
    32 
       
    33 /** Nothing subscribed */
       
    34 const TUint KSimplePluginSubsNone = 0x00000000;
       
    35 /** Grant list subscribed */
       
    36 const TUint KSimplePluginSubsGrant = 0x00000001;
       
    37 
       
    38 /** max length of auth rule id in auth rules document */
       
    39 const TUint KSimplePluginMaxRuleLength = 100;
       
    40 
       
    41 /** the last general error code in e32err.h */
       
    42 const TInt KSimplePluginGeneralErrorLow = KErrCommsBreak;
       
    43 
       
    44 // OMA specifications
       
    45 
       
    46 /** OMA buddy list id */
       
    47 _LIT( KSimpleOMABuddyList, "oma_buddylist");
       
    48 /** OMA blocked list id */
       
    49 _LIT( KSimpleOMABlockedList, "oma_blockedcontacts");
       
    50 
       
    51 
       
    52 namespace NSimplePlugin
       
    53     {
       
    54     namespace NSimpleRls
       
    55         {
       
    56         _LIT( KOne,   "http://");   // 7
       
    57         _LIT( KThree, "/resource-lists/users/"); // 22
       
    58         _LIT( KFive,  "/index/~~/resource-lists/list%5b@name=%22");  // 41
       
    59         _LIT( KSeven, "%22%5d");  // 6
       
    60         const TInt totalSize = 76;
       
    61         }
       
    62     namespace NSimpleRlsBuddy
       
    63         {
       
    64         _LIT( KOne,   "http://"); // 7
       
    65         _LIT( KThree, "/resource-lists/users/"); // 22
       
    66         _LIT( KFive,  "/index/~~/resource-lists/list%5b@name=%22oma_buddylist%22%5d/list%5b@name=%22");  // 77
       
    67         _LIT( KSeven, "%22%5d");  // 6
       
    68         const TInt totalSize = 112;
       
    69         }
       
    70     namespace NSimpleOma
       
    71         {
       
    72         _LIT( KSimpleIndex,   "index");
       
    73         _LIT( KSimpleResourceLists, "resource-lists");
       
    74         _LIT( KSimpleList, "list");
       
    75         _LIT( KSimpleName, "name");
       
    76         _LIT( KSimpleDisplayName, "display-name");
       
    77         _LIT( KSimpleEntry, "entry");
       
    78         _LIT( KSimpleExternal, "external");  
       
    79         _LIT( KSimpleAnchor, "anchor");               
       
    80         _LIT( KSimplePerson, "person");      
       
    81         _LIT( KSimpleBlock, "block");
       
    82         _LIT( KSimplePoliteBlock, "polite-block");
       
    83         _LIT( KSimpleConfirm, "confirm");
       
    84         _LIT( KSimpleAllow, "allow");         
       
    85         _LIT( KSimpleOpen, "open");
       
    86         _LIT( KSimpleClosed, "closed");
       
    87         _LIT( KSimpleUri, "uri"); 
       
    88         _LIT8( KSimplePerson8, "person");                      
       
    89         _LIT8( KSimpleWatcher8, "watcher");
       
    90         _LIT8( KSimpleWatherInfo8, "watcherinfo");
       
    91         _LIT8( KSimpleWatcherList8, "watcher-list");
       
    92         _LIT8( KSimpleStatus8, "status");
       
    93         _LIT8( KSimpleActive8, "active");
       
    94         _LIT8( KSimpleEvent8, "event");
       
    95         _LIT8( KSimplePending8, "pending");
       
    96         _LIT8( KSimpleOverridingwillingness8, "overriding-willingness");
       
    97         _LIT8( KSimpleBasic8, "basic");       
       
    98         _LIT8( KSimpleStatusicon8, "status-icon");
       
    99         _LIT8( KSimpleNote8, "note");
       
   100         _LIT8( KSimpleSubscribe8, "subscribe");
       
   101         _LIT8( KSimpleList8, "list");
       
   102         _LIT8( KSimpleResource8, "resource");
       
   103         _LIT8( KSimpleInstance8, "instance");
       
   104         _LIT8( KSimpleState8, "state");
       
   105         _LIT8( KSimpleTerminated8, "terminated");
       
   106         _LIT8( KSimpleUri8, "uri");
       
   107         _LIT8( KSimpleFull8, "full");
       
   108         _LIT8( KSimpleFullState8, "fullState");
       
   109         _LIT8( KSimpleTrue8, "true");
       
   110         _LIT8( KSimpleId8, "id"); 
       
   111         _LIT8( KSimpleTimestamp8, "timestamp");       
       
   112         }
       
   113     }
       
   114 
       
   115 
       
   116 // S60 specifications
       
   117 
       
   118 /** Presence XDM block rule id */
       
   119 _LIT( KSimpleXdmBlockRule, "blockall");
       
   120 /** Presence XDM grant rule id */
       
   121 _LIT( KSimpleXdmGrantRule, "allowall");
       
   122 /** Presence XDM grant rule id for own sbscribe*/
       
   123 _LIT( KSimpleXdmOwnGrantRule, "grantown");
       
   124 /** Presence XDM default rule id */
       
   125 _LIT( KSimpleXdmDefaultRule, "default");
       
   126 
       
   127 /** S60 Shared XDM list for granted entities */
       
   128 _LIT( KSimpleS60GrantedList, "oma_grantlist");
       
   129 
       
   130 /** S60 default RLS URI template */ 
       
   131 _LIT( KSimpleRlsGroupUriTemplate, "<GROUP_ID>_<USER_ID>@<DOMAIN>");
       
   132 _LIT16( KSimpleGroupTag, "<GROUP_ID>");
       
   133 _LIT16( KSimpleUserTag, "<USER_ID>"); 
       
   134 _LIT16( KSimpleDomainTag, "<DOMAIN>"); 
       
   135 
       
   136 /**
       
   137  example:
       
   138 
       
   139  <rls-services ...
       
   140    <service uri="sip:my_friends_MY-IDENTITY@EXAMPLE.COM">
       
   141       <resource-list>http://EXAMPLE.COM/resource-lists/users/
       
   142         sip:USER@EXAMPLE.COM/index/~~/resource-lists/list%5b@name=%22oma_buddylist%22%5d/list%5b@name=%22my_friends%22%5d
       
   143       </resource-list>
       
   144       <packages>
       
   145         <package>presence</package>
       
   146       </packages>
       
   147    </service>
       
   148    <service uri="sip:my_colleques_MY-IDENTITY@EXAMPLE@EXAMPLE.COM">
       
   149       <resource-list>http://EXAMPLE.COM/resource-lists/users/
       
   150         sip:USER@EXAMPLE.COM/index/~~/resource-lists/list%5b@name=%22oma_buddylist%22%5d/list%5b@name=%22my_colleques%22%5d
       
   151       </resource-list>
       
   152       <packages>
       
   153         <package>presence</package>
       
   154       </packages>
       
   155    </service>
       
   156  </rls-services
       
   157 
       
   158  */
       
   159 
       
   160 namespace NSimpleDocument
       
   161     {
       
   162     _LIT8( KSimpleAvatarContent8, "simpleavatar.s60.com" ); // notice: static now, supports only one
       
   163     _LIT8( KSimpleAvatarCIDURI8, "cid:simpleavatar.s60.com" ); // notice: static now, supports only one
       
   164     }
       
   165 
       
   166 
       
   167 #endif // SIMPLEPLUGINDEF_H
       
   168