aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llcompilequeue.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llcompilequeue.h')
-rw-r--r--linden/indra/newview/llcompilequeue.h44
1 files changed, 33 insertions, 11 deletions
diff --git a/linden/indra/newview/llcompilequeue.h b/linden/indra/newview/llcompilequeue.h
index 9f83f27..6a3a10a 100644
--- a/linden/indra/newview/llcompilequeue.h
+++ b/linden/indra/newview/llcompilequeue.h
@@ -64,9 +64,12 @@ public:
64 // start() returns TRUE if the queue has started, otherwise FALSE. 64 // start() returns TRUE if the queue has started, otherwise FALSE.
65 BOOL start(); 65 BOOL start();
66 66
67 // find an instance by ID. Return NULL if it does not exist.
68 static LLFloaterScriptQueue* findInstance(const LLUUID& id);
69
67protected: 70protected:
68 LLFloaterScriptQueue(const std::string& name, const LLRect& rect, 71 LLFloaterScriptQueue(const std::string& name, const LLRect& rect,
69 const char* title, const char* start_string); 72 const std::string& title, const std::string& start_string);
70 virtual ~LLFloaterScriptQueue(); 73 virtual ~LLFloaterScriptQueue();
71 74
72 // This is the callback method for the viewer object currently 75 // This is the callback method for the viewer object currently
@@ -92,9 +95,6 @@ protected:
92 95
93 // Get this instances ID. 96 // Get this instances ID.
94 const LLUUID& getID() const { return mID; } 97 const LLUUID& getID() const { return mID; }
95
96 // find an instance by ID. Return NULL if it does not exist.
97 static LLFloaterScriptQueue* findInstance(const LLUUID& id);
98 98
99protected: 99protected:
100 // UI 100 // UI
@@ -109,7 +109,7 @@ protected:
109 LLUUID mID; 109 LLUUID mID;
110 static LLMap<LLUUID, LLFloaterScriptQueue*> sInstances; 110 static LLMap<LLUUID, LLFloaterScriptQueue*> sInstances;
111 111
112 const char* mStartString; 112 std::string mStartString;
113}; 113};
114 114
115//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 115//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -118,12 +118,29 @@ protected:
118// This script queue will recompile each script. 118// This script queue will recompile each script.
119//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 119//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120 120
121struct LLCompileQueueData
122{
123 LLUUID mQueueID;
124 LLUUID mItemId;
125 LLCompileQueueData(const LLUUID& q_id, const LLUUID& item_id) :
126 mQueueID(q_id), mItemId(item_id) {}
127};
128
129class LLAssetUploadQueue;
130
121class LLFloaterCompileQueue : public LLFloaterScriptQueue 131class LLFloaterCompileQueue : public LLFloaterScriptQueue
122{ 132{
123public: 133public:
124 // Use this method to create a compile queue. Once created, it 134 // Use this method to create a compile queue. Once created, it
125 // will be responsible for it's own destruction. 135 // will be responsible for it's own destruction.
126 static LLFloaterCompileQueue* create(); 136 static LLFloaterCompileQueue* create(BOOL mono);
137
138 static void onSaveBytecodeComplete(const LLUUID& asset_id,
139 void* user_data,
140 S32 status);
141
142 // remove any object in mScriptScripts with the matching uuid.
143 void removeItemByItemID(const LLUUID& item_id);
127 144
128protected: 145protected:
129 LLFloaterCompileQueue(const std::string& name, const LLRect& rect); 146 LLFloaterCompileQueue(const std::string& name, const LLRect& rect);
@@ -139,24 +156,29 @@ protected:
139 void* user_data, S32 status, LLExtStat ext_status); 156 void* user_data, S32 status, LLExtStat ext_status);
140 157
141 static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status); 158 static void onSaveTextComplete(const LLUUID& asset_id, void* user_data, S32 status, LLExtStat ext_status);
159
142 static void onSaveBytecodeComplete(const LLUUID& asset_id, 160 static void onSaveBytecodeComplete(const LLUUID& asset_id,
143 void* user_data, 161 void* user_data,
144 S32 status, LLExtStat ext_status); 162 S32 status, LLExtStat ext_status);
145 163
146 // compile the file given and save it out. 164 // compile the file given and save it out.
147 void compile(const char* filename, const LLUUID& asset_id); 165 void compile(const std::string& filename, const LLUUID& asset_id);
148 166
149 // remove any object in mScriptScripts with the matching uuid. 167 // remove any object in mScriptScripts with the matching uuid.
150 void removeItemByAssetID(const LLUUID& asset_id); 168 void removeItemByAssetID(const LLUUID& asset_id);
151 169
152 // save the items indicatd by the asset id. 170 // save the items indicated by the item id.
153 void saveItemByAssetID(const LLUUID& asset_id); 171 void saveItemByItemID(const LLUUID& item_id);
154 172
155 // find old_asst_id, and set the asset id to new_asset_id 173 // find InventoryItem given item id.
156 void updateAssetID(const LLUUID& old_asset_id, const LLUUID& new_asset_id); 174 const LLInventoryItem* findItemByItemID(const LLUUID& item_id) const;
157 175
158protected: 176protected:
159 LLViewerInventoryItem::item_array_t mCurrentScripts; 177 LLViewerInventoryItem::item_array_t mCurrentScripts;
178
179private:
180 BOOL mMono; // Compile to mono.
181 LLAssetUploadQueue* mUploadQueue;
160}; 182};
161 183
162//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 184//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~