Enumerations for tinymail

Enumerations for tinymail — Enumerations for tinymail

Synopsis




enum                TnyStatusCode;
enum                TnyStatusDomain;
enum                TnyFolderCaps;
enum                TnyFolderChangeChanged;
enum                TnyFolderStoreChangeChanged;
enum                TnyErrorDomain;
enum                TnyError;
enum                TnyAccountType;
enum                TnyAccountSignal;
enum                TnyConnectionStatus;
enum                TnyAccountStoreSignal;
enum                TnyAlertType;
enum                TnyGetAccountsRequestType;
enum                TnyDeviceSignal;
enum                TnyFolderSignal;
enum                TnyFolderStoreQueryOption;
enum                TnyHeaderFlags;
enum                TnyHeaderPriorityFlags;
enum                TnyFolderType;
enum                TnySendQueueSignal;
enum                TnyStoreAccountSignal;

Description

Enumerations for tinymail

Details

enum TnyStatusCode

typedef enum  
{
	TNY_FOLDER_STATUS_CODE_REFRESH = 1,
	TNY_FOLDER_STATUS_CODE_GET_MSG = 2,
	TNY_GET_MSG_QUEUE_STATUS_GET_MSG = 3,
	TNY_FOLDER_STATUS_CODE_XFER_MSGS = 4,
	TNY_FOLDER_STATUS_CODE_COPY_FOLDER = 5,
	TNY_GET_SUPPORTED_SECURE_AUTH_STATUS_GET_SECURE_AUTH = 6,
	TNY_FOLDER_STATUS_CODE_SYNC = 7,
} TnyStatusCode;

TNY_FOLDER_STATUS_CODE_REFRESH a status that occurs while a folder is being refreshed
TNY_FOLDER_STATUS_CODE_GET_MSG a status that occurs while a message is being downloaded
TNY_GET_MSG_QUEUE_STATUS_GET_MSG
TNY_FOLDER_STATUS_CODE_XFER_MSGS
TNY_FOLDER_STATUS_CODE_COPY_FOLDER
TNY_GET_SUPPORTED_SECURE_AUTH_STATUS_GET_SECURE_AUTH
TNY_FOLDER_STATUS_CODE_SYNC

enum TnyStatusDomain

typedef enum 
{
	TNY_FOLDER_STATUS = 1,
	TNY_GET_MSG_QUEUE_STATUS  = 2,
	TNY_GET_SUPPORTED_SECURE_AUTH_STATUS = 3
} TnyStatusDomain;

TNY_FOLDER_STATUS a status domain code for folder
TNY_GET_MSG_QUEUE_STATUS
TNY_GET_SUPPORTED_SECURE_AUTH_STATUS

enum TnyFolderCaps

typedef enum {
        TNY_FOLDER_CAPS_WRITABLE = 1<<0,
        TNY_FOLDER_CAPS_PUSHEMAIL = 1<<1
} TnyFolderCaps;

TNY_FOLDER_CAPS_WRITABLE indicates that the folder is writable
TNY_FOLDER_CAPS_PUSHEMAIL indicates that the folder supports Push E-mail

enum TnyFolderChangeChanged

typedef enum {
	TNY_FOLDER_CHANGE_CHANGED_ALL_COUNT = 1<<0,
	TNY_FOLDER_CHANGE_CHANGED_UNREAD_COUNT = 1<<1,
	TNY_FOLDER_CHANGE_CHANGED_ADDED_HEADERS = 1<<2,
	TNY_FOLDER_CHANGE_CHANGED_EXPUNGED_HEADERS = 1<<3,
	TNY_FOLDER_CHANGE_CHANGED_FOLDER_RENAME = 1<<4,
	TNY_FOLDER_CHANGE_CHANGED_MSG_RECEIVED = 1<<5,
} TnyFolderChangeChanged;

