included bincimap 1.3.3 to 1.3.4 diffs (mostly cosmetic)

This commit is contained in:
dockes 2006-11-05 18:02:02 +00:00
parent 0cf3b35435
commit 9cedfbf10e
19 changed files with 65 additions and 51 deletions

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* address.cc
@ -6,7 +6,7 @@
* Description:
* Implementation of the Address class.
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* src/mailbox/address.h
@ -6,7 +6,7 @@
* Description:
* Declaration of the Address class.
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* convert.cc
@ -6,7 +6,7 @@
* Description:
* Implementation of miscellaneous convertion functions.
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* src/util/convert.h
@ -6,7 +6,7 @@
* Description:
* Declaration of miscellaneous convertion functions.
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -38,7 +38,7 @@
#include <sys/stat.h>
#include "address.h"
#include "depot.h"
//#include "depot.h"
namespace Binc {
@ -264,6 +264,9 @@ namespace Binc {
} else if (*i == '*')
regex += ".*?";
else if (*i == '%') {
regex += "(\\";
regex += delimiter;
regex += "){0,1}";
regex += "[^\\";
regex += delimiter;
regex += "]*?";

View File

@ -41,7 +41,8 @@ IODevice::IODevice(int f) : flags(f | IsEnabled),
maxOutputBufferSize(0),
timeout(0),
readCount(0), writeCount(0),
outputLevel(0), outputLevelLimit(0),
outputLevel(ErrorLevel),
outputLevelLimit(ErrorLevel),
error(Unknown), errorString("Unknown error"),
dumpfd(0)
{
@ -161,25 +162,25 @@ unsigned int IODevice::getTimeout(void) const
}
//------------------------------------------------------------------------
void IODevice::setOutputLevel(unsigned int level)
void IODevice::setOutputLevel(LogLevel level)
{
outputLevel = level;
}
//------------------------------------------------------------------------
unsigned int IODevice::getOutputLevel(void) const
IODevice::LogLevel IODevice::getOutputLevel(void) const
{
return outputLevel;
}
//------------------------------------------------------------------------
void IODevice::setOutputLevelLimit(unsigned int level)
void IODevice::setOutputLevelLimit(LogLevel level)
{
outputLevelLimit = level;
}
//------------------------------------------------------------------------
unsigned int IODevice::getOutputLevelLimit(void) const
IODevice::LogLevel IODevice::getOutputLevelLimit(void) const
{
return outputLevelLimit;
}

View File

@ -1,4 +1,4 @@
/*-*-mode:c++-*-*/
/*-*-mode:c++;c-basic-offset:2-*-*/
/* --------------------------------------------------------------------
* Filename:
* src/iodevice.h
@ -151,6 +151,13 @@ namespace Binc {
*/
unsigned int getTimeout(void) const;
enum LogLevel {
ErrorLevel,
InfoLevel,
WarningLevel,
DebugLevel
};
/*!
Sets the output level for the following write operations on this
device.
@ -172,14 +179,14 @@ namespace Binc {
\param level The output level
\sa getOutputLevel(), setOutputLevelLimit()
*/
void setOutputLevel(unsigned int level);
void setOutputLevel(LogLevel level);
/*!
Returns the current output level.
\sa setOutputLevel()
*/
unsigned int getOutputLevel(void) const;
LogLevel getOutputLevel(void) const;
/*!
Sets the current output level limit. Write operations with a
@ -188,14 +195,14 @@ namespace Binc {
\param level The output level limit
\sa setOutputLevel()
*/
void setOutputLevelLimit(unsigned int level);
void setOutputLevelLimit(LogLevel level);
/*!
Returns the current output level limit.
\sa setOutputLevelLimit()
*/
unsigned int getOutputLevelLimit(void) const;
LogLevel getOutputLevelLimit(void) const;
/*!
Returns the number of bytes that have been read from this device
@ -209,6 +216,11 @@ namespace Binc {
*/
unsigned int getWriteCount(void) const;
/*!
Calling this function enables the built-in protocol dumping feature in
the device. All input and output to this device will be dumped to a file
in /tmp.
*/
void enableProtocolDumping(void);
/*!
@ -356,11 +368,11 @@ namespace Binc {
unsigned int readCount;
unsigned int writeCount;
unsigned int outputLevel;
unsigned int outputLevelLimit;
LogLevel outputLevel;
LogLevel outputLevelLimit;
Error error;
std::string errorString;
mutable Error error;
mutable std::string errorString;
int dumpfd;
};

View File

@ -28,8 +28,9 @@
#include <map>
#include <string>
#include "iodevice.h"
namespace Binc {
class IODevice;
class IOFactory {
public:
~IOFactory(void);
@ -55,14 +56,14 @@ namespace Binc {
#define bincDebug if (false) std::cout
#else
#define bincError \
IOFactory::getLogger().setOutputLevel(0);IOFactory::getLogger()
IOFactory::getLogger().setOutputLevel(IODevice::ErrorLevel);IOFactory::getLogger()
#define bincWarning \
IOFactory::getLogger().setOutputLevel(2);IOFactory::getLogger()
IOFactory::getLogger().setOutputLevel(IODevice::WarningLevel);IOFactory::getLogger()
#define bincDebug \
IOFactory::getLogger().setOutputLevel(3);IOFactory::getLogger()
IOFactory::getLogger().setOutputLevel(IODevice::DebugLevel);IOFactory::getLogger()
#endif
#define bincInfo \
IOFactory::getLogger().setOutputLevel(1);IOFactory::getLogger()
IOFactory::getLogger().setOutputLevel(IODevice::InfoLevel);IOFactory::getLogger()
#endif

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* mime-getpart.cc
@ -6,7 +6,7 @@
* Description:
* Implementation of main mime parser components
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* src/mime-inputsource.h
@ -6,7 +6,7 @@
* Description:
* The base class of the MIME input source
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -211,9 +211,6 @@ namespace Binc {
}
}
extern Binc::MimeInputSource *mimeSource;
#endif

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* mime-parsefull.cc
@ -6,7 +6,7 @@
* Description:
* Implementation of main mime parser components
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* mime-parseonlyheader.cc
@ -6,7 +6,7 @@
* Description:
* Implementation of main mime parser components
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* mime-printbody.cc
@ -6,7 +6,7 @@
* Description:
* Implementation of main mime parser components
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* mime-printdoc.cc
@ -6,7 +6,7 @@
* Description:
* Implementation of main mime parser components
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* mime-printheader.cc
@ -6,7 +6,7 @@
* Description:
* Implementation of main mime parser components
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* mime.cc
@ -6,7 +6,7 @@
* Description:
* Implementation of main mime parser components
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* mime.cc
@ -6,7 +6,7 @@
* Description:
* Implementation of main mime parser components
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,4 +1,4 @@
/* -*- Mode: c++; -*- */
/* -*- mode:c++;c-basic-offset:2 -*- */
/* --------------------------------------------------------------------
* Filename:
* src/parsers/mime/mime.h
@ -6,7 +6,7 @@
* Description:
* Declaration of main mime parser components
* --------------------------------------------------------------------
* Copyright 2002-2004 Andreas Aardal Hanssen
* Copyright 2002-2005 Andreas Aardal Hanssen
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by