![]() |
![]() |
![]() |
libinfinity-0.3 Reference Manual | ![]() |
---|---|---|---|---|
enum InfUserStatus; enum InfUserFlags; InfUser; InfUserClass; guint inf_user_get_id (const InfUser *user); const gchar* inf_user_get_name (const InfUser *user); InfUserStatus inf_user_get_status (const InfUser *user); InfUserFlags inf_user_get_flags (const InfUser *user); InfXmlConnection* inf_user_get_connection (InfUser *user); const gchar* inf_user_status_to_string (InfUserStatus status); gboolean inf_user_status_from_string (const gchar *string, InfUserStatus *status, GError **error);
"connection" InfXmlConnection* : Read / Write "flags" InfUserFlags : Read / Write "id" guint : Read / Write / Construct Only "name" gchar* : Read / Write "status" InfUserStatus : Read / Write
typedef enum _InfUserStatus { INF_USER_ACTIVE, INF_USER_INACTIVE, INF_USER_UNAVAILABLE } InfUserStatus;
guint inf_user_get_id (const InfUser *user);
Returns the ID of the given InfUser.
|
A InfUser. |
Returns : |
A numerical User ID. |
const gchar* inf_user_get_name (const InfUser *user);
Returns the name of the given InfUser.
|
A InfUser. |
Returns : |
The user's name. |
InfUserStatus inf_user_get_status (const InfUser *user);
Returns the status of the given InfUser.
|
A InfUser. |
Returns : |
The user's status. |
InfUserFlags inf_user_get_flags (const InfUser *user);
Returns the flags for the given INfUser.
|
A InfUser. |
Returns : |
The user's flags. |
InfXmlConnection* inf_user_get_connection (InfUser *user);
Returns a connection to the given InfUser, or NULL
. If a non-NULL
connection is returned, then this is the connection through which records
from that user come from. This means that, when this connection is closed,
then the user is no longer available. However, you cannot send something
to this connection expecting the user will receive it. For example,
in central messaging mode, this connection is always the publisher, because
all records from the user are relayed via the publisher.
If this functions returns NULL
, this either means user
is a local user
(INF_USER_LOCAL
flag set) or it is not available (status is
INF_USER_UNAVAILBALE
).
|
A InfUser. |
Returns : |
A InfXmlConnection, or NULL .
|
const gchar* inf_user_status_to_string (InfUserStatus status);
Returns a non-localized string identifying the given status. This is not meant to be shown to a user, but rather to serialize a user status, for example to store it in XML.
|
A value from the InfUserStatus enumeration. |
Returns : |
A static string representation of status .
|
gboolean inf_user_status_from_string (const gchar *string, InfUserStatus *status, GError **error);
This function does the opposite of inf_user_status_to_string()
. It turns
the given string back to a InfUserStatus, storing the result in status
if status
is non-NULL
. If string
is invalid, then status
is left
untouched, error
is set and FALSE
is returned. Otherwise, the function
returns TRUE
.
|
A string representation of a InfUserStatus. |
|
A pointer to a InfUserStatus value, or NULL .
|
|
Location to store error information, if any. |
Returns : |
When an error occured during the conversion, FALSE is returned,
and TRUE otherwise.
|
"name"
property"name" gchar* : Read / Write
The Name with which a user joined a session. Most servers ensure that it is unique.
Default value: ""
"status"
property"status" InfUserStatus : Read / Write
Whether the user is currently available or not.
Default value: INF_USER_UNAVAILABLE