From 119a05637a4db3407efd358423e8bf4d1426f90c Mon Sep 17 00:00:00 2001 From: shatty Date: Tue, 30 Dec 2003 03:10:23 +0000 Subject: [PATCH] moved to current/headers/private/textencoding git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5804 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/support/CharacterSet.h | 89 ------------------- headers/private/support/CharacterSetRoster.h | 91 -------------------- 2 files changed, 180 deletions(-) delete mode 100644 headers/private/support/CharacterSet.h delete mode 100644 headers/private/support/CharacterSetRoster.h diff --git a/headers/private/support/CharacterSet.h b/headers/private/support/CharacterSet.h deleted file mode 100644 index 2df290e897..0000000000 --- a/headers/private/support/CharacterSet.h +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef CHARACTER_SET_H -#define CHARACTER_SET_H - -#include - -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 diff --git a/headers/private/support/CharacterSetRoster.h b/headers/private/support/CharacterSetRoster.h deleted file mode 100644 index bfe100b89b..0000000000 --- a/headers/private/support/CharacterSetRoster.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef CHARACTER_SET_ROSTER_H -#define CHARACTER_SET_ROSTER_H - -#include -#include - -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