void myqtt_support_add_search_path ( MyQttCtx ctx,
const char *  path 

Allows to add new search path to be used by myqtt_support_find_data_file.

This function allows to configure how MyQtt Library lookups files. This is important to locate dtd file definitions, SSL certificates and so on.

You can also use this API to install and configure application level files that will be used by your MQTT solution.

Once a path is added, myqtt_support_find_data_file function will lookup on the provided paths.

1 // add all search paths (maybe from an user interface)
2 myqtt_support_add_search_path (ctx, "/my/path/to/local/data");
3 myqtt_support_add_search_path (ctx, "/my/alternative/path");
5 // where ctx is an initialized MyQttCtx object
7 ...
9 // write you file location code in an abstract manner so it could be
10 // used on every platform easily.
11 char * my_data_def = myqtt_support_find_data_file (ctx, "my_data.def");
13 // NOTE that the file to lookup doesn't have any references to
14 // local paths

The function will add the search path using "default" as domain. If you want to configure a more especific domain use myqtt_support_add_domain_search_path.

ctxThe context where the operation will be performed.
pathA new path to be added. The function will perform a copy for the given path

References myqtt_support_add_domain_search_path().

Referenced by myqtt_init_ctx().