configuration.h File Reference

#include "nntpgrab.h"

Go to the source code of this file.


Defines

#define  CONFIGURATION_TYPE_OBJECT   (configuration_get_type ())
#define  CONFIGURATION(object)   (G_TYPE_CHECK_INSTANCE_CAST ((object), CONFIGURATION_TYPE_OBJECT, Configuration))
#define  CONFIGURATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIGURATION_TYPE_OBJECT, ConfigurationClass))
#define  IS_CONFIGURATION(object)   (G_TYPE_CHECK_INSTANCE_TYPE ((object), CONFIGURATION_TYPE_OBJECT))
#define  IS_CONFIGURATION_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIGURATION_TYPE_OBJECT))
#define  CONFIGURATION_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIGURATION_TYPE_OBJECT, ConfigurationClass))

Typedefs

typedef struct Configuration  Configuration

Functions

Configuration configuration_new (char **errmsg, char **warnings)
void  configuration_destroy (Configuration *obj)
GList *  configuration_get_avail_servers (Configuration *obj)
  Retrieve a list of all the available usenet servers.
void  configuration_free_avail_servers (Configuration *obj, GList *servers)
  Frees the list returned by configuration_get_avail_servers().
ConfigServer configuration_get_server_info (Configuration *obj, const char *servername)
  Retrieve information about a specific usenet server.
gboolean  configuration_add_server (Configuration *obj, ConfigServer new_server, char **errmsg)
  Add a new server to the list of known usenet servers.
gboolean  configuration_del_server (Configuration *obj, const char *servername, char **errmsg)
  Delete the settings from the specified servername from the list of known usenet servers.
gboolean  configuration_edit_server (Configuration *obj, const char *servername, ConfigServer new_server, char **errmsg)
  Change the settings from the specified servername in the list of known usenet servers.
ConfigGroupInfo  configuration_get_newsgroup_info (Configuration *obj, const char *servername, const char *newsgroup)
  Get the details concerning the given server and newsgroup.
void  configuration_set_newsgroup_info (Configuration *obj, const char *servername, const char *newsgroup, ConfigGroupInfo info)
  Set the details concerning the given server and newsgroup.
ConfigOpts  configuration_get_opts (Configuration *obj)
  Retrieves the configuration options.
void  configuration_set_opts (Configuration *obj, ConfigOpts opts)
  Set the configuration options.
gboolean  configuration_load (Configuration *config, char **errmsg)
  Load all settings from a local file on the harddrive.
gboolean  configuration_save (Configuration *config, char **errmsg)
  Save all settings to a local file on the harddrive.
gboolean  configuration_get_folder_listing (Configuration *obj, const char *parent, GList **folders)
void  configuration_free_folder_listing (Configuration *obj, GList *folders)

Define Documentation

#define CONFIGURATION ( object   )     (G_TYPE_CHECK_INSTANCE_CAST ((object), CONFIGURATION_TYPE_OBJECT, Configuration))

#define CONFIGURATION_CLASS ( klass   )     (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIGURATION_TYPE_OBJECT, ConfigurationClass))

#define CONFIGURATION_GET_CLASS ( obj   )     (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIGURATION_TYPE_OBJECT, ConfigurationClass))

#define CONFIGURATION_TYPE_OBJECT   (configuration_get_type ())

#define IS_CONFIGURATION ( object   )     (G_TYPE_CHECK_INSTANCE_TYPE ((object), CONFIGURATION_TYPE_OBJECT))

#define IS_CONFIGURATION_CLASS ( klass   )     (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIGURATION_TYPE_OBJECT))


Typedef Documentation

typedef struct Configuration Configuration


Function Documentation

gboolean configuration_add_server ( Configuration obj,
ConfigServer  new_server,
char **  errmsg  
)

Add a new server to the list of known usenet servers.

Parameters:
obj  The configuration object
new_server  The structure containing the settings of the new server
errmsg  If an error occurs, an error message will be set in this variable
Returns:
TRUE on success, FALSE on error (errmsg will be set)

gboolean configuration_del_server ( Configuration obj,
const char *  servername,
char **  errmsg  
)

Delete the settings from the specified servername from the list of known usenet servers.

Parameters:
obj  The configuration object
servername  The name of the server whose settings need to be removed
errmsg  If an error occurs, an error message will be set in this variable
Returns:
TRUE on success, FALSE on error (errmsg will be set)

void configuration_destroy ( Configuration obj  ) 

gboolean configuration_edit_server ( Configuration obj,
const char *  servername,
ConfigServer  new_server,
char **  errmsg  
)

Change the settings from the specified servername in the list of known usenet servers.

Parameters:
obj  The configuration object
servername  The name of the server whose settings need to be changed
new_server  The new settings of the server which need to be saved
errmsg  If an error occurs, an error message will be set in this variable
Returns:
TRUE on success, FALSE on error (errmsg will be set)

void configuration_free_avail_servers ( Configuration obj,
GList *  servers  
)

Frees the list returned by configuration_get_avail_servers().

Parameters:
obj  The configuration object
servers  A GList* containing g_malloc'ed char* strings with servernames

void configuration_free_folder_listing ( Configuration obj,
GList *  folders  
)

GList* configuration_get_avail_servers ( Configuration obj  ) 

Retrieve a list of all the available usenet servers.

Parameters:
obj  The configuration object
Returns:
a GList* containing g_malloc'ed char* strings with servernames

gboolean configuration_get_folder_listing ( Configuration obj,
const char *  parent,
GList **  folders  
)

ConfigGroupInfo configuration_get_newsgroup_info ( Configuration obj,
const char *  servername,
const char *  newsgroup  
)

Get the details concerning the given server and newsgroup.

Parameters:
obj  The configuration object
servername  The name of the server
newsgroup  The name of the newsgroup
Returns:
Structure containing the details

ConfigOpts configuration_get_opts ( Configuration obj  ) 

Retrieves the configuration options.

Parameters:
obj  The configuration object
Returns:
A structure containing configuration data

ConfigServer* configuration_get_server_info ( Configuration obj,
const char *  servername  
)

Retrieve information about a specific usenet server.

Parameters:
obj  The Configuration object
servername  The name of the usenet server whose info should be lookup up
Returns:
A g_slice_new'ed ConfigServer structure containing the requested info or NULL when the servername could not be found

gboolean configuration_load ( Configuration obj,
char **  errmsg  
)

Load all settings from a local file on the harddrive.

Parameters:
obj  The configuration object
errmsg  A pointer to a char* to save a possible error message
Returns:
TRUE on success, FALSE on failure (errmsg will be set and needs to be g_free'd after use)

Configuration* configuration_new ( char **  errmsg,
char **  warnings  
)

gboolean configuration_save ( Configuration obj,
char **  errmsg  
)

Save all settings to a local file on the harddrive.

Parameters:
obj  The configuration object
errmsg  A pointer to a char* to save a possible error message
Returns:
TRUE on success, FALSE on failure (errmsg will be set and needs to be g_free'd after use)

void configuration_set_newsgroup_info ( Configuration obj,
const char *  servername,
const char *  newsgroup,
ConfigGroupInfo  info  
)

Set the details concerning the given server and newsgroup.

Parameters:
obj  The configuration object
servername  The name of the server
newsgroup  The name of the newsgroup
info  Structure containing the details

void configuration_set_opts ( Configuration obj,
ConfigOpts  opts  
)

Set the configuration options.

Parameters:
obj  The configuration object
opts  A structure containing configuration data


Generated on Thu May 21 21:25:05 2009 for NNTPGrab by  1.5.4