|
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 "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Contents : for sending faxes from fax stores |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __FAXTSRC_H |
|
19 #define __FAXTSRC_H |
|
20 |
|
21 /** |
|
22 @internalComponent |
|
23 */ |
|
24 enum TFaxPreferredCompression |
|
25 { |
|
26 Prefer1D, Prefer2D |
|
27 }; |
|
28 |
|
29 |
|
30 /********************************************************************/ |
|
31 |
|
32 class TFaxEntry |
|
33 /** |
|
34 @internalComponent |
|
35 */ |
|
36 { |
|
37 public: |
|
38 void InternalizeL (RReadStream &); |
|
39 void ExternalizeL (RWriteStream &) const; |
|
40 |
|
41 TInt iNameLength; |
|
42 TFileName iFaxPageStore; |
|
43 TInt iStartPage; |
|
44 TInt iPageCount; |
|
45 }; |
|
46 |
|
47 /********************************************************************/ |
|
48 |
|
49 class CFaxTransferSource : public CBase |
|
50 /** |
|
51 @internalComponent |
|
52 */ |
|
53 { |
|
54 public: |
|
55 static CFaxTransferSource * NewL (); |
|
56 static CFaxTransferSource * NewLC (); |
|
57 ~CFaxTransferSource (); |
|
58 |
|
59 protected: |
|
60 void ConstructL (); |
|
61 |
|
62 public: |
|
63 IMPORT_C void AddSourceL (const TFileName &, TFaxPreferredCompression); |
|
64 IMPORT_C void AddSourceL (const TFileName &, TInt, TFaxPreferredCompression); |
|
65 IMPORT_C void AddSourceL (const TFileName &, TInt, TInt, TFaxPreferredCompression); |
|
66 IMPORT_C void RemoveAllSources (); |
|
67 |
|
68 void GetNextPageReadyL (); |
|
69 |
|
70 void OpenFaxInL (const TDesC & aFileName); |
|
71 void PagePrepare (); |
|
72 void WriteFaxDataL (const TDesC8 & aBuffer); |
|
73 void WritePageParmsL (TFaxBufSenderId & aSenderId); |
|
74 void CloseFaxInStore (); |
|
75 |
|
76 TInt OpenFaxOutL (const TDesC & aFileName); // returns the number of pages in the file |
|
77 TInt NextPageFind (); |
|
78 void ReadPageParmsL (); |
|
79 void ReadFaxData (TDes8 & aBuffer); |
|
80 void PreviousPageFindL (); |
|
81 void CloseFaxStore (); |
|
82 |
|
83 TInt iLines; // length of image in lines |
|
84 TInt iResolu; // resolution of image |
|
85 TInt iCompression; // type of compression |
|
86 TInt iBitOrder; // little or big endian ordering of bits in a byte |
|
87 TInt iPage; // page number of image in fax |
|
88 |
|
89 TStreamId iOurStreamID; |
|
90 CBufSeg * iSources; |
|
91 RBufReadStream iInstream; |
|
92 RBufWriteStream iOutstream; |
|
93 |
|
94 CWriteFaxFile * iWriteFaxFile; |
|
95 CReadFaxFile * iReadFaxFile; |
|
96 |
|
97 TInt iFaxListEntries; |
|
98 TInt iSavedFaxListEntries; |
|
99 TInt iFaxPages; |
|
100 TInt iPageInCurrentFile; |
|
101 |
|
102 TFaxPreferredCompression iOurPreferredCompression; |
|
103 TFaxEntry iOurFaxEntry; |
|
104 }; |
|
105 |
|
106 #endif |
|
107 |