Top |
struct | GrlConfig |
struct | GrlConfigClass |
#define | GRL_CONFIG_KEY_APIKEY |
#define | GRL_CONFIG_KEY_APIKEY_BLOB |
#define | GRL_CONFIG_KEY_APISECRET |
#define | GRL_CONFIG_KEY_APITOKEN |
#define | GRL_CONFIG_KEY_APITOKEN_SECRET |
#define | GRL_CONFIG_KEY_PASSWORD |
#define | GRL_CONFIG_KEY_PLUGIN |
#define | GRL_CONFIG_KEY_SOURCE |
#define | GRL_CONFIG_KEY_USERNAME |
This class is used to configure plugins during a session.
Pre-defined settings are read from plugin specific configuration files. The settings can be changed to properly setup the session, but are not persistent. Changes are local to each GrlConfig instance.
GrlConfig * grl_config_new (const gchar *plugin
,const gchar *source
);
Creates a new data config object that will be associated with a plugin
(if source
is NULL), or a specific source spawned from a plugin (if
source
is not NULL). The latter may be useful for plugins
spawning various sources, each one needing a different configuration.
plugin |
plugin id for this configuration |
|
source |
source id for this configuration. |
[allow-none] |
a newly-allocated data config. The data config associated with the plugin should not be freed until the plugin has been unloaded.
[transfer none]
Since: 0.1.4
guint8 * grl_config_get_api_key_blob (GrlConfig *config
,gsize *size
);
Since: 0.1.9
gchar *
grl_config_get_api_token_secret (GrlConfig *config
);
Since: 0.2.6
guint8 * grl_config_get_binary (GrlConfig *config
,const gchar *param
,gsize *size
);
Gets the value of param
encoded as base64. If size
is not NULL
, it puts
there the size of the value.
config |
the config instance |
|
param |
a binary type parameter |
|
size |
place for size of value. |
[allow-none] |
Since: 0.1.9
gboolean grl_config_get_boolean (GrlConfig *config
,const gchar *param
);
Since: 0.1.8
gfloat grl_config_get_float (GrlConfig *config
,const gchar *param
);
Since: 0.1.5
gchar * grl_config_get_string (GrlConfig *config
,const gchar *param
);
Since: 0.1.5
gboolean grl_config_has_param (GrlConfig *config
,const gchar *param
);
Since: 0.1.8
void grl_config_set (GrlConfig *config
,const gchar *param
,const GValue *value
);
Set param
value
.
Since: 0.1.5
void grl_config_set_api_key (GrlConfig *config
,const gchar *key
);
Set the webservice API key in the configuration
Since: 0.1.4
void grl_config_set_api_key_blob (GrlConfig *config
,const guint8 *blob
,gsize size
);
Set the binary API key in the configuration
Since: 0.1.9
void grl_config_set_api_secret (GrlConfig *config
,const gchar *secret
);
Set the webservice passphrase in the configuration
Since: 0.1.4
void grl_config_set_api_token (GrlConfig *config
,const gchar *token
);
Set the webservice API token in the configuration
Since: 0.1.4
void grl_config_set_api_token_secret (GrlConfig *config
,const gchar *secret
);
Set the webservice API token secret in the configuration (Needed by OAuth)
Since: 0.2.6
void grl_config_set_binary (GrlConfig *config
,const gchar *param
,const guint8 *blob
,gsize size
);
Set param
value.
config |
the config instance |
|
param |
a binary type parameter |
|
blob |
a base64 encoded binary value |
|
size |
size of |
Since: 0.1.9
void grl_config_set_boolean (GrlConfig *config
,const gchar *param
,gboolean value
);
Set param
value
.
Since: 0.1.8
void grl_config_set_float (GrlConfig *config
,const gchar *param
,gfloat value
);
Set param
value
.
Since: 0.1.5
void grl_config_set_int (GrlConfig *config
,const gchar *param
,gint value
);
Set param
value
.
Since: 0.1.5
void grl_config_set_password (GrlConfig *config
,const gchar *password
);
Set the password in the configuration
Since: 0.1.8
void grl_config_set_plugin (GrlConfig *config
,const gchar *plugin
);
Set the plugin key in the configuration
Since: 0.1.4
void grl_config_set_source (GrlConfig *config
,const gchar *source
);
Set the source key in the configuration
Since: 0.1.4
void grl_config_set_string (GrlConfig *config
,const gchar *param
,const gchar *value
);
Set param
value
.
Since: 0.1.5
void grl_config_set_username (GrlConfig *config
,const gchar *username
);
Set the username in the configuration
Since: 0.1.8