This class encapsulates the global Hummingbird library. More...
Public Member Functions | |
virtual System * | CreateSystem (const SystemSettings &settings)=0 |
Create a Hummingbird System that can hold multiple Views. More... | |
virtual void | StopWorkers ()=0 |
Stops all work happening on auxilliary threads. The developer should call this to break the loops in ExecuteResourceWork and ExecuteLayoutWork and then eventually join the threads doing the HB work. | |
virtual void | Uninitialize (bool freeGlobalSdkMemory=false)=0 |
Uninitializes the Hummingbird library. More... | |
virtual void * | GetFeatureInterface (unsigned featureID)=0 |
Used for acquiring specific feature objects. | |
virtual void | ExecuteWork (WorkType type, WorkExecutionMode mode, TaskFamilyId family=COHTML_ANY_TASK_FAMILY_ID)=0 |
Executes Hummingbird tasks. Some work in Hummingbird has to happen asynchronously which improves performance and the scalability of the solution. The type of work is either Resources (loading, parsing, GC) or Layout. When new work is available, the user is notified through the OnWorkAvailable callback and should make sure that at some point that work is executed. The mode parameter is important to decide if you'll only do some tasks (WEM_UntilQueueEmpty) or use it with a dedicated thread until the Library lives. Using a dedicated thread (WEM_UntilQuit) is simpler, but offers less control. This method can be called on any thread. More... | |
Static Public Member Functions | |
static Library * | Initialize (const char *licenseKey, const LibraryParams ¶ms) |
Initilaizes the library. More... | |
static const char * | GetDefaultUserAgent () |
Get default User Agent string which can be used to reset view UA. | |
static void | HintThreadUsage (WorkType type) |
This hints Hummingbird that the calling thread will be used for certain work. The call is optional and used for profiling purposes only. It is not necessary to call it in a final shipping environment. More... | |
static void | DecodeURLString (const char *url, unsigned urlLen, char *decoded, unsigned *decodedSize) |
Decodes a URL string substituting any URL-encoded characters (%20, %21 etc.) with their ASCII counterparts i.e. 'my%20url.html' -> 'my url.html'. More... | |
This class encapsulates the global Hummingbird library.
|
pure virtual |
Create a Hummingbird System that can hold multiple Views.
settings | the system creation parameters |
|
static |
Decodes a URL string substituting any URL-encoded characters (%20, %21 etc.) with their ASCII counterparts i.e. 'my%20url.html' -> 'my url.html'.
url | the url string to decode |
urlLen | the number of characters in the url |
decoded | pointer to the buffer where to copy the decoded string. Can be nullptr in order to query the size of the output |
decodedSize | the length of the decoded string, including the terminating null |
|
pure virtual |
Executes Hummingbird tasks. Some work in Hummingbird has to happen asynchronously which improves performance and the scalability of the solution. The type of work is either Resources (loading, parsing, GC) or Layout. When new work is available, the user is notified through the OnWorkAvailable callback and should make sure that at some point that work is executed. The mode parameter is important to decide if you'll only do some tasks (WEM_UntilQueueEmpty) or use it with a dedicated thread until the Library lives. Using a dedicated thread (WEM_UntilQuit) is simpler, but offers less control. This method can be called on any thread.
type | Sets the work type to schedule. Layout work shouldn't be executed if the UseDedicatedLayoutThread parameter is false. In that case the Layout will happen in the View::Advance calls. |
mode | Sets the mode to use in the Execution. Note that WEM_UntilQuit will not return until Hummingbird itself is uninitialized. |
family | Sets the task family Layout work to execute. Each View has a task family (work only for that) that can be retrieved through View::GetTaskFamilyId. The parameter allows executing work for a specific View, you can also pass COHTML_ANY_TASK_FAMILY_ID, which will execute any Layout work available for all Views. |
|
static |
This hints Hummingbird that the calling thread will be used for certain work. The call is optional and used for profiling purposes only. It is not necessary to call it in a final shipping environment.
type | Sets the work type of this thread. |
|
static |
Initilaizes the library.
licenseKey | license key provided by Coherent Labs |
params | the initialization parameters of the library. |
|
pure virtual |
Uninitializes the Hummingbird library.
freeGlobalSdkMemory | frees any global SDK memory |