|
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 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef __FAXTSRC_H |
|
24 #define __FAXTSRC_H |
|
25 |
|
26 /** |
|
27 @internalComponent |
|
28 */ |
|
29 enum TFaxPreferredCompression |
|
30 { |
|
31 Prefer1D, Prefer2D |
|
32 }; |
|
33 |
|
34 |
|
35 /********************************************************************/ |
|
36 |
|
37 /** |
|
38 @internalComponent |
|
39 */ |
|
40 class TFaxEntry |
|
41 { |
|
42 public: |
|
43 void InternalizeL (RReadStream &); |
|
44 void ExternalizeL (RWriteStream &) const; |
|
45 |
|
46 TInt iNameLength; |
|
47 TFileName iFaxPageStore; |
|
48 TInt iStartPage; |
|
49 TInt iPageCount; |
|
50 }; |
|
51 |
|
52 /********************************************************************/ |
|
53 |
|
54 /** |
|
55 @internalComponent |
|
56 */ |
|
57 class CFaxTransferSource : public CBase |
|
58 { |
|
59 public: |
|
60 static CFaxTransferSource * NewL (); |
|
61 static CFaxTransferSource * NewLC (); |
|
62 ~CFaxTransferSource (); |
|
63 |
|
64 protected: |
|
65 void ConstructL (); |
|
66 |
|
67 public: |
|
68 IMPORT_C void AddSourceL (const TFileName &, TFaxPreferredCompression); |
|
69 IMPORT_C void AddSourceL (const TFileName &, TInt, TFaxPreferredCompression); |
|
70 IMPORT_C void AddSourceL (const TFileName &, TInt, TInt, TFaxPreferredCompression); |
|
71 IMPORT_C void RemoveAllSources (); |
|
72 |
|
73 void GetNextPageReadyL (); |
|
74 |
|
75 void OpenFaxInL (const TDesC & aFileName); |
|
76 void PagePrepare (); |
|
77 void WriteFaxDataL (const TDesC8 & aBuffer); |
|
78 void WritePageParmsL (TFaxBufSenderId & aSenderId); |
|
79 void CloseFaxInStore (); |
|
80 |
|
81 TInt OpenFaxOutL (const TDesC & aFileName); // returns the number of pages in the file |
|
82 TInt NextPageFind (); |
|
83 void ReadPageParmsL (); |
|
84 void ReadFaxData (TDes8 & aBuffer); |
|
85 void PreviousPageFindL (); |
|
86 void CloseFaxStore (); |
|
87 |
|
88 TInt iLines; // length of image in lines |
|
89 TInt iResolu; // resolution of image |
|
90 TInt iCompression; // type of compression |
|
91 TInt iBitOrder; // little or big endian ordering of bits in a byte |
|
92 TInt iPage; // page number of image in fax |
|
93 |
|
94 TStreamId iOurStreamID; |
|
95 CBufSeg * iSources; |
|
96 RBufReadStream iInstream; |
|
97 RBufWriteStream iOutstream; |
|
98 |
|
99 CWriteFaxFile * iWriteFaxFile; |
|
100 CReadFaxFile * iReadFaxFile; |
|
101 |
|
102 TInt iFaxListEntries; |
|
103 TInt iSavedFaxListEntries; |
|
104 TInt iFaxPages; |
|
105 TInt iPageInCurrentFile; |
|
106 |
|
107 TFaxPreferredCompression iOurPreferredCompression; |
|
108 TFaxEntry iOurFaxEntry; |
|
109 }; |
|
110 |
|
111 #endif // __FAXTSRC_H |