instantmessagesalert/tsrc/testinstantmsgalert/src/stubs/s_presencefeatures.h
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     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 context.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MyMPresenceFeatureStub_H
       
    19 #define MyMPresenceFeatureStub_H
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <ximpbase.h>
       
    23 #include <ximpcontext.h>
       
    24 
       
    25 #include <presencefeatures.h>
       
    26 
       
    27 class MyPresentityGroupsStub;
       
    28 
       
    29 /**
       
    30  * Interface for presence features.
       
    31  * This interface is implemented by the XIMP Framework Presence Feature plug-in.
       
    32  *
       
    33  * MPresenceFeatures is root interface for accessing
       
    34  * and updating presence data to remote presence service.
       
    35  * XIMP FW client binds MXIMPContext interface
       
    36  * to desired remote presence service and creates
       
    37  * MPresenceFeatures interface to access the XIMP FW presence related 
       
    38  * methods to publish and access presence data.
       
    39  *
       
    40  * Following sub interfaces can be accessed from
       
    41  * from MPresenceFeatures:
       
    42  *   - MPresenceObjectFactory
       
    43  *   - MPresenceWatching
       
    44  *   - MPresencePublishing
       
    45  *   - MPresentityGroups
       
    46  *   - MPresenceAuthorization
       
    47  *
       
    48  * All Presence events (context state, presence data,
       
    49  * request completion etc. ones) are delivered through
       
    50  * MPresenceContextObserver interface.
       
    51  *
       
    52  * @ingroup ximppresmanagementapi
       
    53  * @since S60 v3.2
       
    54  */
       
    55 class MyMPresenceFeatureStub : public CBase, public MPresenceFeatures
       
    56     {
       
    57 
       
    58 public:
       
    59 
       
    60     /**
       
    61      * Factory method to instantiate MPresenceFeatures.
       
    62      *
       
    63      * Factory method to instantiate platform default
       
    64      * MXIMPClient implementation through the ECom.
       
    65      * If the default presence framework isn't supported
       
    66      * in the platform, leaves with errorcode signalled
       
    67      * from ECom.
       
    68      *
       
    69      * @return The new presence client object. Object
       
    70      *         ownership is returned to caller.
       
    71      */
       
    72     static MPresenceFeatures* NewStubL( MXIMPContext* aContext );
       
    73 
       
    74     /**
       
    75      * Public destructor.
       
    76      * Objects can be deleted through this interface.
       
    77      */
       
    78     ~MyMPresenceFeatureStub();
       
    79     
       
    80 protected:
       
    81 
       
    82     /**
       
    83      * Default constructor to zero initialize
       
    84      * the iEcomDtorID member.
       
    85      */
       
    86     MyMPresenceFeatureStub();
       
    87   
       
    88 private:
       
    89 	  
       
    90     void ContructL();
       
    91 
       
    92 public: //Sub interfaces for presence context
       
    93 
       
    94 
       
    95     /**
       
    96      * Gets reference to object factory interface.
       
    97      *
       
    98      * Returned object factory interface is used
       
    99      * to instantiate presence objects.
       
   100      *
       
   101      * @return Object factory interface.
       
   102      *         No ownership is returned caller.
       
   103      */
       
   104     MPresenceObjectFactory& PresenceObjectFactory() const ;
       
   105 
       
   106 
       
   107     /**
       
   108      * Gets reference to presence watching interface.
       
   109      *
       
   110      * @return Requested interface.
       
   111      *         No ownership is returned caller.
       
   112      */
       
   113     MPresenceWatching& PresenceWatching() const ;
       
   114 
       
   115 
       
   116 
       
   117     /**
       
   118      * Gets reference to presence publishing interface.
       
   119      *
       
   120      * @return Requested interface.
       
   121      *         No ownership is returned caller.
       
   122      */
       
   123     MPresencePublishing& PresencePublishing() const ;
       
   124 
       
   125 
       
   126 
       
   127     /**
       
   128      * Gets reference to presentity groups interface.
       
   129      *
       
   130      * @return Requested interface.
       
   131      *         No ownership is returned caller.
       
   132      */
       
   133     MPresentityGroups& PresentityGroups() const ;
       
   134 
       
   135 
       
   136     /**
       
   137      * Gets reference to presence authorization interface.
       
   138      *
       
   139      * @return Requested interface.
       
   140      *         No ownership is returned caller.
       
   141      */
       
   142     MPresenceAuthorization& PresenceAuthorization() const ;
       
   143     
       
   144     const TAny* GetInterface(
       
   145                         TInt32 aInterfaceId,
       
   146                         TIfGetOps aOps ) const;
       
   147 
       
   148     TAny* GetInterface(
       
   149                         TInt32 aInterfaceId,
       
   150                         TIfGetOps aOps );
       
   151 
       
   152     TInt32 GetInterfaceId() const;
       
   153 
       
   154 
       
   155 	private:
       
   156 		MyPresentityGroupsStub* iGroups;
       
   157 		
       
   158     };
       
   159 
       
   160 
       
   161 
       
   162 
       
   163 #endif // MyMPresenceFeatureStub_H
       
   164 
       
   165 
       
   166