Change "gboolean connected" to "CamelServiceConnectionStatus status",
authorDan Winship <danw@src.gnome.org>
Thu, 27 Sep 2001 14:39:39 +0000 (14:39 +0000)
committerDan Winship <danw@src.gnome.org>
Thu, 27 Sep 2001 14:39:39 +0000 (14:39 +0000)
commit3a83eabc1bdc9a4638df3946b4904588924ddf7d
tree399c54b6a27ce6bfcdcce555f51aa16581fa96fb
parent4f9d3e49e9fb6e5e08a7dadf52cfd78da4945fbb
Change "gboolean connected" to "CamelServiceConnectionStatus status",

* camel-service.c: Change "gboolean connected" to
"CamelServiceConnectionStatus status", which can be disconnected,
connecting, connected, or disconnecting.
(camel_service_init, camel_service_finalize): create/destroy the
connect_op_lock. Refer to service->status rather than
service->connected.
(camel_service_connect): When connecting, note the current
operation (and create a new one if there's none registered) and
mark the connection "connecting" until we succeed or fail.
(camel_service_disconnect): Likewise in reverse.
(camel_service_cancel_connect): New function to cancel a
connection attempt.
(cancel_connect): Default implementation: Call
camel_operation_cancel on the connect_op.

* camel-disco-store.c (disco_connect): Only call
CamelRemoteStore's connect func if we're online.
(disco_cancel_connect): Fall back to offline if a connection gets
cancelled.
(disco_get_folder_info): Kludge: call connect explicitly before
deciding whether to do the online or offline version, so if the
connect fails, we fall back correctly.

* camel-session.c (camel_session_get_service_connected):
s/svc->connected/svc->status/

* camel-remote-store.c (camel_remote_store_finalise):
Change service->connected check to service->status check.
(remote_connect): Don't set service->connected here:
camel_service_connect() itself does that.

* camel-operation.c (camel_operation_registered): Deal with the
possibility that there's no registered op.
camel/ChangeLog
camel/camel-disco-store.c
camel/camel-operation.c
camel/camel-private.h
camel/camel-remote-store.c
camel/camel-service.c
camel/camel-service.h
camel/camel-session.c