00001 /* $Id$ */ 00002 /* ////////////////////////////////////////////////////////////////////////// 00003 // // 00004 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, // 00005 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution // 00006 // prohibited. Access to and use of this code is permitted only under // 00007 // license from LizardTech, Inc. Portions of the code are protected by // 00008 // US and foreign patents and other filings. All Rights Reserved. // 00009 // // 00011 /* PUBLIC */ 00012 00013 #ifndef MRSIDPASSWORDDELEGATE_H 00014 #define MRSIDPASSWORDDELEGATE_H 00015 00016 #include "lti_types.h" 00017 00018 LT_BEGIN_NAMESPACE(LizardTech) 00019 00020 00030 class MrSIDPasswordDelegate 00031 { 00032 LT_DISALLOW_COPY_CONSTRUCTOR(MrSIDPasswordDelegate); 00033 public: 00037 MrSIDPasswordDelegate(); 00038 00042 virtual ~MrSIDPasswordDelegate(); 00043 00054 virtual LT_STATUS reportIncorrectPassword() = 0; 00055 00068 virtual LT_STATUS getPassword() = 0; 00069 00070 protected: 00079 char* getPasswordBuffer(); 00080 00089 lt_uint32 getPasswordBufferLength(); 00090 00091 private: 00092 class EncryptImp; 00093 struct Data; 00094 Data *m_data; 00095 00096 friend class MrSIDImageReaderInterface; 00097 friend class MG2ImageWriter; 00098 friend class MG3ImageWriter; 00099 friend class MG4ImageWriter; 00100 void registerProvider(); 00101 }; 00102 00103 00110 class MrSIDSimplePasswordDelegate : public MrSIDPasswordDelegate 00111 { 00112 LT_DISALLOW_COPY_CONSTRUCTOR(MrSIDSimplePasswordDelegate); 00113 public: 00121 MrSIDSimplePasswordDelegate(const char* password); 00122 00130 LT_STATUS reportIncorrectPassword(); 00131 00140 LT_STATUS getPassword(); 00141 }; 00142 00143 LT_END_NAMESPACE(LizardTech) 00144 00145 #endif // MRSIDPASSWORDDELEGATE_H
LizardTech |