mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Better special config implementation.
This commit is contained in:
@@ -21,16 +21,26 @@ namespace internal {
|
||||
|
||||
class ConfigLoader : public base::has_weak_ptr {
|
||||
public:
|
||||
ConfigLoader(not_null<Instance*> instance, RPCDoneHandlerPtr onDone, RPCFailHandlerPtr onFail);
|
||||
ConfigLoader(
|
||||
not_null<Instance*> instance,
|
||||
const QString &phone,
|
||||
RPCDoneHandlerPtr onDone,
|
||||
RPCFailHandlerPtr onFail);
|
||||
~ConfigLoader();
|
||||
|
||||
void load();
|
||||
void setPhone(const QString &phone);
|
||||
|
||||
private:
|
||||
mtpRequestId sendRequest(ShiftedDcId shiftedDcId);
|
||||
void addSpecialEndpoint(DcId dcId, const std::string &ip, int port);
|
||||
void addSpecialEndpoint(
|
||||
DcId dcId,
|
||||
const std::string &ip,
|
||||
int port,
|
||||
bytes::const_span secret);
|
||||
void sendSpecialRequest();
|
||||
void enumerate();
|
||||
void refreshSpecialLoader();
|
||||
void createSpecialLoader();
|
||||
DcId specialToRealDcId(DcId specialDcId);
|
||||
void specialConfigLoaded(const MTPConfig &result);
|
||||
@@ -55,6 +65,7 @@ private:
|
||||
base::Timer _specialEnumTimer;
|
||||
DcId _specialEnumCurrent = 0;
|
||||
mtpRequestId _specialEnumRequest = 0;
|
||||
QString _phone;
|
||||
|
||||
RPCDoneHandlerPtr _doneHandler;
|
||||
RPCFailHandlerPtr _failHandler;
|
||||
|
||||
Reference in New Issue
Block a user