Enums

Details

class Infinity.AclSetting(value)

Bases: GObject.GEnum

Defines the actual permissions that can be granted or revoked for different users.

CAN_ADD_SUBDIRECTORY = 0

The user is allowed to create a new subdirectory node.

CAN_ADD_DOCUMENT = 1

The user is allowed to create a new leaf node.

CAN_OVERRIDE_ACCOUNT = 10

The user can create an account under a name that exists already, overriding the login credentials.

CAN_REMOVE_ACCOUNT = 11

The user can remove user accounts.

CAN_QUERY_ACL = 12

The user is allowed to query the full ACL for this node.

CAN_SET_ACL = 13

The user is allowed to change the ACL of this node, or create new nodes with a non-default ACL.

CAN_SYNC_IN = 2

The user is allowed to create documents with non-empty content.

CAN_REMOVE_NODE = 3

The user is allowed to remove a child node.

CAN_EXPLORE_NODE = 4

The user is allowed to explore a subdirectory node in the directory tree.

CAN_SUBSCRIBE_CHAT = 5

The user can subscribe to the global server-wide chat.

CAN_SUBSCRIBE_SESSION = 6

The user is allowed to subscribe to a session in the directory tree.

CAN_JOIN_USER = 7

The user is allowed to join a user into the session which corresponds to the node.

CAN_QUERY_ACCOUNT_LIST = 8

The user is allowed to query the full list of ACL accounts.

CAN_CREATE_ACCOUNT = 9

The user can create a new account on the server.

class Infinity.AdoptedAlgorithmError(value)

Bases: GLib.Enum

Error codes for Infinity.AdoptedAlgorithm. These can occur when invalid requests are passed to Infinity.AdoptedAlgorithm.execute_request().

NO_UNDO = 0

An undo request was about to be executed but there is no operation to undo.

NO_REDO = 1

A redo request was about to be executed but there is no operation to redo.

FAILED = 2

No further specified error code.

class Infinity.AdoptedConcurrencyId(value)

Bases: GObject.GEnum

A concurrency ID is used to determine which operation to transform in case two similar operations are transformed against each other.

OTHER = -1

Transform the other operation.

NONE = 0

Unspecified which operation to transform.

SELF = 1

Transform the operation itself.

class Infinity.AdoptedRequestType(value)

Bases: GObject.GEnum

Possible types for an Infinity.AdoptedRequest.

DO = 0

A request that performs an operation.

UNDO = 1

A request that undoes a previously applied request.

REDO = 2

A request that redoes a previously undone request.

class Infinity.AdoptedSessionError(value)

Bases: GLib.Enum

Error codes for Infinity.AdoptedSession. These only occur when invalid requests are received from the network.

NO_SUCH_USER = 0

The “user” field in a request message does not contain a valid user ID.

MISSING_OPERATION = 1

A request message does not contain an operation.

INVALID_REQUEST = 2

A request in a synchronized request log is invalid. Invalid means that it is not the request that was issued after the previous request in the log, or that it is an Undo or Redo request without a request to Undo or Redo, respectively.

MISSING_STATE_VECTOR = 3

A synchronized user does not contain that the state that user currently is in.

FAILED = 4

No further specified error code.

class Infinity.AdoptedSessionReplayError(value)

Bases: GLib.Enum

Error codes for the INF_ADOPTED_SESSION_REPLAY_ERROR error domain. These can occur while loading or replaying a session with Infinity.AdoptedSessionReplay.

BAD_FILE = 0

The record file could not be opened for reading.

BAD_XML = 1

The record file contains invalid XML.

BAD_DOCUMENT = 2

The record file is not a session recording.

BAD_SESSION_TYPE = 3

The record file is a session recording for a different type of session than the one provided.

BAD_FORMAT = 4

The record file is invalid.

UNEXPECTED_EOF = 5

More data was expected to be read from the record file, but the end of file was reached.

class Infinity.AdoptedStateVectorError(value)

Bases: GLib.Enum

Error codes for Infinity.AdoptedStateVector.

BAD_FORMAT = 0

