| Guifications Library Reference Manual |
|---|
GfConnectionGfConnection — GfConnection Object API |
GfConnection;
enum GfConnectionState;
void gf_connection_set_state (GfConnection *connection,
GfConnectionState state);
GfConnectionState gf_connection_get_state (GfConnection *connection);
gboolean gf_connection_disconnect (GfConnection *connection,
GError **error);
gboolean gf_connection_is_connected (const GfConnection *connection);
GfFeedPool* gf_connection_get_feed_pool (const GfConnection *connection);
void gf_connection_set_feed_pool (GfConnection *connection,
GfFeedPool *feed_pool);
GfPreferenceEngine* gf_connection_get_preference_engine
(const GfConnection *connection);
void gf_connection_set_preference_engine
(GfConnection *connection,
GfPreferenceEngine *engine);
#define gf_connection_state_from_string (str)
#define gf_connection_state_to_string (state, i18n)
#define GF_CONNECTION_IS_CONNECTED (obj)
GObject +----GfObject +----GfNamedObject +----GfConnection +----GfClientConnection +----GfServerConnection
"feed-pool" GfFeedPool : Read / Write / Construct "pref-engine" GfPreferenceEngine : Read / Write / Construct "state" gint : Read / Write
"connected" void user_function (GfConnection *gfconnection, gpointer user_data); "connecting" void user_function (GfConnection *gfconnection, gpointer user_data); "disconnected" void user_function (GfConnection *gfconnection, gpointer user_data); "disconnecting" void user_function (GfConnection *gfconnection, gpointer user_data); "feed-pool-set" void user_function (GfConnection *gfconnection, GfFeedPool *arg1, gpointer user_data); "preference-engine-set" void user_function (GfConnection *gfconnection, GfFeedPool *arg1, gpointer user_data);
typedef struct _GfConnection GfConnection;
GfConnection is an opaque structure that should not be used directly.
typedef enum _GfConnectionState {
GF_CONNECTION_STATE_UNKNOWN = -1,
GF_CONNECTION_STATE_DISCONNECTING = 0,
GF_CONNECTION_STATE_DISCONNECTED,
GF_CONNECTION_STATE_CONNECTING,
GF_CONNECTION_STATE_CONNECTED,
GF_CONNECTION_STATES
} GfConnectionState;
Valid connection states
GF_CONNECTION_STATE_UNKNOWN |
Unknown |
GF_CONNECTION_STATE_DISCONNECTING |
Disconnecting |
GF_CONNECTION_STATE_DISCONNECTED |
Disconnected |
GF_CONNECTION_STATE_CONNECTING |
Connecting |
GF_CONNECTION_STATE_CONNECTED |
Connected |
GF_CONNECTION_STATES |
Total States |
void gf_connection_set_state (GfConnection *connection, GfConnectionState state);
Note: This should _ONLY_ be used in connection implementations!
Sets the GfConnectionState for connection.
connection : |
The GfConnection instance. |
state : |
The new GfConnectionState. |
GfConnectionState gf_connection_get_state (GfConnection *connection);
Gets the GfConnectionState for connection.
connection : |
The GfConnection instance. |
| Returns : | The GfConnectionState for connection.
|
gboolean gf_connection_disconnect (GfConnection *connection, GError **error);
Tries to disconnect connection.
connection : |
The GfConnection instance. |
error : |
The return address for an error, if any. |
| Returns : | TRUE if disconnecting was successful. |
gboolean gf_connection_is_connected (const GfConnection *connection);
Checks whether connection is connected or connecting.
connection : |
The GfConnection instance. |
| Returns : | TRUE if connection is connected or connecting.
|
GfFeedPool* gf_connection_get_feed_pool (const GfConnection *connection);
Gets the GfFeedPool for connection.
connection : |
The GfConnection instance. |
| Returns : | The GfFeedPool for connection.
|
void gf_connection_set_feed_pool (GfConnection *connection, GfFeedPool *feed_pool);
Sets the GfFeedPool for connection.
Note: This should _ONLY_ be used by connection implementations.
connection : |
The GfConnection instance. |
feed_pool : |
The GfFeedPool instance. |
GfPreferenceEngine* gf_connection_get_preference_engine (const GfConnection *connection);
Gets the GfPreferenceEngine for connection.
connection : |
The GfConnection instance. |
| Returns : | The GfPreferenceEngine for connection.
|
void gf_connection_set_preference_engine
(GfConnection *connection,
GfPreferenceEngine *engine);
Sets the GfPreferenceEngine for connection.
Note: This should _ONLY_ be used by connection implementations.
connection : |
The GfConnection instance. |
engine : |
The GfPreferenceEngine instance. |
#define gf_connection_state_from_string(str)
Gets a GfConnectionState from a string.
Note: str MUST be the unstranslated string!
str : |
The string. |
| Returns : | The GfConnectionState. |
#define gf_connection_state_to_string(state, i18n)
Gets a string from a GfConnectionState.
state : |
The GfConnectionState. |
i18n : |
TRUE for the translated version. |
| Returns : |
state as a string.
|
feed-pool" property"feed-pool" GfFeedPool : Read / Write / Construct
The feed pool for this connection.
pref-engine" property"pref-engine" GfPreferenceEngine : Read / Write / Construct
The preference engine for the connection.
void user_function (GfConnection *gfconnection, gpointer user_data);
gfconnection : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |
void user_function (GfConnection *gfconnection, gpointer user_data);
gfconnection : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |
void user_function (GfConnection *gfconnection, gpointer user_data);
gfconnection : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |
void user_function (GfConnection *gfconnection, gpointer user_data);
gfconnection : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |
void user_function (GfConnection *gfconnection, GfFeedPool *arg1, gpointer user_data);
gfconnection : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |
void user_function (GfConnection *gfconnection, GfFeedPool *arg1, gpointer user_data);
gfconnection : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |
| << gf_named_object | gf_client_connection >> |