videofeeds/provisioningprocessor/inc/CIptvProvisioningProcessor.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2004-2005 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 the License "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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CIPTVPROVISIONINGPROCESSOR_H
       
    22 #define CIPTVPROVISIONINGPROCESSOR_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32std.h>
       
    26 #include "CIptvUtil.h"
       
    27 #include <f32file.h>
       
    28 #include <xml/parser.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CIptvPPContentHandler;
       
    32 class CIptvServices;
       
    33 using namespace Xml;
       
    34 class Xml::CParser;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 class CIptvProvisioningProcessor : public CBase
       
    38     {
       
    39     public:
       
    40 
       
    41         /**
       
    42          * Two-phased constructor.
       
    43          * @param 
       
    44          */
       
    45         IMPORT_C static CIptvProvisioningProcessor* NewL();
       
    46 
       
    47         /**
       
    48          * Destructor.
       
    49          */
       
    50         virtual ~CIptvProvisioningProcessor();
       
    51 
       
    52         /**
       
    53          * Stop parsing (too many services).
       
    54          */
       
    55         void StopParsing();
       
    56 
       
    57     public:
       
    58         
       
    59         /**
       
    60          * Local provisioning.
       
    61          *
       
    62          * @param aFileName Full path to service xml-file.
       
    63          * @param aError    Provisioning error code. If aFileName is incorrect value is KErrNotFound.
       
    64          *                  If xml-file uses wrong schema, error code is KIptvSchemaMismatch. Otherwise
       
    65          *                  aError is error code from XML-parser, see XmlParserErrors.h.
       
    66          *  @return         Pointer to CIptvServices which contains array of provisioned services.
       
    67          */
       
    68         IMPORT_C CIptvServices* LocalProvisionL(const TDesC& aFileName, TInt& aError); 
       
    69         
       
    70         /**
       
    71          * External provisioning.
       
    72          *
       
    73          * @param aFile     Open RFile reference to service xml-file.
       
    74          * @param aError    Provisioning error code. 
       
    75          *                  If xml-file uses wrong schema, error code is KIptvSchemaMismatch. Otherwise
       
    76          *                  aError is error code from XML-parser, see XmlParserErrors.h.
       
    77          *  @return         Pointer to CIptvServices which contains array of provisioned services.
       
    78          */
       
    79         IMPORT_C CIptvServices* ExternalProvisionL(RFile& aFile, TInt& aError);
       
    80          
       
    81     private:    // New functions
       
    82         
       
    83         /**
       
    84         * C++ default constructor.
       
    85         */
       
    86         CIptvProvisioningProcessor();
       
    87 
       
    88         /**
       
    89         * By default Symbian 2nd phase constructor is private.
       
    90         * @param 
       
    91         */
       
    92         void ConstructL();                       
       
    93           
       
    94     private:
       
    95 
       
    96         /**
       
    97         * Content handler.
       
    98         */
       
    99         CIptvPPContentHandler* iHandler;
       
   100 
       
   101         /**
       
   102         * Parser.
       
   103         */
       
   104         CParser* iParser;                    
       
   105         
       
   106         /**
       
   107 	    * File server session
       
   108 	    */
       
   109 	    RFs iFs;
       
   110 
       
   111         /**
       
   112 	    * File content.
       
   113 	    */
       
   114         HBufC8* iXmlFileContent;
       
   115 	        
       
   116         /**
       
   117 	    * Local provisioning.
       
   118 	    */
       
   119         TBool iLocal;
       
   120     };
       
   121 
       
   122 #endif  // CIPTVPROVISIONINGPROCESSOR_H
       
   123 
       
   124 // End of File