omacpadapters/WAPAdapter/Inc/WPWAPUtil.h
author hgs
Tue, 13 Jul 2010 04:01:20 +0530
changeset 47 d316aecb87fd
permissions -rw-r--r--
201025_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     1
/*
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     2
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     3
* All rights reserved.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     8
*
d316aecb87fd 201025_02
hgs
parents:
diff changeset
     9
* Initial Contributors:
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    11
*
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    12
* Contributors:
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    13
*
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    14
* Description: 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    15
*     Utility class for reading resource strings.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    16
*
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    17
*/
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    18
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    19
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    20
#ifndef WPWAPUTIL_H
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    21
#define WPWAPUTIL_H
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    22
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    23
// INCLUDES
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    24
#include <e32base.h>
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    25
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    26
// FORWARD DECLARATIONS
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    27
class RResourceFile;
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    28
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    29
// CLASS DECLARATION
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    30
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    31
/**
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    32
 * WPWAPUtil is a utility class for reading resource strings.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    33
 *
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    34
 * @lib WPWAPAdapter
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    35
 * @since 2.0
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    36
 */ 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    37
class WPWAPUtil
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    38
    {
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    39
    public: // New functions
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    40
        /**
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    41
        * Loads a specified resource string from resource file.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    42
        * @param aResourceId is of a resource string.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    43
        * @return pointer to loaded descriptor.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    44
        */
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    45
        static HBufC* ReadHBufCL( TInt aResourceId );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    46
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    47
        /**
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    48
        * Searches for the resource file with the correct language extension 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    49
        * for the language of the current locale, or failing this, the best 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    50
        * matching file.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    51
        * @param aFs reference to file server.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    52
        * @param aResFileName resource file name.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    53
        * @param aResFile reference to resource file.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    54
        */
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    55
        static void FindAndOpenResourceFileLC(RFs& aFs, 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    56
            const TDesC& aResFileName, 
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    57
            RResourceFile& aResFile);
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    58
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    59
        /**
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    60
        * Checks if a URL is valid.
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    61
        * @param aURL the URL to check
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    62
        * @return ETrue if the URL is valid
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    63
        */
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    64
        static TBool CheckURI( const TDesC& aUrl );
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    65
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    66
    };
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    67
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    68
#endif  // WPWAPUTIL_H
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    69
            
d316aecb87fd 201025_02
hgs
parents:
diff changeset
    70
// End of File