McProtocol

McProtocol — representation of a communication protocol.

Synopsis




            McProtocol;
McProtocol* mc_protocol_lookup              (McManager *id,
                                             const gchar *protocol);
void        mc_protocol_free                (McProtocol *id);
GList*      mc_protocols_list               (void);
GList*      mc_protocols_list_by_manager    (McManager *id);
void        mc_protocols_free_list          (GList *list);
McManager*  mc_protocol_get_manager         (McProtocol *id);
const gchar* mc_protocol_get_name           (McProtocol *id);
GSList*     mc_protocol_get_params          (McProtocol *protocol);
void        mc_protocol_free_params_list    (GSList *list);
void        mc_protocol_print               (McProtocol *protocol);

Object Hierarchy


  GObject
   +----McProtocol

Description

An McProtocol represents a protocol (such as Jabber, SIP, IRC...) and stores some parameters about it. It also specifies what is the backend (McManager) which can handle this protocol.

Details

McProtocol

typedef struct _McProtocol McProtocol;


mc_protocol_lookup ()

McProtocol* mc_protocol_lookup              (McManager *id,
                                             const gchar *protocol);

Looks up the protocol having the given name in the manager's supported protocols. The returned object's reference count is incremented.

id : The McManager.
protocol : The protocol name.
Returns : the McProtocol, or NULL if not found.

mc_protocol_free ()

void        mc_protocol_free                (McProtocol *id);

Frees (unrefs) the protocol. DEPRECATED, use g_object_unref() instead.

id : The McProtocol.

mc_protocols_list ()

GList*      mc_protocols_list               (void);

Lists all supported protocols. This currently lists all protocols supported by the "gabble" manager.

Returns : a GList of McProtocol, to be freed with mc_protocols_free_list.

mc_protocols_list_by_manager ()

GList*      mc_protocols_list_by_manager    (McManager *id);

Lists all protocols supported by the given manager.

id : a McManager.
Returns : a GList of McProtocol, to be freed with mc_protocols_free_list.

mc_protocols_free_list ()

void        mc_protocols_free_list          (GList *list);

Frees a list of protocols.

list : a GList of McProtocol.

mc_protocol_get_manager ()

McManager*  mc_protocol_get_manager         (McProtocol *id);

Gets the manager for this protocol.

id : The McProtocol.
Returns : the McManager, or NULL if some error occurred.

mc_protocol_get_name ()

const gchar* mc_protocol_get_name           (McProtocol *id);

Gets the name of this protocol.

id : The McProtocol.
Returns : a string representing the name (not to be freed)

mc_protocol_get_params ()

GSList*     mc_protocol_get_params          (McProtocol *protocol);

Gets the parameters for this protocol.

protocol : The McProtocol.
Returns : a GList of McProtocolParam, to be freed with mc_protocol_free_params_list.

mc_protocol_free_params_list ()

void        mc_protocol_free_params_list    (GSList *list);

Frees a list of McProtocolParam.

list : The GList.

mc_protocol_print ()

void        mc_protocol_print               (McProtocol *protocol);

Prints the protocol name and all protocol parameters via g_print.

protocol : the McProtocol.