LAS-16: add API function AS_get_provider_id().

IOS-2259
Roker 5 years ago
parent 898336eca2
commit 6f8eb6436f

@ -52,6 +52,15 @@ const struct AccountSettings* get_account_settings(const char* accountName, cons
AS_STATUS AS_get_status(const struct AccountSettings* account_settings);
/** get the privder id string of the account_settings
*
* @param account_settings the account settings your want to get provider id
* @return the provider id, if any. Might be NULL or empty string.
The pointer points to internal r/o data in accountSettings, do not delete it!
*/
const char* AS_get_provider_id(const struct AccountSettings* account_settings);
/** get the server settings for "incoming" messages (e.g. IMAP or POP3)
* @param accountSettings guess what
* @return the server for incoming messages associated with the accountSettings.

@ -108,6 +108,12 @@ AS_STATUS AS_get_status(const struct AccountSettings* account_settings)
}
const char* AS_get_provider_id(const struct AccountSettings* account_settings)
{
return account_settings ? account_settings->id.c_str() : nullptr;
}
const AS_Server* AS_get_incoming(const AccountSettings* as)
{
return &as->incoming;

Loading…
Cancel
Save