sipvoipprovider/inc/svpemergencyiapprovider.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Provides IAP IDs for emergency
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_SVPEMERGENCYIAPPROVIDER_H
       
    20 #define C_SVPEMERGENCYIAPPROVIDER_H
       
    21 
       
    22 #include <rconnmon.h> // For RConnectionMonitor
       
    23 #include "svputdefs.h"
       
    24 
       
    25 /**
       
    26  *  Provides IAP IDs by using RConnectionMonitor
       
    27  *
       
    28  *  @lib svp.dll
       
    29  *  @since S60 3.2
       
    30  */
       
    31 class CSVPEmergencyIapProvider : public CActive
       
    32     {
       
    33 
       
    34 public:
       
    35 
       
    36     /**
       
    37      * Two-phased constructor.
       
    38      * @param aPriority Active object priority
       
    39      */
       
    40     static CSVPEmergencyIapProvider* NewL( TPriority aPriority );
       
    41     
       
    42     static CSVPEmergencyIapProvider* NewLC( TPriority aPriority );
       
    43     
       
    44     /**
       
    45      * Destructor.
       
    46      */
       
    47     virtual ~CSVPEmergencyIapProvider();
       
    48 
       
    49     /**
       
    50      * Requests for IAP IDs
       
    51      *
       
    52      * @since S60 3.2
       
    53      * @param aIapIds Array of IAP IDs to be filled
       
    54      * @return Error code
       
    55      */
       
    56     TInt RequestIapIds( RArray<TUint>& aIapIds );
       
    57 
       
    58 private:
       
    59 
       
    60     CSVPEmergencyIapProvider( TPriority aPriority );
       
    61 
       
    62     void ConstructL();
       
    63     
       
    64 // from base class CActive
       
    65 
       
    66     void DoCancel();
       
    67     
       
    68     void RunL();
       
    69     
       
    70 private: // data
       
    71 
       
    72     /**
       
    73      * Contains IAP info when request complete
       
    74      */
       
    75     TConnMonIapInfoBuf iIapInfoBuf;
       
    76 
       
    77     /**
       
    78      * Contains error code of request
       
    79      */
       
    80     TInt iError;
       
    81     
       
    82     /**
       
    83      * Connection monitor
       
    84      */        
       
    85     RConnectionMonitor iConnectionMonitor;
       
    86 
       
    87     /**
       
    88      * Wait object.
       
    89      * Own.
       
    90      */
       
    91     CActiveSchedulerWait* iWait;
       
    92 
       
    93 private:
       
    94 
       
    95     // For testing
       
    96     SVP_UT_DEFS
       
    97     
       
    98     };
       
    99 
       
   100 #endif // C_SVPEMERGENCYIAPPROVIDER_H