1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // 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
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
25 /** 2nd UID of BIF file stores. */
26 const TUid KUidBioInfoFile={0x10005233}; // unicode Uid, used as 2nd Uid of file store
27 /** Indicates that when opening the message no application should be launched. */
28 const TUid KUidBioUseNoApp={0x00000000};
29 /** Indicates that when opened the message is to be viewed by the default application. */
30 const TUid KUidBioUseDefaultApp={0x100052b2};
31 /** Maximum length of BIO_INFO_FILE description field. */
32 const TInt KMaxBioDescription=128;
33 /** Maximum length of ID text field. */
34 const TInt KMaxBioIdText=128;
37 Previously, it specified the maximum length of a command line to BIFTOOL. */
38 const TInt KMaxBioCommandLine=256;
39 /** Maximum length of BIO_INFO_FILE file_extension field. */
40 const TInt KMaxBioFileExtension=10;
44 /** Buffer to hold a BIF ID identifier text field. */
45 typedef TBuf<KMaxBioIdText> TBioMsgIdText;
48 Previously, it held a command line to BIFTOOL. */
49 typedef TBuf<KMaxBioCommandLine> TBioCommand;
51 /** Identifies bearers for the BIF ID type field.
53 It is the C++ equivalent of the resource enum ID_TYPE. */
58 Item will not be used in matching. */
63 Specifies that a bearer that transports MIME messages (e.g. e-mail) should
64 match the MIME type against the ID text field. */
67 /** Narrow band (SMS).
69 Specifies that the SMS bearer should match messages against the ID port field. */
74 Specifies that the WAP bearer should match messages against the ID port field. */
79 Specifies that the WAP bearer should match messages against the ID port field. */
84 Specifies that the WAP bearer should match messages against the ID port field. */
89 Specifies that the WAP bearer should match messages against the ID port field. */
93 /** Encapsulates an ID from a BIF (BIO_INFO_FILE).
100 /** Identifies the bearer that should use this resource to match messages. */
102 /** Confidence level. */
103 CApaDataRecognizerType::TRecognitionConfidence iConfidence; // from APMREC.H
104 /** Text field that can be used to match the message to this BIO type. */
106 /** Receiving port number that can be used to match the message to this BIO type. */
108 /** Expected receiving character set of messages. */
110 /** This is available for 3rd party use for BIO message type identity specific
112 TInt16 iGeneralIdData;
115 // NOTE - this is included here cos the CBioInfoFile requires some of the enums
117 #include "bifbase.h" // for CBioInfoFile
119 /** BIO information file (BIF) reader.
121 Allows reading (all but the icons) from an existing BIF file.
126 class CBioInfoFileReader : public CBioInfoFile
130 // Construction/destruction
131 IMPORT_C static CBioInfoFileReader* NewLC(RFs& aFs,const TDesC& aFileName,TUid aMsgTypeUid=KNullUid);
132 IMPORT_C static CBioInfoFileReader* NewL(RFs& aFs,const TDesC& aFileName,TUid aMsgTypeUid=KNullUid);
133 IMPORT_C virtual ~CBioInfoFileReader();
137 IMPORT_C TUid MessageTypeUid() const;
138 IMPORT_C const TPtrC MessageParserName() const;
139 IMPORT_C TUid MessageAppUid() const;
140 IMPORT_C TUid MessageAppCtrlUid() const;
141 IMPORT_C const TPtrC MessageAppCtrlName() const;
142 IMPORT_C TInt16 GeneralData1() const;
143 IMPORT_C TInt16 GeneralData2() const;
144 IMPORT_C TInt16 GeneralData3() const;
145 IMPORT_C const TPtrC Description() const;
146 IMPORT_C const TPtrC FileExtension() const;
148 IMPORT_C const TPtrC IconsFilename() const;
149 IMPORT_C const CArrayFixFlat<TInt16>* ZoomLevelsLC() const;
150 IMPORT_C TInt ZoomLevelsCount() const;
152 IMPORT_C const CArrayFixFlat<TBioMsgId>* IdsLC() const;
154 IMPORT_C const CBifEntry& BifEntry() const;
157 CBioInfoFileReader(RFs& aFs);
158 void ConstructL(const TDesC& aFileName, TUid aMsgTypeUid);
161 void InternalizeL(RReadStream& aStream);
162 void LoadResourceL(TUid aMsgTypeUid);
163 void LoadDataL(TUid aMsgTypeUid);
164 TBool IsResFileL() const;
165 TBool IsDatFile(const TUidType& aUidType) const;