Gjsify LogoGjsify Logo

Index

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

Type Aliases

_block_t: number
_hash_t: number
_key_t: number

Variables

AI_CANONNAME: number
AI_NUMERICHOST: number
BLOCK_SIZE: number
BLOCK_SIZE_BITS: number
CIPHER_CERT_INFO_PROPERTY_PHOTO_FILENAME: string

Name of the photo-filename property which can be stored on a #CamelCipherCertInfo.

CIPHER_CERT_INFO_PROPERTY_SIGNERS_ALT_EMAILS: string

A string containing a list of email addresses of all signers including their alternative emails. Use camel_address_unformat() to break them back into separate addresses. This can be set only on the first signer of the first validity, even the addresses can belong to a different signer.

DB_FILE: string
DB_FREE_CACHE_SIZE: number
DB_IN_MEMORY_DB: string
DB_IN_MEMORY_TABLE: string
DB_IN_MEMORY_TABLE_LIMIT: number
DB_SLEEP_INTERVAL: number
DEBUG_IMAP: string
DEBUG_IMAP_FOLDER: string
DOT_LOCK_REFRESH: number
EAI_ADDRFAMILY: number
EAI_AGAIN: number
EAI_BADFLAGS: number
EAI_FAIL: number
EAI_FAMILY: number
EAI_MEMORY: number
EAI_NODATA: number
EAI_NONAME: number
EAI_OVERFLOW: number
EAI_SERVICE: number
EAI_SOCKTYPE: number
EAI_SYSTEM: number
EDS_CAMEL_PROVIDER_DIR: string

This environment variable configures where the camel provider modules are loaded from.

FOLDER_TYPE_BIT: number

The folder type bitshift value.

FOLDER_TYPE_MASK: number

The folder type mask value.

FOLD_MAX_SIZE: number
FOLD_SIZE: number
INDEX_DELETED: number
KEY_TABLE_MAX_KEY: number
LOCK_DELAY: number
LOCK_DOT_DELAY: number
LOCK_DOT_RETRY: number
LOCK_DOT_STALE: number
LOCK_RETRY: number
MESSAGE_DATE_CURRENT: number
MESSAGE_SYSTEM_MASK: number
MIME_YDECODE_STATE_BEGIN: number
MIME_YDECODE_STATE_DECODE: number
MIME_YDECODE_STATE_END: number
MIME_YDECODE_STATE_EOLN: number
MIME_YDECODE_STATE_ESCAPE: number
MIME_YDECODE_STATE_INIT: number
MIME_YDECODE_STATE_PART: number
MIME_YENCODE_CRC_INIT: number
MIME_YENCODE_STATE_INIT: number
NI_DGRAM: number
NI_NAMEREQD: number
NI_NOFQDN: number
NI_NUMERICHOST: number
NI_NUMERICSERV: number
O_BINARY: number
RECIPIENT_TYPE_BCC: string
RECIPIENT_TYPE_CC: string
RECIPIENT_TYPE_RESENT_BCC: string
RECIPIENT_TYPE_RESENT_CC: string
RECIPIENT_TYPE_RESENT_TO: string
RECIPIENT_TYPE_TO: string
SESSION_BOOK_UID_ANY: string

Can be used with camel_session_addressbook_contains_sync() as the book UID, meaning to check in all configured address books.

SESSION_BOOK_UID_COMPLETION: string

Can be used with camel_session_addressbook_contains_sync() as the book UID, meaning to check in all address books enabled for auto-completion.

STORE_INFO_FOLDER_TYPE_BIT: number

The folder store info type bitshift value.

STORE_INFO_FOLDER_TYPE_MASK: number

The folder store info type mask value.

STORE_INFO_FOLDER_UNKNOWN: number
STORE_SETUP_ARCHIVE_FOLDER: string
STORE_SETUP_DRAFTS_FOLDER: string
STORE_SETUP_SENT_FOLDER: string
STORE_SETUP_TEMPLATES_FOLDER: string
UNMATCHED_NAME: string
URL_HIDE_ALL: number
URL_PART_AUTH: number
URL_PART_HIDDEN: number
URL_PART_HOST: number
URL_PART_NEED: number
URL_PART_PASSWORD: number
URL_PART_PATH: number
URL_PART_PATH_DIR: number
URL_PART_PORT: number
URL_PART_USER: number
UTILS_MAX_USER_HEADERS: number
UUDECODE_STATE_MASK: number
VJUNK_NAME: string
VTRASH_NAME: string

