engines/vmbxengine/inc/vmspshandler.h
branchRCL_3
changeset 20 987c9837762f
parent 0 ff3b6d0fd310
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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:  Service provider settings handler
       
    15  *
       
    16 */
       
    17 
       
    18 #ifndef C_VMSPSHANDLER_H
       
    19 #define C_VMSPSHANDLER_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 #include <mspnotifychangeobserver.h>
       
    25 #include <spsettingsvoiputils.h>
       
    26 
       
    27 // CONSTANTS
       
    28 // None
       
    29 
       
    30 // MACROS
       
    31 // None
       
    32 
       
    33 // DATA TYPES
       
    34 // None
       
    35 
       
    36 // FUNCTION PROTOTYPES
       
    37 // None
       
    38 
       
    39 // FORWARD DECLARATIONS
       
    40 class CSPSettings;
       
    41 class CSPNotifyChange;
       
    42 class TVmbxServiceInfo;
       
    43 class MServiceNotifyHandler;
       
    44 
       
    45 // CLASS DECLARATION
       
    46 
       
    47 /**
       
    48  *  CVmSPSHandler declaration.
       
    49  *  Service provider settings handler is used to access service and
       
    50  *  sub-service configuration data.
       
    51  *
       
    52  *  @since S60 3.2
       
    53  */
       
    54 NONSHARABLE_CLASS( CVmSPSHandler ) : public CBase,
       
    55                                      private MSPNotifyChangeObserver
       
    56     {
       
    57 
       
    58 public: // Constructors and destructor
       
    59 
       
    60     /**
       
    61     * Two-phased constructor.
       
    62     */
       
    63     static CVmSPSHandler* NewL();
       
    64 
       
    65     /**
       
    66      * Two-phased constructor.
       
    67      */
       
    68     static CVmSPSHandler* NewLC();
       
    69 
       
    70     /**
       
    71      * Destructor.
       
    72      */
       
    73     virtual ~CVmSPSHandler();
       
    74 
       
    75 public: // New functions
       
    76 
       
    77     /**
       
    78      * Get service ids
       
    79      * @since S60 3.2
       
    80      * @param aServiceIds On completion contains service ids
       
    81      */
       
    82     void GetServiceIdsL( RArray<TUint>& aServiceIds ) const;
       
    83 
       
    84     /**
       
    85      * Get service ids
       
    86      * @since S60 3.2
       
    87      * @param aServiceInfo On completion contains service ids
       
    88      */
       
    89     TInt GetServiceInfo( TVmbxServiceInfo& aServiceInfo ) const;
       
    90 
       
    91     /**
       
    92      * Get service's VMBX address
       
    93      * @since S60 3.2
       
    94      * @param aServiceId Used Service
       
    95      * @param aService On completion, contains service's address
       
    96      */
       
    97     void GetVmAddressL( const TUint32 aServiceId, TDes& aAddress ) const;
       
    98 
       
    99     /**
       
   100      * Get service's name
       
   101      * @since S60 3.2
       
   102      * @param aServiceId Used Service
       
   103      * @param aName On completion, contains service's name
       
   104      */
       
   105     void GetServiceNameL( const TUint32 aServiceId, TDes& aName ) const;
       
   106 
       
   107     /**
       
   108      * Get SNAP id
       
   109      * @since S60 3.2
       
   110      * @param aServiceId Used Service
       
   111      * @param aSNAPId On completion, contains SNAP Id
       
   112      */
       
   113     void GetSNAPIdL( TUint32 aServiceId, TInt& aSNAPId ) const;
       
   114 
       
   115     /**
       
   116      * Get brand id
       
   117      * @since S60 3.2
       
   118      * @param aServiceId Used Service
       
   119      * @param aBrandId On completion, contains Brand Id
       
   120      */
       
   121     void BrandIdL( TInt aServiceId, TDes8& aBrandId );
       
   122 
       
   123     /**
       
   124      * Check is given service already activated
       
   125      * @since S60 3.2
       
   126      * @param aServiceId Used Service
       
   127      * @return ETrue if Service is already activated
       
   128      */
       
   129     TBool IsActivatedL( TInt aServiceId );
       
   130 
       
   131     /**
       
   132      * Issues a notify request on a Service profile change.
       
   133      * @param aHandler user's notify handler
       
   134      */
       
   135     void NotifyServiceChange( MServiceNotifyHandler* aHandler );
       
   136 
       
   137     /**
       
   138      * Cancels a notify request on a VoIP profile change.
       
   139      */
       
   140     void NotifyServiceChangeCancel();
       
   141 
       
   142     /**
       
   143      * Check from SPSettings if there are VoIP profiles
       
   144      * @since S60 3.2.3
       
   145      * @param None
       
   146      * @return ETrue if VoIP profiles were found, otherwise EFalse
       
   147      */
       
   148     TBool IsVoIPProfilesFound();
       
   149 
       
   150 protected:
       
   151 
       
   152     /**
       
   153      * Handle notify change event.
       
   154      * From MSPNotifyChangeObserver;
       
   155      *
       
   156      * @since S60 3.2
       
   157      * @param aServiceId The service ID of changed service
       
   158      */
       
   159     void HandleNotifyChange( TServiceId aServiceId );
       
   160 
       
   161     /**
       
   162      * Handle error
       
   163      *
       
   164      * @since S60 3.2
       
   165      */
       
   166     void HandleError( TInt aError );
       
   167 
       
   168 private:
       
   169 
       
   170     /**
       
   171      * Is VMBX supported
       
   172      * @since S60 3.2
       
   173      * @param aServiceId Used Service
       
   174      * @return ETrue if VMBX is supported
       
   175      */
       
   176     TBool IsVbmxSupportedL( TUint32 aServiceId ) const;
       
   177 
       
   178     /**
       
   179      * C++ default constructor.
       
   180      */
       
   181     CVmSPSHandler();
       
   182 
       
   183     /**
       
   184      * By default Symbian 2nd phase constructor is private.
       
   185      */
       
   186     void ConstructL();
       
   187 
       
   188 private: // data
       
   189 
       
   190     /**
       
   191      * CSPSettings. Own
       
   192      */
       
   193     CSPSettings*                    iSettings;
       
   194 
       
   195     /**
       
   196      * CSPSettingsVoIPUtils. Own
       
   197      */
       
   198     CSPSettingsVoIPUtils* iSpsSettingsVoipUtils;
       
   199 
       
   200     /**
       
   201      * Observer. Not own
       
   202      */
       
   203     MServiceNotifyHandler*          iObserver;
       
   204 
       
   205     /**
       
   206      * Pointer to CSPNotifyChange
       
   207      */
       
   208     CSPNotifyChange*                 iNotifier;
       
   209 
       
   210     /**
       
   211      * Service id array
       
   212      */
       
   213     RIdArray                        iServiceIds;
       
   214 
       
   215     };
       
   216 
       
   217 #endif // C_VMSPSHANDLER_H
       
   218 
       
   219 // End of file