wvuing/wvuiada/Inc/MCAImpsGroupClient.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Abstract interface for group services (RImpsGroupClient)
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MCAIMPSGROUPCLIENT_H
       
    21 #define MCAIMPSGROUPCLIENT_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "MCAImpsClient.h"
       
    25 #include <ImpsGroupCli.h>
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 *  Interface for group services.
       
    31 *  Same interface as RImpsGroupClient.
       
    32 *  Comments are copied from RImpsGroupClient.
       
    33 *
       
    34 *  @lib CAAdapter.dll
       
    35 *  @since 1.2
       
    36 */
       
    37 class MCAImpsGroupClient : public MCAImpsClient
       
    38     {
       
    39     public: // New functions
       
    40 
       
    41         // INITILIZATION AND CONNECT
       
    42 
       
    43         /**
       
    44         * Registers the listener object for Group events.
       
    45         * @since 1.2
       
    46         * @param aObserver The observer instance.
       
    47         * @param aApplicationId application UID or
       
    48         *                another unique id for your application.
       
    49         * @param aPriority observer priority. Refer to CActive priority.
       
    50         */
       
    51         virtual void RegisterL(
       
    52             MImpsGroupHandler2* aObserver,
       
    53             TUid aApplicationId,
       
    54             TInt aPriority = 0 ) = 0;
       
    55 
       
    56         /**
       
    57         * Unregisters the listener object and disconnects from the Symbian OS server.
       
    58         * @since 1.2
       
    59         */
       
    60         virtual void Unregister() = 0;
       
    61 
       
    62         // WV PROTOCOL REQUESTS
       
    63 
       
    64         /**
       
    65         * From MCAImpsGroupClient Creates a group.
       
    66         * MImpsGroupHandler::HandleCompleteL handles the server response.
       
    67         * Leaves if out of memory before sending a message to the Symbian OS server.
       
    68         * @since 1.2
       
    69         * @param aGroupId group id
       
    70         * @param aProperties initial group properties
       
    71         * @param aScreenName ScreenName of the user
       
    72         * @param aJoinGroup indicates that the newly created group is joined (or not) at creation time.
       
    73         * @param aSubscribeNotification indicates if we sucscribe notification.
       
    74         * @return oparation-id (positive)
       
    75         */
       
    76         virtual TInt CreateGroupL(
       
    77             const TDesC& aGroupId,
       
    78             const CImpsCommonGroupProps* aProperties,
       
    79             const TDesC& aScreenName,
       
    80             TBool aJoinGroup,
       
    81             TBool aSubscribeNotification = EFalse
       
    82         ) = 0;
       
    83 
       
    84         /**
       
    85         * Delete a group.
       
    86         * MImpsGroupHandler::HandleCompleteL handles the server response.
       
    87         * Leaves if out of memory before sending a message to the Symbian OS server.
       
    88         * @since 1.2
       
    89         * @param aGroupId group id
       
    90         * @return oparation-id (positive)
       
    91         */
       
    92         virtual TInt DeleteGroupL(
       
    93             const TDesC& aGroupId
       
    94         ) = 0;
       
    95 
       
    96         /**
       
    97         * Join a group.
       
    98         * MImpsGroupHandler::HandleJoinL handles the server response.
       
    99         * Leaves if out of memory before sending a message to the Symbian OS server.
       
   100         * @since 1.2
       
   101         * @param aGroupId group id
       
   102         * @param aScreenName screen name for the user, optional (may be zero length)
       
   103         * @param aUsers ETrue if a user wants to get list of joined users in a reponse,
       
   104         * @param aSubscribeNotification indicates if we sucscribe notification.
       
   105         * @return oparation-id (positive)
       
   106         */
       
   107         virtual TInt JoinGroupL(
       
   108             const TDesC& aGroupId,
       
   109             const TDesC& aScreenName,
       
   110             TBool aUsers,
       
   111             TBool aSubscribeNotification = EFalse
       
   112         ) = 0;
       
   113 
       
   114         /**
       
   115         * Leave a group.
       
   116         * MImpsGroupHandler::HandleLeaveL handles the server response.
       
   117         * Leaves if out of memory before sending a message to the Symbian OS server.
       
   118         * @since 1.2
       
   119         * @param aGroupId group id
       
   120         * @return oparation-id (positive)
       
   121         */
       
   122         virtual TInt LeaveGroupL(
       
   123             const TDesC& aGroupId
       
   124         ) = 0;
       
   125 
       
   126         /**
       
   127         * Get group members.
       
   128         * MImpsGroupHandler::HandleGroupMembersL handles the server response.
       
   129         * Leaves if out of memory before sending a message to the Symbian OS server.
       
   130         * @since 1.2
       
   131         * @param aGroupId group id
       
   132         * @return oparation-id (positive)
       
   133         */
       
   134         virtual TInt GroupMembersL(
       
   135             const TDesC& aGroupId
       
   136         ) = 0;
       
   137 
       
   138         /**
       
   139         * From MCAImpsGroupClient Add group members.
       
   140         * The new users' type is ordinary initially.
       
   141         * MImpsGroupHandler::HandleCompleteL handles the server response.
       
   142         * Leaves if out of memory before sending a message to the Symbian OS server.
       
   143         * @since 1.2
       
   144         * @param aGroupId target group id
       
   145         * @param aUserList list of users to be added (user-ids)
       
   146         * @param aScreenNameList Screennames of the users
       
   147         * @return oparation-id (positive)
       
   148         */
       
   149         virtual TInt AddMembersL(
       
   150             const TDesC& aGroupId,
       
   151             const MDesCArray& aUserList,
       
   152             const MDesCArray& aScreenNameList
       
   153         ) = 0;
       
   154 
       
   155         /**
       
   156         * Remove group members.
       
   157         * MImpsGroupHandler::HandleCompleteL handles the server response.
       
   158         * Leaves if out of memory before sending a message to the Symbian OS server.
       
   159         * @since 1.2
       
   160         * @param aGroupId target group id
       
   161         * @param aUserList list of users to be removed
       
   162         * @return oparation-id (positive)
       
   163         */
       
   164         virtual TInt RemoveMembersL(
       
   165             const TDesC& aGroupId,
       
   166             const MDesCArray& aUserList
       
   167         ) = 0;
       
   168 
       
   169         /**
       
   170         * Modify members' access rights.
       
   171         * MImpsGroupHandler::HandleCompleteL handles the server response.
       
   172         * Leaves if out of memory before sending a message to the Symbian OS server.
       
   173         * @since 1.2
       
   174         * @param aGroupId target group id
       
   175         * @param aAdminList list of new administrators user-ids
       
   176         * @param aModerList list of new moderators user-ids
       
   177         * @param aOrdinaryList list of new ordinary users user-ids
       
   178         * @return oparation-id (positive)
       
   179         */
       
   180         virtual TInt ModifyMembersAccessL(
       
   181             const TDesC& aGroupId,
       
   182             const MDesCArray* aAdminList,
       
   183             const MDesCArray* aModerList,
       
   184             const MDesCArray* aOrdinaryList
       
   185         ) = 0;
       
   186 
       
   187         /**
       
   188         * Get group properties.
       
   189         * MImpsGroupHandler::HandleGroupPropertiesL handles the server response.
       
   190         * Leaves if out of memory before sending a message to the Symbian OS server.
       
   191         * @since 1.2
       
   192         * @param aGroupId target group id
       
   193         * @return oparation-id (positive)
       
   194         */
       
   195         virtual TInt GroupPropertiesL(
       
   196             const TDesC& aGroupId
       
   197         ) = 0;
       
   198 
       
   199         /**
       
   200         * Set group properties.
       
   201         * MImpsGroupHandler::HandlecompleteL handles the server response.
       
   202         * Leaves if out of memory before sending a message to the Symbian OS server.
       
   203         * @since 1.2
       
   204         * @param aGroupId target group id
       
   205         * @param aGroupProps common properties
       
   206         * @param aOwnProps user's own properties
       
   207         * @return oparation-id (positive)
       
   208         */
       
   209         virtual TInt SetGroupPropertiesL(
       
   210             const TDesC& aGroupId,
       
   211             const CImpsCommonGroupProps* aGroupProps,
       
   212             const CImpsPrivateGroupProps* aOwnProps
       
   213         ) = 0;
       
   214 
       
   215         /**
       
   216         * Update or get list of rejected users.
       
   217         * MImpsGroupHandler::HandleRejectListL handles the server response.
       
   218         * If you want to get the current reject list only, then
       
   219         * give aGroupId parameter only.
       
   220         * Leaves if out of memory before sending a message to the Symbian OS server.
       
   221         * @since 1.2
       
   222         * @param aGroupId target group id
       
   223         * @param aRejectedList users to be added to the reject list (user-ids)
       
   224         *        May be NULL.
       
   225         * @param aEnabledList users to be removed from the reject list (user-ids)
       
   226         *        May be NULL.
       
   227         * @return oparation-id (positive)
       
   228         */
       
   229         virtual TInt SetRejectListL(
       
   230             const TDesC& aGroupId,
       
   231             const MDesCArray* aRejectedList,
       
   232             const MDesCArray* aEnabledList
       
   233         ) = 0;
       
   234 
       
   235         /**
       
   236         * Subscribe group change notice.
       
   237         * MImpsGroupHandler::HandleCompleteL handles the server response.
       
   238         * After successfull subscription HandleGroupPropertiesL,
       
   239         * HandleNewUsersL and HandleLeftUsersL methods are called
       
   240         * whenever remote service sends notifications.
       
   241         * Leaves if out of memory before sending a message to the Symbian OS server.
       
   242         * @since 1.2
       
   243         * @param aGroupId group id
       
   244         * @return oparation-id (positive)
       
   245         */
       
   246         virtual TInt SubscribeL(
       
   247             const TDesC& aGroupId
       
   248         ) = 0;
       
   249 
       
   250         /**
       
   251         * Unsubscribe group change notice.
       
   252         * MImpsGroupHandler::HandleCompleteL handles the server response.
       
   253         * Leaves if out of memory before sending a message to the Symbian OS server.
       
   254         * @since 1.2
       
   255         * @param aGroupId group id
       
   256         * @return oparation-id (positive)
       
   257         */
       
   258         virtual TInt UnsubscribeL(
       
   259             const TDesC& aGroupId
       
   260         ) = 0;
       
   261 
       
   262         /**
       
   263         * Check the group change subscription status.
       
   264         * MImpsGroupHandler::HandleSubscriptionL handles the server response.
       
   265         * Leaves if out of memory before sending a message to the Symbian OS server.
       
   266         * @since 1.2
       
   267         * @param aGroupId group id
       
   268         * @return oparation-id (positive)
       
   269         */
       
   270         virtual TInt CheckSubscriptionL(
       
   271             const TDesC& aGroupId
       
   272         ) = 0;
       
   273 
       
   274     protected:  // New functions
       
   275 
       
   276         /**
       
   277         * Destructor.
       
   278         */
       
   279         virtual ~MCAImpsGroupClient() { };
       
   280     };
       
   281 
       
   282 #endif      // MCAIMPSGROUPCLIENT_H
       
   283 
       
   284 // End of File