telutils/phoneparser/inc/CPhoneGsmParser.h
changeset 0 ff3b6d0fd310
child 12 ae8abd0db65c
child 43 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2002 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:  It is class that provides parsing functionality.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHONEGSMPARSER_H
       
    20 #define CPHONEGSMPARSER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include    <e32base.h>
       
    24 #include    "CPhoneGsmParserBase.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CPhoneGsmParserResult;
       
    28 class CPhoneGsmOptionContainerBase;
       
    29 class CPhoneGsmOptionContainer;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 * It is class that provides parsing functionality.
       
    35 *
       
    36 * @since 1.0
       
    37 * @lib phoneparser.lib.
       
    38 */
       
    39 NONSHARABLE_CLASS( CPhoneGsmParser )
       
    40     : public CPhoneGsmParserBase
       
    41     {           
       
    42     public:  // Constructors and destructor      
       
    43         
       
    44         /**
       
    45         * Two-phased constructor.
       
    46         *
       
    47         * Note that ownership is transferred!
       
    48         */
       
    49         static CPhoneGsmParser* NewL(
       
    50             CPhoneGsmParserBase* aSsProcedure,
       
    51             CPhoneGsmParserBase* aSimControlProcedure,
       
    52             CPhoneGsmParserBase* aPhoneNumber,
       
    53             CPhoneGsmParserBase* aManufacturerSpecific,
       
    54             CPhoneGsmParserBase* aEmergencyNumberParser,
       
    55             CPhoneGsmParserBase* iVoipNumber,
       
    56             CPhoneGsmParserBase* iImeiParser );
       
    57         
       
    58         /**
       
    59         * Destructor.
       
    60         */
       
    61         ~CPhoneGsmParser();
       
    62 
       
    63     public: // New functions
       
    64         
       
    65         /**
       
    66         * From CPhoneGsmParserBase.
       
    67         * Parses the string.
       
    68         *
       
    69         * @param aString It is string to be parsed.
       
    70         * @param aResult It will contain the results of parsing.
       
    71         * @param aOptions It is option container.
       
    72         */
       
    73         TBool ParseL( 
       
    74             const TDesC& aString, 
       
    75             CPhoneGsmParserResult& aResult,
       
    76             CPhoneGsmOptionContainerBase& aOptions );
       
    77 
       
    78     private:
       
    79 
       
    80         /**
       
    81         * C++ default constructor.
       
    82         */
       
    83         CPhoneGsmParser(
       
    84             CPhoneGsmParserBase* aSsProcedure,
       
    85             CPhoneGsmParserBase* aSimControlProcedure,
       
    86             CPhoneGsmParserBase* aPhoneNumber,
       
    87             CPhoneGsmParserBase* aManufacturerSpecific,
       
    88             CPhoneGsmParserBase* aEmergencyNumberParser,
       
    89             CPhoneGsmParserBase* iVoipNumber,
       
    90             CPhoneGsmParserBase* iImeiParser );
       
    91 
       
    92         /**
       
    93         * By default Symbian OS constructor is private.
       
    94         */
       
    95         void ConstructL();
       
    96 
       
    97         /**
       
    98         * Parses the string.
       
    99         */
       
   100         TBool DoParseL( 
       
   101             const TDesC& aString, 
       
   102             CPhoneGsmParserResult& aResult,
       
   103             CPhoneGsmOptionContainer& aOptions );
       
   104 
       
   105         /**
       
   106         * Define string as unstructured supplementary service.
       
   107         */
       
   108         TBool DefineAsUssdL( 
       
   109             const TDesC& aString,
       
   110             CPhoneGsmParserResult& aResult,
       
   111             CPhoneGsmOptionContainer& aOptions );
       
   112         
       
   113     private:    // Data
       
   114 
       
   115         // Owned supplementary service procedurwe parser.
       
   116         CPhoneGsmParserBase* iGsmSsProcedure;
       
   117 
       
   118         // Owned SIM control procedure parser.
       
   119         CPhoneGsmParserBase* iGsmSimControlProcedure;
       
   120 
       
   121         // Owned phone number parser.
       
   122         CPhoneGsmParserBase* iGsmPhoneNumber;
       
   123 
       
   124         // Owned manufacturer specific procedure parser.
       
   125         CPhoneGsmParserBase* iGsmManufacturerProcedure;
       
   126         
       
   127         // Owned emergency number parser.
       
   128         CPhoneGsmParserBase* iGsmEmergencyNumber;
       
   129         
       
   130         // Owned voip number parser.
       
   131         CPhoneGsmParserBase* iVoipNumber;
       
   132 
       
   133         // Owned IMEI parser.
       
   134         CPhoneGsmParserBase* iImeiParser;
       
   135 
       
   136     };
       
   137 
       
   138 #endif      // CPHONEGSMPARSER_H
       
   139             
       
   140 // End of File