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.
This environment variable configures where the camel provider modules are loaded from.
The folder type bitshift value.
The folder type mask value.
Can be used with camel_session_addressbook_contains_sync() as the book UID, meaning to check in all configured address books.
Can be used with camel_session_addressbook_contains_sync() as the book UID, meaning to check in all address books enabled for auto-completion.
The folder store info type bitshift value.
The folder store info type mask value.
Thread safe variant of g_object_bind_property(). See its documentation for more information on arguments and return value.
the source #GObject
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
Thread safe variant of g_object_bind_property_with_closures(). See its documentation for more information on arguments and return value.
the source #GObject
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
a #GClosure wrapping the transformation function from the source
to the target,
or %NULL to use the default
a #GClosure wrapping the transformation function from the target
to the source,
or %NULL to use the default
Finds the minimum charset for this string NULL means US-ASCII.
input text
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.
Part to write.
flags for the canonicalisation filter (CamelMimeFilterCanon)
stream to write canonicalised output to.
optional #GCancellable object, or %NULL
Gets a named property name
value for the given cert_info
.
a #CamelCipherCertInfo
a property name
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.
a #CamelCipherCertInfo
a property name
a property value, or %NULL
a clone function for the value
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.
string name of the mode to check for
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()
Call this when you're done with your debug output. If and only if you called camel_debug_start, and if it returns TRUE.
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().
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.
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.
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.
a backtrace to push, taken from camel_debug_get_backtrace()
the current object reference count when the push is done
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).
a #GObject, for which add the backtrace
Start debug output for a given mode, used to make sure debug output is output atomically and not interspersed with unrelated stuff.
string name of the mode to start the debug for
Convert in
from text/plain into text/enriched or text/richtext
based on flags
.
input textual string
flags specifying filter behaviour
Retrieve a gint32.
file to read from
pointer to a variable to store the value in
Decode a normal string from the input file.
file to read from
pointer to a variable to store the value in
total-len to decode.
Decode an gsize type.
file to read from
pointer to a variable to put the value in
Decode an off_t type.
file to read from
pointer to a variable to put the value in
Decode a normal string from the input file.
file to read from
pointer to a variable to store the value in
Decode a time_t value.
file to read from
pointer to a variable to store the value in
Retrieve an encoded uint32 from a file.
file to read from
pointer to a variable to store the value in
Encode a gint32, performing no compression, but converting to network order.
file to output to
value to output
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)
file to output to
value to output
total-len of str to store
Encode an gsize type.
file to output to
value to output
Encode an off_t type.
file to output to
value to output
Encode a normal string and save it in the output file.
file to output to
value to output
Encode a time_t value to the file.
file to output to
value to output
Utility function to save an uint32 to a file.
file to output to
value to output
'Flattens' name
into a safe filename string by hex encoding any
chars that may cause problems on the filesystem.
string to 'flattened' into a safe filename
Builds a pathname where the basename is of the form ".#" + the
basename of filename,
for instance used in a two-stage commit file
write.
a pathname
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.
an array of #CamelFolderInfo
an ignorable prefix on the folder names
the hieararchy separator character
%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.
Frees a structure returned with camel_getaddrinfo(). It does
nothing when the host
is %NULL.
a host address information structure to free, or %NULL
Resolves a host name
and returns an information about its address.
an address name to resolve
a service name to use
an #addrinfo hints, or %NULL
optional #GCancellable object, or %NULL
TODO: Document me.
a NULL-terminated list of #CamelHeaderAddress objects
the #CamelHeaderAddress to add
TODO: Document me.
a NULL-terminated list of #CamelHeaderAddress objects
a NULL-terminated list of #CamelHeaderAddress to add
TODO: Document me.
a NULL-terminated list of #CamelHeaderAddress objects
TODO: Document me.
a NULL-terminated list of #CamelHeaderAddress objects
TODO: Document me.
a NULL-terminated list of #CamelHeaderAddress objects
Extract a content-id from in
.
input string
Decodes the rfc822 date string and saves the GMT offset into
tz_offset
if non-NULL.
input date string
timezone offset
Extracts an integer token from in
and updates the pointer to point
to after the end of the integer token (sort of like strtol).
pointer to input string
Decodes rfc2047 encoded-word tokens
input header value string
default charset to use if improperly encoded
Encodes a 'phrase' header according to the rules in rfc2047.
header to encode
Encodes a 'text' header according to the rules of rfc2047.
input string
Decodes a header which contains rfc2047 encoded-word tokens that may or may not be within a comment.
input header value string
default charset to use if improperly encoded
Allocates a string buffer containing the rfc822 formatted date
string represented by time
and tz_offset
.
time_t date representation
Timezone offset
Extract a message-id token from in
.
input string
Either the domain
is used, or the user's local hostname,
in case it's %NULL or empty.
domain to use (like "example.com") for the ID suffix; can be %NULL
Searches params
for a param named name
and gets the value.
parameters
name of param to find
Free the list of params.
a list of params
Generate a list of references, from most recent up.
References header value
Set a parameter in the list.
poinetr to a list of params
name of param to set
value to set
Gets the first token in the string according to the rules of rfc0822.
input string
Searches for a mailing list information among known headers and returns a newly allocated string with its value.
a #CamelNameValueArray with headers
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.
Host name, with or without non-ascii letters in utf8
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.
a host name
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
.
the #time_t to convert
the #tm to store the result in
the #gint to store the offset in
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.
a path to lock
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.
a file descriptor
a #CamelLockType
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.
a file descriptor
a #CamelLockType
Attempt to lock a folder, multiple attempts will be made using all locking strategies available.
Path to the file to lock (used for .locking only).
Open file descriptor of the right type to lock.
Type of lock, CAMEL_LOCK_READ or CAMEL_LOCK_WRITE.
Like mktime(3), but assumes UTC instead of local timezone.
the #tm to convert to a calendar time representation
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).
source file
destination file
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.
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().
pointer to add to the pointer tracker
info to print in tracker summary
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.
pointer to remove from the tracker
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.
a #CamelProvider protocol name
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?
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.
whether or not to load in providers that are not already loaded
Loads the provider at path,
and calls its initialization function,
passing session
as an argument. The provider should then register
itself with session
.
the path to a shared library
Add string
to the pool.
The %NULL and empty strings are special cased to constant values.
Unreference the returned string with camel_pstring_free().
string to add to the string pool
whether the string pool will own the memory pointed to by string,
if string
is not yet in the pool
Returns whether the string
exists in the string pool.
The %NULL and empty strings are special cased to constant values.
string to look up in the string pool
Dumps to stdout memory statistic about the string pool.
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.
string to free
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.
string to fetch from the string pool
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().
string to copy
Decodes a block of quoted-printable encoded data. Performs a 'decode step' on a chunk of QP encoded data.
input stream
output stream
leftover bits that have not yet been decoded
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.
input stream
output string
leftover bits that have not yet been encoded
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).
input stream
output string
leftover bits that have not yet been encoded
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.
file descriptor
buffer to fill
number of bytes to read into buf
optional #GCancellable object, or %NULL
Decodes header_value,
if needed, either from an address header
or the Subject header. Other header_name
headers are returned
as is.
the header name
the header value
the default charset to use for the decode, or %NULL
Returns the last segment of the path string from info
.
a #CamelStoreSummary
a #CamelStoreInfo
Returns the path string from info
.
a #CamelStoreSummary
a #CamelStoreInfo
Set a specific string on the info
.
a #CamelStoreSummary object
a #CamelStoreInfo
specific string being set
string value to set
Find the state of the flag name
in flags
.
bitwise system flags
name of the flag to check for
Convert in
from plain text into HTML.
input text
bitwise flags defining the html conversion behaviour
color to use when syntax highlighting
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.
a time_t to apply the value to, or -1 to use the current time
a #CamelTimeUnit
a value to apply
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.
a ucs2 string to convert
Frees the array of UIDs.
an array returned from camel_uid_cache_get_new_uids()
Attempt to unlock a .lock lock.
The function does nothing, when dot locking had not been compiled.
a path to unlock
Unlock an fcntl lock.
The function does nothing, when fcntl locking had not been compiled.
a file descriptor
Unlock an flock lock.
The function does nothing, when flock locking had not been compiled.
a file descriptor
Free a lock on a folder.
Filename of folder.
Open descrptor on which locks were placed.
%-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.
a URL part
This %-encodes the given URL part and returns the escaped version in allocated memory, which the caller must free when it is done.
a URL part
additional characters beyond " "%#<>{}|^[]`" to escape (or %NULL)
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.
a UTF-7 string to convert
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.
a pointer to read the character from
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.
a pointer to read the character from
upper limit for the read, must not be %NULL
Ensures the returned text will be valid UTF-8 string, with incorrect letters changed to question marks.
a text to make valid
Ensures the returned text will be valid UTF-8 string, with incorrect letters changed to question marks.
a text to make valid
length of the text,
or -1 if NUL-terminated
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.
pointer to write the character to
a Unicode character to write
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.
a UTF-8 string to convert
Convert a UTF-8 string to a modified UTF-7 format.
The IMAP rules [rfc2060] are used in the UTF-7 encoding.
a UTF-8 string to convert
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().
a backend specific data (bdata) pointer
a value to return, when no data can be read
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().
a backend specific data (bdata) pointer
a value to return, when no data can be read
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().
a #GString to store a backend specific data (bdata)
a value to store
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.
a #GString to store a backend specific data (bdata)
a value to store
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.
the value to decode
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.
display name for the header name, or %NULL
the header name
Fill info
's user-headers with the user-defined headers from
the headers
array.
a #CamelMessageInfo
a #CamelNameValueArray with the headers to read from
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.
the main path to work with
path prefix to replace
whether to add also the modules directory
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.
an email address as string
what format will be returned
Checks whether the host name of the url
requires conversion
to ASCII and converts it, if needed.
a #CamelURL
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.
a URL as string
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.
input stream
output stream
leftover bits that have not yet been decoded
Uuencodes a chunk of data. Call this when finished encoding data with camel_uuencode_step() to flush off the last little bit.
input stream
output stream
temporary buffer of 60 bytes
leftover bits that have not yet been encoded
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).
input stream
output stream
temporary buffer of 60 bytes
leftover bits that have not yet been encoded
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.
file descriptor
buffer to write
number of bytes of buf
to write
optional #GCancellable object, or %NULL
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)
.
input buffer
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.
input buffer
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.
input buffer
Name of the photo-filename property which can be stored on a #CamelCipherCertInfo.