uiutils/gamerecognizer/inc/GameRecognizer.h
changeset 47 2f0c06423c72
parent 46 0e1e0022bd03
child 53 3c67ea82fafc
equal deleted inserted replaced
46:0e1e0022bd03 47:2f0c06423c72
     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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef GAMERECOGNIZER_H
       
    20 #define GAMERECOGNIZER_H
       
    21 
       
    22 // includes
       
    23 #include <apmrec.h>  // For CApaDataRecognizerType
       
    24 
       
    25 
       
    26 // constants
       
    27 const TInt KMimeGameDataRecognizerValue             = 0x01005A08;
       
    28 const TInt KMimeGameDataRecognizerImplementationUid = 0x11005A08;
       
    29 const TUid KUidMimeGameDataRecognizerValue = { KMimeGameDataRecognizerValue };
       
    30 
       
    31 // We support only wmlc and wmlsc, but can recognize also
       
    32 // other types internaly.
       
    33 
       
    34 const TInt KSupportedGameDataMimetypes(1);
       
    35 
       
    36 // Exported mimetypes
       
    37 _LIT8( KGameDataMimeType, "application/x-nokiaGameData");
       
    38 _LIT( KDotNGD,".ngd");
       
    39 _LIT8( KGndHeader, "NGDX" );
       
    40 
       
    41 //
       
    42 // CGameRecognizer
       
    43 //
       
    44 class CGameRecognizer : public CApaDataRecognizerType
       
    45     {
       
    46 public: // from CApaDataRecognizerType
       
    47     CGameRecognizer();
       
    48     virtual TUint PreferredBufSize();
       
    49     virtual TDataType SupportedDataTypeL(TInt aIndex) const;
       
    50     static CApaDataRecognizerType* CreateRecognizerL();
       
    51 
       
    52 private: // from CApaDataRecognizerType
       
    53     virtual void DoRecognizeL(const TDesC& aName, const TDesC8& aBuffer);
       
    54          // New funtions
       
    55 private:
       
    56     TBool NameRecognizedL( const TDesC& aName) const;
       
    57     TBool HeaderRecognized( const TDesC8& aName) const;
       
    58     };
       
    59 
       
    60 #endif // GAMERECOGNIZER_H
       
    61 
       
    62 // END FILE