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