libinfinity-0.6 Reference Manual: InfSessionProxy

## InfSessionProxy InfSessionProxy — Joining users into a session |

## Stability Level

Unstable, unless otherwise indicated

## Functions

InfRequest * | inf_session_proxy_join_user ()

## Properties

InfSession * | session | Read / Write / Construct Only

## Types and Values

| InfSessionProxy
struct | InfSessionProxyIface

## Object Hierarchy

        GInterface
        ╰── InfSessionProxy

## Prerequisites

InfSessionProxy requires GObject.

## Known Implementations

InfSessionProxy is implemented by InfcSessionProxy and InfdSessionProxy.

## Includes

    #include <libinfinity/common/inf-session_proxy.h>

## Description

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.

## Functions

### inf_session_proxy_join_user ()

    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.

#### Parameters

proxy | A InfSessionProxy. |
n_params | Number of parameters. |
params | Construction properties for the InfUser (or derived) object. |
func | Function to be called on completion of the user join, or `NULL`. |
user_data | Additional data to be passed to `func` . |

#### Returns

A InfRequest object that may be used to get notified when the request finishes, or `NULL`.

## Types and Values

### InfSessionProxy

    typedef struct _InfSessionProxy InfSessionProxy;

InfSessionProxy is an opaque data type. You should only access it via the public API functions.

### struct InfSessionProxyIface

    struct InfSessionProxyIface {
      InfRequest* (*join_user)(InfSessionProxy* proxy,
                               guint n_params,
                               const GParameter* params,
                               InfRequestFunc func,
                               gpointer user_data);
    };

Virtual functions for the InfSessionProxy interface.

#### Members

`join_user` () | Virtual function to join a user into the proxy's session. |

## Property Details

### The `“session”` property

      “session”                  InfSession *

The underlying session object.

Flags: Read / Write / Construct Only

## See Also

InfSession, InfBrowser, InfcSessionProxy, InfdSessionProxy