Applied API changes for VAServer

parent f5bf8d64
......@@ -28,6 +28,7 @@
// VA includes
#include <VA.h>
#include <VACore.h>
#include <VANet.h>
using namespace std;
......@@ -70,7 +71,7 @@ int main( int argc, char* argv[] )
// Core
IVACore* pCore = NULL;
IVAInterface* pCore = NULL;
IVANetServer* pServer = NULL;
try
......@@ -115,7 +116,7 @@ int main( int argc, char* argv[] )
// If only version requested, exit.
if( bVersionInfoRequest )
{
CVACoreVersionInfo ver;
CVAVersionInfo ver;
pCore->GetVersionInfo( &ver );
cout << "[ VAServer ] " << ver.ToString() << endl;
......@@ -142,7 +143,7 @@ int main( int argc, char* argv[] )
return ec;
}
CVACoreVersionInfo ver;
CVAVersionInfo ver;
pCore->GetVersionInfo( &ver );
cout << endl << "[ VAServer ] Core version: " << ver.ToString() << endl;
......@@ -167,7 +168,7 @@ int main( int argc, char* argv[] )
if( ( char ) c == 'm' )
{
bool bMuted = pServer->GetCoreInstance()->IsOutputMuted();
bool bMuted = pServer->GetCoreInstance()->GetOutputMuted();
cout << "[ VAServer ] " << ( !bMuted ? "Muting" : "Unmuting" ) << " global output" << endl;
pServer->GetCoreInstance()->SetOutputMuted( !bMuted );
}
......@@ -198,20 +199,20 @@ int main( int argc, char* argv[] )
{
CVAStruct oArgs, oReturn, oNewArgs;
oArgs[ "getloglevel" ] = true;
pServer->GetCoreInstance()->CallModule( "VACore", oArgs, oReturn );
oReturn = pServer->GetCoreInstance()->CallModule( "VACore", oArgs );
int iCurrentLogLevel = oReturn[ "loglevel" ];
int iNewLogLevel = int( iCurrentLogLevel + 1 ) % 6;
oNewArgs[ "setloglevel" ] = iNewLogLevel;
pServer->GetCoreInstance()->CallModule( "VACore", oNewArgs, oReturn );
oReturn = pServer->GetCoreInstance()->CallModule( "VACore", oNewArgs );
cout << "[ VAServer ] Switched to log level: " << IVACore::GetLogLevelStr( iNewLogLevel ) << endl;
cout << "[ VAServer ] Switched to log level: " << IVAInterface::GetLogLevelStr( iNewLogLevel ) << endl;
}
if( ( char ) c == 's' )
{
CVAStruct oArgs, oReturn;
oArgs[ "getsearchpaths" ] = true;
pServer->GetCoreInstance()->CallModule( "VACore", oArgs, oReturn );
oReturn = pServer->GetCoreInstance()->CallModule( "VACore", oArgs );
CVAStruct& oSearchPaths( oReturn[ "searchpaths" ] );
if( oSearchPaths.IsEmpty() )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment