Top | ![]() |
![]() |
![]() |
![]() |
ESourceMailSignatureESourceMailSignature — ESource extension for email signatures |
|
e_source_mail_signature_get_file () |
const |
e_source_mail_signature_get_mime_type () |
|
e_source_mail_signature_dup_mime_type () |
|
e_source_mail_signature_set_mime_type () |
|
e_source_mail_signature_load_sync () |
|
e_source_mail_signature_load () |
|
e_source_mail_signature_load_finish () |
|
e_source_mail_signature_replace_sync () |
|
e_source_mail_signature_replace () |
|
e_source_mail_signature_replace_finish () |
|
e_source_mail_signature_symlink_sync () |
|
e_source_mail_signature_symlink () |
|
e_source_mail_signature_symlink_finish () |
The ESourceMailSignature extension refers to a personalized email signature.
Access the extension as follows:
#include <libedataserver/libedataserver.h> ESourceMailSignature *extension; extension = e_source_get_extension (source, E_SOURCE_EXTENSION_MAIL_SIGNATURE);
GFile * e_source_mail_signature_get_file (ESourceMailSignature *extension
);
Returns a extension
.
The signature file may be a regular file containing the static signature
content, or it may be a symbolic link to an executable file that produces
the signature content.
e_source_mail_signature_load() uses this to load the signature content.
Since: 3.6
constgchar * e_source_mail_signature_get_mime_type (ESourceMailSignature *extension
);
Returns the MIME type of the signature content for extension
, or NULL
e_source_mail_signature_load() sets this automatically if the MIME type has not yet been determined.
Since: 3.6
gchar * e_source_mail_signature_dup_mime_type (ESourceMailSignature *extension
);
Thread-safe variation of e_source_mail_signature_get_mime_type()
.
Use this function when accessing extension
from multiple threads.
The returned string should be freed with g_free()
Since: 3.6
void e_source_mail_signature_set_mime_type (ESourceMailSignature *extension
,const
);gchar *mime_type
Sets the MIME type of the signature content for extension
.
e_source_mail_signature_load() sets this automatically if the MIME type has not yet been determined.
The internal copy of mime_type
is automatically stripped of leading
and trailing whitespace. If the resulting string is empty, NULL
Since: 3.6
gboolean e_source_mail_signature_load_sync (ESource *source
,,
gchar **contents,
gsize *length,
GCancellable *cancellable);
GError **error
Loads a signature from the signature file for source
, which is
given by e_source_mail_signature_get_file()
. The signature contents
are placed in contents
, and length
is set to the size of the contents
string. The contents
string should be freed with g_free()
If the signature file is executable, it will be executed and its output captured as the email signature content. If the signature file is not executable, the email signature content is read directly from the file.
source |
an ESource |
|
contents |
return location for the signature content. |
[out] |
length |
return location for the length of the signature
content, or |
[allow-none][out] |
cancellable |
optional |
[allow-none] |
error |
return location for a |
Since: 3.6
void e_source_mail_signature_load (ESource *source
,,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously loads a signature from the signature file for source
,
which is given by e_source_mail_signature_get_file()
.
If the signature file is executable, it will be executed and its output captured as the email signature content. If the signature file is not executable, the email signature content is read directly from the file.
When the operation is finished, callback
will be called. You can
then call e_source_mail_signature_load_finish()
to get the result of
the operation.
source |
an ESource |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
[allow-none] |
callback |
a |
[scope async] |
user_data |
data to pass to the callback function. |
[closure] |
Since: 3.6
gboolean e_source_mail_signature_load_finish (ESource *source
,,
GAsyncResult *result,
gchar **contents,
gsize *length);
GError **error
Finishes an operation started with e_source_mail_signature_load()
. The
signature file contents are placed in contents
, and length
is set to
the size of the contents
string. The contents
string should be freed
with g_free()
source |
an ESource |
|
result |
a |
|
contents |
return location for the signature content. |
[out] |
length |
return location for the length of the signature
content, or |
[allow-none][out] |
error |
return location for a |
Since: 3.6
gboolean e_source_mail_signature_replace_sync (ESource *source
,const
,gchar *contents,
gsize length,
GCancellable *cancellable);
GError **error
Replaces the signature file for source
with the given contents
of length
bytes. The signature file for source
is given by
e_source_mail_signature_get_file()
.
source |
an ESource |
|
contents |
the signature contents |
|
length |
the length of |
|
cancellable |
optional |
[allow-none] |
error |
return location for a |
Since: 3.6
void e_source_mail_signature_replace (ESource *source
,const
,gchar *contents,
gsize length,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchrously replaces the signature file for source
with the given
contents
of length
bytes. The signature file for source
is given
by e_source_mail_signature_get_file()
.
When the operation is finished, callback
will be called. You can
then call e_source_mail_signature_replace_finish()
to get the result
of the operation.
source |
an ESource |
|
contents |
the signature contents |
|
length |
the length of |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
[allow-none] |
callback |
a |
[scope async] |
user_data |
data to pass to the callback function. |
[closure] |
Since: 3.6
gboolean e_source_mail_signature_replace_finish (ESource *source
,,
GAsyncResult *result);
GError **error
Finishes an operation started with e_source_mail_signature_replace()
.
Since: 3.6
gboolean e_source_mail_signature_symlink_sync (ESource *source
,const
,gchar *symlink_target,
GCancellable *cancellable);
GError **error
Replaces the signature file for source
with a symbolic link to
symlink_target
, which should be an executable file that prints
a mail signature to standard output. The signature file for
source
is given by e_source_mail_signature_get_file()
.
source |
an ESource |
|
symlink_target |
executable filename to link to |
|
cancellable |
optional |
[allow-none] |
error |
return location for a |
Since: 3.6
void e_source_mail_signature_symlink (ESource *source
,const
,gchar *symlink_target,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously replaces the signature file for source
with a symbolic
link to symlink_target
, which should be an executable file that prints
a mail signature to standard output. The signature file for source
is given by e_source_mail_signature_get_file()
.
When the operation is finished, callback
will be called. You can
then call e_source_mail_signature_symlink_finish()
to get the result
of the operation.
source |
an ESource |
|
symlink_target |
executable filename to link to |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
[allow-none] |
callback |
a |
[scope async] |
user_data |
data to pass to the callback function. |
[closure] |
Since: 3.6
gboolean e_source_mail_signature_symlink_finish (ESource *source
,,
GAsyncResult *result);
GError **error
Finishes an operation started with e_source_mail_signature_symlink()
.
Since: 3.6
#define E_SOURCE_EXTENSION_MAIL_SIGNATURE "Mail Signature"
Pass this extension name to e_source_get_extension()
to access
ESourceMailSignature. This is also used as a group name in key files.
Since: 3.6
struct ESourceMailSignature { };
Contains only private data that should be read and manipulated using the function below.
Since: 3.6