A string representation of an Infinity.AdoptedStateVector as required by Infinity.AdoptedStateVector.from_string() or Infinity.AdoptedStateVector.from_string_diff() is invalid.

FAILED = 1

No further specified error code.

class Infinity.AuthenticationDetailError(value)

Bases: GLib.Enum

These errors can give an additional hint why the SASL authentication failed.

AUTHENTICATION_FAILED = 0

User did not provide valid credentials.

USER_NOT_AUTHORIZED = 1

User is not permitted to connect to this server.

TRY_AGAIN = 2

Authentication was temporarily interrupted on the server side.

SERVER_ERROR = 3

An error occurred while checking user permissions.

class Infinity.BrowserStatus(value)

Bases: GObject.GEnum

This enumeration contains possible status values for Infinity.Browser. Several operations, such as exploring a node or subscribing to a session can only be performed when the browser is open (for example, connected to a remote infinote server).

CLOSED = 0

The browser is closed and cannot be used currently.

OPENING = 1

The browser is currently being opened but cannot be used yet.

OPEN = 2

The browser is open and can be used to browse the directory.

class Infinity.ChatBufferMessageType(value)

Bases: GObject.GEnum

Possible chat message types.

NORMAL = 0

A normal chat message.

EMOTE = 1

An emote chat message (/me is doing something).

USERJOIN = 2

A user join notification.

USERPART = 3

A user part notification.

class Infinity.ChatSessionError(value)

Bases: GLib.Enum

Errors that can occur with a chat session, especially in the process_xml_sync and process_xml_run vfunc implementations.

TYPE_INVALID = 0

An invalid message type was sent.

NO_SUCH_USER = 1

A message referred to a nonexisting user.

FAILED = 2

Generic error code when no further reason of failure is known.

class Infinity.CommunicationScope(value)

Bases: GObject.GEnum

Infinity.CommunicationScope specifies to which hosts a message belongs.

PTP = 0

The message is sent from one group member to another.

GROUP = 1

The message is sent to all group members.

class Infinity.DirectoryError(value)

Bases: GLib.Enum

These are errors related to the directory of documents. These errors can be reason why requests created by #InfcBrowser fail.

NO_WELCOME_MESSAGE = 0

A client did not receive the directory’s initial welcome message.

VERSION_MISMATCH = 1

The server and client use different versions of the protocol.

ROOT_NODE_REMOVE_ATTEMPT = 10

A <remove-node> request attempted to remove a directory’s root node, which is not allowed.

NOT_EXPLORED = 11

An operation cannot be performed because the corresponding node is not explored.

ALREADY_EXPLORED = 12

The node given in an exploration request has already been explored earlier.

NOT_INITIATED = 13

Exploration has begun before the client was told how many entries to expect.

TOO_MANY_CHILDREN = 14

Exploration yields more children than announced at the beginning of the exploration.

TOO_FEW_CHILDREN = 15

Exploration yields less children than announced at the beginning of the exploration.

TYPE_UNKNOWN = 16

The type of a note is not known.

ALREADY_SUBSCRIBED = 17

The connection already subscribed to the node refered to, but the requested operation requires it to be unsubscribed.

UNSUBSCRIBED = 18

The connection is not subscribed to the node refered to, but the requested operation requires it to be subscribed.

NETWORK_UNSUPPORTED = 19

The server does not support the network of the incoming connection for the requested operation. For example, subscribing to a session might require a network that has a peer-to-peer communication method, but there is no implementation of that method for the connection’s network.

NODE_EXISTS = 2

A node with the given name exists already in that subdirectory (in response to node creation requests).

METHOD_UNSUPPORTED = 20

The server requested a communaction method for subscription or synchronization that is not supported by the client.

OPERATION_UNSUPPORTED = 21

The requested operation is not supported by the server.

UNEXPECTED_SYNC_IN = 22

A client received a <sync-in/> without having requested one. The client has no data to sync to the server.

SUBSCRIPTION_REJECTED = 23

A client replied with <subscribe-nack> on an attempt to subscribe it to a session.

UNEXPECTED_MESSAGE = 24

