moved to current/headers/private/textencoding

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5804 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty 2003-12-30 03:10:23 +00:00
parent ca1cb6b20a
commit 119a05637a
2 changed files with 0 additions and 180 deletions

View File

@ -1,89 +0,0 @@
#ifndef CHARACTER_SET_H
#define CHARACTER_SET_H
#include <SupportDefs.h>
namespace BPrivate {
/**
* @file CharacterSet.h
* @author Andrew Bachmann
* @brief Defines BCharacterSet
*
* @see http://www.iana.org/assignments/character-sets
**/
class BCharacterSet {
/**
* @class BCharacterSet
* @brief An object holding a variety of useful information about a character set.
*
* This information has been derived from the IANA standards organization.
* Since IANA provides several names for some encodings, this object also
* provides for aliases.
**/
public:
/**
* @brief default constructor, for stack allocated character set objects
**/
BCharacterSet();
/**
* @brief constructor, for internal use only
**/
BCharacterSet(uint32 id, uint32 MIBenum, const char * print_name,
const char * iana_name, const char * mime_name,
const char ** aliases);
/**
* @brief returns an id for use in BFont::SetEncoding
* @return an id for use in BFont::SetEncoding
**/
uint32 GetFontID(void) const;
/**
* @brief returns an id for use in convert_to/from_utf8
* @return an id for use in convert_to/from_utf8
**/
uint32 GetConversionID(void) const;
/**
* @brief returns an id for use in MIBs to identify coded character sets
* @return an id for use in MIBs to identify coded character sets
**/
uint32 GetMIBenum(void) const;
/**
* @brief returns the IANA standard name for this character set
* @return the IANA standard name for this character set
**/
const char * GetName(void) const;
/**
* @brief returns a user interface friendly name for this character set
* @return a user interface friendly name for this character set
**/
const char * GetPrintName(void) const;
/**
* @brief returns the MIME preferred name for this character set, or null if none exists
* @return the MIME preferred name for this character set, or null if none exists
**/
const char * GetMIMEName(void) const;
/**
* @brief returns the number of aliases for this character set
* @return the number of aliases for this character set
**/
int32 CountAliases(void) const;
/**
* @brief returns the index'th alias, or NULL if out of range
* @return the index'th alias, or NULL if out of range
**/
const char * AliasAt(uint32 index) const;
private:
uint32 id; //! id from convert_to_utf8/convert_from_utf8
uint32 MIBenum; //! for use in MIBs to identify coded character sets
const char * print_name; //! user interface friendly name
const char * iana_name; //! standard IANA name
const char * mime_name; //! the preferred mime name
const char ** aliases; //! aliases for this character set
uint32 aliases_count; //! how many aliases are available
};
}
#endif CHARACTER_SET_H

View File

@ -1,91 +0,0 @@
#ifndef CHARACTER_SET_ROSTER_H
#define CHARACTER_SET_ROSTER_H
#include <SupportDefs.h>
#include <Messenger.h>
namespace BPrivate {
/**
* @file BCharacterSetRoster.h
* @author Andrew Bachmann
* @brief Defines BCharacterSetRoster
*
* @see BCharacterSet.h
**/
class BCharacterSet;
class BCharacterSetRoster {
/**
* @class BCharacterSetRoster
* @brief An object for finding or enumerating character sets
**/
public:
/**
* @brief initialize the roster to the first character set
**/
BCharacterSetRoster();
virtual ~BCharacterSetRoster();
/**
* @brief get the next available character set
* @return B_NO_ERROR if it's valid, B_BAD_VALUE if it is not
**/
status_t GetNextCharacterSet(BCharacterSet * charset);
/**
* @brief resets the iterator to the first character set
* @return B_NO_ERROR if it's valid, B_BAD_VALUE if it is not
**/
status_t RewindCharacterSets();
/**
* @brief register BMessenger to receive notifications of character set events
* @return B_NO_ERROR if watching was okay, B_BAD_VALUE if poorly formed BMessenger
**/
static status_t StartWatching(BMessenger target);
/**
* @brief stop sending notifications to BMessenger
* @return B_NO_ERROR if stopping went okay, B_BAD_VALUE if poorly formed BMessenger
**/
static status_t StopWatching(BMessenger target);
/**
* @brief return the character set with the given font id, or NULL if none exists
* This function executes in constant time.
* @return the character set with the given font id, or NULL if none exists
**/
static const BCharacterSet * GetCharacterSetByFontID(uint32 id);
/**
* @brief return the character set with the given conversion id, or NULL if none exists
* This function executes in constant time.
* @return the character set with the given conversion id, or NULL if none exists
**/
static const BCharacterSet * GetCharacterSetByConversionID(uint32 id);
/**
* @brief return the character set with the given MIB enum, or NULL if none exists
* This function executes in constant time.
* @return the character set with the given MIB enum, or NULL if none exists
**/
static const BCharacterSet * GetCharacterSetByMIBenum(uint32 MIBenum);
/**
* @brief return the character set with the given print name, or NULL if none exists
* This function executes in linear time.
* @return the character set with the given print name, or NULL if none exists
**/
static const BCharacterSet * FindCharacterSetByPrintName(char * name);
/**
* @brief return the character set with the given name, or NULL if none exists
* This function will match aliases as well.
* This function executes in linear time.
* @return the character set with the given name, or NULL if none exists
**/
static const BCharacterSet * FindCharacterSetByName(char * name);
private:
uint32 index; //! the state variable for iteration
};
}
#endif CHARACTER_SET_ROSTER_H