summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.h
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2025-08-26 21:29:41 -0700
committerRider Linden <rider@lindenlab.com>2025-10-07 09:19:36 -0700
commitf31c194b8674df295edf74693a2f843ca314ca92 (patch)
tree936a587328d122e0bd12f811a2c310d23ec872b8 /indra/newview/llpreviewscript.h
parent7b174ab2a7c54d3e25a56530a2179848db2d46c0 (diff)
Expand the websocket implementation a bit. Added JSONRPC specialization.
Diffstat (limited to 'indra/newview/llpreviewscript.h')
-rw-r--r--indra/newview/llpreviewscript.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 14ec54d42b..72d52a115e 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -54,6 +54,7 @@ class LLScriptEdContainer;
class LLFloaterGotoLine;
class LLFloaterExperienceProfile;
class LLScriptMovedObserver;
+class LLScriptEditorWSConnection;
class LLLiveLSLFile : public LLLiveFile
{
@@ -99,14 +100,14 @@ protected:
bool live,
S32 bottom_pad = 0); // pad below bottom row of buttons
public:
- ~LLScriptEdCore();
+ ~LLScriptEdCore() override;
void initMenu();
void processKeywords();
void processKeywords(bool luau_language);
- virtual void draw();
- /*virtual*/ bool postBuild();
+ void draw() override;
+ bool postBuild() override;
bool canClose();
void setEnableEditing(bool enable);
bool canLoadOrSaveToFile( void* userdata );
@@ -159,6 +160,7 @@ public:
void enableSave(bool b) { mEnableSave = b; }
bool hasChanged() const;
+
private:
void onBtnDynamicHelp();
void onBtnUndoChanges();
@@ -204,7 +206,7 @@ private:
LLScriptEdContainer* mContainer; // parent view
-public:
+ public:
boost::signals2::connection mSyntaxIDConnection;
};
@@ -218,6 +220,11 @@ public:
bool handleKeyHere(KEY key, MASK mask);
+ void startWebsocketServer();
+ void attachToWebSocket(const std::shared_ptr<LLScriptEditorWSConnection>& connection);
+ void detachFromWebSocket(bool send_disconnect);
+ void cleanupWebSocket();
+
protected:
std::string getTmpFileName(const std::string& script_name) const;
std::string getUniqueHash() const;
@@ -230,6 +237,8 @@ protected:
LLScriptEdCore* mScriptEd;
LLLiveLSLFile* mLiveFile = nullptr;
LLLiveLSLFile* mLiveLogFile = nullptr;
+
+ std::shared_ptr<LLScriptEditorWSConnection> mWebSocket;
};
// Used to view and edit an LSL script from your inventory.