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