A message that is not understood was received.

NO_STORAGE = 25

A node cannot be stored permanently on the server since it has no storage backend attached.

INVALID_CERTIFICATE = 26

An invalid certificate or certificate request have been sent.

ACCOUNT_LIST_ALREADY_QUERIED = 27

The account list has already been queried before.

ACCOUNT_LIST_NOT_QUERIED = 28

The account list has not been queried.

DUPLICATE_ACCOUNT = 29

When adding a new account the new account ID exists already in the account list.

INVALID_NAME = 3

A node with an invalid name was attempted to be created.

NO_SUCH_ACCOUNT = 30

There is no such account with the given ID.

ACL_ALREADY_QUERIED = 31

The ACL for a node has already been queried before.

ACL_NOT_QUERIED = 32

The ACL for a node has not yet been queried, but is required to perform the operation.

FAILED = 33

Generic error code when no further reason of failure is known.

NO_SUCH_NODE = 4

The node refered to in a request does not exist in the directory (anymore).

NO_SUCH_SUBSCRIPTION_REQUEST = 5

A <subscribe-ack> or <subscribe-nack> has been received without a previous request.

CHAT_DISABLED = 6

A client attempted to subscribe to a server’s chat, but the chat is disabled on the server side.

NOT_A_SUBDIRECTORY = 7

The node refered to in a request is not a subdirectory node, but the requested operation requires one.

NOT_A_NOTE = 8

The node refered to in a request is not a note (non-subdirectory) node, but the requested operations requires one.

NOTE_TYPE_UNSUPPORTED = 9

The node type is not supported by the server.

class Infinity.FileType(value)

Bases: GLib.Enum

This type represents the possible file types that Infinity.file_util_list_directory() can report.

UNKNOWN = 0

Unknown file type.

REG = 1

File is a regular file.

DIR = 2

File is a directory.

LNK = 3

File is a symbolic link.

class Infinity.IpAddressFamily(value)

Bases: GObject.GEnum

This enumeration specifies different types of IP addresses.

IPV4 = 0

This specifies an IPv4 address.

IPV6 = 1

This specifies an IPv6 address.

class Infinity.RequestError(value)

Bases: GLib.Enum

These are general request errors that all #InfcRequest s can fail with. Specific requests may also fail with more errors, such as Infinity.DirectoryError.

UNKNOWN_DOMAIN = 0

The server sent <request-failed/> with an unknown error domain.

REPLY_UNPROCESSED = 1

An error occurred while processing the server reply for a request.

INVALID_SEQ = 2

The server sent an invalid sequence number in a reply to a request.

NO_SUCH_ATTRIBUTE = 3

A request did not contain a XML attribute that is required to complete the request.

INVALID_ATTRIBUTE = 4

A request contains an XML attribute with unexpected content.

INVALID_NUMBER = 5

A number in a request was invalid. Either it was not numerical, or it produced an underflow or an overflow.

NOT_AUTHORIZED = 6

The requesting host is not authorized to perform the requested action.

FAILED = 7

Generic error code when no further reason of failure is known.

class Infinity.SessionStatus(value)

Bases: GObject.GEnum

Infinity.SessionStatus defines in what state a session is in.

PRESYNC = 0

The session is scheduled to be synchronized from a remote host. This can be useful if the session is needed to be present before the actual synchronization begins. Use Infinity.Session.synchronize_from() to switch to Infinity.SessionStatus.SYNCHRONIZING.

SYNCHRONIZING = 1

The session is currently being synchronized from a remote host. When done synchronizing, it will enter into Infinity.SessionStatus.RUNNING state.

RUNNING = 2

The session is running and ready to synchronize other hosts. If a subscription group is set (see Infinity.Session.set_subscription_group()), then changes to the underlying buffer are transmitted to all subscribed connections.

CLOSED = 3

The session is closed and can no longer be used. The session enters this state if the synchronization fails in Infinity.SessionStatus.SYNCHRONIZING state or Infinity.Session.close() is called.

class Infinity.SessionSyncError(value)

Bases: GLib.Enum