TNY_FOLDER_CHANGE_CHANGED_ALL_COUNT indicates that the total count of the folder got changed
TNY_FOLDER_CHANGE_CHANGED_UNREAD_COUNT indicates that the unread count of the folder got changed
TNY_FOLDER_CHANGE_CHANGED_ADDED_HEADERS indicates that a summary item or header got added (that a message got added, this is a typical Push E-mail event)
TNY_FOLDER_CHANGE_CHANGED_EXPUNGED_HEADERS
TNY_FOLDER_CHANGE_CHANGED_FOLDER_RENAME indicates that the folder got renamed
TNY_FOLDER_CHANGE_CHANGED_MSG_RECEIVED

enum TnyFolderStoreChangeChanged

typedef enum {
	TNY_FOLDER_STORE_CHANGE_CHANGED_CREATED_FOLDERS = 1<<0,
	TNY_FOLDER_STORE_CHANGE_CHANGED_REMOVED_FOLDERS = 1<<1
} TnyFolderStoreChangeChanged;

TNY_FOLDER_STORE_CHANGE_CHANGED_CREATED_FOLDERS indicates that a folder got created in the store
TNY_FOLDER_STORE_CHANGE_CHANGED_REMOVED_FOLDERS indicates that a folder got removed from the store

enum TnyErrorDomain

typedef enum {
	TNY_FOLDER_ERROR = 1,
	TNY_FOLDER_STORE_ERROR = 2,
	TNY_TRANSPORT_ACCOUNT_ERROR = 3,
	TNY_ACCOUNT_ERROR = 4,
	TNY_ACCOUNT_STORE_ERROR = 5,
	TNY_SEND_QUEUE_ERROR = 6
} TnyErrorDomain;

TNY_FOLDER_ERROR An error domain for errors that occured with a folder
TNY_FOLDER_STORE_ERROR An error domain for errors that occured with a folder store
TNY_TRANSPORT_ACCOUNT_ERROR An error domain for errors that occured with a transport account
TNY_ACCOUNT_ERROR An error domain for errors that occured with a account
TNY_ACCOUNT_STORE_ERROR
TNY_SEND_QUEUE_ERROR

enum TnyError

typedef enum {
	TNY_ERROR_UNSPEC = 1,

	TNY_FOLDER_ERROR_SYNC = 2,
	TNY_FOLDER_ERROR_REMOVE_MSG = 3,
	TNY_FOLDER_ERROR_ADD_MSG = 4,
	TNY_FOLDER_ERROR_REFRESH = 5,
	TNY_FOLDER_ERROR_GET_MSG = 6,
	TNY_FOLDER_ERROR_TRANSFER_MSGS = 7,
	TNY_FOLDER_ERROR_SET_NAME = 8,
	TNY_FOLDER_ERROR_COPY = 9,

	TNY_FOLDER_STORE_ERROR_REMOVE_FOLDER = 10,
	TNY_FOLDER_STORE_ERROR_GET_FOLDERS = 11,
	TNY_FOLDER_STORE_ERROR_CREATE_FOLDER = 12,

	TNY_TRANSPORT_ACCOUNT_ERROR_SEND = 13,
	TNY_TRANSPORT_ACCOUNT_ERROR_SEND_HOST_LOOKUP_FAILED = 23,
	TNY_TRANSPORT_ACCOUNT_ERROR_SEND_SERVICE_UNAVAILABLE = 24,
	TNY_TRANSPORT_ACCOUNT_ERROR_SEND_AUTHENTICATION_NOT_SUPPORTED = 25,
	TNY_TRANSPORT_ACCOUNT_ERROR_SEND_USER_CANCEL = 26,

	TNY_ACCOUNT_ERROR_TRY_CONNECT = 14,
	TNY_ACCOUNT_ERROR_TRY_CONNECT_HOST_LOOKUP_FAILED = 19,
	TNY_ACCOUNT_ERROR_TRY_CONNECT_SERVICE_UNAVAILABLE = 20,
	TNY_ACCOUNT_ERROR_TRY_CONNECT_AUTHENTICATION_NOT_SUPPORTED = 21,
	TNY_ACCOUNT_ERROR_TRY_CONNECT_CERTIFICATE = 22,
	TNY_ACCOUNT_ERROR_TRY_CONNECT_USER_CANCEL = 27,

	TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT = 15,

	TNY_ACCOUNT_ERROR_GET_SUPPORTED_AUTH = 16,

	TNY_SEND_QUEUE_ERROR_ADD = 17,

	TNY_ACCOUNT_STORE_ERROR_CANCEL_ALERT = 18,

	TNY_FOLDER_ERROR_REMOVE_MSGS = 19,
} TnyError;

An GError error code.

TODO: Ideally, we would have more error codes, one for each specific error, such as "hostname not accepted", so that the application can identify the exact error, and respond accordingly. However, these error codes are not yet present because the implementations do not yet provide such fine-grained information. TODO: Document the other error codes.

TNY_ACCOUNT_ERROR_TRY_CONNECT: This can possibly indicate such errors as "hostname not resolved", "no network", or "password not accepted", though some implementations might return TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT (in the TNY_ACCOUNT_STORE_ERROR error domain) in these cases Currently, the application must know whether it is using our camel implementation, in order to know whether it can expect to receive a TNY_ACCOUNT_ERROR_TRY_CONNECT (in the TNY_ACCOUNT_ERROR error domain) rather than a TNY_ACCOUNT_ERROR_UNKNOWN_ALERT (in the TNY_ACCOUNT_STORE_ERROR error domain) in these situations. If using our camel implementation then even this level of exact detection of the particular error is not currently possible, so a generic error dialog should probably be shown, though the application could choose to suggest possible causes for the error.

TNY_ACCOUNT_ERROR_TRY_CONNECT_HOST_LOOKUP_FAILED: The specified host name cannot be resolved to an IP address. It is probably incorrect.

TNY_ACCOUNT_ERROR_TRY_CONNECT_SERVICE_UNAVAILABLE: No connection could be made with the specified server. Maybe the server is not running on the specified host.

TNY_ACCOUNT_ERROR_TRY_CONNECT_AUTHENTICATION_NOT_SUPPORTED: The server reported that it does not support the specified secure authentication method. It might support a different method instead.

TNY_ACCOUNT_ERROR_TRY_CONNECT_CERTIFICATE: There was a problem with an authentication or connection certificate. For instance, a bad certificate must be manually accepted.

TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT: This indicates that an unknown error has occurred. Depending on the implementation being used, and the server being used, this could have multiple possible causes. More exact error information is only possible with other servers, and/or othre implementations.

