phonesrv_plat/string_parser_api/inc/CPhoneGsmParserResult.h
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     1 /*
       
     2 * Copyright (c) 2002-2006 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:  Instances will contain the results of the parsing.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHONEGSMPARSERRESULT_H
       
    20 #define CPHONEGSMPARSERRESULT_H
       
    21 
       
    22 // INCLUDES
       
    23 #include    <e32base.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 /**
       
    28 * Instances will contain the results of the parsing.
       
    29 *
       
    30 * @since 1.0
       
    31 * @lib phoneparser.lib
       
    32 */
       
    33 NONSHARABLE_CLASS( CPhoneGsmParserResult )
       
    34     : public CBase
       
    35     {
       
    36     public:  // Constructors and destructor      
       
    37         
       
    38         /**
       
    39         * Two-phased constructor.
       
    40         */
       
    41         static CPhoneGsmParserResult* NewL();
       
    42         
       
    43         /**
       
    44         * Destructor.
       
    45         */
       
    46         ~CPhoneGsmParserResult();
       
    47 
       
    48     public: // New functions
       
    49         
       
    50         /**
       
    51         * Reserve parameters.
       
    52         * 
       
    53         * @param aAmount It is the amount of parameters to reserve.
       
    54         */
       
    55         void ReserveParametersL( TUint aAmount );
       
    56 
       
    57         /**
       
    58         * Sets state to initial.
       
    59         */
       
    60         void ClearL();
       
    61 
       
    62         /**
       
    63         * Returns uid.
       
    64         */
       
    65         inline TUint Uid() const;
       
    66 
       
    67         /**
       
    68         * Returns auxilirary information.
       
    69         */
       
    70         inline TUint AuxInformation() const;
       
    71 
       
    72         /**
       
    73         * Returns the count of parameters.
       
    74         */
       
    75         inline TUint CountParameters() const;
       
    76 
       
    77         /**
       
    78         * Returns parameter at given position.
       
    79         *
       
    80         * @param aIndex It is the position.
       
    81         * @return Returns the parameter.
       
    82         */
       
    83         const TDesC& ParameterAt( TInt aIndex ) const;
       
    84 
       
    85         /**
       
    86         * Sets the uid.
       
    87         *
       
    88         * @param aUid It is the new uid.
       
    89         */
       
    90         void SetUid( TUint aUid );
       
    91 
       
    92         /**
       
    93         * Sets auxilirary information.
       
    94         *
       
    95         * @param aAuxInformation It is the new aux information.
       
    96         */
       
    97         void SetAuxInformation( TUint aAuxInformation );
       
    98 
       
    99         /**
       
   100         * Adds a parameter. 
       
   101         *
       
   102         * It will leave if there is not enough memory.
       
   103         *
       
   104         * @param aParameter It is the parameter.
       
   105         */
       
   106         void AddParameterL( const TDesC& aParameter );
       
   107             
       
   108     private:
       
   109 
       
   110         /**
       
   111         * C++ default constructor.
       
   112         */
       
   113         CPhoneGsmParserResult();
       
   114 
       
   115         /**
       
   116         * Symbian OS constructor.
       
   117         */
       
   118         void ConstructL();
       
   119 
       
   120         // By default, prohibit copy constructor
       
   121         CPhoneGsmParserResult( const CPhoneGsmParserResult& );
       
   122         // Prohibit assigment operator
       
   123         CPhoneGsmParserResult& operator= ( const CPhoneGsmParserResult& );
       
   124 
       
   125     private:    // Data
       
   126 
       
   127         // Unique identifier, type of result.
       
   128         TUint iUid;
       
   129 
       
   130         // Additional information, specific to type.
       
   131         TUint iAuxInformation;
       
   132 
       
   133         // Array of parameters, pointer descriptors to original string.
       
   134         CArrayFixFlat< TPtrC >* iParameters;
       
   135 
       
   136     };
       
   137 
       
   138 #include    "CPhoneGsmParserResult.inl"
       
   139 
       
   140 #endif      // CPHONEGSMPARSERRESULT_H
       
   141             
       
   142 // End of File