Functions

  • Thread safe variant of g_object_bind_property(). See its documentation for more information on arguments and return value.

    Parameters

    • source: GObject.Object

      the source #GObject

    • sourceProperty: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • targetProperty: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    Returns Binding

  • Thread safe variant of g_object_bind_property_with_closures(). See its documentation for more information on arguments and return value.

    Parameters

    • source: GObject.Object

      the source #GObject

    • sourceProperty: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • targetProperty: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    • transformTo: TClosure<any, any>

      a #GClosure wrapping the transformation function from the source to the target, or %NULL to use the default

    • transformFrom: TClosure<any, any>

      a #GClosure wrapping the transformation function from the target to the source, or %NULL to use the default

    Returns Binding

  • charsetBest(in_: number[]): string | null
  • Finds the minimum charset for this string NULL means US-ASCII.

    Parameters

    • in_: number[]

      input text

    Returns string | null

  • charsetIsoToWindows(isocharset: string): string
  • cipherCanLoadPhotos(): boolean
  • Writes a part to a stream in a canonicalised format, suitable for signing/encrypting.

    The transfer encoding paramaters for the part may be changed by this function.

    Parameters

    • part: MimePart

      Part to write.

    • flags: number

      flags for the canonicalisation filter (CamelMimeFilterCanon)

    • ostream: Camel.Stream

      stream to write canonicalised output to.

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns number

  • cipherCertinfoGetProperty(certInfo: CipherCertInfo, name: string): object | null
  • Gets a named property name value for the given cert_info.

    Parameters

    • certInfo: CipherCertInfo

      a #CamelCipherCertInfo

    • name: string

      a property name

    Returns object | null

  • Sets a named property name value value for the given cert_info. If the value is %NULL, then the property is removed. With a non-%NULL value also value_free and value_clone functions cannot be %NULL.

    Parameters

    • certInfo: CipherCertInfo

      a #CamelCipherCertInfo

    • name: string

      a property name

    • value: object

      a property value, or %NULL

    • valueClone: CipherCloneFunc

      a clone function for the value

    Returns void

  • contentTransferEncodingDecode(in_: string): string
  • debug(mode: string): boolean
  • Check to see if a debug mode is activated. mode takes one of two forms, a fully qualified 'module:target', or a wildcard 'module' name. It returns a boolean to indicate if the module or module and target is currently activated for debug output.

    Parameters

    • mode: string

      string name of the mode to check for

    Returns boolean

  • Demangles bt, possibly got from camel_debug_get_raw_backtrace(), by replacing addresses with actual function calls and eventually line numbers, if available. It modifies lines of bt, but skips those it cannot parse.

    Note: Getting backtraces only works if the library was configured with --enable-backtraces.

    See also camel_debug_get_raw_backtrace()

    Parameters

    • bt: GLib.String

      a #GString with a raw backtrace, or %NULL

    Returns GLib.String | null

  • debugEnd(): void
  • Call this when you're done with your debug output. If and only if you called camel_debug_start, and if it returns TRUE.

    Returns void

  • Gets current raw backtrace leading to this function call. This is quicker than camel_debug_get_backtrace(), because it doesn't demangle the backtrace. To demangle it (replace addresses with actual function calls and eventually line numbers, if available) call camel_debug_demangle_backtrace().

    Returns GLib.String | null

  • debugInit(): void
  • Init camel debug.

    CAMEL_DEBUG is set to a comma separated list of modules to debug. The modules can contain module-specific specifiers after a ':', or just act as a wildcard for the module or even specifier. e.g. 'imap' for imap debug, or 'imap:folder' for imap folder debug. Additionaly, ':folder' can be used for a wildcard for any folder operations.

    Returns void

  • debugRefUnrefDumpBacktraces(): void
  • Prints current backtraces stored with camel_debug_ref_unref_push_backtrace() or with camel_debug_ref_unref_push_backtrace_for_object().

    It's usually not needed to use this function, as the left backtraces, if any, are printed at the end of the application.

    Returns void

  • debugRefUnrefPushBacktrace(backtrace: GLib.String, objectRefCount: number): void
  • Adds this backtrace into the set of backtraces related to some object reference counting issues debugging. This is usually called inside g_object_ref() and g_object_unref(). If the backtrace corresponds to a g_object_unref() call, and a corresponding g_object_ref() backtrace is found in the current list, then the previous backtrace is removed and this one is skipped.

    Any left backtraces in the list are printed at the application end.

    A convenient function camel_debug_ref_unref_push_backtrace_for_object() is provided too.

    Parameters

    • backtrace: GLib.String

      a backtrace to push, taken from camel_debug_get_backtrace()

    • objectRefCount: number

      the current object reference count when the push is done

    Returns void

  • debugRefUnrefPushBacktraceForObject(object: object): void
  • Gets current backtrace of this call and adds it to the list of backtraces with camel_debug_ref_unref_push_backtrace().

    Usual usage would be, once GNOME bug 758358 is applied to the GLib sources, or a patched GLib is used, to call this function in an object init() function, like this:

    static void my_object_init (MyObject *obj) { camel_debug_ref_unref_push_backtrace_for_object (obj); g_track_object_ref_unref (obj, (GFunc) camel_debug_ref_unref_push_backtrace_for_object, NULL); }

    Note that the g_track_object_ref_unref() can track only one pointer, thus make sure you track the right one (add some logic if multiple objects are created at once).

    Parameters

    • object: object

      a #GObject, for which add the backtrace

    Returns void

  • debugStart(mode: string): boolean
  • Start debug output for a given mode, used to make sure debug output is output atomically and not interspersed with unrelated stuff.

    Parameters

    • mode: string

      string name of the mode to start the debug for

    Returns boolean

  • Convert in from text/plain into text/enriched or text/richtext based on flags.

    Parameters

    Returns string

  • fileUtilDecodeFixedInt32(in_: object, dest: number): number
  • Retrieve a gint32.

    Parameters

    • in_: object

      file to read from

    • dest: number

      pointer to a variable to store the value in

    Returns number

  • fileUtilDecodeFixedString(in_: object, str: string, len: number): number
  • Decode a normal string from the input file.

    Parameters

    • in_: object

      file to read from

    • str: string

      pointer to a variable to store the value in

    • len: number

      total-len to decode.

    Returns number

  • fileUtilDecodeGsize(in_: object, dest: number): number
  • Decode an gsize type.

    Parameters

    • in_: object

      file to read from

    • dest: number

      pointer to a variable to put the value in

    Returns number

  • fileUtilDecodeOffT(in_: object, dest: number): number
  • Decode an off_t type.

    Parameters

    • in_: object

      file to read from

    • dest: number

      pointer to a variable to put the value in

    Returns number

  • fileUtilDecodeString(in_: object, str: string): number
  • Decode a normal string from the input file.

    Parameters

    • in_: object

      file to read from

    • str: string

      pointer to a variable to store the value in

    Returns number

  • fileUtilDecodeTimeT(in_: object, dest: number): number
  • Decode a time_t value.

    Parameters

    • in_: object

      file to read from

    • dest: number

      pointer to a variable to store the value in

    Returns number

  • fileUtilDecodeUint32(in_: object, dest: number): number
  • Retrieve an encoded uint32 from a file.

    Parameters

    • in_: object

      file to read from

    • dest: number

      pointer to a variable to store the value in

    Returns number

  • fileUtilEncodeFixedInt32(out: object, value: number): number
  • Encode a gint32, performing no compression, but converting to network order.

    Parameters

    • out: object

      file to output to

    • value: number

      value to output

    Returns number

  • fileUtilEncodeFixedString(out: object, str: string, len: number): number
  • Encode a normal string and save it in the output file. Unlike camel_file_util_encode_string, it pads the str with "NULL" bytes, if len is > strlen(str)

    Parameters

    • out: object

      file to output to

    • str: string

      value to output

    • len: number

      total-len of str to store

    Returns number

  • fileUtilEncodeGsize(out: object, value: number): number
  • Encode an gsize type.

    Parameters

    • out: object

      file to output to

    • value: number

      value to output

    Returns number

  • fileUtilEncodeOffT(out: object, value: number): number
  • Encode an off_t type.

    Parameters

    • out: object

      file to output to

    • value: number

      value to output

    Returns number

  • fileUtilEncodeString(out: object, str: string): number
  • Encode a normal string and save it in the output file.

    Parameters

    • out: object

      file to output to

    • str: string

      value to output

    Returns number

  • fileUtilEncodeTimeT(out: object, value: number): number
  • Encode a time_t value to the file.

    Parameters

    • out: object

      file to output to

    • value: number

      value to output

    Returns number

  • fileUtilEncodeUint32(out: object, value: number): number
  • Utility function to save an uint32 to a file.

    Parameters

    • out: object

      file to output to

    • value: number

      value to output

    Returns number

  • fileUtilSafeFilename(name: string): string
  • 'Flattens' name into a safe filename string by hex encoding any chars that may cause problems on the filesystem.

    Parameters

    • name: string

      string to 'flattened' into a safe filename

    Returns string

  • fileUtilSavename(filename: string): string
  • Builds a pathname where the basename is of the form ".#" + the basename of filename, for instance used in a two-stage commit file write.

    Parameters

    • filename: string

      a pathname

    Returns string

  • folderErrorQuark(): Quark
  • folderInfoBuild(folders: FolderInfo[], namespace: string, separator: number, shortNames: boolean): FolderInfo
  • This takes an array of folders and attaches them together according to the hierarchy described by their full_names and separator. If namespace_ is non-%NULL, then it will be ignored as a full_name prefix, for purposes of comparison. If necessary, camel_folder_info_build() will create additional #CamelFolderInfo with %NULL urls to fill in gaps in the tree. The value of short_names is used in constructing the names of these intermediate folders.

    Parameters

    • folders: FolderInfo[]

      an array of #CamelFolderInfo

    • namespace: string

      an ignorable prefix on the folder names

    • separator: number

      the hieararchy separator character

    • shortNames: boolean

      %TRUE if the (short) name of a folder is the part after the last separator in the full name. %FALSE if it is the full name.

    Returns FolderInfo

  • freeaddrinfo(host: object): void
  • Frees a structure returned with camel_getaddrinfo(). It does nothing when the host is %NULL.

    Parameters

    • host: object

      a host address information structure to free, or %NULL

    Returns void

  • getaddrinfo(name: string, service: string, hints: object, cancellable: Gio.Cancellable): object | null
  • Resolves a host name and returns an information about its address.

    Parameters

    • name: string

      an address name to resolve

    • service: string

      a service name to use

    • hints: object

      an #addrinfo hints, or %NULL

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns object | null

  • headerAddressFold(in_: string, headerlen: number): string
  • TODO: Document me.

    Parameters

    • addrlistp: HeaderAddress[]

      a NULL-terminated list of #CamelHeaderAddress objects

    • addrs: HeaderAddress[]

      a NULL-terminated list of #CamelHeaderAddress to add

    Returns void

  • headerContentidDecode(in_: string): string
  • Extract a content-id from in.

    Parameters

    • in_: string

      input string

    Returns string

  • headerDecodeDate(str: string, tzOffset: number): number
  • Decodes the rfc822 date string and saves the GMT offset into tz_offset if non-NULL.

    Parameters

    • str: string

      input date string

    • tzOffset: number

      timezone offset

    Returns number

  • headerDecodeInt(in_: string): number
  • Extracts an integer token from in and updates the pointer to point to after the end of the integer token (sort of like strtol).

    Parameters

    • in_: string

      pointer to input string

    Returns number

  • headerDecodeString(in_: string, defaultCharset: string): string
  • Decodes rfc2047 encoded-word tokens

    Parameters

    • in_: string

      input header value string

    • defaultCharset: string

      default charset to use if improperly encoded

    Returns string

  • headerEncodePhrase(in_: number): string
  • Encodes a 'phrase' header according to the rules in rfc2047.

    Parameters

    • in_: number

      header to encode

    Returns string

  • headerEncodeString(in_: number): string
  • Encodes a 'text' header according to the rules of rfc2047.

    Parameters

    • in_: number

      input string

    Returns string

  • headerFold(in_: string, headerlen: number): string
  • headerFormatCtext(in_: string, defaultCharset: string): string
  • Decodes a header which contains rfc2047 encoded-word tokens that may or may not be within a comment.

    Parameters

    • in_: string

      input header value string

    • defaultCharset: string

      default charset to use if improperly encoded

    Returns string

  • headerFormatDate(date: number, tzOffset: number): string
  • Allocates a string buffer containing the rfc822 formatted date string represented by time and tz_offset.

    Parameters

    • date: number

      time_t date representation

    • tzOffset: number

      Timezone offset

    Returns string

  • headerLocationDecode(in_: string): string
  • headerMimeDecode(in_: string, maj: number, min: number): void
  • headerMsgidDecode(in_: string): string
  • Extract a message-id token from in.

    Parameters

    • in_: string

      input string

    Returns string

  • headerMsgidGenerate(domain: string): string
  • Either the domain is used, or the user's local hostname, in case it's %NULL or empty.

    Parameters

    • domain: string

      domain to use (like "example.com") for the ID suffix; can be %NULL

    Returns string

  • headerNewsgroupsDecode(in_: string): string[]
  • headerParam(params: object, name: string): string
  • Searches params for a param named name and gets the value.

    Parameters

    • params: object

      parameters

    • name: string

      name of param to find

    Returns string

  • headerParamListDecode(in_: string): object | null
  • headerParamListFormat(params: object): string
  • headerParamListFormatAppend(out: GLib.String, params: object): void
  • headerParamListFree(params: object): void
  • Free the list of params.

    Parameters

    • params: object

      a list of params

    Returns void

  • headerReferencesDecode(in_: string): string[]
  • Generate a list of references, from most recent up.

    Parameters

    • in_: string

      References header value

    Returns string[]

  • headerSetParam(paramsp: object, name: string, value: string): object | null
  • Set a parameter in the list.

    Parameters

    • paramsp: object

      poinetr to a list of params

    • name: string

      name of param to set

    • value: string

      value to set

    Returns object | null

  • headerTokenDecode(in_: string): string
  • Gets the first token in the string according to the rules of rfc0822.

    Parameters

    • in_: string

      input string

    Returns string

  • headerUnfold(in_: string): string
  • Searches for a mailing list information among known headers and returns a newly allocated string with its value.

    Parameters

    Returns string | null

  • hostIdnaToAscii(host: string): string | null
  • Converts IDN (Internationalized Domain Name) into ASCII representation. If there's a failure or the host has only ASCII letters, then a copy of host is returned.

    Parameters

    • host: string

      Host name, with or without non-ascii letters in utf8

    Returns string | null

  • hostnameUtilsRequiresAscii(hostname: string): boolean
  • Check whether the hostname requires conversion to ASCII. That can be when a character in it can look like an ASCII character, even it being a Unicode letter. This can be used to display host names in a way of invulnerable to IDN homograph attacks.

    Parameters

    • hostname: string

      a host name

    Returns boolean

  • iconvCharsetLanguage(charset: string): string
  • iconvCharsetName(charset: string): string
  • iconvLocaleCharset(): string
  • iconvLocaleLanguage(): string
  • init(certdbDir: string, nssInit: boolean): number
  • localtimeWithOffset(tt: number, tm: object, offset: number): void
  • Converts the calendar time representation tt to a broken-down time representation, stored in tm, and provides the offset in seconds from UTC time, stored in offset.

    Parameters

    • tt: number

      the #time_t to convert

    • tm: object

      the #tm to store the result in

    • offset: number

      the #gint to store the offset in

    Returns void

  • lockDot(path: string): number
  • Create an exclusive lock using .lock semantics. All locks are equivalent to write locks (exclusive).

    The function does nothing and returns success (zero), when dot locking had not been compiled.

    Parameters

    • path: string

      a path to lock

    Returns number

  • lockFcntl(fd: number, type: LockType): number
  • Create a lock using fcntl(2).

    type is CAMEL_LOCK_WRITE or CAMEL_LOCK_READ, to create exclusive or shared read locks

    The function does nothing and returns success (zero), when fcntl locking had not been compiled.

    Parameters

    • fd: number

      a file descriptor

    • type: LockType

      a #CamelLockType

    Returns number

  • lockFlock(fd: number, type: LockType): number
  • Create a lock using flock(2).

    type is CAMEL_LOCK_WRITE or CAMEL_LOCK_READ, to create exclusive or shared read locks

    The function does nothing and returns success (zero), when flock locking had not been compiled.

    Parameters

    • fd: number

      a file descriptor

    • type: LockType

      a #CamelLockType

    Returns number

  • lockFolder(path: string, fd: number, type: LockType): number
  • Attempt to lock a folder, multiple attempts will be made using all locking strategies available.

    Parameters

    • path: string

      Path to the file to lock (used for .locking only).

    • fd: number

      Open file descriptor of the right type to lock.

    • type: LockType

      Type of lock, CAMEL_LOCK_READ or CAMEL_LOCK_WRITE.

    Returns number

  • lockHelperLock(path: string): number
  • lockHelperUnlock(lockid: number): number
  • mktimeUtc(tm: object): number
  • Like mktime(3), but assumes UTC instead of local timezone.

    Parameters

    • tm: object

      the #tm to convert to a calendar time representation

    Returns number

  • movemail(source: string, dest: string): number
  • This copies an mbox file from a shared directory with multiple readers and writers into a private (presumably Camel-controlled) directory. Dot locking is used on the source file (but not the destination).

    Parameters

    • source: string

      source file

    • dest: string

      destination file

    Returns number

  • pointerTrackerDump(): void
  • Prints information about currently stored pointers in the pointer tracker. This is called automatically on application exit if camel_pointer_tracker_track() or camel_pointer_tracker_track_with_info() was called.

    Note: If the library is configured with --enable-backtraces, then also backtraces where the pointer was added is printed in the summary.

    Returns void

  • pointerTrackerTrackWithInfo(ptr: object, info: string): void
  • Adds pointer to the pointer tracker, with associated information, which is printed in summary of pointer tracker printed by camel_pointer_tracker_dump(). For convenience can be used camel_pointer_tracker_track(), which adds place of the caller as info. Added pointer should be removed with pair function camel_pointer_tracker_untrack().

    Parameters

    • ptr: object

      pointer to add to the pointer tracker

    • info: string

      info to print in tracker summary

    Returns void

  • pointerTrackerUntrack(ptr: object): void
  • Removes pointer from the pointer tracker. It's an error to try to remove pointer which was not added to the tracker by camel_pointer_tracker_track() or camel_pointer_tracker_track_with_info(), or a pointer which was already removed.

    Parameters

    • ptr: object

      pointer to remove from the tracker

    Returns void

  • Returns the registered #CamelProvider for protocol, loading it from disk if necessary. If no #CamelProvider can be found for protocol, or the provider module fails to load, the function sets error and returns %NULL.

    The returned #CamelProvider is owned by Camel and should not be modified or freed.

    Parameters

    • protocol: string

      a #CamelProvider protocol name

    Returns Camel.Provider

  • providerInit(): void
  • Initialize the Camel provider system by reading in the .urls files in the provider directory and creating a hash table mapping URLs to module names.

    A .urls file has the same initial prefix as the shared library it correspond to, and consists of a series of lines containing the URL protocols that that library handles.

    TODO: This should be pathed? TODO: This should be plugin-d?

    Returns void

  • This returns a list of available providers. If load is %TRUE, it will first load in all available providers that haven't yet been loaded.

    Free the returned list with g_list_free(). The #CamelProvider structs in the list are owned by Camel and should not be modified or freed.

    Parameters

    • load: boolean

      whether or not to load in providers that are not already loaded

    Returns Camel.Provider[]

  • providerLoad(path: string): boolean
  • Loads the provider at path, and calls its initialization function, passing session as an argument. The provider should then register itself with session.

    Parameters

    • path: string

      the path to a shared library

    Returns boolean

  • providerModuleInit(): void
  • pstringAdd(string: string, own: boolean): string | null
  • Add string to the pool.

    The %NULL and empty strings are special cased to constant values.

    Unreference the returned string with camel_pstring_free().

    Parameters

    • string: string

      string to add to the string pool

    • own: boolean

      whether the string pool will own the memory pointed to by string, if string is not yet in the pool

    Returns string | null

  • pstringContains(string: string): boolean
  • Returns whether the string exists in the string pool.

    The %NULL and empty strings are special cased to constant values.

    Parameters

    • string: string

      string to look up in the string pool

    Returns boolean

  • pstringDumpStat(): void
  • Dumps to stdout memory statistic about the string pool.

    Returns void

  • pstringFree(string: string): void
  • Unreferences a pooled string. If the string's reference count drops to zero it will be deallocated. %NULL and the empty string are special cased.

    Parameters

    • string: string

      string to free

    Returns void

  • pstringPeek(string: string): string | null
  • Returns the canonicalized copy of string without increasing its reference count in the string pool. If necessary, string is first added to the string pool.

    The %NULL and empty strings are special cased to constant values.

    Parameters

    • string: string

      string to fetch from the string pool

    Returns string | null

  • pstringStrdup(string: string): string | null
  • Create a new pooled string entry for strings. A pooled string is a table where common strings are canonicalized. They are also reference counted and freed when no longer referenced.

    The %NULL and empty strings are special cased to constant values.

    Unreference the returned string with camel_pstring_free().

    Parameters

    • string: string

      string to copy

    Returns string | null

  • quotedDecodeStep(in_: Uint8Array, out: Uint8Array, saveme: number[]): [number, Uint8Array, number[]]
  • Decodes a block of quoted-printable encoded data. Performs a 'decode step' on a chunk of QP encoded data.

    Parameters

    • in_: Uint8Array

      input stream

    • out: Uint8Array

      output stream

    • saveme: number[]

      leftover bits that have not yet been decoded

    Returns [number, Uint8Array, number[]]

  • quotedEncodeClose(in_: Uint8Array, out: Uint8Array, save: number[]): [number, Uint8Array, number[]]
  • Quoted-printable encodes a block of text. Call this when finished encoding data with camel_quoted_encode_step() to flush off the last little bit.

    Parameters

    • in_: Uint8Array

      input stream

    • out: Uint8Array

      output string

    • save: number[]

      leftover bits that have not yet been encoded

    Returns [number, Uint8Array, number[]]

  • quotedEncodeStep(in_: Uint8Array, out: Uint8Array, save: number[]): [number, Uint8Array, number[]]
  • Quoted-printable encodes a block of text. Performs an 'encode step', saves left-over state in state and save (initialise to -1 on first invocation).

    Parameters

    • in_: Uint8Array

      input stream

    • out: Uint8Array

      output string

    • save: number[]

      leftover bits that have not yet been encoded

    Returns [number, Uint8Array, number[]]

  • read(fd: number, buf: string, n: number, cancellable: Gio.Cancellable): number
  • Cancellable libc read() replacement.

    Code that intends to be portable to Win32 should call this function only on file descriptors returned from open(), not on sockets.

    Parameters

    • fd: number

      file descriptor

    • buf: string

      buffer to fill

    • n: number

      number of bytes to read into buf

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns number

  • searchCamelHeaderSoundex(header: string, match: string): boolean
  • searchGetAllHeadersDecoded(message: MimeMessage): string
  • searchGetDefaultCharsetFromMessage(message: MimeMessage): string
  • searchGetHeaderDecoded(headerName: string, headerValue: string, defaultCharset: string): string
  • Decodes header_value, if needed, either from an address header or the Subject header. Other header_name headers are returned as is.

    Parameters

    • headerName: string

      the header name

    • headerValue: string

      the header value

    • defaultCharset: string

      the default charset to use for the decode, or %NULL

    Returns string

  • searchGetHeadersDecoded(headers: NameValueArray, defaultCharset: string): string
  • searchHeaderIsAddress(headerName: string): boolean
  • searchWordsFree(words: object): void
  • searchWordsSimple(words: object): object | null
  • searchWordsSplit(in_: number): object | null
  • serviceErrorQuark(): Quark
  • shutdown(): void
  • Set a specific string on the info.

    Parameters

    • summary: StoreSummary

      a #CamelStoreSummary object

    • info: StoreInfo

      a #CamelStoreInfo

    • type: number

      specific string being set

    • value: string

      string value to set

    Returns void

  • strcaseEqual(a: object, b: object): number
  • strcaseHash(v: object): number
  • strdown(str: string): string
  • stringIsAllAscii(str: string): boolean
  • strstrcase(haystack: string, needle: string): string
  • Find the state of the flag name in flags.

    Parameters

    • flags: Camel.MessageFlags

      bitwise system flags

    • name: string

      name of the flag to check for

    Returns boolean

  • Convert in from plain text into HTML.

    Parameters

    • in_: string

      input text

    • flags: MimeFilterToHTMLFlags

      bitwise flags defining the html conversion behaviour

    • color: number

      color to use when syntax highlighting

    Returns string

  • timeValueApply(srcTime: number, unit: Camel.TimeUnit, value: number): number
  • Applies the given time value in unit unit to the src_time. Use negative value to subtract it. The time part is rounded to the beginning of the day.

    Parameters

    • srcTime: number

      a time_t to apply the value to, or -1 to use the current time

    • unit: Camel.TimeUnit

      a #CamelTimeUnit

    • value: number

      a value to apply

    Returns number

  • ucs2Utf8(ptr: string): string
  • Convert a ucs2 string into a UTF-8 one. The ucs2 string is treated as network byte ordered, and terminated with a 16-bit %NULL.

    Parameters

    • ptr: string

      a ucs2 string to convert

    Returns string

  • uidCacheFreeUids(uids: string[]): void
  • Frees the array of UIDs.

    Parameters

    • uids: string[]

      an array returned from camel_uid_cache_get_new_uids()

    Returns void

  • unlockDot(path: string): void
  • Attempt to unlock a .lock lock.

    The function does nothing, when dot locking had not been compiled.

    Parameters

    • path: string

      a path to unlock

    Returns void

  • unlockFcntl(fd: number): void
  • Unlock an fcntl lock.

    The function does nothing, when fcntl locking had not been compiled.

    Parameters

    • fd: number

      a file descriptor

    Returns void

  • unlockFlock(fd: number): void
  • Unlock an flock lock.

    The function does nothing, when flock locking had not been compiled.

    Parameters

    • fd: number

      a file descriptor

    Returns void

  • unlockFolder(path: string, fd: number): void
  • Free a lock on a folder.

    Parameters

    • path: string

      Filename of folder.

    • fd: number

      Open descrptor on which locks were placed.

    Returns void

  • urlAddrspecEnd(in_: string, pos: string, inend: string, match: UrlMatch): boolean
  • urlAddrspecStart(in_: string, pos: string, inend: string, match: UrlMatch): boolean
  • urlDecode(part: string): void
  • %-decodes the passed-in URL in place. The decoded version is never longer than the encoded version, so there does not need to be any additional space at the end of the string.

    Parameters

    • part: string

      a URL part

    Returns void

  • urlDecodePath(path: string): string
  • urlEncode(part: string, escapeExtra: string): string
  • This %-encodes the given URL part and returns the escaped version in allocated memory, which the caller must free when it is done.

    Parameters

    • part: string

      a URL part

    • escapeExtra: string

      additional characters beyond " "%#<>{}|^[]`" to escape (or %NULL)

    Returns string

  • urlFileEnd(in_: string, pos: string, inend: string, match: UrlMatch): boolean
  • urlFileStart(in_: string, pos: string, inend: string, match: UrlMatch): boolean
  • urlWebEnd(in_: string, pos: string, inend: string, match: UrlMatch): boolean
  • urlWebStart(in_: string, pos: string, inend: string, match: UrlMatch): boolean
  • ustrstrcase(haystack: string, needle: string): string
  • utf7Utf8(ptr: string): string
  • Convert a modified UTF-7 string to UTF-8. If the UTF-7 string contains 8 bit characters, they are treated as iso-8859-1.

    The IMAP rules [rfc2060] are used in the UTF-7 encoding.

    Parameters

    • ptr: string

      a UTF-7 string to convert

    Returns string

  • utf8Getc(ptr: number): [number, number]
  • Get a Unicode character from a UTF-8 stream. ptr will be advanced to the next character position. Invalid utf8 characters will be silently skipped. The ptr should point to a NUL terminated array.

    Parameters

    • ptr: number

      a pointer to read the character from

    Returns [number, number]

  • utf8GetcLimit(ptr: number, end: number): [number, number]
  • Get the next UTF-8 gchar at ptr, and return it, advancing ptr to the next character. If end is reached before a full UTF-8 character can be read, then the invalid Unicode gchar 0xffff is returned as a sentinel (Unicode 3.1, section 2.7), and ptr is not advanced.

    Parameters

    • ptr: number

      a pointer to read the character from

    • end: number

      upper limit for the read, must not be %NULL

    Returns [number, number]

  • utf8MakeValid(text: string): string
  • Ensures the returned text will be valid UTF-8 string, with incorrect letters changed to question marks.

    Parameters

    • text: string

      a text to make valid

    Returns string

  • utf8MakeValidLen(text: string, textLen: number): string
  • Ensures the returned text will be valid UTF-8 string, with incorrect letters changed to question marks.

    Parameters

    • text: string

      a text to make valid

    • textLen: number

      length of the text, or -1 if NUL-terminated

    Returns string

  • utf8Putc(ptr: number, c: number): number
  • Output a 32 bit unicode character as UTF-8 octets. At most 4 octets will be written to ptr. The ptr will be advanced to the next character position.

    Parameters

    • ptr: number

      pointer to write the character to

    • c: number

      a Unicode character to write

    Returns number

  • utf8Ucs2(ptr: string): string
  • Convert a UTF-8 string into a ucs2 one. The ucs string will be in network byte order, and terminated with a 16-bit %NULL.

    Parameters

    • ptr: string

      a UTF-8 string to convert

    Returns string

  • utf8Utf7(ptr: string): string
  • Convert a UTF-8 string to a modified UTF-7 format.

    The IMAP rules [rfc2060] are used in the UTF-7 encoding.

    Parameters

    • ptr: string

      a UTF-8 string to convert

    Returns string

  • utilBdataGetNumber(bdataPtr: string, defaultValue: number): number
  • Reads a numeric data from the bdata_ptr and moves the bdata_ptr after that number. If the number cannot be read, then the default_value is returned instead and the bdata_ptr is left unchanged. The number might be previously stored with the camel_util_bdata_put_number().

    Parameters

    • bdataPtr: string

      a backend specific data (bdata) pointer

    • defaultValue: number

      a value to return, when no data can be read

    Returns number

  • utilBdataGetString(bdataPtr: string, defaultValue: string): string
  • Reads a string data from the bdata_ptr and moves the bdata_ptr after that string. If the string cannot be read, then the default_value is returned instead and the bdata_ptr is left unchanged. The string might be previously stored with the camel_util_bdata_put_string().

    Parameters

    • bdataPtr: string

      a backend specific data (bdata) pointer

    • defaultValue: string

      a value to return, when no data can be read

    Returns string

  • utilBdataPutNumber(bdataStr: GLib.String, value: number): void
  • Puts the number value at the end of the bdata_str. In case the bdata_str is not empty a space is added before the numeric value. The stored value can be read back with the camel_util_bdata_get_number().

    Parameters

    • bdataStr: GLib.String

      a #GString to store a backend specific data (bdata)

    • value: number

      a value to store

    Returns void

  • utilBdataPutString(bdataStr: GLib.String, value: string): void
  • Puts the string value at the end of the bdata_str. In case the bdata_str is not empty a space is added before the string value. The stored value can be read back with the camel_util_bdata_get_string().

    The strings are encoded as "length-value", quotes for clarity only.

    Parameters

    • bdataStr: GLib.String

      a #GString to store a backend specific data (bdata)

    • value: string

      a value to store

    Returns void

  • utilDecodeUserHeaderSetting(settingValue: string): [string | null, string]
  • Decode the values previously encoded by camel_util_encode_user_header_setting(). The out_header_name points to the setting_value, thus it's valid as long as the setting_value is valid and unchanged.

    The out_header_name can result in %NULL when the setting_value contains invalid data.

    The out_display_name can result in %NULL when the setting_value does not contain the display name. In such case the header name can be used as the display name.

    Parameters

    • settingValue: string

      the value to decode

    Returns [string | null, string]

  • utilEncodeUserHeaderSetting(displayName: string, headerName: string): string
  • Encode the optional display_name and the header_name to a value suitable for GSettings schema org.gnome.evolution-data-server and key camel-message-info-user-headers.

    Free the returned string with g_free(), when no longer needed.

    Parameters

    • displayName: string

      display name for the header name, or %NULL

    • headerName: string

      the header name

    Returns string

  • Fill info 's user-headers with the user-defined headers from the headers array.

    Parameters

    Returns boolean

  • utilGetDirectoryVariants(mainPath: string, replacePrefix: string, withModulesDir: boolean): string[]
  • The main_path is a directory, which will be always used. It should have as its prefix the replace_prefix, otherwise the function returns only the main_path in the paths array.

    When there's exported an environment variable EDS_EXTRA_PREFIXES, it is used as a list of alternative prefixes where to look for the main_path (rest after the replace_prefix).

    When the with_modules_dir is %TRUE, there's also added g_get_user_data_dir() + "evolution/modules/", aka ~/.local/share/evolution/modules/, into the resulting array.

    Parameters

    • mainPath: string

      the main path to work with

    • replacePrefix: string

      path prefix to replace

    • withModulesDir: boolean

      whether to add also the modules directory

    Returns string[]

  • utilsSanitizeAsciiDomainInAddress(emailAddress: string, doFormat: boolean): string | null
  • Checks whether the domain in the email_address requires conversion to ASCII and if it does it also converts it. When the do_format is %TRUE, the output string is formatted for display, otherwise it's encoded for use in the message headers. A %NULL is returned when no conversion was needed.

    Parameters

    • emailAddress: string

      an email address as string

    • doFormat: boolean

      what format will be returned

    Returns string | null

  • utilsSanitizeAsciiDomainInUrl(url: URL): boolean
  • Checks whether the host name of the url requires conversion to ASCII and converts it, if needed.

    Parameters

    • url: URL

      a #CamelURL

    Returns boolean

  • utilsSanitizeAsciiDomainInUrlStr(urlStr: string): string | null
  • Checks whether the host name of the url_str requires conversion to ASCII and converts it if needed. Returns %NULL, when no conversion was required.

    Parameters

    • urlStr: string

      a URL as string

    Returns string | null

  • uudecodeStep(in_: Uint8Array, out: Uint8Array, save: number[]): [number, Uint8Array, number[]]
  • Uudecodes a chunk of data. Performs a 'decode step' on a chunk of uuencoded data. Assumes the "begin mode filename" line has been stripped off.

    Parameters

    • in_: Uint8Array

      input stream

    • out: Uint8Array

      output stream

    • save: number[]

      leftover bits that have not yet been decoded

    Returns [number, Uint8Array, number[]]

  • uuencodeClose(in_: Uint8Array, out: Uint8Array, uubuf: Uint8Array, save: number[]): [number, Uint8Array, Uint8Array, number[]]
  • Uuencodes a chunk of data. Call this when finished encoding data with camel_uuencode_step() to flush off the last little bit.

    Parameters

    • in_: Uint8Array

      input stream

    • out: Uint8Array

      output stream

    • uubuf: Uint8Array

      temporary buffer of 60 bytes

    • save: number[]

      leftover bits that have not yet been encoded

    Returns [number, Uint8Array, Uint8Array, number[]]

  • uuencodeStep(in_: Uint8Array, out: Uint8Array, uubuf: Uint8Array, save: number[]): [number, Uint8Array, Uint8Array, number[]]
  • Uuencodes a chunk of data. Performs an 'encode step', only encodes blocks of 45 characters to the output at a time, saves left-over state in uubuf, state and save (initialize to 0 on first invocation).

    Parameters

    • in_: Uint8Array

      input stream

    • out: Uint8Array

      output stream

    • uubuf: Uint8Array

      temporary buffer of 60 bytes

    • save: number[]

      leftover bits that have not yet been encoded

    Returns [number, Uint8Array, Uint8Array, number[]]

  • write(fd: number, buf: string, n: number, cancellable: Gio.Cancellable): number
  • Cancellable libc write() replacement.

    Code that intends to be portable to Win32 should call this function only on file descriptors returned from open(), not on sockets.

    Parameters

    • fd: number

      file descriptor

    • buf: string

      buffer to write

    • n: number

      number of bytes of buf to write

    • cancellable: Gio.Cancellable

      optional #GCancellable object, or %NULL

    Returns number

  • ydecodeStep(in_: Uint8Array): [number, Uint8Array, number, number, number]
  • Performs a 'decode step' on a chunk of yEncoded data of length inlen pointed to by in and writes to out. Assumes the =ybegin and =ypart lines have already been stripped off.

    To get the crc32 value of the part, use #CAMEL_MIME_YENCODE_CRC_FINAL (pcrc). If there are more parts, you should reuse crc without re-initializing. Once all parts have been decoded, you may get the combined crc32 value of all the parts using #CAMEL_MIME_YENCODE_CRC_FINAL (crc).

    Parameters

    • in_: Uint8Array

      input buffer

    Returns [number, Uint8Array, number, number, number]

  • yencodeClose(in_: Uint8Array): [number, Uint8Array, number, number, number]
  • Call this function when finished encoding data with camel_yencode_step() to flush off the remaining state.

    #CAMEL_MIME_YENCODE_CRC_FINAL (pcrc) will give you the crc32 of the encoded "part". If there are more "parts" to encode, you should re-use crc when encoding the next "parts" and then use #CAMEL_MIME_YENCODE_CRC_FINAL (crc) to get the combined crc32 value of all the parts.

    Parameters

    • in_: Uint8Array

      input buffer

    Returns [number, Uint8Array, number, number, number]

  • yencodeStep(in_: Uint8Array): [number, Uint8Array, number, number, number]
  • Performs an yEncode 'encode step' on a chunk of raw data of length inlen pointed to by in and writes to out.

    state should be initialized to #CAMEL_MIME_YENCODE_STATE_INIT before beginning making the first call to this function. Subsequent calls should reuse state.

    Along the same lines, pcrc and crc should be initialized to #CAMEL_MIME_YENCODE_CRC_INIT before using.

    Parameters

    • in_: Uint8Array

      input buffer

    Returns [number, Uint8Array, number, number, number]

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method