Delta Chat Core C Interface
Public Member Functions | List of all members
dc_provider_t Class Reference

Opaque object containing information about one single email provider. More...

#include <deltachat.h>

Public Member Functions

char * dc_provider_get_markdown (const dc_provider_t *provider)
 The markdown content of the providers page. More...
 
char * dc_provider_get_name (const dc_provider_t *provider)
 The provider's name. More...
 
char * dc_provider_get_overview_page (const dc_provider_t *provider)
 URL of the overview page. More...
 
int dc_provider_get_status (const dc_provider_t *provider)
 Whether DC works with this provider. More...
 
char * dc_provider_get_status_date (const dc_provider_t *provider)
 Date of when the state was last checked/updated. More...
 
dc_provider_tdc_provider_new_from_domain (const char *domain)
 Create a provider struct for the given domain. More...
 
dc_provider_tdc_provider_new_from_email (const char *email)
 Create a provider struct for the given email address. More...
 
void dc_provider_unref (const dc_provider_t *provider)
 Free the provider info struct. More...
 

Detailed Description

Opaque object containing information about one single email provider.

Member Function Documentation

char * dc_provider_get_markdown ( const dc_provider_t provider)

The markdown content of the providers page.

This contains the preparation steps or additional information if the status is DC_PROVIDER_STATUS_BROKEN.

Parameters
providerThe dc_provider_t struct.
Returns
A string which must be released using dc_str_unref().
char * dc_provider_get_name ( const dc_provider_t provider)

The provider's name.

The name of the provider, e.g. "POSTEO".

Parameters
providerThe dc_provider_t struct.
Returns
A string which must be released using dc_str_unref().
char * dc_provider_get_overview_page ( const dc_provider_t provider)

URL of the overview page.

This URL allows linking to the providers page on providers.delta.chat.

Parameters
providerThe dc_provider_t struct.
Returns
A string which must be released using dc_str_unref().
int dc_provider_get_status ( const dc_provider_t provider)

Whether DC works with this provider.

Can be one of DC_PROVIDER_STATUS_OK, DC_PROVIDER_STATUS_PREPARATION and DC_PROVIDER_STATUS_BROKEN.

Parameters
providerThe dc_provider_t struct.
Returns
The status as a constant number.
char * dc_provider_get_status_date ( const dc_provider_t provider)

Date of when the state was last checked/updated.

This is returned as a string.

Parameters
providerThe dc_provider_t struct.
Returns
A string which must be released using dc_str_unref().
dc_provider_t * dc_provider_new_from_domain ( const char *  domain)

Create a provider struct for the given domain.

Parameters
domainThe domain to get provider info for.
Returns
a dc_provider_t struct which can be used with the dc_provider_get_* accessor functions. If no provider info is found, NULL will be returned.
dc_provider_t * dc_provider_new_from_email ( const char *  email)

Create a provider struct for the given email address.

The provider is extracted from the email address and it's information is returned.

Parameters
emailThe user's email address to extract the provider info form.
Returns
a dc_provider_t struct which can be used with the dc_provider_get_* accessor functions. If no provider info is found, NULL will be returned.
void dc_provider_unref ( const dc_provider_t provider)

Free the provider info struct.

Parameters
providerThe dc_provider_t struct.

The documentation for this class was generated from the following file: