diff options
| author | Robert Pösel <robyer@seznam.cz> | 2016-04-17 11:14:33 +0000 |
|---|---|---|
| committer | Robert Pösel <robyer@seznam.cz> | 2016-04-17 11:14:33 +0000 |
| commit | 1218cb54337c4683baf728bec19701da1f10e5ac (patch) | |
| tree | 925726d9fbed53764efebbe7e1bbbbf2bd8339f9 /protocols/FacebookRM/src/dialogs.h | |
| parent | 0c1facf5ca73994ad269fd18a88e5b8fe68551c8 (diff) | |
Facebook: Implement login with two-way authorization
It shows dialog that asks for verification code. User can press button to request code via SMS. Allows 3 attempts to entering correct code, then plugin disconnects.
git-svn-id: http://svn.miranda-ng.org/main/trunk@16685 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/dialogs.h')
| -rw-r--r-- | protocols/FacebookRM/src/dialogs.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/dialogs.h b/protocols/FacebookRM/src/dialogs.h index 41c5e8006b..ee7d4da144 100644 --- a/protocols/FacebookRM/src/dialogs.h +++ b/protocols/FacebookRM/src/dialogs.h @@ -28,3 +28,31 @@ INT_PTR CALLBACK FBOptionsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lp INT_PTR CALLBACK FBOptionsMessagingProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
INT_PTR CALLBACK FBOptionsEventsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
INT_PTR CALLBACK FBOptionsStatusesProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
+
+/////////////////////////////////////////////////////////////////////////////////
+
+typedef CProtoDlgBase<FacebookProto> CFacebookDlgBase;
+
+#define DIALOG_RESULT_OK 1
+
+class CFacebookGuardDialog : public CFacebookDlgBase
+{
+private:
+ const char *m_fb_dtsg;
+ char m_code[7];
+
+ CCtrlEdit m_text;
+ CCtrlButton m_ok;
+ CCtrlButton m_sms;
+
+protected:
+ void OnInitDialog();
+ void OnOk(CCtrlButton*);
+ void OnSms(CCtrlButton*);
+ void OnClose();
+
+public:
+ CFacebookGuardDialog(FacebookProto *proto, const char *fb_dtsg);
+
+ const char *GetCode();
+};
|