TNY_ERROR_UNSPEC An unspecified error occured
TNY_FOLDER_ERROR_SYNC
TNY_FOLDER_ERROR_REMOVE_MSG An error that occured while removing a message
TNY_FOLDER_ERROR_ADD_MSG An error that occured while adding a message
TNY_FOLDER_ERROR_REFRESH An error that occured while refreshing a folder
TNY_FOLDER_ERROR_GET_MSG An error that occured while getting a message
TNY_FOLDER_ERROR_TRANSFER_MSGS An error that occured while transfering a message
TNY_FOLDER_ERROR_SET_NAME An error that occured while renaming a folder
TNY_FOLDER_ERROR_COPY An error that occured while copying a folder
TNY_FOLDER_STORE_ERROR_REMOVE_FOLDER An error that occured while removing a folder
TNY_FOLDER_STORE_ERROR_GET_FOLDERS An error that occured while getting folders
TNY_FOLDER_STORE_ERROR_CREATE_FOLDER An error that occured while creating a folder
TNY_TRANSPORT_ACCOUNT_ERROR_SEND An error that occured while sending a message
TNY_TRANSPORT_ACCOUNT_ERROR_SEND_HOST_LOOKUP_FAILED
TNY_TRANSPORT_ACCOUNT_ERROR_SEND_SERVICE_UNAVAILABLE
TNY_TRANSPORT_ACCOUNT_ERROR_SEND_AUTHENTICATION_NOT_SUPPORTED
TNY_TRANSPORT_ACCOUNT_ERROR_SEND_USER_CANCEL
TNY_ACCOUNT_ERROR_TRY_CONNECT An error that occured while trying to connect to an account
TNY_ACCOUNT_ERROR_TRY_CONNECT_HOST_LOOKUP_FAILED
TNY_ACCOUNT_ERROR_TRY_CONNECT_SERVICE_UNAVAILABLE
TNY_ACCOUNT_ERROR_TRY_CONNECT_AUTHENTICATION_NOT_SUPPORTED
TNY_ACCOUNT_ERROR_TRY_CONNECT_CERTIFICATE
TNY_ACCOUNT_ERROR_TRY_CONNECT_USER_CANCEL
TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT
TNY_ACCOUNT_ERROR_GET_SUPPORTED_AUTH
TNY_SEND_QUEUE_ERROR_ADD
TNY_ACCOUNT_STORE_ERROR_CANCEL_ALERT
TNY_FOLDER_ERROR_REMOVE_MSGS

enum TnyAccountType

typedef enum  {
	TNY_ACCOUNT_TYPE_STORE,
	TNY_ACCOUNT_TYPE_TRANSPORT,
	TNY_ACCOUNT_TYPE_COMBINED
} TnyAccountType;

TNY_ACCOUNT_TYPE_STORE A account that can store folders and messages
TNY_ACCOUNT_TYPE_TRANSPORT A account that can send and messages (transfer them)
TNY_ACCOUNT_TYPE_COMBINED

enum TnyAccountSignal

typedef enum
{
	TNY_ACCOUNT_CONNECTION_STATUS_CHANGED,
	TNY_ACCOUNT_LAST_SIGNAL
} TnyAccountSignal;


enum TnyConnectionStatus

typedef enum {
        TNY_CONNECTION_STATUS_DISCONNECTED,
        TNY_CONNECTION_STATUS_DISCONNECTED_BROKEN,
        TNY_CONNECTION_STATUS_CONNECTED_BROKEN,
        TNY_CONNECTION_STATUS_CONNECTED,
        TNY_CONNECTION_STATUS_RECONNECTING,
        TNY_CONNECTION_STATUS_INIT
} TnyConnectionStatus;


enum TnyAccountStoreSignal

typedef enum {
	TNY_ACCOUNT_STORE_ACCOUNT_CHANGED,
	TNY_ACCOUNT_STORE_ACCOUNT_INSERTED,
	TNY_ACCOUNT_STORE_ACCOUNT_REMOVED,
	TNY_ACCOUNT_STORE_ACCOUNTS_RELOADED,
	TNY_ACCOUNT_STORE_CONNECTING_STARTED,
	TNY_ACCOUNT_STORE_CONNECTING_FINISHED,
	TNY_ACCOUNT_STORE_LAST_SIGNAL
} TnyAccountStoreSignal;

TNY_ACCOUNT_STORE_ACCOUNT_CHANGED An account has been changed
TNY_ACCOUNT_STORE_ACCOUNT_INSERTED An account was inserted
TNY_ACCOUNT_STORE_ACCOUNT_REMOVED An account was removed
TNY_ACCOUNT_STORE_ACCOUNTS_RELOADED The accounts got reloaded
TNY_ACCOUNT_STORE_CONNECTING_STARTED
TNY_ACCOUNT_STORE_CONNECTING_FINISHED
TNY_ACCOUNT_STORE_LAST_SIGNAL Number of signals

enum TnyAlertType

typedef enum  {
	TNY_ALERT_TYPE_INFO,
	TNY_ALERT_TYPE_WARNING,
	TNY_ALERT_TYPE_ERROR
} TnyAlertType;

