2007-09-14 Dan Williams <dcbw@redhat.com>

Implement deferred activation handling in the NMActRequest class.  When a
	client wants to activate a device but must create the NMConnection details
	on the fly, there likely hasn't been enough time yet for NM to receive the
	new connection signal and grab all the connection details.  So the
	activation is deferred (and bounded by a timer) for a while, and if the
	connection appears within the window, it is activated.

	* src/nm-activation-request.c
	  src/nm-activation-request.h
		- (nm_act_request_class_init): two new signals to support deferred
			activation, to allow the listener to handle both timeout and success
		- (nm_act_request_new_deferred): new function, starts the deferred
			activation timeout handler and listens to the NMManager for
			new-connection signals to notice when the connection comes in



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2811 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2007-09-14 19:43:28 +00:00
parent 13f21985d4
commit 92ee635c59
3 changed files with 199 additions and 12 deletions

View File

@@ -41,16 +41,23 @@ typedef struct {
GObjectClass parent;
/* Signals */
void (*connection_secrets_updated) (NMActRequest *req,
NMConnection *connection,
const char * setting);
void (*connection_secrets_updated) (NMActRequest *req,
NMConnection *connection,
const char * setting);
void (*deferred_activation_timeout) (NMActRequest *req);
void (*deferred_activation_start) (NMActRequest *req);
} NMActRequestClass;
GType nm_act_request_get_type (void);
NMActRequest *nm_act_request_new (NMConnection *connection,
const char *specific_object,
gboolean user_requested);
NMActRequest *nm_act_request_new (NMConnection *connection,
const char *specific_object,
gboolean user_requested);
NMActRequest *nm_act_request_new_deferred (const char *service_name,
const char *connection_path,
const char *specific_object,
gboolean user_requested);
NMConnection *nm_act_request_get_connection (NMActRequest *req);
const char * nm_act_request_get_specific_object(NMActRequest *req);