addd urlhandler for static content, more reusing of code.
This commit is contained in:
@@ -53,6 +53,8 @@ void AQH_HttpUrlHandler_free(AQH_HTTP_URLHANDLER *uh)
|
||||
if (uh) {
|
||||
GWEN_LIST_FINI(AQH_HTTP_URLHANDLER, uh);
|
||||
GWEN_INHERIT_FINI(AQH_HTTP_URLHANDLER, uh);
|
||||
|
||||
free(uh->folder);
|
||||
GWEN_StringList_free(uh->urlPatternList);
|
||||
GWEN_FREE_OBJECT(uh);
|
||||
}
|
||||
@@ -90,6 +92,23 @@ void AQH_HttpUrlHandler_AddUrlPattern(AQH_HTTP_URLHANDLER *uh, const char *s)
|
||||
|
||||
|
||||
|
||||
const char *AQH_HttpUrlHandler_GetFolder(const AQH_HTTP_URLHANDLER *uh)
|
||||
{
|
||||
return uh?uh->folder:NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AQH_HttpUrlHandler_SetFolder(AQH_HTTP_URLHANDLER *uh, const char *s)
|
||||
{
|
||||
if (uh) {
|
||||
free(uh->folder);
|
||||
uh->folder=s?strdup(s):NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int AQH_HttpUrlHandler_UrlMatches(const AQH_HTTP_URLHANDLER *uh, const char *s)
|
||||
{
|
||||
if (uh && s && *s) {
|
||||
|
||||
Reference in New Issue
Block a user