* kDefaultEngineDefinitions =
55 "search.netscape query\n";
56 returnkDefaultEngineDefinitions;
74 typedeflist<string> TDefList;
88 const string& arg_names)
90 typedeflist<string> TArgList;
94 ITERATE(TArgList, arg, arg_list) {
124 stringhost = (pos !=
NPOS) ?
125referrer.substr(pos+3, referrer.size()) : referrer;
130host = host.substr(0, pos);
Exception classes used by the NCBI CGI framework.
iterator insert(const value_type &val)
container_type::value_type value_type
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
string GetQueryString(const string &referrer) const
Find query string in the referrer.
bool IsListedHost(const string &referrer) const
Check if the host from the referrer string is listed in definitions.
CRefArgs(const string &definitions=kEmptyStr)
Create referrer parser from a set of definitions.
static string GetDefaultDefinitions(void)
Get default set of search engine definitions.
void AddDefinitions(const string &definitions)
Add mappings between host mask and CGI argument name for query string.
#define ERR_POST_X(err_subcode, message)
Error posting with default error code and given error subcode.
void Warning(CExceptionArgs_Base &args)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
NCBI_NS_STD::string::size_type SIZE_TYPE
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static SIZE_TYPE FindNoCase(const CTempString str, const CTempString pattern, SIZE_TYPE start, SIZE_TYPE end, EOccurrence which=eFirst)
Find the pattern in the specified range of a string using a case insensitive search.
static SIZE_TYPE Find(const CTempString str, const CTempString pattern, ECase use_case=eCase, EDirection direction=eForwardSearch, SIZE_TYPE occurrence=0)
Find the pattern in the string.
static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
Split a string into two pieces using the specified delimiters.
static string TruncateSpaces(const string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string.
@ fSplit_MergeDelimiters
Merge adjacent delimiters.
const string & GetHost(void) const
const CUrlArgs & GetArgs(void) const
Get const list of arguments.
bool HaveArgs(void) const
Check if the URL contains any arguments.
bool IsSetValue(const string &name) const
Check if an argument with the given name exists.
const string & GetValue(const string &name, bool *is_found=0) const
Get value for the given name.
Definition of all error codes used in cgi (xcgi.lib).
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4