aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/otr_floater_smp_progress.h
blob: 05ff208a11744958212107a052bf2e5b39ac7d67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* otr_floater_smp_progress.h - SMP progress dialog box [$PLOTR$]
   See http://www.cypherpunks.ca/otr/

   Copyright (C) 2009 Chris Tuchs

   This is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1 of
   the License, or (at your option) any later version.

   This is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
   License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the viewer; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.  */

#ifndef OTR_FLOATER_SMP_PROGRESS_H_INCLUDED
#define OTR_FLOATER_SMP_PROGRESS_H_INCLUDED 1

#include "llfloater.h"
class LLFloaterIMPanel;
class LLProgressBar;

class OtrFloaterSmpProgress
: public LLFloater
{
private:
    LLUUID mOtherParticipantUUID;
    LLUUID mSessionUUID;
    std::string mQuestion;
    std::string mSecretAnswer;
    bool mSecretAnswerOnly;
    LLFloaterIMPanel *mIMPanel;
    LLProgressBar* mProgressBar;
    bool mIsReply;

    static void onClickHelp(void* userdata);
    static void onClickCancel(void* userdata);
    static void onClickOk(void* userdata);

    void init();
public:
    OtrFloaterSmpProgress(LLFloaterIMPanel *im_panel, LLUUID session_id, LLUUID other_id,
                          std::string a_question, std::string a_secret_answer, bool is_reply = false);
    OtrFloaterSmpProgress(LLFloaterIMPanel *im_panel, LLUUID session_id, LLUUID other_id,
                          std::string a_secret_answer, bool is_reply = false);
    void setPercent(float percent);
    void setStatus(const char *message_string_name);
    void setStatusName(const char *message_string_name);
    void setFinalStatus(const char *message_string_name);
    virtual ~OtrFloaterSmpProgress();
    /*virtual*/ BOOL postBuild();
    /*virtual*/ void onClose(bool app_quitting);

    void show();
};
#endif // ndef OTR_FLOATER_SMP_PROGRESS_H_INCLUDED [/$PLOTR$]