mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +00:00
31 lines
867 B
C++
31 lines
867 B
C++
#include <string>
|
|
#include "editor/osm_auth.hpp"
|
|
|
|
namespace osm_auth_ios
|
|
{
|
|
|
|
enum class AuthorizationButtonType
|
|
{
|
|
AuthorizationButtonTypeGoogle,
|
|
AuthorizationButtonTypeFacebook,
|
|
AuthorizationButtonTypeOSM
|
|
};
|
|
|
|
// Deletes any stored credentials if called with empty key or secret.
|
|
void AuthorizationStoreCredentials(std::string const & oauthToken);
|
|
BOOL AuthorizationHaveOAuth1Credentials();
|
|
void AuthorizationClearOAuth1Credentials();
|
|
BOOL AuthorizationHaveCredentials();
|
|
void AuthorizationClearCredentials();
|
|
// Returns empty key and secret if user has not beed authorized.
|
|
std::string const AuthorizationGetCredentials();
|
|
|
|
void AuthorizationSetNeedCheck(BOOL needCheck);
|
|
BOOL AuthorizationIsNeedCheck();
|
|
/// Returns nil if not logged in.
|
|
NSString * OSMUserName();
|
|
/// Returns 0 if not logged in.
|
|
NSInteger OSMUserChangesetsCount();
|
|
|
|
} // namespace osm_auth_ios
|