version 1.1.2.1, 2003/07/16 21:45:25
|
version 1.13, 2005/05/30 13:43:49
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2005//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
// | // |
// Author: Humberto Rivero (hurivero@us.ibm.com) | // Author: Humberto Rivero (hurivero@us.ibm.com) |
// | // |
// Modified By: |
// Modified By: Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3697, 3698, 3699, 3700 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
#include <Pegasus/Common/String.h> | #include <Pegasus/Common/String.h> |
#include <Pegasus/Common/Array.h> | #include <Pegasus/Common/Array.h> |
| |
|
#ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
* them in an array. | * them in an array. |
* @param values Array<String>& where the individual fields are stored | * @param values Array<String>& where the individual fields are stored |
* @param hdr String the value portion of the HTTP Accept/ContentLanguage header | * @param hdr String the value portion of the HTTP Accept/ContentLanguage header |
|
* this parameter is passed as object intentionally |
*/ | */ |
void parseHdr(Array<String> &values, String & hdr); |
void parseHdr(Array<String> &values, String hdr); |
| |
/** Parses an AcceptLanguage or ContentLanguage value from a header. | /** Parses an AcceptLanguage or ContentLanguage value from a header. |
* If a valid AcceptLanguage value is determined to contain a quality | * If a valid AcceptLanguage value is determined to contain a quality |
|
|
* @return Real32 if a valid quality found then 1 <=> 0, otherwise 1 | * @return Real32 if a valid quality found then 1 <=> 0, otherwise 1 |
* @exception throws ??? | * @exception throws ??? |
*/ | */ |
Real32 parseAcceptLanguageValue(String &language, String & hdr); |
Real32 parseAcceptLanguageValue(String &language, String hdr); |
| |
String parseContentLanguageValue(String & hdr); |
String parseContentLanguageValue(const String& hdr); |
| |
/** | /** |
* Given a language ex: en-US-xx, | * Given a language ex: en-US-xx, |
|
|
* @param separator Char16 the character that separates the various subtags | * @param separator Char16 the character that separates the various subtags |
* @return String base of the language parameter | * @return String base of the language parameter |
*/ | */ |
String getLanguage(String & language_tag); |
String getLanguage(const String & language_tag); |
| |
String getCountry(String & language_tag); |
String getCountry(const String & language_tag); |
| |
String getVariant(String & language_tag); |
String getVariant(const String & language_tag); |
| |
private: | private: |
| |
|
|
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
|
#endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES |
|
|
#endif | #endif |