aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llplugin
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-10-30 14:16:00 -0700
committerMcCabe Maxsted2010-11-02 16:49:44 -0700
commitf10af893916d543fb29f2740ecfc8039b0a31b73 (patch)
treea13b71834d2e41092301b3a7b0b0539cb705b996 /linden/indra/llplugin
parentRemove explicit dependency of windows on media_plugin_gstreamer010 (diff)
downloadmeta-impy-f10af893916d543fb29f2740ecfc8039b0a31b73.zip
meta-impy-f10af893916d543fb29f2740ecfc8039b0a31b73.tar.gz
meta-impy-f10af893916d543fb29f2740ecfc8039b0a31b73.tar.bz2
meta-impy-f10af893916d543fb29f2740ecfc8039b0a31b73.tar.xz
Added conversion function for plugin EState to string info
Diffstat (limited to 'linden/indra/llplugin')
-rwxr-xr-xlinden/indra/llplugin/llpluginprocessparent.cpp52
-rwxr-xr-xlinden/indra/llplugin/llpluginprocessparent.h1
2 files changed, 52 insertions, 1 deletions
diff --git a/linden/indra/llplugin/llpluginprocessparent.cpp b/linden/indra/llplugin/llpluginprocessparent.cpp
index 8db6046..8fd18ef 100755
--- a/linden/indra/llplugin/llpluginprocessparent.cpp
+++ b/linden/indra/llplugin/llpluginprocessparent.cpp
@@ -1084,7 +1084,7 @@ std::string LLPluginProcessParent::getPluginVersion(void)
1084 1084
1085void LLPluginProcessParent::setState(EState state) 1085void LLPluginProcessParent::setState(EState state)
1086{ 1086{
1087 LL_DEBUGS("Plugin") << "setting state to " << state << LL_ENDL; 1087 LL_DEBUGS("Plugin") << "setting state to " << stateToString(state) << LL_ENDL;
1088 mState = state; 1088 mState = state;
1089}; 1089};
1090 1090
@@ -1118,3 +1118,53 @@ bool LLPluginProcessParent::pluginLockedUp()
1118 return (mHeartbeat.getStarted() && mHeartbeat.hasExpired()); 1118 return (mHeartbeat.getStarted() && mHeartbeat.hasExpired());
1119} 1119}
1120 1120
1121std::string LLPluginProcessParent::stateToString(EState state)
1122{
1123 std::string eng = "unknown plugin state";
1124 switch (state)
1125 {
1126 case STATE_UNINITIALIZED:
1127 eng = "STATE_UNINITIALIZED";
1128 break;
1129 case STATE_INITIALIZED:
1130 eng = "STATE_INITIALIZED - init() has been called";
1131 break;
1132 case STATE_LISTENING:
1133 eng = "STATE_LISTENING - listening for incoming connection";
1134 break;
1135 case STATE_LAUNCHED:
1136 eng = "STATE_LAUNCHED - process has been launched";
1137 break;
1138 case STATE_CONNECTED:
1139 eng = "STATE_CONNECTED - process has connected";
1140 break;
1141 case STATE_HELLO:
1142 eng = "STATE_HELLO - first message from the plugin process has been received";
1143 break;
1144 case STATE_LOADING:
1145 eng = "STATE_LOADING - process has been asked to load the plugin";
1146 break;
1147 case STATE_RUNNING:
1148 eng = "STATE_RUNNING - plugin running";
1149 break;
1150 case STATE_LAUNCH_FAILURE:
1151 eng = "STATE_LAUNCH_FAILURE - failure before plugin loaded";
1152 break;
1153 case STATE_ERROR:
1154 eng = "STATE_ERROR - generic bailout state";
1155 break;
1156 case STATE_CLEANUP:
1157 eng = "STATE_CLEANUP - clean everything up";
1158 break;
1159 case STATE_EXITING:
1160 eng = "STATE_EXITING - tried to kill process, waiting for it to exit";
1161 break;
1162 case STATE_DONE:
1163 eng = "STATE_DONE - plugin done";
1164 break;
1165 default:
1166 break;
1167 }
1168
1169 return llformat("(%d) ", (S32)state) + eng;
1170}
diff --git a/linden/indra/llplugin/llpluginprocessparent.h b/linden/indra/llplugin/llpluginprocessparent.h
index a8929b1..95f5f70 100755
--- a/linden/indra/llplugin/llpluginprocessparent.h
+++ b/linden/indra/llplugin/llpluginprocessparent.h
@@ -147,6 +147,7 @@ private:
147 }; 147 };
148 EState mState; 148 EState mState;
149 void setState(EState state); 149 void setState(EState state);
150 std::string stateToString(EState state);
150 151
151 bool pluginLockedUp(); 152 bool pluginLockedUp();
152 bool pluginLockedUpOrQuit(); 153 bool pluginLockedUpOrQuit();