![]() |
![]() |
![]() |
libinfinity-0.5 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
enum InfUserStatus; enum InfUserFlags; InfUser; struct InfUserClass; guint inf_user_get_id (InfUser *user
); const gchar * inf_user_get_name (InfUser *user
); InfUserStatus inf_user_get_status (InfUser *user
); InfUserFlags inf_user_get_flags (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
);
GEnum +----InfUserStatus
GFlags +----InfUserFlags
GObject +----InfUser +----InfAdoptedUser
"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;
struct InfUserClass { GObjectClass parent_class; void (*set_status)(InfUser* user, InfUserStatus status); };
guint inf_user_get_id (InfUser *user
);
Returns the ID of the given InfUser.
|
A InfUser. |
Returns : |
A numerical User ID. |
const gchar * inf_user_get_name (InfUser *user
);
Returns the name of the given InfUser.
|
A InfUser. |
Returns : |
The user's name. |
InfUserStatus inf_user_get_status (InfUser *user
);
Returns the status of the given InfUser.
|
A InfUser. |
Returns : |
The user's status. |
InfUserFlags inf_user_get_flags (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
"set-status"
signalvoid user_function (InfUser *user,
InfUserStatus status,
gpointer user_data) : Run Last
This signal is emitted whenever the user's status changes. This is basically the same as a notification for the "status" property, but it allows to access the previous user status when connecting before the default signal handler.
|
The InfUser that changes status. |
|
The new user status. |
|
user data set when the signal handler was connected. |