presencefwsimpleadpt/inc/simplepluginconnection.h
branchRCL_3
changeset 35 fbd2e7cec7ef
parent 0 c8caa15ef882
equal deleted inserted replaced
34:2669f8761a99 35:fbd2e7cec7ef
       
     1 /*
       
     2 * Copyright (c) 2006 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:    CSimplePluginConnection implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CSIMPLEPLUGINCONNECTION_H
       
    22 #define CSIMPLEPLUGINCONNECTION_H
       
    23 
       
    24 
       
    25 #include <ximpprotocolconnection.h>
       
    26 #include <protocolpresencefeatures.h>
       
    27 #include "msimplepluginconnectionobs.h"
       
    28 #include "msimplepluginsettings.h"
       
    29 
       
    30 class MXIMPObjectFactory;
       
    31 class MXIMPServiceInfo;
       
    32 class CSimplePluginAuthorization;
       
    33 class CSimplePluginSession;
       
    34 class CSimplePluginPublisher;
       
    35 class CSimplePluginWatcher;
       
    36 class CSimplePluginGroups;
       
    37 class CSimplePluginVariation;
       
    38 
       
    39 /**
       
    40  * CSimplePluginConnection
       
    41  *
       
    42  * Implementation of MXIMPProtocolConnection
       
    43  *
       
    44  * @lib ?library
       
    45  * @since s60 v5.0
       
    46  */
       
    47 NONSHARABLE_CLASS(CSimplePluginConnection) : public CBase,
       
    48     public MXIMPProtocolConnection,
       
    49     public MProtocolPresenceFeatures,
       
    50     public MSimplePluginConnectionObs,
       
    51     public MSimplePluginSettings  
       
    52     {
       
    53 
       
    54 public:
       
    55 
       
    56     static CSimplePluginConnection* NewL(
       
    57         const MXIMPServiceInfo& aServiceInfo,
       
    58         const MXIMPContextClientInfo& aClientCtxInfo );
       
    59 
       
    60     ~CSimplePluginConnection();
       
    61 
       
    62 private:
       
    63 
       
    64     CSimplePluginConnection();
       
    65 
       
    66 
       
    67     void ConstructL( const MXIMPServiceInfo& aServiceInfo,
       
    68                      const MXIMPContextClientInfo& aClientCtxInfo );
       
    69                      
       
    70 public:
       
    71 
       
    72     /**
       
    73      * Convert error code into PrFW errors
       
    74      * @param aStatus error code [IN]
       
    75      * @return harmonized error code
       
    76      */
       
    77     static TInt HarmonizeErrorCode( TInt aStatus );
       
    78 
       
    79 // from base class MXIMPBase
       
    80 public:
       
    81 
       
    82     /**
       
    83      * Defined in a base class
       
    84      */
       
    85     TAny* GetInterface(
       
    86         TInt32 aInterfaceId,
       
    87         TIfGetOps aOps );
       
    88 
       
    89     /**
       
    90      * Defined in a base class
       
    91      */
       
    92     const TAny* GetInterface(
       
    93         TInt32 aInterfaceId,
       
    94         TIfGetOps aOps ) const;
       
    95 
       
    96     /**
       
    97      * Defined in a base class
       
    98      */
       
    99     TInt32 GetInterfaceId() const;
       
   100 
       
   101 
       
   102 // from base class MXIMPProtocolConnection
       
   103 public:
       
   104 
       
   105     /**
       
   106      * Defined in a base class
       
   107      */
       
   108     void PrimeHost( MXIMPProtocolConnectionHost& aHost );
       
   109 
       
   110     /**
       
   111      * Defined in a base class
       
   112      */
       
   113     void OpenSessionL(
       
   114         const MXIMPContextClientInfo& aContextClient,
       
   115         TXIMPRequestId aReqId );
       
   116 
       
   117     /**
       
   118      * Defined in a base class
       
   119      */
       
   120     void OpenSessionL(
       
   121         const TInt& aSettingsId,
       
   122         TXIMPRequestId aReqId );
       
   123 
       
   124     /**
       
   125      * Defined in a base class
       
   126      */
       
   127     void CloseSession( 
       
   128         const MXIMPContextClientInfo& aContextClient,
       
   129         TXIMPRequestId aOpId );
       
   130 
       
   131     /**
       
   132      * Defined in a base class
       
   133      */
       
   134     void GetSupportedFeaturesL( CDesC8Array& aFeatures ) const;
       
   135     
       
   136     /**
       
   137      * Defined in a base class
       
   138      */    
       
   139     MProtocolPresenceFeatures& ProtocolPresenceFeatures();
       
   140     
       
   141 /*<branchInfo originator="gronoff" since="08-06-06" category="new_feature" error=”none”>
       
   142 <pf_5250_OFF_CYCLE_SW_INT>
       
   143 </branchInfo>*/
       
   144 // BRANCH 08-06-06 : gronoff
       
   145     TAny* GetProtocolInterface( TInt aInterfaceId );
       
   146 // BRANCH_END 08-06-06 : gronoff        
       
   147     
       
   148     
       
   149 // from base class MProtocolPresenceFeatures
       
   150 
       
   151     MProtocolPresenceWatching& PresenceWatching();
       
   152 
       
   153 
       
   154     MProtocolPresencePublishing& PresencePublishing();
       
   155 
       
   156 
       
   157     MProtocolPresentityGroups& PresentityGroups();
       
   158 
       
   159 
       
   160     MProtocolPresenceAuthorization& PresenceAuthorization();  
       
   161     
       
   162     
       
   163 
       
   164 // from base class MSimplePluginConnectionObs
       
   165 
       
   166     /**
       
   167      * Defined in a base class
       
   168      */
       
   169     void CompleteReq( TReqType aType, TInt aStatus );
       
   170 
       
   171     /**
       
   172      * Defined in a base class
       
   173      */
       
   174     void CompleteReq( TXIMPRequestId aReqId, TInt aStatus );
       
   175     
       
   176     /**
       
   177      * Defined in a base class
       
   178      */
       
   179     void CompleteWinfoReq( TXIMPRequestId aReqId, TInt aStatus );      
       
   180 
       
   181     /**
       
   182      * Defined in a base class
       
   183      */
       
   184     MXIMPObjectFactory& ObjectFactory();
       
   185     
       
   186     /**
       
   187      * Defined in a base class
       
   188      */    
       
   189     MPresenceObjectFactory& PresenceObjectFactory();    
       
   190 
       
   191     /**
       
   192      * Defined in a base class
       
   193      */
       
   194     CSimplePluginWinfo* WinfoHandlerL();
       
   195 
       
   196     /**
       
   197      * Defined in a base class
       
   198      */
       
   199     void WinfoTerminatedL( TInt aReason );
       
   200 
       
   201     /**
       
   202      * Defined in a base class
       
   203      */
       
   204     void WinfoNotification( MSimpleWinfo& aWinfo );
       
   205 
       
   206     /**
       
   207      * Defined in a base class
       
   208      */
       
   209     CSimplePluginXdmUtils* XdmUtilsL();
       
   210 
       
   211     /**
       
   212      * Defined in a base class
       
   213      */
       
   214     MXIMPProtocolConnectionHost* Host();
       
   215 
       
   216     
       
   217 // from base class MSimplePluginSettings 
       
   218 
       
   219     /**
       
   220      * Defined in a base class
       
   221      */
       
   222     TPtrC16 CurrentSipPresentity();
       
   223 
       
   224     /**
       
   225      * Defined in a base class
       
   226      */
       
   227     TPtrC8 CurrentSipPresentity8();
       
   228 
       
   229     /**
       
   230      * Defined in a base class
       
   231      */
       
   232     TPtrC16 CurrentDomain();
       
   233     
       
   234     /**
       
   235      * Variation
       
   236      */
       
   237     CSimplePluginVariation& Variation();  
       
   238     
       
   239 private:
       
   240 
       
   241     
       
   242 
       
   243 private:    // data members
       
   244 
       
   245     /**
       
   246      * Host for connection.
       
   247      * Not own.
       
   248      */
       
   249     MXIMPProtocolConnectionHost* iConnectionHost;
       
   250 
       
   251     /**
       
   252      * Simple Engine session
       
   253      * Own.
       
   254      */
       
   255     CSimplePluginSession* iSession;
       
   256 
       
   257     /**
       
   258      * current request id
       
   259      */
       
   260     TXIMPRequestId iPrFwId;
       
   261 
       
   262     /**
       
   263      * MProtocolPresenceAuthorization implementation.
       
   264      * Own.
       
   265      */
       
   266     CSimplePluginAuthorization* iAuth;
       
   267 
       
   268     /**
       
   269      * CSimplePluginWinfo
       
   270      * Own.
       
   271      */
       
   272     CSimplePluginWinfo* iPluginWinfo;
       
   273 
       
   274     /**
       
   275      * CSimplePluginPublisher
       
   276      * Own.
       
   277      */
       
   278     CSimplePluginPublisher* iPublisher;
       
   279 
       
   280     /**
       
   281      * CSimplePluginWatcher
       
   282      * Own.
       
   283      */
       
   284     CSimplePluginWatcher* iWatcher;
       
   285 
       
   286     /**
       
   287      * CSimplePluginGroups
       
   288      * Own.
       
   289      */
       
   290     CSimplePluginGroups* iGroups;
       
   291 
       
   292     /**
       
   293      * Current user SIP identity
       
   294      * Own.
       
   295      */
       
   296     HBufC16* iSipPresentity;
       
   297 
       
   298     /**
       
   299      * XDM utils
       
   300      * Own.
       
   301      */
       
   302     CSimplePluginXdmUtils* iXdmUtils;
       
   303     
       
   304     
       
   305     /**
       
   306      * Run time variation
       
   307      * Own
       
   308      */
       
   309     CSimplePluginVariation* iVariation;    
       
   310 
       
   311     };
       
   312 
       
   313 
       
   314 #endif // CSIMPLEPLUGIN_H