InfAdoptedUser

InfAdoptedUser — User in a InfAdoptedUser.

Stability Level

Unstable, unless otherwise indicated

Synopsis

#include <libinfinity/adopted/inf-adopted-user.h>

                    InfAdoptedUser;
struct              InfAdoptedUserClass;
guint               inf_adopted_user_get_component      (InfAdoptedUser *user,
                                                         guint id);
InfAdoptedStateVector * inf_adopted_user_get_vector     (InfAdoptedUser *user);
void                inf_adopted_user_set_vector         (InfAdoptedUser *user,
                                                         InfAdoptedStateVector *vec);
InfAdoptedRequestLog * inf_adopted_user_get_request_log (InfAdoptedUser *user);

Object Hierarchy

  GObject
   +----InfUser
         +----InfAdoptedUser

Properties

  "request-log"              InfAdoptedRequestLog*  : Read / Write / Construct Only
  "vector"                   InfAdoptedStateVector*  : Read / Write

Description

InfAdoptedUser is a InfUser-derived class that is used in InfAdoptedSession. It holds all user-specific information that is needed by InfAdoptedAlgorithm to handle the concurrency control. This includes the user's request log which stores all the requests made by the user and a state vector which specifies the document state that the user has, as known to the local host. This information is extracted from the most recent request received from the user.

Details

InfAdoptedUser

typedef struct _InfAdoptedUser InfAdoptedUser;

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


struct InfAdoptedUserClass

struct InfAdoptedUserClass {
};

This structure does not contain any public fields.


inf_adopted_user_get_component ()

guint               inf_adopted_user_get_component      (InfAdoptedUser *user,
                                                         guint id);

Returns the amount of requests user is guaranteed to have processed from the user with ID id.

user :

A InfAdoptedUser.

id :

The component to retrieve.

Returns :

The number of requests user has processed from id.

inf_adopted_user_get_vector ()

InfAdoptedStateVector * inf_adopted_user_get_vector     (InfAdoptedUser *user);

Returns the current vector time of user.

user :

A InfAdoptedUser.

Returns :

The current vector time of user.

inf_adopted_user_set_vector ()

void                inf_adopted_user_set_vector         (InfAdoptedUser *user,
                                                         InfAdoptedStateVector *vec);

Updates the state vector of user. This function takes ownership of vec.

user :

A InfAdoptedUser.

vec :

A InfAdoptedStateVector.

inf_adopted_user_get_request_log ()

InfAdoptedRequestLog * inf_adopted_user_get_request_log (InfAdoptedUser *user);

Returns the request log of user.

user :

A InfAdoptedUser.

Returns :

User's InfAdoptedRequestLog.

Property Details

The "request-log" property

  "request-log"              InfAdoptedRequestLog*  : Read / Write / Construct Only

Request log of this user.


The "vector" property

  "vector"                   InfAdoptedStateVector*  : Read / Write

The state this user is currently at.

See Also

InfAdoptedSession, InfAdoptedAlgorithm