These are errors that can occur during a synchronization of a session. Additional errors may occur depending on the session type.

GOT_MESSAGE_IN_PRESYNC = 0

Received a message in state Infinity.SessionStatus.PRESYNC. It is not processed because Infinity.Session.synchronize_from() was not yet called.

UNEXPECTED_NODE = 1

A message has been received that was not understood.

NUM_MESSAGES_MISSING = 10

The <sync-begin/> message does not contain the number of synchronization messages to expect.

UNEXPECTED_END_OF_SYNC = 11

The <sync-end/> message was not received at the end of the synchronization.

EXPECTED_BEGIN_OF_SYNC = 12

The <sync-begin/> message was not received at the beginning of the synchronization.

EXPECTED_END_OF_SYNC = 13

The <sync-end/> message was not received at the end of the synchronization.

FAILED = 14

Generic error code when no further reason of failure is known.

ID_NOT_PRESENT = 2

An ID was not provided for a user in the session.

ID_IN_USE = 3

The ID of a user is already in use by another user.

NAME_NOT_PRESENT = 4

A name was not provided for a user in the session.

NAME_IN_USE = 5

The name of a user is already in use by another user.

CONNECTION_CLOSED = 6

The synchronization connection has been closed.

SENDER_CANCELLED = 7

The sender has cancelled the synchronization.

RECEIVER_CANCELLED = 8

The receiver has cancelled the synchronization.

UNEXPECTED_BEGIN_OF_SYNC = 9

Received <sync-begin/> not a the beginning of the synchronization.

class Infinity.SessionSyncStatus(value)

Bases: GLib.Enum

Infinity.SessionSyncStatus represents the status of a synchronization. It is used by Infinity.Session.get_synchronization_status().

NONE = 0

No synchronization is ongoing.

IN_PROGRESS = 1

Synchronization is currently in progress.

AWAITING_ACK = 2

All synchronization data has been sent (progress is 1.0), but we are still waiting for an acknowledgment from the remote site. Synchronization can no longer be cancelled, but it can stiff fail.

class Infinity.SimulatedConnectionMode(value)

Bases: GObject.GEnum

The mode of a simulated connection defines when sent messages arrive at the target connection.

IMMEDIATE = 0

Messages are received directly by the target site when calling Infinity.XmlConnection.send().

DELAYED = 1

Messages are queued, and delivered to the target site when Infinity.SimulatedConnection.flush() is called.

IO_CONTROLLED = 2

Messages are queued and delivered once the application main loop regains control. This requires the simulated connection to have been created with Infinity.SimulatedConnection.new_with_io().

class Infinity.TcpConnectionStatus(value)

Bases: GObject.GEnum

Infinity.TcpConnectionStatus specifies the connection status of a Infinity.TcpConnection.

CONNECTING = 0

A new connection is currently being established.

CONNECTED = 1

The connection is ready to send and receive data.

CLOSED = 2

The connection is closed. Before data can be transmitted, it needs to be opened with Infinity.TcpConnection.open().

class Infinity.UserError(value)

Bases: GLib.Enum

These are errors related to users. They may occur during user join or during processing a user-related message, such as a user status change message in an Infinity.Session.

NAME_IN_USE = 0

The requested name is already in use by another user.

ID_PROVIDED = 1

The client provided a user ID field in a user join request, but it’s the server’s job to find an ID.

NO_SUCH_USER = 2

A request referred to a user ID that no user is associated with.

STATUS_UNAVAILABLE = 3

The initial user status was given as unavailable during user join or rejoin.

NOT_JOINED = 4

The user did not join from the connection the request comes from. For example, a user status change can only be requested from the same connection that joined the user.

INVALID_STATUS = 5

An invalid status was used in a XML request. Allowed status values are “unavailable”, “inactive” or “active”.

FAILED = 6

Generic error code when no further reason of failure is known.

class Infinity.UserStatus(value)

Bases: GObject.GEnum

Different possible types of status an Infinity.User can have.

classmethod from_string(string)
Parameters:

string (str) – A string representation of a Infinity.UserStatus.

