Top |
Connection manager life cycleConnection manager life cycle — entry point for telepathy-glib connection managers |
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.