telutils/phoneparser/inc/CPhoneGsmParser.h
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     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         
       
    57         /**
       
    58         * Destructor.
       
    59         */
       
    60         ~CPhoneGsmParser();
       
    61 
       
    62     public: // New functions
       
    63         
       
    64         /**
       
    65         * From CPhoneGsmParserBase.
       
    66         * Parses the string.
       
    67         *
       
    68         * @param aString It is string to be parsed.
       
    69         * @param aResult It will contain the results of parsing.
       
    70         * @param aOptions It is option container.
       
    71         */
       
    72         TBool ParseL( 
       
    73             const TDesC& aString, 
       
    74             CPhoneGsmParserResult& aResult,
       
    75             CPhoneGsmOptionContainerBase& aOptions );
       
    76 
       
    77     private:
       
    78 
       
    79         /**
       
    80         * C++ default constructor.
       
    81         */
       
    82         CPhoneGsmParser(
       
    83             CPhoneGsmParserBase* aSsProcedure,
       
    84             CPhoneGsmParserBase* aSimControlProcedure,
       
    85             CPhoneGsmParserBase* aPhoneNumber,
       
    86             CPhoneGsmParserBase* aManufacturerSpecific,
       
    87             CPhoneGsmParserBase* aEmergencyNumberParser,
       
    88             CPhoneGsmParserBase* iVoipNumber);
       
    89 
       
    90         /**
       
    91         * By default Symbian OS constructor is private.
       
    92         */
       
    93         void ConstructL();
       
    94 
       
    95         /**
       
    96         * Parses the string.
       
    97         */
       
    98         TBool DoParseL( 
       
    99             const TDesC& aString, 
       
   100             CPhoneGsmParserResult& aResult,
       
   101             CPhoneGsmOptionContainer& aOptions );
       
   102 
       
   103         /**
       
   104         * Define string as unstructured supplementary service.
       
   105         */
       
   106         TBool DefineAsUssdL( 
       
   107             const TDesC& aString,
       
   108             CPhoneGsmParserResult& aResult,
       
   109             CPhoneGsmOptionContainer& aOptions );
       
   110         
       
   111     private:    // Data
       
   112 
       
   113         // Owned supplementary service procedurwe parser.
       
   114         CPhoneGsmParserBase* iGsmSsProcedure;
       
   115 
       
   116         // Owned SIM control procedure parser.
       
   117         CPhoneGsmParserBase* iGsmSimControlProcedure;
       
   118 
       
   119         // Owned phone number parser.
       
   120         CPhoneGsmParserBase* iGsmPhoneNumber;
       
   121 
       
   122         // Owned manufacturer specific procedure parser.
       
   123         CPhoneGsmParserBase* iGsmManufacturerProcedure;
       
   124         
       
   125         // Owned emergency number parser.
       
   126         CPhoneGsmParserBase* iGsmEmergencyNumber;
       
   127         
       
   128         // Owned voip number parser.
       
   129         CPhoneGsmParserBase* iVoipNumber;
       
   130     };
       
   131 
       
   132 #endif      // CPHONEGSMPARSER_H
       
   133             
       
   134 // End of File