*Backed out changeset 3be01fb200a5
--HG-- branch : trunk
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
//=============================================================================
|
||||
/**
|
||||
* @file Codecs.h
|
||||
@@ -14,17 +15,24 @@
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
#ifndef ACE_CODECS_H
|
||||
#define ACE_CODECS_H
|
||||
|
||||
#include /**/ "ace/pre.h"
|
||||
|
||||
#include /**/ "ace/ACE_export.h"
|
||||
|
||||
#if !defined (ACE_LACKS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif /* ACE_LACKS_PRAGMA_ONCE */
|
||||
|
||||
#include "ace/Basic_Types.h"
|
||||
#include "ace/Global_Macros.h"
|
||||
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
/**
|
||||
* @class ACE_Base64
|
||||
*
|
||||
@@ -38,7 +46,9 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
class ACE_Export ACE_Base64
|
||||
{
|
||||
public:
|
||||
|
||||
//@{
|
||||
|
||||
/**
|
||||
* Encodes a stream of bytes to Base64 data
|
||||
*
|
||||
@@ -49,6 +59,7 @@ public:
|
||||
* @return Encoded Base64 data in byte stream or NULL if input data cannot
|
||||
* be encoded.
|
||||
*/
|
||||
|
||||
static ACE_Byte* encode (const ACE_Byte* input,
|
||||
const size_t input_len,
|
||||
size_t* output_len,
|
||||
@@ -63,6 +74,7 @@ public:
|
||||
*/
|
||||
static ACE_Byte* decode (const ACE_Byte* input,
|
||||
size_t* output_len);
|
||||
|
||||
/**
|
||||
* Return the length of the encoded input data
|
||||
*
|
||||
@@ -71,26 +83,40 @@ public:
|
||||
*
|
||||
*/
|
||||
static size_t length (const ACE_Byte* input);
|
||||
|
||||
//@}
|
||||
|
||||
protected:
|
||||
|
||||
// Prevent default construction.
|
||||
ACE_Base64 (void) {}
|
||||
|
||||
private:
|
||||
|
||||
// Preventing copying and assignment.
|
||||
ACE_Base64 (ACE_Base64 const &);
|
||||
ACE_Base64 & operator= (ACE_Base64 const &);
|
||||
|
||||
/// Initialize the tables for encoding/decoding.
|
||||
static void init (void);
|
||||
|
||||
private:
|
||||
|
||||
/// Alphabet used for decoding i.e decoder_[alphabet_[i = 0..63]] = i
|
||||
static ACE_Byte decoder_[];
|
||||
|
||||
/// Alphabet used to check valid range of encoded input i.e
|
||||
/// member_[alphabet_[0..63]] = 1
|
||||
static ACE_Byte member_[];
|
||||
|
||||
/// Boolean to denote whether initialization is complete
|
||||
static bool init_;
|
||||
|
||||
};
|
||||
|
||||
ACE_END_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
#include /**/ "ace/post.h"
|
||||
|
||||
#endif /* ACE_CODECS_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user