![]() |
![]() |
![]() |
Camel Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
struct CamelInternetAddress; CamelInternetAddress * camel_internet_address_new (void
); gint camel_internet_address_add (CamelInternetAddress *addr
,const gchar *name
,const gchar *address
); gboolean camel_internet_address_get (const CamelInternetAddress *addr
,gint index
,const gchar **namep
,const gchar **addressp
); gint camel_internet_address_find_name (CamelInternetAddress *addr
,const gchar *name
,const gchar **addressp
); gint camel_internet_address_find_address (CamelInternetAddress *addr
,const gchar *address
,const gchar **namep
); gchar * camel_internet_address_encode_address (gint *len
,const gchar *name
,const gchar *addr
); gchar * camel_internet_address_format_address (const gchar *name
,const gchar *addr
);
struct CamelInternetAddress { CamelAddress parent; struct _CamelInternetAddressPrivate *priv; };
CamelInternetAddress * camel_internet_address_new (void
);
Create a new CamelInternetAddress object.
Returns : |
a new CamelInternetAddress object |
gint camel_internet_address_add (CamelInternetAddress *addr
,const gchar *name
,const gchar *address
);
Add a new internet address to addr
.
|
a CamelInternetAddress object |
|
name associated with the new address |
|
routing address associated with the new address |
Returns : |
the index of added entry |
gboolean camel_internet_address_get (const CamelInternetAddress *addr
,gint index
,const gchar **namep
,const gchar **addressp
);
Get the address at index
.
|
a CamelInternetAddress object |
|
address's array index |
|
holder for the returned name, or NULL , if not required.
|
|
holder for the returned address, or NULL , if not required.
|
Returns : |
TRUE if such an address exists, or FALSE otherwise
|
gint camel_internet_address_find_name (CamelInternetAddress *addr
,const gchar *name
,const gchar **addressp
);
Find address by real name.
|
a CamelInternetAddress object |
|
name to lookup |
|
holder for address part, or NULL , if not required.
|
Returns : |
the index of the address matching the name, or -1 if no
match was found
|
gint camel_internet_address_find_address (CamelInternetAddress *addr
,const gchar *address
,const gchar **namep
);
Find an address by address.
|
a CamelInternetAddress object |
|
address to lookup |
|
holder for the matching name, or NULL , if not required.
|
Returns : |
the index of the address, or -1 if not found
|
gchar * camel_internet_address_encode_address (gint *len
,const gchar *name
,const gchar *addr
);
Encode a single address ready for internet usage. Header folding
as per rfc822 is also performed, based on the length *len
. If len
is NULL
, then no folding will occur.
Note: The value at *in
will be updated based on any linewrapping done
|
the length of the line the address is being appended to |
|
the unencoded real name associated with the address |
|
the routing address |
Returns : |
the encoded address |
gchar * camel_internet_address_format_address (const gchar *name
,const gchar *addr
);
Function to format a single address, suitable for display.
|
a name, quotes may be stripped from it |
|
an rfc822 routing address |
Returns : |
a nicely formatted string containing the rfc822 address |