TNY_ALERT_TYPE_INFO A informative alert
TNY_ALERT_TYPE_WARNING A warning alert
TNY_ALERT_TYPE_ERROR An error alert

enum TnyGetAccountsRequestType

typedef enum {
	TNY_ACCOUNT_STORE_TRANSPORT_ACCOUNTS,
	TNY_ACCOUNT_STORE_STORE_ACCOUNTS,
	TNY_ACCOUNT_STORE_BOTH
} TnyGetAccountsRequestType;

TNY_ACCOUNT_STORE_TRANSPORT_ACCOUNTS Get only the transport accounts
TNY_ACCOUNT_STORE_STORE_ACCOUNTS Get only the store accounts
TNY_ACCOUNT_STORE_BOTH Get both the transport and the store accounts

enum TnyDeviceSignal

typedef enum {
	TNY_DEVICE_CONNECTION_CHANGED,
	TNY_DEVICE_LAST_SIGNAL
} TnyDeviceSignal;

TNY_DEVICE_CONNECTION_CHANGED The connectivity status of the device changed
TNY_DEVICE_LAST_SIGNAL Number of signals

enum TnyFolderSignal

typedef enum {
	TNY_FOLDER_FOLDER_INSERTED,
	TNY_FOLDER_FOLDERS_RELOADED,
	TNY_FOLDER_LAST_SIGNAL
} TnyFolderSignal;

TNY_FOLDER_FOLDER_INSERTED A child-folder got inserted
TNY_FOLDER_FOLDERS_RELOADED The child-folders got reloaded
TNY_FOLDER_LAST_SIGNAL Number of signals

enum TnyFolderStoreQueryOption

typedef enum {
	TNY_FOLDER_STORE_QUERY_OPTION_SUBSCRIBED = 1<<0
	TNY_FOLDER_STORE_QUERY_OPTION_UNSUBSCRIBED = 1<<1,
	TNY_FOLDER_STORE_QUERY_OPTION_MATCH_ON_NAME = 1<<2,
	TNY_FOLDER_STORE_QUERY_OPTION_MATCH_ON_ID = 1<<3
} TnyFolderStoreQueryOption;

TNY_FOLDER_STORE_QUERY_OPTION_SUBSCRIBED Only subscribed folders will match this query
TNY_FOLDER_STORE_QUERY_OPTION_MATCH_ON_NAME Only folders that will match the pattern on folder name will match this query
TNY_FOLDER_STORE_QUERY_OPTION_MATCH_ON_ID Only folders that wil match the pattern on folder id will match this query

enum TnyHeaderFlags

typedef enum {
	TNY_HEADER_FLAG_ANSWERED = 1<<0,
	TNY_HEADER_FLAG_DELETED = 1<<1,
	TNY_HEADER_FLAG_DRAFT = 1<<2,
	TNY_HEADER_FLAG_FLAGGED = 1<<3,
	TNY_HEADER_FLAG_SEEN = 1<<4,
	TNY_HEADER_FLAG_ATTACHMENTS = 1<<5,
	TNY_HEADER_FLAG_CACHED = 1<<6,
	TNY_HEADER_FLAG_PARTIAL = 1<<7,
	TNY_HEADER_FLAG_EXPUNGED = 1<<8,
	TNY_HEADER_FLAG_PRIORITY = 1<<9|1<<10
} TnyHeaderFlags;

When defining new flags, please stay below 1<<12. Starting 1<<12 is being used internally (and you would overwrite that, which can cause severe defects like crashes and memory leaks). You are rather advised not to add any new flags unless there is really no other way to achieve what you are trying to do (and then still, consider talking to the tinymail framework developers about simply getting your "special" cool flag added to tinymail itself).

