epoc32/include/conlist.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/conlist.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/conlist.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,116 @@
     1.4 -conlist.h
     1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +#if !defined(__CONLIST_H__)
    1.21 +#define __CONLIST_H__
    1.22 +
    1.23 +#if !defined(__E32BASE_H__)
    1.24 +#include <e32base.h>
    1.25 +#endif
    1.26 +
    1.27 +#if !defined(__F32FILE_H__)
    1.28 +#include <f32file.h>
    1.29 +#endif
    1.30 +
    1.31 +#if !defined(__CONARC_H__)
    1.32 +#include <conarc.h>
    1.33 +#endif
    1.34 +
    1.35 +#if !defined(__CONCNF_H__)
    1.36 +#include <concnf.h>
    1.37 +#endif
    1.38 +
    1.39 +#if !defined(__IMPLEMENTATION_INFORMATION_H__)
    1.40 +#include <ecom/implementationinformation.h>
    1.41 +#endif
    1.42 +#if !defined(__ECOM_H__)
    1.43 +#include <ecom/ecom.h>
    1.44 +#endif
    1.45 +
    1.46 +
    1.47 +/** Creates a converter dll's factory interface object.
    1.48 +
    1.49 +@publishedAll
    1.50 +@deprecated
    1.51 +*/
    1.52 +typedef CConverterLibrary* (*CreateCConverterLibrary)(); 
    1.53 +
    1.54 +struct SConverterInfo
    1.55 +/** Describes a converter, as obtained from a converter list (CCnaConverterList).
    1.56 +
    1.57 +@publishedAll
    1.58 +@released
    1.59 +@see CCnaConverterList */
    1.60 +	{
    1.61 +	/** Localised name of the data type. */
    1.62 +	TTranslation iTranslation;
    1.63 +	/** Converter UID. */
    1.64 +	TUid iUid;
    1.65 +	/** Position of the converter in the list. */
    1.66 +	TInt iIndex;
    1.67 +	};
    1.68 +
    1.69 +class CCnaConverterList : public CBase
    1.70 +/** Provides a list of available converters, allowing clients to search for and 
    1.71 +obtain converters for specific source and target data types. 
    1.72 +
    1.73 +@publishedAll
    1.74 +@released */
    1.75 +	{
    1.76 +public:
    1.77 +	IMPORT_C static CCnaConverterList* NewL();
    1.78 +	IMPORT_C static CCnaConverterList* NewLC();
    1.79 +	IMPORT_C void Release();
    1.80 +	IMPORT_C ~CCnaConverterList();
    1.81 +//
    1.82 +	IMPORT_C TInt CountL();
    1.83 +	inline TInt Count();
    1.84 +	IMPORT_C CConverterBase* NewConverterL(TUid aUid);
    1.85 +	IMPORT_C void UpdateL();
    1.86 +	IMPORT_C TUid ConvFromL(const TDataType& aMimeType); // searches for a particular converter
    1.87 +	IMPORT_C TUid ConvToL(const TDataType& aMimeType);
    1.88 +	IMPORT_C TUid ConverterL(const TDataType& aFrom,const TDataType& aTo);
    1.89 +	IMPORT_C void ConvFromListL(const TDataType& aMimeType,CArrayFix<SConverterInfo>* aSConverterInfoArray);
    1.90 +	IMPORT_C void ConvToListL(const TDataType& aMimeType,CArrayFix<SConverterInfo>* aSConverterInfoArray);
    1.91 +	IMPORT_C TInt MimeTypeFrom(TDataType& aDataType,const SConverterInfo& aConverterInfo) const;
    1.92 +	IMPORT_C TInt MimeTypeTo(TDataType& aDataType,const SConverterInfo& aConverterInfo) const;
    1.93 +private:
    1.94 +	CCnaConverterList();
    1.95 +	void ConstructL();
    1.96 +	CConverterBase* LoadConverterL(TUid aImplUid);
    1.97 +private:
    1.98 +	TBool iDoneScan;
    1.99 +	CArrayPtr<CCnaConverter>* iConverters;
   1.100 +	RImplInfoPtrArray iImplementationArray;
   1.101 +	};
   1.102 +
   1.103 +class ConverterListUtil
   1.104 +/** @internalComponent */
   1.105 +	{
   1.106 +public:
   1.107 +	static CConverterBase* UtilityConverterL(TUid aUid);
   1.108 +	static TInt CountUtilityConverters();
   1.109 +	};
   1.110 +
   1.111 +inline TInt CCnaConverterList::Count()
   1.112 +/** @deprecated
   1.113 +
   1.114 +Deprecated - Use CCnaConverterList::CountL instead. 
   1.115 +Rescan of the disk to refresh the list of converters could leave. */
   1.116 +	{
   1.117 +	return CountL();
   1.118 +	}
   1.119 +
   1.120 +#endif