InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IAsciiEncodingUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Chris Jones
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __IEncodingUtils__
25 #define __IEncodingUtils__
26 
27 #include "IPMUnknown.h"
28 
29 #include "UtilitiesID.h"
30 
31 class IPMStream;
32 
33 
35 {
36 public:
37  enum { kDefaultIID = IID_IASCIIENCODINGUTILS };
38 
39  // Type of encoding
40  typedef enum
41  {
42  // encoding type.
43  kHexEncoding = 0x01,
44  kAscii85Encoding = 0x02,
45  kAscii64Encoding = 0x04
46 
47  // future, compression types.
48  // todo
49  } EncodingOptions;
50 
54  virtual void Encode( int32 nOptions, unsigned char* pSrc, int32 nSrcBytes, PMString& strDst ) = 0;
55 
59  virtual void Encode( int32 nOptions, IPMStream* sStream, PMString& strDst ) = 0;
60 
64  virtual void Encode( int32 nOptions, IPMStream* sStream, IPMStream* dStream ) = 0;
65 
69  virtual unsigned char* Decode( int32 nOptions, const PMString& strSrc, int32& nDstBytes ) = 0;
70 
74  virtual void Decode( int32 nOptions, const PMString& strSrc, IPMStream* dStream ) = 0;
75 
79  virtual void Decode( int32 nOptions, IPMStream* sStream, IPMStream* dStream ) = 0;
80 
81 
82 
86  virtual void Encode( int32 nOptions, IPMStream* sStream, std::string& destString ) = 0;
87 
91  virtual unsigned char* Decode( int32 nOptions, const std::string& strSrc, int32& nDstBytes ) = 0;
92 
96  virtual void Decode( int32 nOptions, const std::string& sourceString, IPMStream* dStream ) = 0;
97 
98 };
99 
100 
101 #endif