imsrv_plat/ximp_presence_protocol_plugin_api/inc/protocolpresencewatching.h
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     1 /*
       
     2 * Copyright (c) 2006, 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:  Interface for presence protocol watching object.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MXIMPFWPROTOCOLPRESENCEWATCHING_H
       
    19 #define MXIMPFWPROTOCOLPRESENCEWATCHING_H
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <badesca.h>
       
    23 #include <presenceprotocolpluginifids.hrh>
       
    24 #include <ximpbase.h>
       
    25 
       
    26 
       
    27 class MPresenceInfo;
       
    28 class MPresenceInfoFilter;
       
    29 class MXIMPIdentity;
       
    30 
       
    31 
       
    32 /**
       
    33  * Interface for presence protocol watching object.
       
    34  * Interface must be implemented by a XIMP Framework protocol
       
    35  * plug-ins.
       
    36  *
       
    37  * This interface defines actions that XIMP Framework
       
    38  * requests from a presence protocol connection to
       
    39  * execute presence watching related tasks.
       
    40  *
       
    41  * Protocol implementation must route requests received through
       
    42  * this interface, to same remote presence service destination,
       
    43  * as where the parent MXIMPProtocolConnection is connected.
       
    44  * (Here the parent MXIMPProtocolConnection means the protocol
       
    45  * connection instance from where this interface instance
       
    46  * was retrieved.)
       
    47  *
       
    48  * @see MXIMPProtocolConnection
       
    49  * @ingroup ximppresprotocolpluginapi
       
    50  * @since S60 v3.2
       
    51  */
       
    52 class MProtocolPresenceWatching : public MXIMPBase
       
    53     {
       
    54 public:
       
    55 
       
    56     /** Interface ID for the MProtocolPresenceWatching. */
       
    57     enum { KInterfaceId = PRES_IF_ID_PROTOCOL_PRESENCE_WATCHING };
       
    58 
       
    59 
       
    60 protected:
       
    61 
       
    62     /**
       
    63      * Protected destructor. MProtocolPresenceWatching
       
    64      * instancies can't be destroyed via this interface.
       
    65      */
       
    66     virtual inline ~MProtocolPresenceWatching() {};
       
    67 
       
    68 
       
    69 
       
    70 public: // Subscribe presence information from single presentities
       
    71 
       
    72 
       
    73     /**
       
    74      * Requests the protocol to subscribe presence information
       
    75      * for identified presentity.
       
    76      *
       
    77      * @param [in] aPresentityId
       
    78      *        Identification of the presentity which presence
       
    79      *        information subscribe to.
       
    80      *
       
    81      * @param [in] aPif
       
    82      *        Presence information filter indicating the set
       
    83      *        of presence information to request from the
       
    84      *        presentity.
       
    85      *
       
    86      * @param [in] aReqId
       
    87      *        Request ID identifying the issued request.
       
    88      */
       
    89     virtual void DoSubscribePresentityPresenceL(
       
    90                     const MXIMPIdentity& aPresentityId,
       
    91                     const MPresenceInfoFilter& aPif,
       
    92                     TXIMPRequestId aReqId ) = 0;
       
    93 
       
    94 
       
    95     /**
       
    96      * Requests the protocol to update presence information
       
    97      * filter (PIF) for already existing presence subscription.
       
    98      *
       
    99      * @param [in] aPresentityId
       
   100      *        Identification of the presentity which presence
       
   101      *        subscribtion PIF to update.
       
   102      *
       
   103      * @param [in] aPif
       
   104      *        Indicates the new set of presence information
       
   105      *        to request from the presentity. Given set
       
   106      *        may be "wider" or "narrower" than the already
       
   107      *        subscribed one.
       
   108      *
       
   109      * @param [in] aReqId
       
   110      *        Request ID identifying the issued request.
       
   111      */
       
   112     virtual void DoUpdatePresentityPresenceSubscriptionPifL(
       
   113                     const MXIMPIdentity& aPresentityId,
       
   114                     const MPresenceInfoFilter& aPif,
       
   115                     TXIMPRequestId aReqId ) = 0;
       
   116 
       
   117 
       
   118     /**
       
   119      * Requests the protocol to terminate presentity
       
   120      * presence information subscription.
       
   121      *
       
   122      * @param [in] aPresentityId
       
   123      *        Identification of the presentity which presence
       
   124      *        subscribtion to terminate.
       
   125      *
       
   126      * @param [in] aReqId
       
   127      *        Request ID identifying the issued request.
       
   128      */
       
   129     virtual void DoUnsubscribePresentityPresenceL(
       
   130                     const MXIMPIdentity& aPresentityId,
       
   131                     TXIMPRequestId aReqId ) = 0;
       
   132 
       
   133 
       
   134 
       
   135 
       
   136 public: // Subscribe presence information from presentity group members
       
   137 
       
   138 
       
   139     /**
       
   140      * Requests the protocol to subscribe presence information
       
   141      * for all the presentities existing in the identified
       
   142      * presentity group.
       
   143      *
       
   144      * @param [in] aGroupId
       
   145      *        Identification of the presentity group for which
       
   146      *        members to request presence information.
       
   147      *
       
   148      * @param [in] aPif
       
   149      *        Presence information filter indicating the set
       
   150      *        of presence information to request from the
       
   151      *        presentity group members.
       
   152      *
       
   153      * @param [in] aReqId
       
   154      *        Request ID identifying the issued request.
       
   155      */
       
   156     virtual void DoSubscribePresentityGroupMembersPresenceL(
       
   157                     const MXIMPIdentity& aGroupId,
       
   158                     const MPresenceInfoFilter& aPif,
       
   159                     TXIMPRequestId aReqId ) = 0;
       
   160 
       
   161 
       
   162     /**
       
   163      * Requests the protocol to update presence information
       
   164      * filter (PIF) for already existing presentity group
       
   165      * members presence subscription.
       
   166      *
       
   167      * @param [in] aGroupId
       
   168      *        Identification of the presentity group for which
       
   169      *        members presence subscribtion PIF to update.
       
   170      *
       
   171      * @param [in] aPif
       
   172      *        Indicates the new set of presence information
       
   173      *        to request from the presentities. Given set
       
   174      *        may be "wider" or "narrower" than the already
       
   175      *        subscribed one.
       
   176      *
       
   177      * @param [in] aReqId
       
   178      *        Request ID identifying the issued request.
       
   179      */
       
   180     virtual void DoUpdatePresentityGroupMembersPresenceSubscriptionPifL(
       
   181                     const MXIMPIdentity& aGroupId,
       
   182                     const MPresenceInfoFilter& aPif,
       
   183                     TXIMPRequestId aReqId ) = 0;
       
   184 
       
   185 
       
   186     /**
       
   187      * Requests the protocol to terminate presentity group
       
   188      * members presence information subscription.
       
   189      *
       
   190      * @param [in] aGroupId
       
   191      *        Identification of the presentity group
       
   192      *        which members presence subscribtion to terminate.
       
   193      *
       
   194      * @param [in] aReqId
       
   195      *        Request ID identifying the issued request.
       
   196      */
       
   197     virtual void DoUnsubscribePresentityGroupMembersPresenceL(
       
   198                     const MXIMPIdentity& aGroupId,
       
   199                     TXIMPRequestId aReqId ) = 0;
       
   200 
       
   201     };
       
   202 
       
   203 
       
   204 
       
   205 #endif // MXIMPFWPROTOCOLPRESENCEWATCHING_H