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