(file) Return to LanguageParser.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/LanguageParser.h between version 1.1 and 1.16

version 1.1, 2003/07/15 17:02:49 version 1.16, 2005/05/30 14:14:17
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%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
Line 23 
Line 29 
 // //
 // 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
   //              Aruran, IBM (ashanmug@in.ibm.com) for Bug# 3701, 3702, 3703
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 37 
Line 44 
 #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
  
Line 60 
Line 68 
  * 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
Line 74 
Line 83 
  * @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,
Line 85 
Line 94 
  * @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:
  
Line 110 
Line 119 
  * @param s String language to be validated  * @param s String language to be validated
  * @return Boolean  * @return Boolean
  */  */
 Boolean isValid(String language_tag, Boolean length_check = true);  Boolean isValid(const String& language_tag, Boolean length_check = true);
  
 /** Checks if the String has all characters in A-Z OR a-z range. /** Checks if the String has all characters in A-Z OR a-z range.
  * @param s String  * @param s String
  * @return Boolean  * @return Boolean
  */  */
 Boolean checkAlpha(CString _str);  Boolean checkAlpha(const CString & _str);
  
 CString replaceSeparator(CString _s, char new_sep = '-');  CString replaceSeparator(const CString & _s, char new_sep = '-');
  
 char findSeparator(CString _str);  char findSeparator(const CString & _str);
  
 String convertPrivateLanguageTag(String language_tag);  String convertPrivateLanguageTag(const String & language_tag);
  
 }; //end LanguageParser }; //end LanguageParser
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
  
   #endif  // PEGASUS_USE_EXPERIMENTAL_INTERFACES
   
 #endif #endif


Legend:
Removed from v.1.1  
changed lines
  Added in v.1.16

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2