TNY_HEADER_FLAG_ANSWERED The messages was answered
TNY_HEADER_FLAG_DELETED The messages is deleted, launching the expunge will wipe it
TNY_HEADER_FLAG_DRAFT The message is a draft
TNY_HEADER_FLAG_FLAGGED The message is flagged
TNY_HEADER_FLAG_SEEN The message is seen
TNY_HEADER_FLAG_ATTACHMENTS The message has attachments
TNY_HEADER_FLAG_CACHED The message is cached
TNY_HEADER_FLAG_PARTIAL The message is retrieved partially
TNY_HEADER_FLAG_EXPUNGED The message got expunged and therefore is the header instance invalid
TNY_HEADER_FLAG_PRIORITY Priority information is available, use the TnyHeaderPriorityFlags type as mask

enum TnyHeaderPriorityFlags

typedef enum {
	TNY_HEADER_FLAG_HIGH_PRIORITY = 1<<9|1<<10,
	TNY_HEADER_FLAG_NORMAL_PRIORITY = 0<<9|0<<10,
	TNY_HEADER_FLAG_LOW_PRIORITY = 0<<9|1<<10,
	TNY_HEADER_FLAG_SUSPENDED_PRIORITY = 1<<9|0<<10
} TnyHeaderPriorityFlags;


enum TnyFolderType

typedef enum {
	TNY_FOLDER_TYPE_UNKNOWN,
	TNY_FOLDER_TYPE_NORMAL,
	TNY_FOLDER_TYPE_INBOX,
	TNY_FOLDER_TYPE_OUTBOX,
	TNY_FOLDER_TYPE_TRASH,
	TNY_FOLDER_TYPE_JUNK,
	TNY_FOLDER_TYPE_SENT,
	TNY_FOLDER_TYPE_ROOT,
	TNY_FOLDER_TYPE_NOTES,
	TNY_FOLDER_TYPE_DRAFTS,
	TNY_FOLDER_TYPE_CONTACTS,
	TNY_FOLDER_TYPE_CALENDAR,
	TNY_FOLDER_TYPE_ARCHIVE,
	TNY_FOLDER_TYPE_MERGE,
	TNY_FOLDER_TYPE_NUM
} TnyFolderType;

TNY_FOLDER_TYPE_UNKNOWN The type is unknown
TNY_FOLDER_TYPE_NORMAL The folder type is a normal folder
TNY_FOLDER_TYPE_INBOX The folder type is a INBOX folder
TNY_FOLDER_TYPE_OUTBOX The folder type is an OUTBOX folder
TNY_FOLDER_TYPE_TRASH The folder type is a TRASH folder
TNY_FOLDER_TYPE_JUNK The folder type is a JUNK folder
TNY_FOLDER_TYPE_SENT The folder type is a SENT folder
TNY_FOLDER_TYPE_ROOT The folder type is a TnyAccount that contains this folder (used for the TnyGtkAccountTreeModel)
TNY_FOLDER_TYPE_NOTES
TNY_FOLDER_TYPE_DRAFTS
TNY_FOLDER_TYPE_CONTACTS
TNY_FOLDER_TYPE_CALENDAR
TNY_FOLDER_TYPE_ARCHIVE
TNY_FOLDER_TYPE_MERGE
TNY_FOLDER_TYPE_NUM

enum TnySendQueueSignal

typedef enum 
{
	TNY_SEND_QUEUE_MSG_SENDING,
	TNY_SEND_QUEUE_MSG_SENT,
	TNY_SEND_QUEUE_ERROR_HAPPENED,
	TNY_SEND_QUEUE_LAST_SIGNAL
} TnySendQueueSignal;


enum TnyStoreAccountSignal

typedef enum
{
	TNY_STORE_ACCOUNT_SUBSCRIPTION_CHANGED,
	TNY_STORE_ACCOUNT_LAST_SIGNAL
} TnyStoreAccountSignal;

See Also

TnyHeader, TnyAccountStore, TnyAccount, TnyDevice, TnyFolder, TnyFolderStore