Raises:

GLib.Error

Returns:

When an error occurred during the conversion, False is returned, and True otherwise.

status:

A pointer to a Infinity.UserStatus value, or None.

Return type:

(bool, status: Infinity.UserStatus)

This function does the opposite of Infinity.UserStatus.to_string(). It turns the given string back to a Infinity.UserStatus, storing the result in status if status is non-None. If string is invalid, then status is left untouched, error is set and False is returned. Otherwise, the function returns True.

classmethod to_string(status)
Parameters:

status (Infinity.UserStatus) – A value from the Infinity.UserStatus enumeration.

Returns:

A static string representation of status.

Return type:

str

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.

ACTIVE = 0

The user is available and currently looking at this session.

INACTIVE = 1

The user is available but currently not paying attention to this session.

UNAVAILABLE = 2

The user is not available, i.e. not joined into the session.

class Infinity.XmlConnectionStatus(value)

Bases: GObject.GEnum

The possible connection status of an Infinity.XmlConnection.

CLOSED = 0

The connection is currently not established.

CLOSING = 1

The connection is in the process of being closed, no more data can be sent.

OPEN = 2

The connection is up and data can be transmitted.

OPENING = 3

The connection is being established.

class Infinity.XmppConnectionAuthError(value)

Bases: GLib.Enum

Specifies the error codes in the INF_XMPP_CONNECTION_AUTH_ERROR error domain. These errors correspond to the ones defined in RFC 3920, section 6.4.

ABORTED = 0

The receiving entity acknowledged an <abort/> element sent by the initiating entity.

INCORRECT_ENCODING = 1

The data provided by the initiating entity could not be processed because the Base64 encoding is incorrect.

INVALID_AUTHZID = 2

The authzid provided by the initiating entity is invalid, either because it is incorrectly formatted or because the initiating entity does not have permissions to authorize that ID.

INVALID_MECHANISM = 3

The initiating entity did not provide a mechanism or requested a mechanism that is not supported by the receiving entity.

MECHANISM_TOO_WEAK = 4

The mechanism requested by the initiating entity is weaker than server policy permits for that initiating entity.

NOT_AUTHORIZED = 5

The authentication failed because the initiating entity did not provide valid credentials.

TEMPORARY_AUTH_FAILURE = 6

The authentication failed because of a temporary error condition within the receiving entity.

FAILED = 7

General error code for otherwise unknown errors.

class Infinity.XmppConnectionError(value)

Bases: GLib.Enum

Specifies the error codes in the INF_XMPP_CONNECTION_ERROR error domain.

TLS_UNSUPPORTED = 0

Server does not support TLS, but the security policy is set to Infinity.XmppConnectionSecurityPolicy.ONLY_TLS.

TLS_REQUIRED = 1

The server requires TLS, but the security policy is set to Infinity.XmppConnectionSecurityPolicy.ONLY_UNSECURED.

TLS_FAILURE = 2

Server cannot proceed with the TLS handshake.

NO_CERTIFICATE_PROVIDED = 3

The server did not provide a certificate.

CERTIFICATE_NOT_TRUSTED = 4

The server certificate is not trusted. Whether the server certificate is trusted or not is defined by the API user, by providing a certificate callback with inf_xmpp_connection_set_certificate_callback().

AUTHENTICATION_UNSUPPORTED = 5

The server does not provide any authentication mechanisms.

NO_SUITABLE_MECHANISM = 6

The server does not offer a suitable authentication mechanism that is accepted by the client.

FAILED = 7

General error code for otherwise unknown errors.

class Infinity.XmppConnectionSecurityPolicy(value)

Bases: GObject.GEnum

The Infinity.XmppConnectionSecurityPolicy enumeration specifies various options of how to deal with the other site allowing or requiring TLS-secured connections. Note that if the local site is a server, then Infinity.XmppConnectionSecurityPolicy.BOTH_PREFER_UNSECURED and Infinity.XmppConnectionSecurityPolicy.BOTH_PREFER_TLS are equivalent.

ONLY_UNSECURED = 0

