// EXTERNAL INCLUDE
#include <cstddef>
+#include <string>
namespace Dali
{
-
namespace EnvironmentVariable
{
-
namespace
{
-const char * gReturnValue = NULL;
-}
+const char* gReturnValue = NULL;
+std::string gEnvironmentVariableName;
+std::string gEnvironmentVariableValue;
+} // namespace
-const char * GetEnvironmentVariable( const char * variable )
+const char* GetEnvironmentVariable(const char* variable)
{
+ if(gEnvironmentVariableName == variable)
+ {
+ return gEnvironmentVariableValue.c_str();
+ }
return gReturnValue;
}
-void SetTestingEnvironmentVariable( bool testing)
+void SetTestingEnvironmentVariable(bool testing)
{
- if( testing )
+ if(testing)
{
gReturnValue = "1";
}
}
}
+void SetTestEnvironmentVariable(const char* variable, const char* value)
+{
+ gEnvironmentVariableName = variable;
+ gEnvironmentVariableValue = value;
+}
+
} // namespace EnvironmentVariable
} // namespace Dali