harvester/common/inc/mimetypemapping.h
changeset 0 c53acadfccc6
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2009 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 #ifndef MIMETYPEMAPPING_H_
       
    18 #define MIMETYPEMAPPING_H_
       
    19 
       
    20 //
       
    21 // TMimeTypeMapping
       
    22 // 
       
    23 // Helper class for mapping file extensions 
       
    24 // to MIME types and harvesting method.
       
    25 //
       
    26 template <typename T> class TMimeTypeMapping
       
    27 	{
       
    28 	public:
       
    29 		TPtrC iExt;
       
    30 		TPtrC iMimeType;
       
    31 		T iHandler;
       
    32 		
       
    33 		TMimeTypeMapping(TPtrC aExt);
       
    34 
       
    35 		TMimeTypeMapping(TPtrC aExt, TPtrC aMimeType, const T& aHandler);
       
    36 		
       
    37 		static TInt CompareFunction(const TMimeTypeMapping& aKey, 
       
    38 				const TMimeTypeMapping& aItem);
       
    39 	};
       
    40 
       
    41 #include "mimetypemapping.inl"
       
    42 
       
    43 #endif /*MIMETYPEMAPPING_H_*/