InfcSessionProxy

InfcSessionProxy

Synopsis




                    InfcSessionProxy;
                    InfcSessionProxyClass;
void                infc_session_proxy_set_connection   (InfcSessionProxy *proxy,
                                                         InfCommunicationJoinedGroup *group,
                                                         InfXmlConnection *connection);
InfcUserRequest*    infc_session_proxy_join_user        (InfcSessionProxy *proxy,
                                                         const GParameter *params,
                                                         guint n_params,
                                                         GError **error);
InfSession*         infc_session_proxy_get_session      (InfcSessionProxy *proxy);
InfXmlConnection*   infc_session_proxy_get_connection   (InfcSessionProxy *proxy);
InfCommunicationJoinedGroup* infc_session_proxy_get_subscription_group
                                                        (InfcSessionProxy *proxy);

Object Hierarchy


  GObject
   +----InfcSessionProxy

Implemented Interfaces

InfcSessionProxy implements InfCommunicationObject.

Properties


  "connection"               InfXmlConnection*     : Read
  "session"                  InfSession*           : Read / Write / Construct Only
  "subscription-group"       InfCommunicationJoinedGroup*  : Read

Description

Details

InfcSessionProxy

typedef struct _InfcSessionProxy InfcSessionProxy;


InfcSessionProxyClass

typedef struct {
  GObjectClass parent_class;

  GError* (*translate_error)(InfcSessionProxy* session,
                             GQuark domain,
                             guint code);
} InfcSessionProxyClass;


infc_session_proxy_set_connection ()

void                infc_session_proxy_set_connection   (InfcSessionProxy *proxy,
                                                         InfCommunicationJoinedGroup *group,
                                                         InfXmlConnection *connection);

Sets the subscription connection for the given session. The subscription connection is the connection through which session requests are transmitted during subscription.

The subscription connection might be set even if the session is in SYNCHRONIZING state in which case the session is immediately subscribed after synchronization. Note that no attempt is made to tell the other end about the subscription.

When the subscription connection is being closed or replaced (by a subsequent call to this function), all pending requests are dropped and all users are set to be unavailable, but the session will not be closed, so it may be reused by setting another subscription connection. However, the session might not be synchronized again, but it is fully okay to close the session by hand (using inf_session_close) and create a new session that is synchronized.

proxy :

A InfcSessionProxy.

group :

A InfCommunicationJoinedGroup of subscribed connections. Ignored if * connection is NULL.

connection :

A InfXmlConnection.

infc_session_proxy_join_user ()

InfcUserRequest*    infc_session_proxy_join_user        (InfcSessionProxy *proxy,
                                                         const GParameter *params,
                                                         guint n_params,
                                                         GError **error);

Requests a user join for a user with the given properties (which must not include ID and status since these are initially set by the server).

proxy :

A InfcSessionProxy.

params :

Construction properties for the InfUser (or derived) object.

n_params :

Number of parameters.

error :

Location to store error information.

Returns :

A InfcUserRequest object that may be used to get notified when the request succeeds or fails.

infc_session_proxy_get_session ()

InfSession*         infc_session_proxy_get_session      (InfcSessionProxy *proxy);

Returns the session proxied by proxy, or NULL if the session has been closed.

proxy :

A InfcSessionProxy.

Returns :

A InfSession, or NULL.

infc_session_proxy_get_connection ()

InfXmlConnection*   infc_session_proxy_get_connection   (InfcSessionProxy *proxy);

Returns the connection that is used to transmit requests to the publisher of the session, or NULL if the session is not subscribed.

proxy :

A InfcSessionProxy.

Returns :

A InfXmlConnection, or NULL.

infc_session_proxy_get_subscription_group ()

InfCommunicationJoinedGroup* infc_session_proxy_get_subscription_group
                                                        (InfcSessionProxy *proxy);

proxy :

Returns :

Property Details

The "connection" property

  "connection"               InfXmlConnection*     : Read

The connection with which the session communicates with the server.


The "session" property

  "session"                  InfSession*           : Read / Write / Construct Only

The underlaying session object.


The "subscription-group" property

  "subscription-group"       InfCommunicationJoinedGroup*  : Read

The communication group of subscribed connections.