13 #ifndef _SMING_CORE_NETWORK_HTTP_HTTP_RESOURCE_TREE_H_ 14 #define _SMING_CORE_NETWORK_HTTP_HTTP_RESOURCE_TREE_H_ 16 #include "HttpResource.h" 21 #define RESOURCE_PATH_DEFAULT String('*') 33 set(RESOURCE_PATH_DEFAULT, resource);
41 set(RESOURCE_PATH_DEFAULT, onRequestComplete);
47 set(RESOURCE_PATH_DEFAULT, callback);
55 return find(RESOURCE_PATH_DEFAULT);
Implementation of a HashMap for owned objects, i.e. anything created with new().
Definition: ObjectMap.h:48
HttpResourceDelegate onRequestComplete
request is complete OR upgraded
Definition: HttpResource.h:49
void set(const K &key, V *value)
Set a key value.
Definition: ObjectMap.h:209
void setDefault(const HttpResourceDelegate &onRequestComplete)
Set the default resource handler, identified by "*" wildcard.
Definition: HttpResourceTree.h:39
The string class.
Definition: WString.h:104
Definition: Delegate.h:118
HttpResource * getDefault()
Get the current default resource handler, if any.
Definition: HttpResourceTree.h:53
Definition: HttpResource.h:32
void setDefault(const HttpPathDelegate &callback)
Set the default resource handler, identified by "*" wildcard.
Definition: HttpResourceTree.h:45
Class to map URL paths to classes which handle them.
Definition: HttpResourceTree.h:25
void setDefault(HttpResource *resource)
Set the default resource handler.
Definition: HttpResourceTree.h:31
HttpResource * find(const String &key) const
Find the value for a given key, if it exists.
Definition: ObjectMap.h:226