aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/SendCodeHelper.h
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2019-05-03 05:44:59 +0300
committerlevlam <levlam@telegram.org>2019-05-03 05:44:59 +0300
commit68b2d10fdb70cf664dad886030ca396a98672bf4 (patch)
tree0b74776edc3d691984973c734010c6732cd7a723 /td/telegram/SendCodeHelper.h
parenteed517a2e7da2349e499a9b60fe0329e37ebdd33 (diff)
Add td_api::phoneNumberAuthenticationSettings and support automatic code retrival from SMS on Android.
GitOrigin-RevId: f97bd5bf3eb7449da1b14242fa47537801657b04
Diffstat (limited to 'td/telegram/SendCodeHelper.h')
-rw-r--r--td/telegram/SendCodeHelper.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/td/telegram/SendCodeHelper.h b/td/telegram/SendCodeHelper.h
index 4c32e6ec6..90041ed7a 100644
--- a/td/telegram/SendCodeHelper.h
+++ b/td/telegram/SendCodeHelper.h
@@ -25,18 +25,19 @@ class SendCodeHelper {
td_api::object_ptr<td_api::authenticationCodeInfo> get_authentication_code_info_object() const;
Result<telegram_api::auth_resendCode> resend_code();
- Result<telegram_api::auth_sendCode> send_code(Slice phone_number, bool allow_flash_call, bool is_current_phone_number,
- int32 api_id, const string &api_hash);
+ using Settings = td_api::object_ptr<td_api::phoneNumberAuthenticationSettings>;
- Result<telegram_api::account_sendChangePhoneCode> send_change_phone_code(Slice phone_number, bool allow_flash_call,
- bool is_current_phone_number);
+ Result<telegram_api::auth_sendCode> send_code(Slice phone_number, const Settings &settings, int32 api_id,
+ const string &api_hash);
+
+ Result<telegram_api::account_sendChangePhoneCode> send_change_phone_code(Slice phone_number,
+ const Settings &settings);
Result<telegram_api::account_sendVerifyPhoneCode> send_verify_phone_code(const string &hash, Slice phone_number,
- bool allow_flash_call,
- bool is_current_phone_number);
+ const Settings &settings);
- Result<telegram_api::account_sendConfirmPhoneCode> send_confirm_phone_code(Slice phone_number, bool allow_flash_call,
- bool is_current_phone_number);
+ Result<telegram_api::account_sendConfirmPhoneCode> send_confirm_phone_code(Slice phone_number,
+ const Settings &settings);
Slice phone_number() const {
return phone_number_;
@@ -91,8 +92,7 @@ class SendCodeHelper {
static td_api::object_ptr<td_api::AuthenticationCodeType> get_authentication_code_type_object(
const AuthenticationCodeInfo &authentication_code_info);
- static telegram_api::object_ptr<telegram_api::codeSettings> get_input_code_settings(bool allow_flash_call,
- bool is_current_phone_number);
+ static telegram_api::object_ptr<telegram_api::codeSettings> get_input_code_settings(const Settings &settings);
};
} // namespace td