Merge pull request #2 from Tripwire/master
merge out from tripwire/master
This commit is contained in:
commit
7b183eab5e
|
@ -1,5 +1,5 @@
|
||||||
#Open Source Tripwire®
|
#Open Source Tripwire<sup>®</sup>
|
||||||
|
|
||||||
Open Source Tripwire® software is a security and data integrity tool useful for monitoring and alerting on specific file change(s) on a range of systems. The project is based on code originally contributed by [Tripwire, Inc.](http://www.tripwire.com)in 2000.
|
Open Source Tripwire<sup>®</sup> software is a security and data integrity tool useful for monitoring and alerting on specific file change(s) on a range of systems. The project is based on code originally contributed by [Tripwire, Inc.](http://www.tripwire.com) in 2000.
|
||||||
|
|
||||||
Open Source Tripwire is suitable for monitoring a small number of Linux servers, where centralized control and reporting is not needed and professional support or system automation is not a requirement.
|
Open Source Tripwire is suitable for monitoring a small number of Linux servers, where centralized control and reporting is not needed and professional support or system automation is not a requirement.
|
||||||
|
|
|
@ -38,6 +38,7 @@ Linuxes
|
||||||
- Android 6.0 (arm) + gcc 4.9
|
- Android 6.0 (arm) + gcc 4.9
|
||||||
- Raspbian 7 (wheezy) (armv6l) + gcc 4.6.3
|
- Raspbian 7 (wheezy) (armv6l) + gcc 4.6.3
|
||||||
- openSuSE Tumbleweed (20160408) (i586) + gcc 5.3.1
|
- openSuSE Tumbleweed (20160408) (i586) + gcc 5.3.1
|
||||||
|
- RHEL 6.0 (powerpc64) + gcc 4.4.4
|
||||||
|
|
||||||
OSX
|
OSX
|
||||||
- Mac OS X 10.11 + LLVM 7.0.2 / clang-700.1.81
|
- Mac OS X 10.11 + LLVM 7.0.2 / clang-700.1.81
|
||||||
|
@ -51,6 +52,7 @@ BSDs
|
||||||
- HardenedBSD 11.0 + gcc 4.8.5
|
- HardenedBSD 11.0 + gcc 4.8.5
|
||||||
|
|
||||||
UNIXes
|
UNIXes
|
||||||
|
- Solaris 10 SPARC + gcc 3.4.6
|
||||||
- Solaris 10 x86 + gcc 3.4.3
|
- Solaris 10 x86 + gcc 3.4.3
|
||||||
- OpenIndiana 151 + gcc 4.8.5 [an OpenSolaris/illumos distro]
|
- OpenIndiana 151 + gcc 4.8.5 [an OpenSolaris/illumos distro]
|
||||||
- AIX 5.2 + gcc 4.3.1
|
- AIX 5.2 + gcc 4.3.1
|
||||||
|
|
|
@ -3251,8 +3251,8 @@ ac_config_headers="$ac_config_headers config.h"
|
||||||
rm -f src/tripwire/syslog.h 2> /dev/null
|
rm -f src/tripwire/syslog.h 2> /dev/null
|
||||||
chmod 755 install-sh 2> /dev/null
|
chmod 755 install-sh 2> /dev/null
|
||||||
|
|
||||||
CFLAGS=${CFLAGS:-"-O -pipe -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"}
|
CFLAGS=${CFLAGS:-"-O -pipe -Wall -Wextra -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"}
|
||||||
CXXFLAGS=${CXXFLAGS:-"-O -pipe -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"}
|
CXXFLAGS=${CXXFLAGS:-"-O -pipe -Wall -Wextra -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"}
|
||||||
|
|
||||||
# Check whether --enable-static was given.
|
# Check whether --enable-static was given.
|
||||||
if test "${enable_static+set}" = set; then :
|
if test "${enable_static+set}" = set; then :
|
||||||
|
|
|
@ -17,8 +17,8 @@ chmod 755 install-sh 2> /dev/null
|
||||||
dnl ###############
|
dnl ###############
|
||||||
dnl Setup defaults
|
dnl Setup defaults
|
||||||
dnl ###############
|
dnl ###############
|
||||||
CFLAGS=${CFLAGS:-"-O -pipe -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"}
|
CFLAGS=${CFLAGS:-"-O -pipe -Wall -Wextra -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"}
|
||||||
CXXFLAGS=${CXXFLAGS:-"-O -pipe -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"}
|
CXXFLAGS=${CXXFLAGS:-"-O -pipe -Wall -Wextra -Wno-unused-parameter -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"}
|
||||||
|
|
||||||
dnl #####################
|
dnl #####################
|
||||||
dnl Configuration options
|
dnl Configuration options
|
||||||
|
|
|
@ -237,7 +237,7 @@ int64 cArchive::Copy(cArchive* pFrom, int64 amt)
|
||||||
|
|
||||||
while(amtLeft > 0)
|
while(amtLeft > 0)
|
||||||
{
|
{
|
||||||
int64 amtToRead = amtLeft > BUF_SIZE ? BUF_SIZE : amtLeft;
|
int64 amtToRead = amtLeft > (int64)BUF_SIZE ? (int64)BUF_SIZE : amtLeft;
|
||||||
int64 amtRead = pFrom->ReadBlob(buf, static_cast<int>( amtToRead ) );
|
int64 amtRead = pFrom->ReadBlob(buf, static_cast<int>( amtToRead ) );
|
||||||
amtLeft -= amtRead;
|
amtLeft -= amtRead;
|
||||||
WriteBlob(buf, static_cast<int>( amtRead ) );
|
WriteBlob(buf, static_cast<int>( amtRead ) );
|
||||||
|
|
|
@ -117,10 +117,9 @@ class iCodeConverter
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
iCodeConverter()
|
iCodeConverter() {}
|
||||||
{
|
virtual ~iCodeConverter() {}
|
||||||
};
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
static iCodeConverter* CreateConverter();
|
static iCodeConverter* CreateConverter();
|
||||||
|
@ -170,7 +169,7 @@ class cIconvConverter : public iCodeConverter
|
||||||
virtual int Convert( ntdbs_t, size_t, const_ntmbs_t, size_t );
|
virtual int Convert( ntdbs_t, size_t, const_ntmbs_t, size_t );
|
||||||
|
|
||||||
cIconvConverter();
|
cIconvConverter();
|
||||||
~cIconvConverter();
|
virtual ~cIconvConverter();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
|
@ -189,7 +188,7 @@ class cDoubleIconvConverter : public iCodeConverter
|
||||||
virtual int Convert( ntdbs_t, size_t, const_ntmbs_t, size_t );
|
virtual int Convert( ntdbs_t, size_t, const_ntmbs_t, size_t );
|
||||||
|
|
||||||
cDoubleIconvConverter();
|
cDoubleIconvConverter();
|
||||||
~cDoubleIconvConverter();
|
virtual ~cDoubleIconvConverter();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -221,6 +220,8 @@ class cWcharIs32BitUcs2Converterer : public iCodeConverter
|
||||||
public:
|
public:
|
||||||
virtual int Convert( ntmbs_t, size_t, const_ntdbs_t, size_t );
|
virtual int Convert( ntmbs_t, size_t, const_ntdbs_t, size_t );
|
||||||
virtual int Convert( ntdbs_t, size_t, const_ntmbs_t, size_t );
|
virtual int Convert( ntdbs_t, size_t, const_ntmbs_t, size_t );
|
||||||
|
|
||||||
|
virtual ~cWcharIs32BitUcs2Converterer() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // WCHAR_IS_32_BITS
|
#endif // WCHAR_IS_32_BITS
|
||||||
|
@ -239,6 +240,8 @@ class cWcharIs16BitUcs2Converterer : public iCodeConverter
|
||||||
public:
|
public:
|
||||||
virtual int Convert( ntmbs_t, size_t, const_ntdbs_t, size_t );
|
virtual int Convert( ntmbs_t, size_t, const_ntdbs_t, size_t );
|
||||||
virtual int Convert( ntdbs_t, size_t, const_ntmbs_t, size_t );
|
virtual int Convert( ntdbs_t, size_t, const_ntmbs_t, size_t );
|
||||||
|
|
||||||
|
virtual ~cWcharIs16BitUcs2Converterer() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // WCHAR_IS_16_BITS
|
#endif // WCHAR_IS_16_BITS
|
||||||
|
@ -250,6 +253,8 @@ class cGoodEnoughConverterer : public iCodeConverter
|
||||||
public:
|
public:
|
||||||
virtual int Convert( ntmbs_t, size_t, const_ntdbs_t, size_t );
|
virtual int Convert( ntmbs_t, size_t, const_ntdbs_t, size_t );
|
||||||
virtual int Convert( ntdbs_t, size_t, const_ntmbs_t, size_t );
|
virtual int Convert( ntdbs_t, size_t, const_ntmbs_t, size_t );
|
||||||
|
|
||||||
|
virtual ~cGoodEnoughConverterer() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -190,33 +190,33 @@ inline int cDebug::GetDebugLevel()
|
||||||
|
|
||||||
#else // DEBUG
|
#else // DEBUG
|
||||||
|
|
||||||
inline cDebug::cDebug (const char *pLabel) {}
|
inline cDebug::cDebug (const char *) {}
|
||||||
inline cDebug::~cDebug () {}
|
inline cDebug::~cDebug () {}
|
||||||
inline cDebug::cDebug (const cDebug& rhs) {}
|
inline cDebug::cDebug (const cDebug&) {}
|
||||||
inline void cDebug::TraceAlways (const char *format, ...) {}
|
inline void cDebug::TraceAlways (const char *, ...) {}
|
||||||
inline void cDebug::TraceError (const char *format, ...) {}
|
inline void cDebug::TraceError (const char *, ...) {}
|
||||||
inline void cDebug::TraceWarning (const char *format, ...) {}
|
inline void cDebug::TraceWarning (const char *, ...) {}
|
||||||
inline void cDebug::TraceDebug (const char *format, ...) {}
|
inline void cDebug::TraceDebug (const char *, ...) {}
|
||||||
inline void cDebug::TraceDetail (const char *format, ...) {}
|
inline void cDebug::TraceDetail (const char *, ...) {}
|
||||||
inline void cDebug::TraceNever (const char *format, ...) {}
|
inline void cDebug::TraceNever (const char *, ...) {}
|
||||||
inline void cDebug::TraceAlways (const wchar_t *format, ...) {}
|
inline void cDebug::TraceAlways (const wchar_t *, ...) {}
|
||||||
inline void cDebug::TraceError (const wchar_t *format, ...) {}
|
inline void cDebug::TraceError (const wchar_t *, ...) {}
|
||||||
inline void cDebug::TraceWarning (const wchar_t *format, ...) {}
|
inline void cDebug::TraceWarning (const wchar_t *, ...) {}
|
||||||
inline void cDebug::TraceDebug (const wchar_t *format, ...) {}
|
inline void cDebug::TraceDebug (const wchar_t *, ...) {}
|
||||||
inline void cDebug::TraceDetail (const wchar_t *format, ...) {}
|
inline void cDebug::TraceDetail (const wchar_t *, ...) {}
|
||||||
inline void cDebug::TraceNever (const wchar_t *format, ...) {}
|
inline void cDebug::TraceNever (const wchar_t *, ...) {}
|
||||||
inline void cDebug::TraceVaArgs (int iDebugLevel, const char *format, va_list &args) {}
|
inline void cDebug::TraceVaArgs (int, const char *, va_list &) {}
|
||||||
inline void cDebug::TraceVaArgs (int iDebugLevel, const wchar_t *format, va_list &args) {}
|
inline void cDebug::TraceVaArgs (int, const wchar_t *, va_list &) {}
|
||||||
inline void cDebug::Trace (int levelNum, const char* format, ...) {}
|
inline void cDebug::Trace (int, const char*, ...) {}
|
||||||
inline void cDebug::Trace (int levelNum, const wchar_t* format, ...) {}
|
inline void cDebug::Trace (int, const wchar_t*, ...) {}
|
||||||
inline bool cDebug::AddOutTarget (OutTarget target) { return false; }
|
inline bool cDebug::AddOutTarget (OutTarget) { return false; }
|
||||||
inline bool cDebug::RemoveOutTarget (OutTarget target) { return false; }
|
inline bool cDebug::RemoveOutTarget (OutTarget) { return false; }
|
||||||
inline bool cDebug::HasOutTarget (OutTarget target) { return false; }
|
inline bool cDebug::HasOutTarget (OutTarget) { return false; }
|
||||||
inline bool cDebug::SetOutputFile (const char* filename) { return false; }
|
inline bool cDebug::SetOutputFile (const char*) { return false; }
|
||||||
inline void cDebug::SetDebugLevel (int level) {}
|
inline void cDebug::SetDebugLevel (int) {}
|
||||||
inline int cDebug::GetDebugLevel (void) { return 0; }
|
inline int cDebug::GetDebugLevel (void) { return 0; }
|
||||||
inline void cDebug::DebugOut ( const char* lpOutputString, ... ) {}
|
inline void cDebug::DebugOut ( const char*, ... ) {}
|
||||||
inline void cDebug::DebugOut ( const wchar_t* lpOutputString, ... ) {}
|
inline void cDebug::DebugOut ( const wchar_t*, ... ) {}
|
||||||
|
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,6 @@ void cErrorReporter::PrintErrorMsg(const eError& error, const TSTRING& strExtra)
|
||||||
(cDisplayEncoder::Flags) ( cDisplayEncoder::NON_ROUNDTRIP |
|
(cDisplayEncoder::Flags) ( cDisplayEncoder::NON_ROUNDTRIP |
|
||||||
cDisplayEncoder::ALLOW_WHITESPACE ) );
|
cDisplayEncoder::ALLOW_WHITESPACE ) );
|
||||||
TSTRING errStr;
|
TSTRING errStr;
|
||||||
int len;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// if the ID is zero, just return.
|
// if the ID is zero, just return.
|
||||||
|
@ -86,7 +85,7 @@ void cErrorReporter::PrintErrorMsg(const eError& error, const TSTRING& strExtra)
|
||||||
errStr = strm.str();
|
errStr = strm.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
len = errStr.length(); // save for later
|
//int len = errStr.length(); // save for later
|
||||||
TCERR << errStr;
|
TCERR << errStr;
|
||||||
|
|
||||||
// "First Part" error string
|
// "First Part" error string
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// util_GetErrnoString -- return the result of strerror(errno) as a tstring
|
// util_GetErrnoString -- return the result of strerror(errno) as a tstring
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
static TSTRING util_GetErrnoString()
|
/*static TSTRING util_GetErrnoString()
|
||||||
{
|
{
|
||||||
TSTRING ret;
|
TSTRING ret;
|
||||||
char* pErrorStr = strerror(errno);
|
char* pErrorStr = strerror(errno);
|
||||||
|
@ -64,7 +64,7 @@ static TSTRING util_GetErrnoString()
|
||||||
ret = pErrorStr;
|
ret = pErrorStr;
|
||||||
#endif
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -145,7 +145,8 @@ cFileHeader::cFileHeader()
|
||||||
}
|
}
|
||||||
|
|
||||||
cFileHeader::cFileHeader(const cFileHeader& rhs)
|
cFileHeader::cFileHeader(const cFileHeader& rhs)
|
||||||
: mID(rhs.mID),
|
: iSerializable(),
|
||||||
|
mID(rhs.mID),
|
||||||
mVersion(rhs.mVersion),
|
mVersion(rhs.mVersion),
|
||||||
mEncoding(rhs.mEncoding)
|
mEncoding(rhs.mEncoding)
|
||||||
{
|
{
|
||||||
|
|
|
@ -86,7 +86,7 @@ inline cFileHeaderID::cFileHeaderID(const TCHAR* id)
|
||||||
|
|
||||||
inline
|
inline
|
||||||
cFileHeaderID::cFileHeaderID( const cFileHeaderID& rhs ) :
|
cFileHeaderID::cFileHeaderID( const cFileHeaderID& rhs ) :
|
||||||
mIDLen( rhs.mIDLen )
|
iSerializable(), mIDLen( rhs.mIDLen )
|
||||||
{
|
{
|
||||||
memcpy( mID, rhs.mID, MAXBYTES );
|
memcpy( mID, rhs.mID, MAXBYTES );
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,9 +82,7 @@ public:
|
||||||
virtual void Write(iSerializer* pSerializer) const = 0; // throw (eSerializer, eArchive)
|
virtual void Write(iSerializer* pSerializer) const = 0; // throw (eSerializer, eArchive)
|
||||||
// objects implement these methods to read and write themselves to a serializer.
|
// objects implement these methods to read and write themselves to a serializer.
|
||||||
|
|
||||||
#ifdef _SUNPRO
|
virtual ~iSerializable() {}
|
||||||
~iSerializable();
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class iTypedSerializable : public iTyped, public iSerializable
|
class iTypedSerializable : public iTyped, public iSerializable
|
||||||
|
@ -101,9 +99,7 @@ public:
|
||||||
static int16 MajorVersion(int32 version) { return (int16)((uint32)version >> 16); }
|
static int16 MajorVersion(int32 version) { return (int16)((uint32)version >> 16); }
|
||||||
static int16 MinorVersion(int32 version) { return (int16)version; }
|
static int16 MinorVersion(int32 version) { return (int16)version; }
|
||||||
|
|
||||||
#ifdef _SUNPRO
|
virtual ~iTypedSerializable() {}
|
||||||
~iTypedSerializable();
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
|
|
|
@ -155,6 +155,8 @@ public:
|
||||||
E_OUTPUT_STREAM_FORMAT = 706,
|
E_OUTPUT_STREAM_FORMAT = 706,
|
||||||
E_NUMITEMS
|
E_NUMITEMS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
virtual ~iSerializer() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,9 @@ private:
|
||||||
//
|
//
|
||||||
virtual int GetMax() { return LIMIT_MAX; };
|
virtual int GetMax() { return LIMIT_MAX; };
|
||||||
virtual int GetMin() { return LIMIT_MIN; };
|
virtual int GetMin() { return LIMIT_MIN; };
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~cInterpretInt() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
|
@ -104,6 +107,9 @@ private:
|
||||||
|
|
||||||
virtual int GetMax() { return LIMIT_MAX; };
|
virtual int GetMax() { return LIMIT_MAX; };
|
||||||
virtual int GetMin() { return LIMIT_MIN; };
|
virtual int GetMin() { return LIMIT_MIN; };
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~cSeverityLimits() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////
|
///////////////////////////////////////////////
|
||||||
|
@ -120,6 +126,9 @@ private:
|
||||||
|
|
||||||
virtual int GetMax() { return LIMIT_MAX; };
|
virtual int GetMax() { return LIMIT_MAX; };
|
||||||
virtual int GetMin() { return LIMIT_MIN; };
|
virtual int GetMin() { return LIMIT_MIN; };
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~cRecurseDepthLimits() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__TWLIMITS_H
|
#endif //__TWLIMITS_H
|
||||||
|
|
|
@ -57,11 +57,13 @@
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// UTIL FUNCTION PROTOTYPES
|
// UTIL FUNCTION PROTOTYPES
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
||||||
static TSTRING& util_FormatTimeC( struct tm* ptm, TSTRING& strBuf );
|
static TSTRING& util_FormatTimeC( struct tm* ptm, TSTRING& strBuf );
|
||||||
static TSTRING& util_FormatTimeCPlusPlus( struct tm* ptm, TSTRING& strBuf );
|
|
||||||
static TSTRING& util_FormatTime( struct tm* ptm, TSTRING& strBuf );
|
static TSTRING& util_FormatTime( struct tm* ptm, TSTRING& strBuf );
|
||||||
|
|
||||||
|
#if !USES_CLIB_DATE_FUNCTION
|
||||||
|
static TSTRING& util_FormatTimeCPlusPlus( struct tm* ptm, TSTRING& strBuf );
|
||||||
|
#endif
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
// PUBLIC METHOD CODE
|
// PUBLIC METHOD CODE
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
@ -281,6 +283,7 @@ TSTRING& util_FormatTime( struct tm* ptm, TSTRING& strBuf )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if !USES_CLIB_DATE_FUNCTION
|
||||||
TSTRING& util_FormatTimeCPlusPlus( struct tm* ptm, TSTRING& strBuf )
|
TSTRING& util_FormatTimeCPlusPlus( struct tm* ptm, TSTRING& strBuf )
|
||||||
{
|
{
|
||||||
ASSERT( ptm );
|
ASSERT( ptm );
|
||||||
|
@ -299,6 +302,7 @@ TSTRING& util_FormatTimeCPlusPlus( struct tm* ptm, TSTRING& strBuf )
|
||||||
strBuf = sstr.str();
|
strBuf = sstr.str();
|
||||||
return strBuf;
|
return strBuf;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
TSTRING& util_FormatTimeC( struct tm* ptm, TSTRING& strBuf )
|
TSTRING& util_FormatTimeC( struct tm* ptm, TSTRING& strBuf )
|
||||||
|
|
|
@ -62,9 +62,7 @@ public:
|
||||||
// (b) returning that object in their implementation of GetType()
|
// (b) returning that object in their implementation of GetType()
|
||||||
// You can use the macros below to simplify the process
|
// You can use the macros below to simplify the process
|
||||||
|
|
||||||
#ifdef _SUNPRO
|
virtual ~iTyped() {}
|
||||||
~iTyped();
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
|
@ -93,7 +93,7 @@ void cFCOName::ClearNameTable()
|
||||||
// ctor, dtor
|
// ctor, dtor
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
cFCOName::cFCOName(iFCONameInfo* pNI) :
|
cFCOName::cFCOName(iFCONameInfo* pNI) :
|
||||||
mpPathName(0), mDelimiter('/')
|
iTypedSerializable(), mpPathName(0), mDelimiter('/')
|
||||||
{
|
{
|
||||||
SetNameInfo(pNI);
|
SetNameInfo(pNI);
|
||||||
mpPathName = new cFCOName_i;
|
mpPathName = new cFCOName_i;
|
||||||
|
@ -105,6 +105,7 @@ cFCOName::cFCOName(iFCONameInfo* pNI) :
|
||||||
}
|
}
|
||||||
|
|
||||||
cFCOName::cFCOName(const cFCOName& rhs) :
|
cFCOName::cFCOName(const cFCOName& rhs) :
|
||||||
|
iTypedSerializable(),
|
||||||
mpPathName(rhs.mpPathName),
|
mpPathName(rhs.mpPathName),
|
||||||
mDelimiter(rhs.mDelimiter),
|
mDelimiter(rhs.mDelimiter),
|
||||||
mbCaseSensitive(rhs.mbCaseSensitive)
|
mbCaseSensitive(rhs.mbCaseSensitive)
|
||||||
|
@ -117,8 +118,8 @@ cFCOName::cFCOName(const cFCOName& rhs) :
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
cFCOName::cFCOName(const TSTRING& rhs, iFCONameInfo* pNI) :
|
cFCOName::cFCOName(const TSTRING& rhs, iFCONameInfo* pNI) :
|
||||||
mpPathName(0), mDelimiter('/')
|
iTypedSerializable(), mpPathName(0), mDelimiter('/')
|
||||||
{
|
{
|
||||||
SetNameInfo(pNI);
|
SetNameInfo(pNI);
|
||||||
mpPathName = new cFCOName_i;
|
mpPathName = new cFCOName_i;
|
||||||
|
@ -132,7 +133,7 @@ cFCOName::cFCOName(const TSTRING& rhs, iFCONameInfo* pNI) :
|
||||||
}
|
}
|
||||||
|
|
||||||
cFCOName::cFCOName(const TCHAR* rhs, iFCONameInfo* pNI) :
|
cFCOName::cFCOName(const TCHAR* rhs, iFCONameInfo* pNI) :
|
||||||
mpPathName(0), mDelimiter('/')
|
iTypedSerializable(), mpPathName(0), mDelimiter('/')
|
||||||
{
|
{
|
||||||
SetNameInfo(pNI);
|
SetNameInfo(pNI);
|
||||||
mpPathName = new cFCOName_i;
|
mpPathName = new cFCOName_i;
|
||||||
|
|
|
@ -47,6 +47,7 @@ class iFCONameInfo
|
||||||
public:
|
public:
|
||||||
virtual bool IsCaseSensitive() const = 0;
|
virtual bool IsCaseSensitive() const = 0;
|
||||||
virtual TCHAR GetDelimitingChar() const = 0;
|
virtual TCHAR GetDelimitingChar() const = 0;
|
||||||
|
virtual ~iFCONameInfo() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,8 @@ public:
|
||||||
virtual bool DisplayStringToFCOName( const TSTRING& str, cFCOName& name ) const = 0;
|
virtual bool DisplayStringToFCOName( const TSTRING& str, cFCOName& name ) const = 0;
|
||||||
// this function converts strings from FCONameToDisplayString back into an fconame
|
// this function converts strings from FCONameToDisplayString back into an fconame
|
||||||
// returns false if can't convert.
|
// returns false if can't convert.
|
||||||
|
|
||||||
|
virtual ~iFCONameTranslator() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__FCONAMETRANSLATOR_H
|
#endif //__FCONAMETRANSLATOR_H
|
||||||
|
|
|
@ -45,7 +45,7 @@ int cFCOPropVector::msBitlength(sizeof (uint32) * 8);
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Constructor -- Sets mSize. Default = 32.
|
// Constructor -- Sets mSize. Default = 32.
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
cFCOPropVector::cFCOPropVector(int size)
|
cFCOPropVector::cFCOPropVector(int size) : iSerializable()
|
||||||
{
|
{
|
||||||
mSize = 32;
|
mSize = 32;
|
||||||
mMask = 0;
|
mMask = 0;
|
||||||
|
@ -65,7 +65,7 @@ cFCOPropVector::~cFCOPropVector()
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Copy Constructor
|
// Copy Constructor
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
cFCOPropVector::cFCOPropVector(const cFCOPropVector &rhs)
|
cFCOPropVector::cFCOPropVector(const cFCOPropVector &rhs) : iSerializable()
|
||||||
{
|
{
|
||||||
mSize = rhs.mSize;
|
mSize = rhs.mSize;
|
||||||
mMask = rhs.mMask;
|
mMask = rhs.mMask;
|
||||||
|
|
|
@ -63,7 +63,7 @@ inline static const cFCOIterImpl* CreateIterator(const cFCOSetImpl* pSet)
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// ctor and dtor
|
// ctor and dtor
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
cFCOSetImpl::cFCOSetImpl()
|
cFCOSetImpl::cFCOSetImpl() : iFCOSet()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ cFCOSetImpl::~cFCOSetImpl()
|
||||||
Clear();
|
Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
cFCOSetImpl::cFCOSetImpl(const cFCOSetImpl& rhs)
|
cFCOSetImpl::cFCOSetImpl(const cFCOSetImpl& rhs) : iFCOSet()
|
||||||
{
|
{
|
||||||
*this = rhs;
|
*this = rhs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,8 @@ class iFCOSpecHelper;
|
||||||
class iFCOSpec : public iSerRefCountObj
|
class iFCOSpec : public iSerRefCountObj
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~iFCOSpec() {}
|
||||||
|
|
||||||
virtual const TSTRING& GetName() const = 0;
|
virtual const TSTRING& GetName() const = 0;
|
||||||
// returns the name of this FCOSpec
|
// returns the name of this FCOSpec
|
||||||
virtual void SetName(const TSTRING& name) = 0;
|
virtual void SetName(const TSTRING& name) = 0;
|
||||||
|
@ -120,13 +122,14 @@ public:
|
||||||
class iFCOSpecMask
|
class iFCOSpecMask
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual const TSTRING& GetName() const = 0;
|
virtual ~iFCOSpecMask() {}
|
||||||
|
virtual const TSTRING& GetName() const = 0;
|
||||||
// return the name of this mask
|
// return the name of this mask
|
||||||
|
|
||||||
virtual bool Accept(const iFCO* pFCO) const = 0;
|
virtual bool Accept(const iFCO* pFCO) const = 0;
|
||||||
// returns true if the fco matches the criterion in the SpecMask
|
// returns true if the fco matches the criterion in the SpecMask
|
||||||
|
|
||||||
static const iFCOSpecMask* GetDefaultMask();
|
static const iFCOSpecMask* GetDefaultMask();
|
||||||
// returns the "default mask" that all iFCOSpecs must have. The default
|
// returns the "default mask" that all iFCOSpecs must have. The default
|
||||||
// mask matches every FCO and is called "Default". There is no need to
|
// mask matches every FCO and is called "Default". There is no need to
|
||||||
// destroy the returned pointer
|
// destroy the returned pointer
|
||||||
|
@ -136,7 +139,7 @@ public:
|
||||||
// inline implementation
|
// inline implementation
|
||||||
inline const cFCOPropVector& iFCOSpec::GetPropVector(const iFCO* pFCO) const
|
inline const cFCOPropVector& iFCOSpec::GetPropVector(const iFCO* pFCO) const
|
||||||
{
|
{
|
||||||
return GetPropVector(GetSpecMask(pFCO));
|
return GetPropVector(GetSpecMask(pFCO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ cFCOSpecImpl::cFCOSpecImpl(const TSTRING& name, void* pSrc, iFCOSpecHelper* pHel
|
||||||
}
|
}
|
||||||
|
|
||||||
cFCOSpecImpl::cFCOSpecImpl() :
|
cFCOSpecImpl::cFCOSpecImpl() :
|
||||||
|
iFCOSpec(),
|
||||||
mName(_T("Unnamed_FCOSpecImpl")),
|
mName(_T("Unnamed_FCOSpecImpl")),
|
||||||
mpHelper(0)
|
mpHelper(0)
|
||||||
{
|
{
|
||||||
|
@ -72,6 +73,7 @@ cFCOSpecImpl::cFCOSpecImpl() :
|
||||||
}
|
}
|
||||||
|
|
||||||
cFCOSpecImpl::cFCOSpecImpl(const cFCOSpecImpl& rhs) :
|
cFCOSpecImpl::cFCOSpecImpl(const cFCOSpecImpl& rhs) :
|
||||||
|
iFCOSpec(),
|
||||||
mpHelper(0)
|
mpHelper(0)
|
||||||
{
|
{
|
||||||
*this = rhs;
|
*this = rhs;
|
||||||
|
|
|
@ -150,7 +150,8 @@ protected:
|
||||||
mutable std::list<cFCOSpecList::PairType>::iterator mIter;
|
mutable std::list<cFCOSpecList::PairType>::iterator mIter;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline cFCOSpecList::cFCOSpecList(const cFCOSpecList& rhs)
|
inline cFCOSpecList::cFCOSpecList(const cFCOSpecList& rhs)
|
||||||
|
: iTypedSerializable()
|
||||||
{
|
{
|
||||||
*this = rhs;
|
*this = rhs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,10 +81,12 @@ void cGenreSpecListPair::SetSpecList(const cFCOSpecList& speclist)
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
cGenreSpecListVector::cGenreSpecListVector()
|
cGenreSpecListVector::cGenreSpecListVector()
|
||||||
|
: std::vector<cGenreSpecListPair>()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
cGenreSpecListVector::cGenreSpecListVector(const cGenreSpecListVector& rhs)
|
cGenreSpecListVector::cGenreSpecListVector(const cGenreSpecListVector& rhs)
|
||||||
|
: std::vector<cGenreSpecListPair>()
|
||||||
{
|
{
|
||||||
*this = rhs;
|
*this = rhs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -523,24 +523,22 @@ TSTRING cMD5Signature::AsString() const
|
||||||
return AsStringHex();
|
return AsStringHex();
|
||||||
|
|
||||||
TSTRING ret;
|
TSTRING ret;
|
||||||
char buf[24];
|
char buf[24];
|
||||||
int length;
|
|
||||||
|
|
||||||
ASSERT( sizeof( uint8 ) == sizeof( byte ) ); /* everything breaks otherwise */
|
ASSERT( sizeof( uint8 ) == sizeof( byte ) ); /* everything breaks otherwise */
|
||||||
btob64((byte*)md5_digest, buf, SIG_BYTE_SIZE*8);
|
btob64((byte*)md5_digest, buf, SIG_BYTE_SIZE*8);
|
||||||
//converting to base64 representation.
|
//converting to base64 representation.
|
||||||
length = strlen(buf);
|
|
||||||
|
|
||||||
#ifdef _UNICODE //making it TSTRING sensitive
|
#ifdef _UNICODE //making it TSTRING sensitive
|
||||||
ret.resize(length);
|
int length;
|
||||||
mbstowcs((TCHAR*) ret.data(), buf, length);
|
length = strlen(buf);
|
||||||
|
ret.resize(length);
|
||||||
|
mbstowcs((TCHAR*) ret.data(), buf, length);
|
||||||
#else
|
#else
|
||||||
ret.append(buf);
|
ret.append(buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
//return ret;
|
|
||||||
//ret holds base64 representation of digest.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TSTRING cMD5Signature::AsStringHex() const
|
TSTRING cMD5Signature::AsStringHex() const
|
||||||
|
@ -649,13 +647,13 @@ TSTRING cSHASignature::AsString(void) const
|
||||||
TSTRING ret;
|
TSTRING ret;
|
||||||
char* ps_signature;
|
char* ps_signature;
|
||||||
char buf[100];
|
char buf[100];
|
||||||
int length;
|
|
||||||
|
|
||||||
ps_signature = btob64((uint8*)sha_digest, buf, SIG_UINT32_SIZE*sizeof(uint32)*8);
|
ps_signature = btob64((uint8*)sha_digest, buf, SIG_UINT32_SIZE*sizeof(uint32)*8);
|
||||||
//converting to base64 representation.
|
//converting to base64 representation.
|
||||||
length = strlen(ps_signature);
|
|
||||||
|
|
||||||
#ifdef _UNICODE //making it TSTRING sensitive
|
#ifdef _UNICODE //making it TSTRING sensitive
|
||||||
|
int length;
|
||||||
|
length = strlen(ps_signature);
|
||||||
ret.resize(length);
|
ret.resize(length);
|
||||||
mbstowcs((TCHAR*) ret.data(), ps_signature, length);
|
mbstowcs((TCHAR*) ret.data(), ps_signature, length);
|
||||||
#else
|
#else
|
||||||
|
@ -839,23 +837,21 @@ TSTRING cHAVALSignature::AsString() const
|
||||||
return AsStringHex();
|
return AsStringHex();
|
||||||
|
|
||||||
TSTRING ret;
|
TSTRING ret;
|
||||||
char buf[24];
|
char buf[24];
|
||||||
int length;
|
|
||||||
|
|
||||||
btob64((byte*)mSignature, buf, 128);
|
btob64((byte*)mSignature, buf, 128);
|
||||||
//converting to base64 representation.
|
//converting to base64 representation.
|
||||||
length = strlen(buf);
|
|
||||||
|
|
||||||
#ifdef _UNICODE //making it TSTRING sensitive
|
#ifdef _UNICODE //making it TSTRING sensitive
|
||||||
ret.resize(length);
|
int length;
|
||||||
mbstowcs((TCHAR*) ret.data(), buf, length);
|
length = strlen(buf);
|
||||||
|
ret.resize(length);
|
||||||
|
mbstowcs((TCHAR*) ret.data(), buf, length);
|
||||||
#else
|
#else
|
||||||
ret.append(buf);
|
ret.append(buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
//return ret;
|
|
||||||
//ret holds base64 representation of digest.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TSTRING cHAVALSignature::AsStringHex() const
|
TSTRING cHAVALSignature::AsStringHex() const
|
||||||
|
|
|
@ -55,11 +55,10 @@
|
||||||
// METHOD CODE
|
// METHOD CODE
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
||||||
cFSDataSourceIter::cFSDataSourceIter()
|
cFSDataSourceIter::cFSDataSourceIter() : cFCODataSourceIterImpl(), mDev(0)
|
||||||
{
|
{
|
||||||
// set the case sensitiveness of the parent...
|
// set the case sensitiveness of the parent...
|
||||||
//
|
//
|
||||||
mDev = 0;
|
|
||||||
mParentName.SetCaseSensitive( iTWFactory::GetInstance()->GetNameInfo()->IsCaseSensitive() );
|
mParentName.SetCaseSensitive( iTWFactory::GetInstance()->GetNameInfo()->IsCaseSensitive() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +66,7 @@ cFSDataSourceIter::~cFSDataSourceIter()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
cFSDataSourceIter::cFSDataSourceIter( const cFSDataSourceIter& rhs )
|
cFSDataSourceIter::cFSDataSourceIter( const cFSDataSourceIter& rhs ) : cFCODataSourceIterImpl(), mDev(0)
|
||||||
{
|
{
|
||||||
// set the case sensitiveness of the parent...
|
// set the case sensitiveness of the parent...
|
||||||
//
|
//
|
||||||
|
|
|
@ -59,6 +59,8 @@ public:
|
||||||
{
|
{
|
||||||
return _T('/');
|
return _T('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual ~cUnixNameInfo() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,8 @@ public:
|
||||||
virtual TSTRING ToStringAPI( const cFCOName& name ) const;
|
virtual TSTRING ToStringAPI( const cFCOName& name ) const;
|
||||||
virtual TSTRING ToStringDisplay( const cFCOName& name, bool bUnique = false ) const;
|
virtual TSTRING ToStringDisplay( const cFCOName& name, bool bUnique = false ) const;
|
||||||
virtual bool DisplayStringToFCOName( const TSTRING& str, cFCOName& name ) const;
|
virtual bool DisplayStringToFCOName( const TSTRING& str, cFCOName& name ) const;
|
||||||
|
|
||||||
|
virtual ~cFSNameTranslator() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__FSNAMETRANSLATOR_H
|
#endif //__FSNAMETRANSLATOR_H
|
||||||
|
|
|
@ -191,6 +191,7 @@ int cFSPropSet::GetNumFSProps()
|
||||||
// ctors. dtor, operator=
|
// ctors. dtor, operator=
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
cFSPropSet::cFSPropSet() :
|
cFSPropSet::cFSPropSet() :
|
||||||
|
iFCOPropSet(),
|
||||||
mValidProps(cFSPropSet::PROP_NUMITEMS),
|
mValidProps(cFSPropSet::PROP_NUMITEMS),
|
||||||
mUndefinedProps(cFSPropSet::PROP_NUMITEMS)
|
mUndefinedProps(cFSPropSet::PROP_NUMITEMS)
|
||||||
{
|
{
|
||||||
|
@ -203,6 +204,7 @@ cFSPropSet::~cFSPropSet()
|
||||||
}
|
}
|
||||||
|
|
||||||
cFSPropSet::cFSPropSet(const cFSPropSet& rhs) :
|
cFSPropSet::cFSPropSet(const cFSPropSet& rhs) :
|
||||||
|
iFCOPropSet(),
|
||||||
mValidProps(cFSPropSet::PROP_NUMITEMS)
|
mValidProps(cFSPropSet::PROP_NUMITEMS)
|
||||||
{
|
{
|
||||||
*this = rhs;
|
*this = rhs;
|
||||||
|
|
|
@ -150,8 +150,9 @@ public:
|
||||||
|
|
||||||
class iMimeEncoding
|
class iMimeEncoding
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~iMimeEncoding() {}
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
std::string
|
std::string
|
||||||
Encode( const std::string& sIn,
|
Encode( const std::string& sIn,
|
||||||
|
@ -173,7 +174,9 @@ class iMimeEncoding
|
||||||
// TODO:BAM -- convert ToBase64 to Encode
|
// TODO:BAM -- convert ToBase64 to Encode
|
||||||
class cBase64Encoding : public iMimeEncoding
|
class cBase64Encoding : public iMimeEncoding
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~cBase64Encoding() {}
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
std::string
|
std::string
|
||||||
Encode( const std::string& sIn,
|
Encode( const std::string& sIn,
|
||||||
|
@ -191,7 +194,9 @@ class cBase64Encoding : public iMimeEncoding
|
||||||
|
|
||||||
class cQuotedPrintableEncoding : public iMimeEncoding
|
class cQuotedPrintableEncoding : public iMimeEncoding
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~cQuotedPrintableEncoding() {}
|
||||||
|
|
||||||
virtual
|
virtual
|
||||||
std::string
|
std::string
|
||||||
Encode( const std::string& sIn,
|
Encode( const std::string& sIn,
|
||||||
|
|
|
@ -86,8 +86,6 @@ bool cPipedMailMessage::Send()
|
||||||
// Get Body and Attachments
|
// Get Body and Attachments
|
||||||
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
bool allOK = true;
|
|
||||||
|
|
||||||
// get body
|
// get body
|
||||||
std::string sNBody = cStringUtil::TstrToStr( mstrBody );
|
std::string sNBody = cStringUtil::TstrToStr( mstrBody );
|
||||||
|
|
||||||
|
@ -96,7 +94,6 @@ bool cPipedMailMessage::Send()
|
||||||
if( ! GetAttachmentsAsString( sAttachments ) )
|
if( ! GetAttachmentsAsString( sAttachments ) )
|
||||||
{
|
{
|
||||||
sAttachments.erase();
|
sAttachments.erase();
|
||||||
allOK = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string sSend = sNBody + sAttachments;
|
std::string sSend = sNBody + sAttachments;
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
static bool PopNextLine( TSTRING& fileIn, TSTRING& sLine, int& nLine );
|
static bool PopNextLine( TSTRING& fileIn, TSTRING& sLine, int& nLine );
|
||||||
static bool IsReturnChar( TCHAR tch );
|
static bool IsReturnChar( TCHAR tch );
|
||||||
static bool IsComment( const TSTRING& sLine );
|
static bool IsComment( const TSTRING& sLine );
|
||||||
static void GetKeyValuePair( const TSTRING& sLine, TSTRING& sKey, TSTRING& sVal ); // throw( eConfigFile );
|
//static void GetKeyValuePair( const TSTRING& sLine, TSTRING& sKey, TSTRING& sVal ); // throw( eConfigFile );
|
||||||
static TSTRING& util_MakeTripwireDateString( TSTRING& strBuf );
|
static TSTRING& util_MakeTripwireDateString( TSTRING& strBuf );
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
|
@ -78,7 +78,8 @@ cDbDataSourceIter::cDbDataSourceIter(cHierDatabase* pDb, int genreNum )
|
||||||
// cDbDataSourceIter
|
// cDbDataSourceIter
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
cDbDataSourceIter::cDbDataSourceIter( const cDbDataSourceIter& rhs )
|
cDbDataSourceIter::cDbDataSourceIter( const cDbDataSourceIter& rhs )
|
||||||
: mDbIter ( rhs.mDbIter ),
|
: iFCODataSourceIter(),
|
||||||
|
mDbIter ( rhs.mDbIter ),
|
||||||
mFCOCreateFunc ( rhs.mFCOCreateFunc ),
|
mFCOCreateFunc ( rhs.mFCOCreateFunc ),
|
||||||
mFlags ( rhs.mFlags ),
|
mFlags ( rhs.mFlags ),
|
||||||
mpErrorBucket ( rhs.mpErrorBucket )
|
mpErrorBucket ( rhs.mpErrorBucket )
|
||||||
|
|
|
@ -67,9 +67,9 @@
|
||||||
// UTILITY METHODS
|
// UTILITY METHODS
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
static void util_PrintFCO(const iFCO* pFCO, iFCOPropDisplayer * pPropDisplayer);
|
//static void util_PrintFCO(const iFCO* pFCO, iFCOPropDisplayer * pPropDisplayer);
|
||||||
static void util_InitBlockArray( cBlockRecordArray& block );
|
static void util_InitBlockArray( cBlockRecordArray& block );
|
||||||
static void util_MapHierRoot( std::map< std::pair< int, int>, int > dbMap );
|
//static void util_MapHierRoot( std::map< std::pair< int, int>, int > dbMap );
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Insulated implementation:
|
// Insulated implementation:
|
||||||
|
|
|
@ -2688,6 +2688,8 @@ static bool NotifyEncryptionType(cFileHeader::Encoding encoding, iUserNotify::Ve
|
||||||
case cFileHeader::ASYM_ENCRYPTION:
|
case cFileHeader::ASYM_ENCRYPTION:
|
||||||
iUserNotify::GetInstance()->Notify(vl, TSS_GetString(cTWAdmin, twadmin::STR_ENCRYPT_TYPE_ASYM).c_str());
|
iUserNotify::GetInstance()->Notify(vl, TSS_GetString(cTWAdmin, twadmin::STR_ENCRYPT_TYPE_ASYM).c_str());
|
||||||
return true;
|
return true;
|
||||||
|
default:
|
||||||
|
ASSERT("Unexpeced encryption type");
|
||||||
}
|
}
|
||||||
|
|
||||||
iUserNotify::GetInstance()->Notify(vl, TSS_GetString(cTWAdmin, twadmin::STR_ENCRYPT_TYPE_UNK).c_str());
|
iUserNotify::GetInstance()->Notify(vl, TSS_GetString(cTWAdmin, twadmin::STR_ENCRYPT_TYPE_UNK).c_str());
|
||||||
|
|
|
@ -134,13 +134,14 @@ unsigned int cByteQueueNode::Peek(byte &outByte) const
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
cByteQueue::cByteQueue(int mNodeSize)
|
cByteQueue::cByteQueue(int mNodeSize)
|
||||||
: mNodeSize(mNodeSize),
|
: BufferedTransformation(),
|
||||||
|
mNodeSize(mNodeSize),
|
||||||
mCurrentSize(0)
|
mCurrentSize(0)
|
||||||
{
|
{
|
||||||
head = tail = new cByteQueueNode(mNodeSize);
|
head = tail = new cByteQueueNode(mNodeSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
cByteQueue::cByteQueue(const cByteQueue ©)
|
cByteQueue::cByteQueue(const cByteQueue ©) : BufferedTransformation()
|
||||||
{
|
{
|
||||||
CopyFrom(copy);
|
CopyFrom(copy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,9 +58,9 @@
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
||||||
static std::string util_ConvertMB( const std::string& sIn );
|
static std::string util_ConvertMB( const std::string& sIn );
|
||||||
static bool util_ReadMBCharAsSBString( std::stringstream& ss, std::string& strCh );
|
//static bool util_ReadMBCharAsSBString( std::stringstream& ss, std::string& strCh );
|
||||||
static std::string convert_to_encoded_hex( char ch );
|
static std::string convert_to_encoded_hex( char ch );
|
||||||
static std::string util_Output512Chars( const std::string& s );
|
//static std::string util_Output512Chars( const std::string& s );
|
||||||
// don't want to pass debug a string over 1024, so play it safe with 512
|
// don't want to pass debug a string over 1024, so play it safe with 512
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
|
|
|
@ -121,6 +121,8 @@ public:
|
||||||
// Returns a TSTRING that describes specific usage for a derived mode.
|
// Returns a TSTRING that describes specific usage for a derived mode.
|
||||||
virtual cTWPrintCmdLine::CmdLineArgs GetModeID() = 0;
|
virtual cTWPrintCmdLine::CmdLineArgs GetModeID() = 0;
|
||||||
virtual void SetConfigFile( TSTRING configFilePath ) = 0;
|
virtual void SetConfigFile( TSTRING configFilePath ) = 0;
|
||||||
|
|
||||||
|
virtual ~iTWMode() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue