telepathy-glib API Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Connection manager life cycleConnection manager life cycle — entry point for telepathy-glib connection managers |
#include <telepathy-glib/telepathy-glib.h> int tp_run_connection_manager (const char *prog_name
,const char *version
,TpBaseConnectionManager* (*construct_cm) (void)
,int argc
,char **argv
);
tp_run_connection_manager()
provides a convenient entry point for
telepathy-glib connection managers. It initializes most of the
functionality the CM will need, constructs a connection manager object
and lets it run.
This function also manages the connection manager's lifetime - if there are no new connections for a while, it times out and exits.
int tp_run_connection_manager (const char *prog_name
,const char *version
,TpBaseConnectionManager* (*construct_cm) (void)
,int argc
,char **argv
);
Run the connection manager by initializing libraries, constructing a main loop, instantiating a connection manager and running the main loop. When this function returns, the program should exit.
If the connection manager does not create a connection within a short arbitrary time (currently 5 seconds), either on startup or after the last open connection is disconnected, and the PERSIST debug flag is not set, return 0.
If registering the connection manager on D-Bus fails, return 1.
|
The program name to be used in debug messages etc. |
|
The program version |
|
A function which will return the connection manager object |
|
The number of arguments passed to the program |
|
The arguments passed to the program |
Returns : |
the status code with which the process should exit |