imsrv_plat/ximp_im_management_api/inc/imgroup.h
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     1 /*
       
     2 * Copyright (c) 2007 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:  IM group handling interface for clients use.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MIMGROUPS_H
       
    19 #define MIMGROUPS_H
       
    20 
       
    21 
       
    22 #include <ximpbase.h>
       
    23 #include <ximpidentity.h>
       
    24 #include  "imaccesscontrollist.h"
       
    25 #include  "imaccesscontrollistimp.h"
       
    26 #include  <bamdesca.h>
       
    27 
       
    28 class MImGroupInfo;
       
    29 class MImAccessControlList;
       
    30 /**
       
    31  * IM group handling interface for clients use.
       
    32  * Interface is implemented by the IM.
       
    33  *
       
    34  * MImGroups provides services for
       
    35  * Im clients to manage groups
       
    36  * and group members. It provides also services to 
       
    37  * subscribe notifications from IM group list changes
       
    38  * and from individual IM group changes.
       
    39  *
       
    40  * Client can retrieve MImGroups interface from
       
    41  * MImContext interface.
       
    42  *
       
    43  * @ingroup Immanagementapi
       
    44  * 
       
    45  */
       
    46 class MImGroups : public MXIMPBase
       
    47     {
       
    48 public:
       
    49 
       
    50     /** Interface ID for the MImGroups. */
       
    51     enum { KInterfaceId = IM_IF_ID_GROUPS };
       
    52 
       
    53 
       
    54 protected:
       
    55 
       
    56     /**
       
    57      * Protected destructor.
       
    58      * Object instancies can't be deleted via this interface.
       
    59      */
       
    60     virtual ~MImGroups() {}
       
    61 
       
    62 
       
    63 public: //IM Group management requests
       
    64    
       
    65    	/**
       
    66      * Subscribe to the specified group change notification
       
    67      * 
       
    68      * @return The request ID identifying the issued request.
       
    69      *
       
    70      * /b Note: Possible error conditions
       
    71      *	/n		1. Group does't exists  - KImErrGroupDoesNotExists
       
    72      *	/n		2. Not joined in this group  - KImErrGroupNotJoined
       
    73      *
       
    74      * If the request is success whenever there is a change in the group
       
    75      * user will be notified.
       
    76      *
       
    77      */
       
    78      virtual TXIMPRequestId SubscribeImGroupChangeL(const MXIMPIdentity& aGroupId)= 0;
       
    79      
       
    80      /**
       
    81      * UnSubscribe to the specified group change notification
       
    82      * 
       
    83      * @param [in] aGroupId
       
    84      *		Identification for IM group.
       
    85 	 *
       
    86      * @return The request ID identifying the issued request.
       
    87      *
       
    88      * /b Note: Possible error conditions
       
    89      *	/n		1. Group does't exists - KImErrGroupDoesNotExists
       
    90      *	/n		2. Not joined in this group  - KImErrGroupNotJoined
       
    91      *
       
    92      * If the request is success whenever there is a change in the group
       
    93      * user will not be notified.
       
    94      *
       
    95      */
       
    96      virtual TXIMPRequestId UnsubscribeImGroupChangeL(const MXIMPIdentity& aGroupId)= 0;
       
    97         /** 
       
    98      * Creates IM group
       
    99      * 				(By default private group)
       
   100      * @param [in] aProperties
       
   101      *      To be created IM group Properties.
       
   102      *
       
   103      * @return The request ID identifying the issued request.
       
   104      *
       
   105      * /b Note: Possible error conditions
       
   106      *	/n		1. Group already exists -  KImErrGroupAlreadyExists
       
   107      *	/n		2. Incorrect group properties is not  - KImErrGroupPropertyNotSupported
       
   108      *	/n		3. Not allowed to create a group - KImErrNotHavingPermission
       
   109      *
       
   110      * If the request is success it will create a group
       
   111      *
       
   112      */
       
   113     virtual TXIMPRequestId CreateImGroupL(const MImGroupInfo& aProperties) = 0;
       
   114 	/**
       
   115      * Join IM group
       
   116      *
       
   117 	 * @param [in] aGroupId	
       
   118      *		Identification for IM group.
       
   119      *
       
   120 	 * @return The request ID identifying the issued request.
       
   121      *
       
   122      * /b Note: Possible error conditions
       
   123      *	/n		1. Group does't exists - KImErrGroupDoesNotExists 
       
   124      *	/n		2. Group already joined - KImErrGroupAlreadyJoined
       
   125      *	/n		3. Joining this group is rejected - KImErrJoiningNotAllowed
       
   126      *	/n		4. Reached the maximum limit to users can be joined - KImErrTooManyIMGroups
       
   127 	 * If the request is success user will be joined in the 
       
   128 	 * specified group with the mentioned screenname
       
   129      */
       
   130     virtual TXIMPRequestId JoinImGroupL(const MXIMPIdentity& aGroupId) = 0;
       
   131    /**
       
   132      * Delete IM group
       
   133      *
       
   134 	 * @param [in] aGroupId
       
   135      *		Identification for IM group.
       
   136      *
       
   137 	 * @return The request ID identifying the issued request.
       
   138      *
       
   139      * /b Note: Possible error conditions
       
   140      *	/n		1. Group does't exists - KImErrGroupDoesNotExists 
       
   141      *	/n		2. Not having access rigts to delete the group -KImErrNotHavingPermission
       
   142      * If the request is success specified group will be deleted
       
   143      */
       
   144     virtual TXIMPRequestId DeleteImGroupL(const MXIMPIdentity& aGroupId) = 0;
       
   145     
       
   146     
       
   147     /**
       
   148      * Leave IM group
       
   149      *
       
   150 	 * @param [in] aGroupId
       
   151      *		Identification for IM group.
       
   152      *
       
   153 	 * @return The request ID identifying the issued request.
       
   154      *
       
   155      * /b Note: Possible error conditions
       
   156      *	/n		1. Group does't exists - KImErrGroupDoesNotExists 
       
   157      *	/n		2. Not joined in this group - KImErrGroupNotJoined
       
   158      * If the request is success user will leave the group.
       
   159      */
       
   160     virtual TXIMPRequestId LeaveImGroupL(const MXIMPIdentity& aGroupId) = 0;
       
   161    
       
   162     /**
       
   163      * Get the specified group properties
       
   164      *
       
   165 	 * @param [in] aGroupId
       
   166      *		Identification for IM group.
       
   167      *
       
   168 	 * @return The request ID identifying the issued request.
       
   169      *
       
   170      * /b Note: Possible error conditions
       
   171      *	/n		1. Group does't exists - KImErrGroupDoesNotExists
       
   172      *	/n		2. Not joined in this group - KImErrGroupNotJoined
       
   173      *
       
   174      * If the request is success response will have the specified group properties
       
   175      *
       
   176      */
       
   177      virtual TXIMPRequestId GetImGroupPropertiesL( MXIMPIdentity* aGroupId )= 0;
       
   178 
       
   179 
       
   180 	/**
       
   181      * Set/Modify the specified group properties
       
   182      *
       
   183 	 * @param [in] aGroupId
       
   184      *		Identification for IM group.
       
   185      * @param [in] aGroupProps
       
   186      *		Group properties need to be set for the specified group
       
   187      *
       
   188 	 * @return The request ID identifying the issued request.
       
   189      *
       
   190      * /b Note: Possible error conditions
       
   191      *	/n		1. Group does't exists - KImErrGroupDoesNotExists
       
   192      *	/n		2. Incorrect group properties - KImErrGroupPropertyNotSupported
       
   193      *	/n		3. Not allowed(having permission) to change the group properties - KImErrNotHavingPermission
       
   194      *
       
   195      * If the request is success specified group properties will be updated
       
   196      *
       
   197      */
       
   198      virtual TXIMPRequestId SetImGroupPropertiesL( MXIMPIdentity* aGroupId,
       
   199                                             MImGroupInfo* aGroupProps)= 0;
       
   200 
       
   201 	 /**
       
   202      * Get access control list of users of the specified group
       
   203      *
       
   204 	 * @param [in] aGroupId
       
   205      *		Identification for IM group.
       
   206      *
       
   207 	 * @return The request ID identifying the issued request.
       
   208 	 *
       
   209      * /b Note: Possible error conditions
       
   210      *	/n		1. Group does't exists
       
   211      *	/n		2. User does't exists
       
   212      * If the request is success responce will have access control list for the specified group
       
   213      *
       
   214      */
       
   215    virtual TXIMPRequestId GetImGroupAccessControlListL( const MXIMPIdentity& aGroupId )=0;
       
   216     /**
       
   217      * Set access control list of users for the specified group
       
   218      *
       
   219 	 * @param [in] aGroupId
       
   220      *		Identification for IM group.
       
   221 	 * @param [in] acl
       
   222      *		access control list.
       
   223 
       
   224      * @return The request ID identifying the issued request.
       
   225      * 
       
   226 	 *  /b Note: Possible error conditions
       
   227      *	/n		1. Group does't exists
       
   228      *	/n		2. User does't exists
       
   229 	 *  /n      3. User don't have access control   
       
   230      * If the request is success responce will have access control for the specified group
       
   231      *
       
   232      */
       
   233    
       
   234    virtual TXIMPRequestId SetImGroupAccessControLlistL( const MXIMPIdentity& aGroupId,
       
   235                                            MImAccessControlList* aCl ) = 0;
       
   236 
       
   237   	/**
       
   238      * Set rejected list of users of the specified group
       
   239      *
       
   240 	 * @param [in] aGroupId
       
   241      *		Identification for IM group.
       
   242      * @param [in] aRejectedList
       
   243      *      List of users need to be rejected from the group  
       
   244      * @param [in] aEnabledList
       
   245      *      List of users need to be added to the group      
       
   246      *
       
   247 	 * @return The request ID identifying the issued request.
       
   248      *
       
   249      * /b Note: Possible error conditions
       
   250      *	/n		1. Group does't exists
       
   251      *	/n		2. User does't exists
       
   252      *  /n		3. Not allowed(having permission) to chage/update users list of the group
       
   253      * If the request is success user permissions will be  
       
   254      * granted as per the request in the specified group
       
   255      *
       
   256      */
       
   257    virtual TXIMPRequestId SetImGroupRejectListL( const TDesC& aGroupId,
       
   258                                       const MDesCArray* aRejectedList,
       
   259                                       const MDesCArray* aEnabledList )= 0;
       
   260 
       
   261     
       
   262 
       
   263  public: //Prototypes for IM group member management requests
       
   264  
       
   265    /**
       
   266      * Get list of members of the indicated group
       
   267 	 * 
       
   268      * @param [in] aGroupId
       
   269      *		Identification for IM group.
       
   270      *
       
   271 	 * @return The request ID identifying the issued request.
       
   272      *
       
   273      * /b Note: Possible error conditions
       
   274      *	/n		1. Group does't exists  - KImErrGroupDoesNotExists
       
   275      *	/n		2. Not Joined in this group  - KImErrGroupNotJoined
       
   276      *
       
   277      * If the request is success,response will have list of members of the specified group
       
   278      *
       
   279      */
       
   280      virtual TXIMPRequestId GetImGroupMembersL( MXIMPIdentity* aGroupId )= 0;
       
   281       /**
       
   282      * Get lest of joined users for the specified group
       
   283      *
       
   284 	 * @param [in] aGroupId
       
   285      *		Identification for IM group.
       
   286      *
       
   287 	 * @return The request ID identifying the issued request.
       
   288      *
       
   289 	 * /b Note: Possible error conditions
       
   290      *	/n		1. Group does't exists
       
   291      *	/n		2. User does't exists
       
   292      * If the Request is success client will get list of joined users for the specified group
       
   293      *
       
   294      */
       
   295    virtual TXIMPRequestId GetImGroupJoinedUsersListL( const MXIMPIdentity& aGroupId )=0;
       
   296        
       
   297 	 /**
       
   298      * Add members to IM group
       
   299      *
       
   300 	 * @param [in] aGroupId
       
   301      *		Identification for IM group.
       
   302      * @param [in] aUserList
       
   303      *      List of users need to be added to the group     
       
   304      *
       
   305 	 * @return The request ID identifying the issued request.
       
   306      *
       
   307      * /b Note: Possible error conditions
       
   308      *	/n		1. Group does't exists
       
   309      *	/n		2. Not allowed(having permission) to change the group properties
       
   310      *
       
   311      * If the request is success user list will be added to the Group
       
   312      *
       
   313      */
       
   314    
       
   315 	virtual TXIMPRequestId AddImGroupMembersL( const MXIMPIdentity& aGroupId,const MDesCArray& aUserList )= 0;
       
   316 										
       
   317 
       
   318   /**
       
   319      * Remove members from IM group
       
   320      *
       
   321 	 * @param [in] aGroupId
       
   322      *		Identification for IM group.
       
   323      * @param [in] aUserList
       
   324      *      List of users need to be removed from the group     
       
   325      *
       
   326 	 * @return The request ID identifying the issued request.
       
   327      *
       
   328      * /b Note: Possible error conditions
       
   329      *	/n		1. Group does't exists
       
   330      *	/n		2. Not allowed(having permission) to change the group properties
       
   331      *
       
   332      * If the request is success user list will be removed to the Group
       
   333      *
       
   334      */
       
   335     virtual TXIMPRequestId RemoveImGroupMembersL( const MXIMPIdentity& aGroupId,
       
   336    											  const MDesCArray& aUserList )= 0;
       
   337 
       
   338     
       
   339     
       
   340     
       
   341     
       
   342     
       
   343     };
       
   344 
       
   345 
       
   346 
       
   347 #endif // MIMGROUPS_H