## InfAdoptedUser InfAdoptedUser — User in a InfAdoptedUser. |

## Stability Level

Unstable, unless otherwise indicated

## Functions

guint | inf_adopted_user_get_component ()
InfAdoptedStateVector * | inf_adopted_user_get_vector ()
void | inf_adopted_user_set_vector ()
InfAdoptedRequestLog * | inf_adopted_user_get_request_log ()

## Properties

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

## Types and Values

| InfAdoptedUser
struct | InfAdoptedUserClass

## Object Hierarchy

        GObject
        ╰── InfUser
            ╰── InfAdoptedUser

## Includes

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

## 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.

## Functions

### 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` .

#### Parameters

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` .

#### Parameters

user | A InfAdoptedUser. |

#### Returns

The current vector time of `user` .

[transfer none]

### 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` .

#### Parameters

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` .

#### Parameters

user | A InfAdoptedUser. |

#### Returns

User's InfAdoptedRequestLog.

[transfer none]

## Types and Values

### 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.

## Property Details

### The `“request-log”` property

      “request-log”              InfAdoptedRequestLog *

Request log of this user.

Owner: InfAdoptedUser

Flags: Read / Write / Construct Only

### The `“vector”` property

      “vector”                   InfAdoptedStateVector *

The state this user is currently at.

Owner: InfAdoptedUser

Flags: Read / Write

## See Also

InfAdoptedSession, InfAdoptedAlgorithm