In the case of a server, do not offer TLS to the client. As a client, only connect if the server does not require TLS.

ONLY_TLS = 1

In the case of a server, require all connections to be TLS-secured. As a client, only connect if the server supports TLS.

BOTH_PREFER_UNSECURED = 2

In the case of a server, offer both unsecured and secured messaging to the client. As a client, use unsecured communication unless TLS is required by the server.

BOTH_PREFER_TLS = 3

In the case of a server, offer both unsecured and secured messaging to the client. As a client, use TLS unless not supported by the server.

class Infinity.XmppConnectionSite(value)

Bases: GObject.GEnum

Specifies whether the local site of the connection is a client or a server.

SERVER = 0

The local site of this connection is an XMPP server and the remote counterpart is a client.

CLIENT = 1

The local site of this connection is a XMPP client and the remote counterpart is a server.

class Infinity.XmppConnectionStreamError(value)

Bases: GLib.Enum

Specifies the error codes in the INF_XMPP_CONNECTION_STREAM_ERROR error domain. These errors correspond to the ones defined in RFC 3920, section 4.7.3.

BAD_FORMAT = 0

The entity has sent XML that cannot be processed.

BAD_NAMESPACE_PREFIX = 1

The entity has sent a namespace prefix that is unsupported, or has sent no namespace prefix on an element that requires such a prefix.

INVALID_NAMESPACE = 10

The streams namespace is something other than http://etherx.jabber.org/streams or the dialback namespace name is something other than jabber:server:dialback.

INVALID_XML = 11

The entity has sent invalid XML over the stream to a server that performs validation.

NOT_AUTHORIZED = 12

The entity has attempted to send data before the stream has been authenticated, or otherwise is not authorized to perform an action related to stream negotiation.

POLICY_VIOLATION = 13

The entity has violated some local service policy.

REMOTE_CONNECTION_FAILED = 14

The server is unable to properly connect to a remote entity that is required for authentication or authorization.

RESOURCE_CONSTRAINT = 15

The server lacks the system resources necessary to service the stream.

RESTRICTED_XML = 16

The entity has attempted to send restricted XML features.

SEE_OTHER_HOST = 17

The server will not provide service to the initiating entity but is redirecting traffic to another host.

SYSTEM_SHUTDOWN = 18

The server is being shut down and all active streams are being closed.

UNDEFINED_CONDITION = 19

The error condition is not one of those defined by the other conditions.

CONFLICT = 2

The server is closing the active stream for this entity because a new stream has been initiated that conflicts with the existing stream.

UNSUPPORTED_ENCODING = 20

The initiating entity has encoded the stream in an encoding that is not supported by the server.

UNSUPPORTED_STANZA_TYPE = 21

The initiating entity has sent a first-level child of the stream that is not supported by the server.

UNSUPPORTED_VERSION = 22

The value of the ‘version’ attribute provided by the initiating entity in the stream header specifies a version of XMPP that is not supported by the server.

XML_NOT_WELL_FORMED = 23

The initiating entity has sent XML that is not well-formed.

FAILED = 24

General error code for otherwise unknown errors.

CONNECTION_TIMEOUT = 3

The entity has not generated any traffic over the stream for some period of time.

HOST_GONE = 4

The value of the ‘to’ attribute provided by the initiating entity in the stream header corresponds to a hostname that is no longer hosted by the server.

HOST_UNKNOWN = 5

The value of the ‘to’ attribute provided by the initiating entity in the stream header does not correspond to a hostname that is hosted by the server.

IMPROPER_ADDRESSING = 6

A stanza sent between two servers lacks a ‘to’ or ‘from’ attribute.

INTERNAL_SERVER_ERROR = 7

The server has experienced a misconfiguration or an otherwise-undefined internal error that prevents it from servicing the stream.

INVALID_FROM = 8

The JID or hostname provided in a ‘from’ address does not match an authorized JID or validated domain negotiated between servers via SASL or dialback, or between a client and a server via authentication and resource binding.

INVALID_ID = 9

The stream ID or dialback ID is invalid or does not match an ID previously provided.