Read about our upcoming Code of Conduct on this issue

This instance was upgraded to Heptapod 0.28.1 today

Commit 9efe671f authored by aivan_2008's avatar aivan_2008
Browse files

Added project deployment modules templates

--HG--
branch : ClientServerQt
parent 064e6df06a36
......@@ -144,6 +144,8 @@ SOURCES += \
../../../Core/System/Gcc/pevents.cpp \
../../../Core/Engine/UComponentFactory.cpp \
../../../Deploy/Include/rdk_version.cpp \
../../../Core/Application/UProjectDeployer.cpp \
../../../Core/Application/Qt/UProjectDeployerQt.cpp \
../../../Core/Application/UServerTransportHttp.cpp \
../../../Core/Application/UServerTransportHttp.cpp
......@@ -269,6 +271,8 @@ HEADERS +=\
../../../Core/System/Gcc/pevents.h \
../../../Core/Engine/UComponentFactory.h \
../../../Deploy/Include/rdk_version.h \
../../../Core/Application/UProjectDeployer.h \
../../../Core/Application/Qt/UProjectDeployerQt.h \
../../../Core/Application/UServerTransportHttp.h \
../../../Core/Application/UServerTransportHttp.h
......
#include "UProjectDeployerQt.h"
namespace RDK{
// --------------------------
//
// --------------------------
UProjectDeployerQt::UProjectDeployerQt(void)
{
}
UProjectDeployerQt::~UProjectDeployerQt(void)
{
}
// --------------------------
int StartProjectDeployment(const std::string &project_path, const std::string &project_url)
{
}
// --------------------------
//
// --------------------------
/// ,
///
//int UProjectDeployerQt::ReadIncomingBytes(std::string &bind, std::vector<unsigned char> &bytes)
//{
//}
}//namespace RDK
#ifndef UProjectDeployerQtH
#define UProjectDeployerQtH
#include "../../../Deploy/Include/rdk.h"
#include "../UIVisualController.h"
namespace RDK{
class UApplication;
class RDK_LIB_TYPE UProjectDeployerQt: public UAppController
{
friend class UApplication;
protected: //
protected: //
///
UEPtr<UApplication> Application;
protected: //
protected: //
// (- 1)
std::string project_path;
std::string project_url;
// :
std::string database_address;
std::string database_port;
std::string database_login;
std::string database_password;
//
int project_gt_id;
int project_sln_id;
int project_weigts_id;
int project_script_id;
public: //
virtual int StartProjectDeployment(const std::string &project_path, const std::string &project_url);
virtual void SetDatabaseCredentials(const std::string &db_address, const std::string &db_port, const std::string &db_login, const std::string &db_password);
virtual void SetProjectIndices(int gt_id, int sln_id, int weights_id, int script_id);
// --------------------------
//
// --------------------------
UProjectDeployerQt(void);
virtual ~UProjectDeployerQt(void);
// --------------------------
// --------------------------
//
// --------------------------
/// ,
///
//virtual int ReadIncomingBytes(std::string &bind, std::vector<unsigned char> &bytes);
};
}//namespace RDK
#endif
......@@ -17,6 +17,7 @@
#include "UBroadcasterInterface.h"
#include "UServerControl.h"
#include "UServerTransport.h"
#include "UProjectDeployer.h"
#include "UChannelProfiler.h"
#include "UTestManager.h"
......
#include "UProjectDeployer.h"
#include "UApplication.h"
namespace RDK{
// --------------------------
//
// --------------------------
UProjectDeployer::UProjectDeployer(void)
{
}
UProjectDeployer::~UProjectDeployer(void)
{
}
// --------------------------
///
UEPtr<UApplication> UProjectDeployer::GetApplication(void)
{
return Application;
}
bool UProjectDeployer::SetApplication(UEPtr<UApplication> value)
{
if(Application == value)
return true;
Application=value;
return true;
}
void UProjectDeployer::SetDatabaseCredentials(const std::string &db_address,
const std::string &db_port,
const std::string &db_login,
const std::string &db_password)
{
database_port = db_port;
database_address = db_address;
database_login = db_login;
database_password = db_password;
}
void UProjectDeployer::SetProjectIndices(int gt_id, int sln_id, int weights_id, int script_id)
{
project_gt_id = gt_id;
project_sln_id = sln_id;
project_weigts_id = weights_id;
project_script_id = script_id;
}
// --------------------------
//
// --------------------------
/// ,
///
//int UProjectDeployer::ReadIncomingBytes(std::string &bind, std::vector<unsigned char> &bytes)
//{
//}
}//namespace RDK
#ifndef UProjectDeployerH
#define UProjectDeployerH
#include "../../Deploy/Include/rdk.h"
#include "UIVisualController.h"
namespace RDK{
class UApplication;
class RDK_LIB_TYPE UProjectDeployer: public UAppController
{
friend class UApplication;
protected: //
protected: //
///
UEPtr<UApplication> Application;
protected: //
protected: //
// (- 1)
std::string project_path;
std::string project_url;
// :
std::string database_address;
std::string database_port;
std::string database_login;
std::string database_password;
//
int project_gt_id;
int project_sln_id;
int project_weigts_id;
int project_script_id;
public: //
// --------------------------
//
// --------------------------
///
UEPtr<UApplication> GetApplication(void);
bool SetApplication(UEPtr<UApplication> value);
// --------------------------
virtual int StartProjectDeployment(const std::string &project_path, const std::string &project_url) {return 0;};
virtual void SetDatabaseCredentials(const std::string &db_address, const std::string &db_port, const std::string &db_login, const std::string &db_password);
virtual void SetProjectIndices(int gt_id, int sln_id, int weights_id, int script_id);
// --------------------------
//
// --------------------------
UProjectDeployer(void);
virtual ~UProjectDeployer(void);
// --------------------------
// --------------------------
//
// --------------------------
/// ,
///
//virtual int ReadIncomingBytes(std::string &bind, std::vector<unsigned char> &bytes);
};
}//namespace RDK
#endif
......@@ -128,12 +128,12 @@ bool URpcDecoderCommon::IsCmdSupported(const UEPtr<URpcCommand> &command) const
else
if(cmd == "LoadProject")
{
return false;
return true;
}
else
if(cmd == "SaveProject")
{
return false;
return true;
}
else
if(cmd == "ReadImageFromVideoSource")
......@@ -318,7 +318,6 @@ const char* URpcDecoderCommon::RemoteCall(const char *request, int &return_value
int port=xml.ReadInteger("Port",1000);
return_value=GetApplication()->GetServerControl()->UnRegisterMetadataReceiver(address, port);
}
/*
else
if(cmd == "LoadProject")
{
......@@ -335,7 +334,7 @@ const char* URpcDecoderCommon::RemoteCall(const char *request, int &return_value
{
GetApplication()->SaveProject();
return_value=0;//UServerControlForm->SaveProject();
}*/
}
}
// }
......
......@@ -7,6 +7,7 @@
namespace RDK {
class UApplication;
class RDK_LIB_TYPE UServerTransport: public UAppController
{
friend class UApplication;
......@@ -91,7 +92,5 @@ void ConvertVectorToString(const UParamT &source, std::string &dest);
};
}//namespace RDK
#endif
......@@ -718,7 +718,7 @@ std::string URpcDecoderCommonQt::ARemoteCall(const std::string &cmd, RDK::USerSt
else
if(cmd == "LoadProject")
{
std::string file_name=xml.ReadString("FileName","");
/*std::string file_name=xml.ReadString("FileName","");
if(!file_name.empty())
{
//GetApplication()->OpenProject(file_name);
......@@ -736,12 +736,14 @@ std::string URpcDecoderCommonQt::ARemoteCall(const std::string &cmd, RDK::USerSt
}
//UServerControlForm->LoadProject(channel_index,file_name);
}
}*/
return_value=1;
}
else
if(cmd == "SaveProject")
{
//GetApplication()->SaveProject();
/*
if(!engine)
{
return_value=1;
......@@ -752,7 +754,9 @@ std::string URpcDecoderCommonQt::ARemoteCall(const std::string &cmd, RDK::USerSt
eng->actionSaveConfig();
return_value=0;
}
*/
//return_value=0;//UServerControlForm->SaveProject();
return_value=1;
}
else
return_value=2001;
......
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