diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llfloaterreporter.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/newview/llfloaterreporter.h')
-rw-r--r-- | linden/indra/newview/llfloaterreporter.h | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloaterreporter.h b/linden/indra/newview/llfloaterreporter.h new file mode 100644 index 0000000..af01771 --- /dev/null +++ b/linden/indra/newview/llfloaterreporter.h | |||
@@ -0,0 +1,132 @@ | |||
1 | /** | ||
2 | * @file llfloaterreporter.h | ||
3 | * @author Andrew Meadows | ||
4 | * @brief Bug and abuse reports. | ||
5 | * | ||
6 | * Copyright (c) 2006-2007, Linden Research, Inc. | ||
7 | * | ||
8 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
9 | * to you under the terms of the GNU General Public License, version 2.0 | ||
10 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
11 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
12 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
13 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
14 | * | ||
15 | * There are special exceptions to the terms and conditions of the GPL as | ||
16 | * it is applied to this Source Code. View the full text of the exception | ||
17 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
18 | * online at http://secondlife.com/developers/opensource/flossexception | ||
19 | * | ||
20 | * By copying, modifying or distributing this software, you acknowledge | ||
21 | * that you have read and understood your obligations described above, | ||
22 | * and agree to abide by those obligations. | ||
23 | * | ||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
26 | * COMPLETENESS OR PERFORMANCE. | ||
27 | */ | ||
28 | |||
29 | #ifndef LL_LLFLOATERREPORTER_H | ||
30 | #define LL_LLFLOATERREPORTER_H | ||
31 | |||
32 | #include "llfloater.h" | ||
33 | #include "lluuid.h" | ||
34 | #include "v3math.h" | ||
35 | |||
36 | class LLMessageSystem; | ||
37 | class LLViewerImage; | ||
38 | class LLInventoryItem; | ||
39 | class LLViewerObject; | ||
40 | class LLAgent; | ||
41 | class LLToolObjPicker; | ||
42 | class LLMeanCollisionData; | ||
43 | |||
44 | // these flags are used to label info requests to the server | ||
45 | const U32 BUG_REPORT_REQUEST = 0x01 << 0; | ||
46 | const U32 COMPLAINT_REPORT_REQUEST = 0x01 << 1; | ||
47 | |||
48 | // ************************************************************ | ||
49 | // THESE ENUMS ARE IN THE DATABASE!!! | ||
50 | // | ||
51 | // The process for adding a new report type is to: | ||
52 | // 1. Issue a command to the database to insert the new value: | ||
53 | // insert into user_report_type (description) | ||
54 | // values ('${new type name}'); | ||
55 | // 2. Record the integer value assigned: | ||
56 | // select type from user_report_type | ||
57 | // where description='${new type name}'; | ||
58 | // 3. Add it here. | ||
59 | // ${NEW TYPE NAME}_REPORT = ${type_number}; | ||
60 | // | ||
61 | // Failure to follow this process WILL result in incorrect | ||
62 | // queries on user reports. | ||
63 | // ************************************************************ | ||
64 | enum EReportType | ||
65 | { | ||
66 | NULL_REPORT = 0, // don't use this value anywhere | ||
67 | UNKNOWN_REPORT = 1, | ||
68 | BUG_REPORT = 2, | ||
69 | COMPLAINT_REPORT = 3, | ||
70 | CS_REQUEST_REPORT = 4 | ||
71 | }; | ||
72 | |||
73 | |||
74 | class LLFloaterReporter | ||
75 | : public LLFloater | ||
76 | { | ||
77 | public: | ||
78 | LLFloaterReporter(const std::string& name, | ||
79 | const LLRect &rect, | ||
80 | const std::string& title, | ||
81 | EReportType = UNKNOWN_REPORT); | ||
82 | /*virtual*/ ~LLFloaterReporter(); | ||
83 | |||
84 | virtual void draw(); | ||
85 | |||
86 | // Enables all buttons | ||
87 | static void showFromMenu(EReportType report_type); | ||
88 | |||
89 | static void showFromObject(const LLUUID& object_id); | ||
90 | |||
91 | static void onClickSend (void *userdata); | ||
92 | static void onClickCancel (void *userdata); | ||
93 | static void onClickObjPicker (void *userdata); | ||
94 | static void onClickSelectAbuser (void *userdata); | ||
95 | static void closePickTool (void *userdata); | ||
96 | static void uploadDoneCallback(const LLUUID &uuid, void* user_data, S32 result); | ||
97 | static void addDescription(const LLString& description, LLMeanCollisionData *mcd = NULL); | ||
98 | static void setDescription(const LLString& description, LLMeanCollisionData *mcd = NULL); | ||
99 | |||
100 | // returns a pointer to reporter of report_type | ||
101 | static LLFloaterReporter* getReporter(EReportType report_type); | ||
102 | static LLFloaterReporter* createNewAbuseReporter(); | ||
103 | static LLFloaterReporter* createNewBugReporter(); | ||
104 | |||
105 | // static | ||
106 | static void processRegionInfo(LLMessageSystem* msg); | ||
107 | |||
108 | void setPickedObjectProperties(const char *object_name, const char *owner_name); | ||
109 | void uploadScreenshot(); | ||
110 | |||
111 | private: | ||
112 | void setReporterID(); | ||
113 | void sendReport(); | ||
114 | void setPosBox(const LLVector3d &pos); | ||
115 | void enableControls(BOOL own_avatar); | ||
116 | void getObjectInfo(const LLUUID& object_id); | ||
117 | static void callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data); | ||
118 | |||
119 | private: | ||
120 | EReportType mReportType; | ||
121 | LLUUID mObjectID; | ||
122 | LLUUID mScreenID; | ||
123 | LLUUID mAbuserID; | ||
124 | BOOL mDeselectOnClose; | ||
125 | BOOL mPicking; | ||
126 | LLVector3 mPosition; | ||
127 | BOOL mCopyrightWarningSeen; | ||
128 | std::list<LLMeanCollisionData*> mMCDList; | ||
129 | LLString mDefaultSummary; | ||
130 | }; | ||
131 | |||
132 | #endif | ||