本文整理汇总了C++中Cookie::BuildCookieList方法的典型用法代码示例。如果您正苦于以下问题:C++ Cookie::BuildCookieList方法的具体用法?C++ Cookie::BuildCookieList怎么用?C++ Cookie::BuildCookieList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cookie
的用法示例。
在下文中一共展示了Cookie::BuildCookieList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BuildCookieList
OP_STATUS CookiePath::BuildCookieList(Cookie ** cookieArray, int * pos, char * pathstr, CookieDomain *domainHolder, BOOL is_export, BOOL match_subpaths/*=FALSE*/)
{
char* pathstrcopy = pathstr;
if(!match_subpaths && path.HasContent() && pathstr && *pathstr)
{
int p_len = path.Length();
if(path.Compare(pathstr,p_len) != 0)
return OpStatus::OK;
pathstr += p_len; // Remove first part, if path found
if(*pathstr == '/') pathstr++;
}
Cookie *ck = (Cookie*)cookie_list.First();
if( ck )
{
if(match_subpaths && pathstrcopy && *pathstrcopy) //if a path was specified
{
OpString8 fullpath;
RETURN_IF_ERROR(GetFullPath(fullpath)); // get the full path
//the internal root part does not start with /, so get rid of it
fullpath.Delete(0,1);
int pathlen = fullpath.Length();
if(!pathlen || (pathlen && fullpath.Compare(pathstrcopy, pathlen) == 0)) //compare against the full path length since we want subpaths, root has null length
ck->BuildCookieList(cookieArray, pos, domainHolder, this, is_export);
}
else
ck->BuildCookieList(cookieArray, pos, domainHolder, this, is_export);
}
CookiePath *cp = (CookiePath*)FirstChild();
while(cp)
{
cp->BuildCookieList(cookieArray, pos, pathstr, domainHolder, is_export, match_subpaths);
cp = cp->Suc();
}
return OpStatus::OK;
}