Top | ![]() |
![]() |
![]() |
![]() |
A InfSessionProxy is a network-architecture-aware layer on top of a InfSession. A InfSession has no idea about what kind of network it is in, all it has is a possibility to send messages to one user or to all users.
A InfSessionProxy implements the part of the infinote protocol which depends on whether the session is at an infinote server or an infinote client. This interface provides a method to join a user into a session so that it does not need to be known to the caller whether the session at hand is on a server or a client.
InfRequest * inf_session_proxy_join_user (InfSessionProxy *proxy
,guint n_params
,const GParameter *params
,InfRequestFunc func
,gpointer user_data
);
Requests a user join for a user with the given properties (which must not
include “id” or “flags” since these are chosen by the session
proxy). The “status” property is optional and defaults to
INF_USER_ACTIVE
if not given. It must not be INF_USER_UNAVAILABLE
.
The request might either finish during the call to this function, in which
case func
will be called and NULL
being returned. If the request does not
finish within the function call, a InfRequest object is returned,
where func
has been installed for the “finished” signal,
so that it is called as soon as the request finishes.
proxy |
||
n_params |
Number of parameters. |
|
params |
Construction properties for the InfUser (or derived) object. |
[array length=n_params] |
func |
Function to be called on completion of the user
join, or |
[scope async] |
user_data |
Additional data to be passed to |
A InfRequest object that may be used to get
notified when the request finishes, or NULL
.
[transfer none]
typedef struct _InfSessionProxy InfSessionProxy;
InfSessionProxy is an opaque data type. You should only access it via the public API functions.
struct InfSessionProxyInterface { InfRequest* (*join_user)(InfSessionProxy* proxy, guint n_params, const GParameter* params, InfRequestFunc func, gpointer user_data); };
Virtual functions for the InfSessionProxy interface.
“session”
property“session” InfSession *
The underlying session object.
Owner: InfSessionProxy
Flags: Read / Write / Construct Only