42 #include "CoreFoundation.h"
56 m_pDataSessionConfig = NULL;
57 m_Rendered_Frames = 0;
58 m_pResourceManager = NULL;
76 m_pDataSessionConfig = pSessionConfig;
77 m_pResourceManager = p_ResMan;
78 m_SessionMode = p_sessionmode;
79 m_SessionPlaybackMode = p_playbackmode;
80 m_SessionRecordMode = p_recordmode;
99 MODebug2->Message(
"moDataSession::SaveToFile: ");
102 if (m_pDataSessionConfig==NULL) {
103 MODebug2->Error(
"moDataSession::SaveToFile > no Data Session Config defined.");
106 moText FileDestination = m_pDataSessionConfig->GetSessionFileName();
108 if (p_filename !=
moText(
"") && p_filename!=FileDestination) {
113 FileDestination = p_filename;
116 moParam& paramKeys( m_pDataSessionConfig->GetParam(
"keys" ) );
117 moValues& valuesKey( paramKeys.GetValues() );
124 for(
int keyi=0; keyi<(int)this->m_Keys.Count(); keyi++) {
130 MODebug2->Message(
"moDataSession::SaveToFile > keyi: " +
IntToStr(keyi) +
" xml:" + pKeyXML );
135 paramKeys.AddValue( newValue );
139 m_pDataSessionConfig->SaveConfig( FileDestination );
149 moText FileDestination = p_filename;
151 if (m_pDataSessionConfig==NULL) {
152 MODebug2->Error(
"moDataSession::LoadFromFile > no Data Session Config defined.");
157 if (p_filename ==
"") {
158 FileDestination = m_pDataSessionConfig->GetSessionFileName();
161 if (m_pDataSessionConfig->LoadConfig( FileDestination )==
MO_CONFIG_OK) {
163 for(
int keyi=0; keyi<(int)this->m_Keys.Count(); keyi++) {
170 moParam& paramKeys( m_pDataSessionConfig->GetParam(
"keys" ) );
171 moValues& valuesKey( paramKeys.GetValues() );
172 for(
int i=0; i<(int)valuesKey.Count(); i++ ) {
178 m_Keys.Add( newKey );
183 }
else MODebug2->Error(
"moDataSession::LoadFromFile > could not load the session config file at " + FileDestination);
190 if (!m_pDataSessionConfig) {
191 MODebug2->Error(
"moDataSession::LoadSession() > no session config object.");
194 return m_pDataSessionConfig->LoadConfig( m_pDataSessionConfig->GetSessionFileName() )!=
MO_CONFIGFILE_NOT_FOUND;
202 m_Keys.Add( newKey );
203 MODebug2->Message(
"moDataSession::AddKey > " + newKey->
ToJSON() );
213 (*eventKey) = p_eventkey;
214 m_EventKeys.Add( eventKey );
231 MODebug2->Message(
"moDataSession::StopRecord > m_StartTimeCode: "+
IntToStr(m_StartTimeCode)+
" m_EndTimeCode:" +
IntToStr(m_EndTimeCode));
242 return StopRecord( p_console_state ) && Render( p_console_state );
244 return StopRender( p_console_state );
251 MODebug2->Message(
"moDataSession::Record > m_StartTimeCode:" +
IntToStr(m_StartTimeCode));
259 return m_Rendered_Frames;
267 MODebug2->Message(
"moDataSession::StopRender > m_EndTimeCode:" +
IntToStr(m_EndTimeCode)+
" zero:" +
IntToStr(zero));
276 return StopRender( p_console_state );
278 m_Rendered_Frames = 0;
284 if (zero!=0) MODebug2->Error(
"moDataSession::Render> not zero! zero: " +
IntToStr(zero));
289 MODebug2->Message(
"moConsole::ConsoleModeUpdate > START RENDER session: absolute tickis: " +
IntToStr(tickis)+
" tickis(moldeo): " +
IntToStr(tickis_moldeo) );
291 MODebug2->Message(
"moConsole::ConsoleModeUpdate > START RENDER session: m_StartTimeCode: " +
IntToStr(m_StartTimeCode) );
294 this->m_Rendered_Folder = temp_render_base;
300 this->m_Rendered_Folder = temp_render_base +
IntToStr( ntemp, 3 );
311 m_Rendered_Folder = p_rendered_folder;
322 moText frame_filename =
"frame_" +
IntToStr( m_Rendered_Frames, 7 );
323 if (m_pResourceManager && m_pResourceManager->GetRenderMan())
327 m_Rendered_Frames+=1;
335 if (m_pVideoGraph && m_pDataSessionConfig) {
343 if (m_pDataSessionConfig) {
344 return m_pDataSessionConfig->IsConfigLoaded();
351 if (m_iActualKey>=(
int)m_Keys.Count() || m_Keys.Count()==0 )
359 return m_Keys.Count();
375 if ( 0<=p_actual_key && p_actual_key<(
int)m_Keys.Count()) {
376 m_iActualKey = p_actual_key;
377 m_ActualKey = (*m_Keys[m_iActualKey]);
392 if (m_iActualKey<0 || m_iActualKey>=(
int)m_Keys.Count()) {
396 if (m_iActualKey<(
int)m_Keys.Count()) {
402 MODebug2->Message(
"moDataSession::NextKey > Founded timecode Key in! time_code_ms: " +
IntToStr(time_code_ms) );
404 m_ActualKey = TestKey;
416 moText fieldSeparation =
",";
419 m_FullJSON+=
moText(
"'rendered_folder': '") + this->GetRenderedFolder() +
moText(
"'");
444 long p_MoldeoObjectId,
446 m_TimeCode = p_Timecode;
447 m_ActionType = p_ActionType;
449 m_ObjectId = p_MoldeoObjectId;
450 m_PreconfId = p_PreconfId;
455 long p_MoldeoObjectId ) {
456 m_TimeCode = p_Timecode;
457 m_ActionType = p_ActionType;
458 m_ObjectId = p_MoldeoObjectId;
464 long p_MoldeoObjectId,
467 m_TimeCode = p_Timecode;
468 m_ActionType = p_ActionType;
470 m_ObjectId = p_MoldeoObjectId;
471 m_ParamId = p_ParamId;
472 m_ValueId = p_ValueId;
478 long p_MoldeoObjectId,
482 m_TimeCode = p_Timecode;
483 m_ActionType = p_ActionType;
487 m_ObjectId = p_MoldeoObjectId;
488 m_ParamId = p_ParamId;
489 m_ValueId = p_ValueId;
495 long p_MoldeoObjectId,
498 m_TimeCode = p_Timecode;
499 m_ActionType = p_ActionType;
501 m_ObjectId = p_MoldeoObjectId;
503 m_EffectState = p_effect_state;
508 long p_MoldeoObjectId,
511 m_TimeCode = p_Timecode;
512 m_ActionType = p_ActionType;
514 m_ObjectId = p_MoldeoObjectId;
515 m_ParamId = p_ParamId;
517 m_ParamDefinition = p_param_definition;
531 m_TimeCode = src.m_TimeCode;
532 m_ActionType = src.m_ActionType;
533 m_Value = src.m_Value;
534 m_ObjectId = src.m_ObjectId;
535 m_ParamId = src.m_ParamId;
536 m_ValueId = src.m_ValueId;
537 m_PreconfId = src.m_PreconfId;
538 m_ParamDefinition = src.m_ParamDefinition;
539 m_EffectState = src.m_EffectState;
545 if ( m_TimeCode<=time_position
546 && time_position< (m_TimeCode+time_interval) ) {
567 m_FullJSON+=
moText(
"'TimeCode': '") +
IntToStr((
long)m_TimeCode)+
"',";
568 m_FullJSON+=
moText(
"'ActionType': '") +
IntToStr((
long)m_ActionType)+
"',";
572 m_FullJSON+=
moText(
"'PreconfId': '") +
IntToStr(m_PreconfId)+
"',";
573 m_FullJSON+=
moText(
"'ParamDefinition': ") + m_ParamDefinition.ToJSON() +
",";
574 m_FullJSON+=
moText(
"'EffectState': ") + m_EffectState.ToJSON() +
",";
575 m_FullJSON+=
moText(
"'Value': ") + m_Value.ToJSON() +
",";
585 m_FullXML+=
"<moDataSessionKey timecode='"+
IntToStr((
long)m_TimeCode)+
"' ";
586 m_FullXML+=
moText(
" actiontype='") +
IntToStr((
long)GetActionType())+
"' ";
594 m_FullXML+=
"</moDataSessionKey>";
601 TiXmlDocument m_XMLDoc;
603 TiXmlEncoding xencoding = TIXML_ENCODING_LEGACY;
605 m_XMLDoc.Parse((
const char*) p_XmlText, 0, xencoding );
608 TiXmlElement* sessionkeyNode = m_XMLDoc.FirstChildElement(
"moDataSessionKey");
613 if (sessionkeyNode) {
614 m_TimeCode = atoi(
moText( sessionkeyNode->Attribute(
"timecode") ));
616 m_ObjectId = atoi(
moText( sessionkeyNode->Attribute(
"objectid") ) );
617 m_ParamId = atoi(
moText( sessionkeyNode->Attribute(
"paramid") ) );
618 m_ValueId = atoi(
moText( sessionkeyNode->Attribute(
"valueid") ) );
619 m_PreconfId = atoi(
moText( sessionkeyNode->Attribute(
"preconfid") ) );
621 TiXmlElement* paramdefNode = sessionkeyNode->FirstChildElement(
"moParamDefinition");
622 if (paramdefNode) m_ParamDefinition.Set(
moText( sessionkeyNode->GetText() ) );
624 TiXmlElement* efffectstateNode = sessionkeyNode->FirstChildElement(
"moEffectState");
625 if (efffectstateNode) m_EffectState.Set(
moText( sessionkeyNode->GetText() ) );
627 TiXmlElement* valueNode = sessionkeyNode->FirstChildElement(
"moValue");
628 if (valueNode) m_Value.Set(
moText( sessionkeyNode->GetText() ) );
650 m_Timecode = p_Timecode;
677 m_ConsoleConfigName =
moText(
"");
692 m_AppPath = p_apppath;
693 m_DataPath = p_datapath;
696 m_ConsoleConfigName = p_consoleconfig;
697 m_SessionFileName = p_SessionFileName;
698 m_VideoFileName = p_VideoFileName;
699 m_MaxKeys = p_MaxKeys;
700 m_MaxTimecode = p_MaxTimecode;
702 if ( m_AppPath==
moText(
"") ) {
704 moFile fileMol( p_apppath );
706 m_AppPath = workPath;
710 +
" p_Address: " +
IntToStr( p_Address ) );
716 moFile molFile( m_ConsoleConfigName );
717 moFile mosFile( m_SessionFileName );
720 m_ConsoleConfigName = m_DataPath + moSlash + m_ConsoleConfigName;
725 m_SessionFileName = m_DataPath + moSlash + m_SessionFileName;
729 GetConfigDefinition()->Set(
"session",
"moDataSession" );
736 if (CreateDefault( m_SessionFileName )) {
749 if ( m_AppDataPath ==
moText(
"../../data") ) {
763 m_AppDataPath = exeFile.
GetPath() + moSlash + m_AppDataPath;
775 if ( m_DataPath ==
moText(
"") ) {
776 m_DataPath = m_AppPath;
799 return m_AppDataPath;
805 return m_ConsoleConfigName;
810 return m_VideoFileName;
815 return m_SessionFileName;
820 return m_PluginsPath;
835 SetName(
"datamanager");
836 SetLabelName(
"datamanager");
838 m_pDataSession = NULL;
839 m_pDataSessionConfig = NULL;
850 if (!m_pDataSession) {
853 m_pDataSession->Set(
moText(
"session 1"),
854 m_pDataSessionConfig,
858 m_pResourceManager );
865 if (m_pDataSession) {
866 delete m_pDataSession;
867 m_pDataSession = NULL;
869 if (m_pDataSessionConfig) {
870 delete m_pDataSessionConfig;
871 m_pDataSessionConfig = NULL;
874 if (!m_pDataSessionConfig) {
877 if (!m_pDataSession) {
879 m_pDataSession->Set(
moText(
"session 1"),
880 m_pDataSessionConfig,
884 m_pResourceManager );
888 ReloadPluginDefinitions();
899 moText pluginfullpath = m_pDataSessionConfig->GetPluginsPath();
904 ReloadPluginDefinitions( pluginfullpath + moSlash +
"effects",
MO_OBJECT_EFFECT );
907 ReloadPluginDefinitions( pluginfullpath + moSlash +
"resources",
MO_OBJECT_RESOURCE );
908 ReloadPluginDefinitions( pluginfullpath + moSlash +
"iodevices",
MO_OBJECT_IODEVICE );
913 switch(mobjecttype) {
918 ReloadPluginDefinitions( pluginfullpath + moSlash +
"effects",
MO_OBJECT_EFFECT );
927 ReloadPluginDefinitions( pluginfullpath + moSlash +
"resources",
MO_OBJECT_RESOURCE );
930 ReloadPluginDefinitions( pluginfullpath + moSlash +
"iodevices",
MO_OBJECT_IODEVICE );
942 DirEffects.
Open( plugindir,
moText(
"/*.dll") );
944 DirEffects.
Open( plugindir,
moText(
"/*.so") );
947 if (DirEffects.
Exists()) {
955 MODebug2->Message(
moText(
"File founded") );
962 FileNameEnd.
Right(2);
963 bDebug = ( FileNameEnd==
moText(
"_d") );
964 if (bDebug) PluginName.
Left( PluginName.
Length() - 3 );
986 }
else MODebug2->Error(
moText(
"Directory doesn't exists:")+(
moText)plugindir );
999 CFBundleRef mainBundle = CFBundleGetMainBundle();
1000 CFURLRef moldeologoURL = CFBundleCopyResourceURL( mainBundle, CFSTR(
"moldeologo"),CFSTR(
"png"),NULL );
1004 string moldeologostr(
"-");
1006 if (moldeologoURL) {
1007 moldeologostr = CFStringGetCStringPtr( CFURLGetString(moldeologoURL), kCFStringEncodingUTF8 );
1008 CFStringRef cfstr = CFURLCopyFileSystemPath( moldeologoURL, kCFURLPOSIXPathStyle );
1010 moldeologostr = CFStringGetCStringPtr( cfstr, kCFStringEncodingUTF8 );
1017 moText datad = moldeologostr.c_str();
1020 moDataManager::m_ModulesDir = logof.
GetPath()+
moText(
"plugins");
1028 CFBundleRef mainBundle = CFBundleGetMainBundle();
1029 CFURLRef moldeologoURL = CFBundleCopyResourceURL( mainBundle, CFSTR(
"moldeologo"),CFSTR(
"png"),NULL );
1033 string moldeologostr(
"-");
1035 if (moldeologoURL) {
1036 moldeologostr = CFStringGetCStringPtr( CFURLGetString(moldeologoURL), kCFStringEncodingUTF8 );
1037 CFStringRef cfstr = CFURLCopyFileSystemPath( moldeologoURL, kCFURLPOSIXPathStyle );
1039 moldeologostr = CFStringGetCStringPtr( cfstr, kCFStringEncodingUTF8 );
1046 moText datad = moldeologostr.c_str();
1049 moDataManager::m_ModulesDir = logof.
GetPath()+
moText(
"plugins");
1051 return m_ModulesDir;
1058 if (m_pDataSessionConfig)
1059 return m_pDataSessionConfig->GetAppPath();
1066 if (m_pDataSessionConfig)
1067 return m_pDataSessionConfig->GetDataPath();
1074 moText full_path = m_pDataSessionConfig->GetDataPath() + moSlash + p_file_name;
1075 return moFile( full_path );
1081 moText full_path = m_pDataSessionConfig->GetDataPath() + moSlash + p_dir_name;
1089 moText full_path = m_pDataSessionConfig->GetAppDataPath() + moSlash + p_file_name;
1090 return moFile( full_path );
1096 moText full_path = m_pDataSessionConfig->GetAppDataPath() + moSlash + p_dir_name;
1103 if (m_pDataSessionConfig)
1104 return m_pDataSessionConfig->GetAppDataPath();
1111 if (m_pDataSessionConfig)
1112 return m_pDataSessionConfig->GetConsoleConfigName();
1119 if (m_pDataSessionConfig)
1120 return m_pDataSessionConfig->GetPluginsPath();
1139 return m_pDataSession;
1151 MODebug2->
Message(
"moDataManager::Export > p_export_path_: " + p_export_path_ );
1153 if ( m_pDataSessionConfig && p_from_config_console ==
"") {
1155 p_from_config_console = m_pDataSessionConfig->GetDataPath() + moSlash + m_pDataSessionConfig->GetConsoleConfigName();
1159 if ( p_from_config_console !=
"" ) {
1163 MODebug2->Error(
moText(
"moDataManager::Export > Couldn't load config from ") + p_from_config_console );
1167 MODebug2->Push(
moText(
"moDataManager::Export > Exporting moldeo console project: ") + p_from_config_console );
1172 MODebug2->Error(
moText(
"moDataManager::Export > Couldn't load config from no console config file, please define one or load a project.") );
1204 result&= IteratedExport( config_file );
1209 result&= IteratedExport( p_from_config_console );
1220 if ( p_from_config_file !=
"" ) {
1224 MODebug2->Error(
moText(
"moDataManager::IteratedExport > error loading config file ") + p_from_config_file );
1253 moText filerelative_Data =
"";
1254 moFile filetoImport( p_file_full_path );
1256 if (InData(p_file_full_path)) {
1261 moText datapath = GetDataPath();
1265 MODebug2->Message(
"moDataManager::MakeRelativeToData > fileabs: " + fileabs +
" datapath:" + datapath
1266 +
" filerelative_Data: " + filerelative_Data );
1269 return filerelative_Data;
1275 moFile filetoImport( p_file_full_path );
1279 moText datapath = GetDataPath();
1282 MODebug2->Message(
"moDataManager::InData > fileabs: " + fileabs +
" datapath:" + datapath );
1287 MODebug2->Message(
"moDataManager::InData > fileabs_Data:" + fileabs_Data );
1288 if (fileabs_Data==datapath) {
1292 MODebug2->Message(
"moDataManager::InData > not InData! Copy file please!");
1299 bool result =
false;
1304 moFile importFile( p_import_file_full_path );
1305 moText file_destination_path;
1306 if (importFile.
Exists()) {
1307 file_destination_path = GetDataPath() +
"/" + importFile.
GetFullName();
1308 MODebug2->Message(
"moDataManager::ImportFile > p_import_file_full_path: " + p_import_file_full_path
1309 +
" to " + file_destination_path );
virtual ~moDataSessionKey()
static bool CopyFile(moText FileSrc, moText FileDst)
moText GetFullName()
Retreive full file name: return "myFileName" for "myFileName.txt".
void SetRenderedFolder(const moText &p_rendered_folder)
moMoldeoObjectType
Tipos de objetos en Moldeo.
Grabación a memoria de las claves (al finalizar se puede elegir grabar o no a disco... modo predeterminado)
void SetText(moText ptext)
"valueset" > MO_ACTION_VALUE_SET
static void Message(moText p_text)
Anuncia un mensaje al usuario además de guardarlo en el log de texto.
static moMoldeoActionType StrToActionType(const moText &p_action_type_str)
moText GetConsoleConfigName()
virtual ~moDataSessionEventKey()
static moText GetWorkPath()
moValueBase & GetSubValue(MOint p_indexsubvalue=0)
moDirectory GetAppDataDir(const moText &p_dir_name)
value type: NUM or FUNCTION
#define MO_CONFIGFILE_NOT_FOUND
static moText m_ModulesDir
moRenderManager * GetRenderMan()
bool Render(moConsoleState &p_console_state)
stop record
static void Error(moText p_text)
Anuncia un error.
void StartRecordingSession()
bool IteratedExport(const moText &p_from_config_file_)
moDataSessionPlaybackMode
Objeto dibujable, efecto-maestro ( puede controlar otros efectos )
bool LoadFromFile(const moText &p_filename)
virtual ~moDataSessionConfig()
static moText GetTypeToClass(moMoldeoObjectType p_Type=MO_OBJECT_UNDEFINED)
Transforma un moMoldeoObjectType en el nombre de su correspondiente clase base.
bool Record(moConsoleState &p_console_state)
stop playback
moText GetExtension()
Get absolute path and filename "/D/PP/myFileName.txt".
static moText GetExePath()
moFile GetDataFile(const moText &p_file_name)
void ReplaceChar(const char *target, const char *replacement)
clase de para manejar textos
bool StopRender(moConsoleState &p_console_state)
render to images
virtual MOboolean Finish()
Clase Base Descriptiva de un Objeto Moldeo.
Dispositivo de entrada/salida, típicamente, interfaces humanas de IO y datos ( teclado, mouse, tableta, tcp, udp, serial )
bool AddEventKey(const moDataSessionEventKey &p_eventkey)
bool AddKey(const moDataSessionKey &p_key)
static void Log(moText p_text)
Escribe un mensaje en el archivo de registro (log)
static const moText & GetModulesDir()
void moStopTimer()
Detiene el temporizador global.
int LoadConfig(moText p_filename)
Lee la configuracion de un archivo.
moText GetPath()
Retreive full file name: return "myFileName.txt", extension is included.
bool SaveToFile(const moText &p_filename=moText(""))
bool RecordLive(moResourceManager *pRM)
stop render
void moStartTimer()
Inicia el temporizador global.
const moDataSessionKey & NextKey(moConsoleState &m_ConsoleState)
bool InData(const moText &p_file_full_path)
moMoldeoActionType
moMoldeoActionType
MOulong moGetTicksAbsoluteStep(long step_interval)
Devuelve en milisegundos el valor del reloj de Moldeo.
Objeto dibujable, pre-efecto ( primeros efectos en el orden de dibujado )
moText GetCompletePath()
Get inmediate folder name: return "PP" for "PP/myFileName.txt".
Administrador de recursos.
bool StepRender(moConsoleState &p_console_state)
moText GetConsoleConfigName()
param 1: effect label name | effect id
moText m_RenderFrameQuality
const moDataSessionKey & GetActualKey()
Objeto dibujable, efecto ( efectos en el orden de dibujado )
MOulong moResetTicksAbsoluteStep(long reset_value)
moDataSessionKey & operator=(const moDataSessionKey &src)
"paramset" > MO_ACTION_PARAM_SET
void StartPlayinbackSession()
Reproducción en tiempo real a consola.
virtual MOboolean Init(const moText &p_apppath, const moText &p_datapath, moConfig &p_consoleconfig, MOint p_render_to_texture_mode=0, MOint p_screen_width=320, MOint p_screen_height=240, MOint p_render_width=320, MOint p_render_height=240, MO_HANDLE p_OpWindowHandle=0, MO_DISPLAY p_Display=NULL)
bool SetKey(int p_actual_key)
const moDataMessage & Message(moParamReference p_paramreference)
int GetRenderedFrames() const
moValue & GetValue(MOint i=-1)
bool Export(const moText &p_export_path, moText p_from_config_console=moText(""))
moParam & GetParam(MOint p_paramindex=-1)
Devuelve el parámetro por índice.
virtual long Duration()
Devuelve el valor del reloj del temporizador.
Objeto principal de administración y dibujado de objetos de Moldeo.
moBucketsPool * GetFramesPool()
bool ImportFile(const moText &p_import_file_full_path)
bool StopRecord(moConsoleState &p_console_state)
start record
moText GetVideoFileName()
LIBMOLDEO_API moText0 IntToStr(int a)
moMoldeoActionType GetActionType() const
Objeto dibujable, post-efecto ( últímos efectos en el orden de dibujado )
bool Playback(moConsoleState &p_console_state)
moDataSession * GetSession()
MOuint GetValuesCount() const
moText GetAbsolutePath()
Get relative path and filename "PP/myFileName.txt".
moFile GetAppDataFile(const moText &p_file_name)
moValueType GetType() const
Devuelve el tipo de valor ,esta función se implementa sólo como atajo a ciertos datos de la definición ...
void Set(moText p_Name, moDataSessionConfig *pSessionConfig, moDataSessionMode p_sessionmode, moDataSessionRecordMode p_recordmode, moDataSessionPlaybackMode p_playbackmode, moResourceManager *p_ResMan)
moDefineDynamicArray(moDataSessionKeys) moDefineDynamicArray(moDataSessionEventKeys) moDataSession
bool Loaded()
fast live record
static bool DirectoryExists(moText dirname)
MOboolean Open(moText p_CompletePath, moText p_Search="/*.*")
bool IsInTime(long time_position, long time_interval)
moText MakeRelativeToData(const moText &p_file_full_path)
int ReloadPluginDefinitions(moText plugindir="", moMoldeoObjectType mobjecttype=MO_OBJECT_UNDEFINED)
int Set(const moText &p_XmlText)
almacena la configuración de los parámetros de un objeto en un archivo XML
static const moText & GetDataDir()
MOulong moGetTicks()
Devuelve en milisegundos el valor del reloj de Moldeo.
moText GetSessionFileName()