mmsharing/mmshengine/inc/mussipprofilehandler.h
branchRCL_3
changeset 22 73a1feb507fb
parent 0 f0cf47e981f9
child 23 bc78a40cd63c
equal deleted inserted replaced
21:33a5d2bbf6fc 22:73a1feb507fb
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:
    14 * Description:
       
    15 *  Version     : %version: 6.1.4 % << Don't touch! Updated by Synergy at check-out.
    15 *
    16 *
    16 */
    17 */
       
    18 
    17 
    19 
    18 
    20 
    19 #ifndef MUSSIPPROFILEHANDLER_H
    21 #ifndef MUSSIPPROFILEHANDLER_H
    20 #define MUSSIPPROFILEHANDLER_H
    22 #define MUSSIPPROFILEHANDLER_H
    21 
    23 
    43 */
    45 */
    44 class CMusSipProfileHandler : public CBase,
    46 class CMusSipProfileHandler : public CBase,
    45                               public MSIPProfileRegistryObserver,
    47                               public MSIPProfileRegistryObserver,
    46                               public MSIPObserver,
    48                               public MSIPObserver,
    47                               public MSIPConnectionObserver,
    49                               public MSIPConnectionObserver,
    48                               public MSipProfileAlrObserver
    50                               public MSipProfileAlrObserver                             
    49                               
       
    50     {
    51     {
    51     MUS_UNITTEST( UT_CMusEngSipProfileHandler )
    52     MUS_UNITTEST( UT_CMusEngSipProfileHandler )
    52     
    53     
    53     public:
    54     public:
    54 
    55 
    55 		/**
    56         /**
    56         * Creates new instance of CMusSipProfileHandler
    57         * Creates new instance of CMusSipProfileHandler
    57         * @param aSipProfileId profile id of requested profile
    58         * @param aSipProfileId profile id of requested profile
    58         */
    59         */
    59         static CMusSipProfileHandler* NewL( MMusSipProfileUser& aUser );
    60         static CMusSipProfileHandler* NewL( MMusSipProfileUser& aUser );
    60 
    61 
    64         */
    65         */
    65         ~CMusSipProfileHandler();
    66         ~CMusSipProfileHandler();
    66 
    67 
    67 
    68 
    68     public: // API
    69     public: // API
    69 
    70         
    70 		/**
    71         /**
    71         * Creates the SIP profile used.
    72         * Creates the SIP profile used.
    72         * @param aSipProfileId profile ID of requested SIP profile
    73         * @param aSipProfileId profile ID of requested SIP profile
    73         */
    74         */
    74         void CreateProfileL( TUint32 aSipProfileId );
    75         void CreateProfileL( TUint32 aSipProfileId );
    75         
    76         
    92         * Refreshes the availabilities of the access points 
    93         * Refreshes the availabilities of the access points 
    93         * for the used SIP profile.
    94         * for the used SIP profile.
    94         * Should be called when a MuS session terminates.
    95         * Should be called when a MuS session terminates.
    95         */
    96         */
    96         void RefreshIapAvailabilities();
    97         void RefreshIapAvailabilities();
    97 
    98         
       
    99         /**
       
   100          * @return ETrue if SIP profile returned by Profile() is registered
       
   101          */
       
   102         TBool IsRegistered();
       
   103 
       
   104         
    98     private:
   105     private:
    99 
   106 
   100         /**
   107         /**
   101         * Constructor
   108         * Constructor
   102         *
       
   103         */
   109         */
   104         CMusSipProfileHandler( MMusSipProfileUser& aUser );
   110         CMusSipProfileHandler( MMusSipProfileUser& aUser );
   105 
   111 
   106         /**
   112         /**
   107         * Second-phase constructor
   113         * Second-phase constructor
   108         *
       
   109         */
   114         */
   110         void ConstructL();
   115         void ConstructL();
   111 
       
   112 
   116 
   113     private: // From MSIPProfileRegistryObserver
   117     private: // From MSIPProfileRegistryObserver
   114 
   118 
   115         /**
   119         /**
   116         * An event related to SIP Profile has accorred
   120         * An event related to SIP Profile has accorred
   132         */
   136         */
   133         void ProfileRegistryErrorOccurred( 
   137         void ProfileRegistryErrorOccurred( 
   134             TUint32 aProfileId,
   138             TUint32 aProfileId,
   135             TInt aError );
   139             TInt aError );
   136 
   140 
   137 	private: // From MSIPObserver
   141     private: // From MSIPObserver    
   138  	
   142 
   139         void IncomingRequest( TUint32 aIapId,
   143         void IncomingRequest( TUint32 aIapId,
   140                               CSIPServerTransaction* aTransaction );
   144                               CSIPServerTransaction* aTransaction );
   141 
   145 
   142         void TimedOut( CSIPServerTransaction& aTransaction );
   146         void TimedOut( CSIPServerTransaction& aTransaction );
   143 
   147 
   144 	private: // MSIPConnectionObserver must be implemented to enable SIP profile
   148     private: // MSIPConnectionObserver must be implemented to enable SIP profile
   145 
   149         
   146         void IncomingRequest (CSIPServerTransaction* aTransaction );
   150         void IncomingRequest (CSIPServerTransaction* aTransaction );
   147 
   151 
   148         void IncomingRequest (CSIPServerTransaction* aTransaction,
   152         void IncomingRequest (CSIPServerTransaction* aTransaction,
   149                               CSIPDialog& aDialog );
   153                               CSIPDialog& aDialog );
   150 
   154 
   166                            CSIPRegistrationBinding& aRegistration );
   170                            CSIPRegistrationBinding& aRegistration );
   167 
   171 
   168         void ErrorOccured( TInt aError,
   172         void ErrorOccured( TInt aError,
   169                            CSIPTransactionBase& aTransaction,
   173                            CSIPTransactionBase& aTransaction,
   170                            CSIPDialogAssocBase& aDialogAssoc );
   174                            CSIPDialogAssocBase& aDialogAssoc );
   171 
   175         
   172         void ErrorOccured( TInt aError, CSIPRefresh& aSIPRefresh );
   176         void ErrorOccured( TInt aError, CSIPRefresh& aSIPRefresh );
   173 
   177 
   174         void ErrorOccured( TInt aError,
   178         void ErrorOccured( TInt aError, 
   175                            CSIPRegistrationBinding& aRegistration );
   179                            CSIPRegistrationBinding& aRegistration );
   176 
   180 
   177         void ErrorOccured( TInt aError, CSIPDialogAssocBase& aDialogAssoc );
   181         void ErrorOccured( TInt aError, CSIPDialogAssocBase& aDialogAssoc );
   178 
   182 
   179         void InviteCompleted( CSIPClientTransaction& aTransaction );
   183         void InviteCompleted( CSIPClientTransaction& aTransaction );
   180 
   184 
   181         void InviteCanceled( CSIPServerTransaction& aTransaction );
   185         void InviteCanceled( CSIPServerTransaction& aTransaction );
   182 
   186         
   183         void ConnectionStateChanged( CSIPConnection::TState aState );
   187         void ConnectionStateChanged( CSIPConnection::TState aState );     
   184 
   188         
   185 	private: // From MSipProfileAlrObserver
   189     private: // From MSipProfileAlrObserver    
   186         
   190         
   187         void AlrEvent( MSipProfileAlrObserver::TEvent aEvent,
   191         void AlrEvent( MSipProfileAlrObserver::TEvent aEvent,
   188                        TUint32 aProfileId,
   192                        TUint32 aProfileId,
   189                        TUint32 aSnapId,
   193                        TUint32 aSnapId,
   190                        TUint32 aIapId );
   194                        TUint32 aIapId );
   191 
   195 
   192         void AlrError( TInt aError,
   196         void AlrError( TInt aError,
   193                        TUint32 aProfileId,
   197                        TUint32 aProfileId,
   194                        TUint32 aSnapId,
   198                        TUint32 aSnapId,
   195                        TUint32 aIapId );
   199                        TUint32 aIapId );         
   196                        
   200   
   197 	private: // New functions
   201     private: // New functions
   198         
   202         
   199         TUint32 ProfileId() const;
   203         TUint32 ProfileId() const;
   200 
   204         
   201     private: // DATA
   205     private: // DATA
   202     
   206         
   203     	MMusSipProfileUser& iUser;
   207         MMusSipProfileUser& iUser;
   204         CSIP* iSip;
   208         CSIP* iSip;
   205         CSIPProfileRegistry* iProfileRegistry;
   209         CSIPProfileRegistry* iProfileRegistry;
   206         CSipProfileAlrController* iProfileAlrController;
   210         CSipProfileAlrController* iProfileAlrController;
   207         CSIPProfile* iSipProfile;
   211         CSIPProfile* iSipProfile;
   208     };
   212     };
   209 
   213 
       
   214 
   210 #endif // MUSSIPPROFILEHANDLER_H
   215 #endif // MUSSIPPROFILEHANDLER_H