voipplugins/voipadapters/voipxmlprovisioning/provisioningappui/Inc/VoIPProvisioningAppUi.h
branchRCL_3
changeset 21 f742655b05bf
parent 20 65a3ef1d5bd0
child 22 d38647835c2e
equal deleted inserted replaced
20:65a3ef1d5bd0 21:f742655b05bf
     1 /*
       
     2 * Copyright (c) 2009-2010 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:  Application UI definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef VOIPPROVISIONINGAPPUI_H
       
    20 #define VOIPPROVISIONINGAPPUI_H
       
    21 
       
    22 #ifdef _DEBUG
       
    23 #define EUNIT_FRIEND_CLASS( x ) friend class x;
       
    24 #else
       
    25 #define EUNIT_FRIEND_CLASS( x )
       
    26 #endif
       
    27 
       
    28 // INCLUDES
       
    29 #include <aknappui.h>
       
    30 #include <downloadmgrclient.h>
       
    31 
       
    32 class CAknWaitDialog;
       
    33 
       
    34 /**
       
    35 *  CVoIPProvisioningAppUi class.
       
    36 *  This class handles the operation betweed provisioning processor,
       
    37 *  notifier framework (asks if user want to install parsed service)
       
    38 *  and service api (used to add service to the database if user has
       
    39 *  decided so)
       
    40 */
       
    41 class CVoIPProvisioningAppUi : public CAknAppUi,
       
    42                                public MHttpDownloadMgrObserver
       
    43     {
       
    44 public:
       
    45 
       
    46     CVoIPProvisioningAppUi();
       
    47     virtual ~CVoIPProvisioningAppUi();
       
    48 
       
    49     /**
       
    50      * Method to be called for CVoIPProvisioningDocument when
       
    51      * that classes OpenFileL method has been called and file
       
    52      * containing the data to be parsed is received.
       
    53      *
       
    54      * @since S60 v5.0
       
    55      * @param aFile File handle to XML file.
       
    56      */
       
    57     void HandleFileL( RFile& aFile );
       
    58 
       
    59     /**
       
    60      * Overwritten method from CEikAppUi. This method gets called
       
    61      * when application is started by framework when file, which has
       
    62      * mime type this applicaion knows, has been selected to be
       
    63      * opened.
       
    64      * 
       
    65      * @since S60 v5.0
       
    66      * @param aCommand Type of the command
       
    67      * @param aDocumentName Name of the document to be opened
       
    68      *                      When starting up application this value
       
    69      *                      is empty
       
    70      * @param aTail Command line's tail. Not used in this implementation.
       
    71      * @return ETrue if aDocument represents an existing file, otherwise
       
    72      *         EFalse.
       
    73      */
       
    74     TBool ProcessCommandParametersL( TApaCommand aCommand,
       
    75      TFileName& aDocumentName, const TDesC8& aTail );
       
    76 
       
    77 protected:
       
    78 
       
    79     /**
       
    80      * Indicates an event.
       
    81      *
       
    82      * @since S60 v5.0
       
    83      * @param aDownload The download with which the event occured.
       
    84      * @param aEvent Event type.
       
    85      */
       
    86     void HandleDMgrEventL( RHttpDownload& aDownload,
       
    87         THttpDownloadEvent aEvent );
       
    88 
       
    89 private:
       
    90 
       
    91     /**
       
    92      * Show invalid data note.
       
    93      * 
       
    94      * @since S60 v5.0
       
    95      */
       
    96     void ShowFailNoteL() const;
       
    97 
       
    98     /**
       
    99      * Show done note.
       
   100      * 
       
   101      * @since S60 v5.0
       
   102      */
       
   103    void ShowDoneNoteL() const;
       
   104 
       
   105    /**
       
   106     * Fetches, i.e. downloads branding data from given URL.
       
   107     * 
       
   108     * @since S60 v5.0
       
   109     * @param aUrl URL from which branding data is downloaded.
       
   110     */
       
   111    TInt FetchBrandingDataL( const TDesC8& aUrl );
       
   112 
       
   113    /**
       
   114     * Uncompresses (unzips) files from GZip file.
       
   115     * 
       
   116     * @since S60 v5.0
       
   117     */
       
   118    void UncompressFilesL();
       
   119 
       
   120 private:
       
   121     void ConstructL();
       
   122 private:
       
   123     /**
       
   124      * Download manager.
       
   125      */
       
   126     RHttpDownloadMgr iDownloadMgr;
       
   127 
       
   128     /**
       
   129      * File name of branding zip.
       
   130      */
       
   131     TFileName iBrandPackageName;
       
   132 
       
   133     /**
       
   134      * Wait dialog.
       
   135      * Own.
       
   136      */
       
   137     CAknWaitDialog* iWaitDialog;
       
   138     
       
   139     EUNIT_FRIEND_CLASS( UT_CVoIPProvisioningAppUi )
       
   140     };
       
   141 
       
   142 #endif // VOIPPROVISIONINGAPPUI_H
       
   143 
       
   144 // End of File