remote/gen-cpp/Server_server.skeleton.cpp (392 lines of code) (raw):
// This autogenerated skeleton file illustrates how to build a server.
// You should copy it to another filename to avoid overwriting it.
#include "Server.h"
#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/server/TSimpleServer.h>
#include <thrift/transport/TServerSocket.h>
#include <thrift/transport/TBufferTransports.h>
using namespace ::apache::thrift;
using namespace ::apache::thrift::protocol;
using namespace ::apache::thrift::transport;
using namespace ::apache::thrift::server;
using namespace ::thrift_codegen;
class ServerHandler : virtual public ServerIf {
public:
ServerHandler() {
// Your initialization goes here
}
int32_t connect(const std::string& backwardConnectionPipe, const bool isMaster) {
// Your implementation goes here
printf("connect\n");
}
int32_t connectTcp(const int32_t backwardConnectionPort, const bool isMaster) {
// Your implementation goes here
printf("connectTcp\n");
}
void attach(const int32_t connectionId) {
// Your implementation goes here
printf("attach\n");
}
void log(const std::string& msg) {
// Your implementation goes here
printf("log\n");
}
void echo(std::string& _return, const std::string& msg) {
// Your implementation goes here
printf("echo\n");
}
void getServerInfo(std::string& _return, const std::string& request) {
// Your implementation goes here
printf("getServerInfo\n");
}
void stop() {
// Your implementation goes here
printf("stop\n");
}
int32_t Client_Create(const int32_t handlersMask) {
// Your implementation goes here
printf("Client_Create\n");
}
void Client_Dispose(const int32_t cid) {
// Your implementation goes here
printf("Client_Dispose\n");
}
void Client_AddHandlers(const int32_t cid, const int32_t handlersMask) {
// Your implementation goes here
printf("Client_AddHandlers\n");
}
void Client_RemoveHandlers(const int32_t cid, const int32_t handlersMask) {
// Your implementation goes here
printf("Client_RemoveHandlers\n");
}
void Client_AddMessageRouter(const int32_t cid, const ::thrift_codegen::RObject& msgRouter) {
// Your implementation goes here
printf("Client_AddMessageRouter\n");
}
void Client_RemoveMessageRouter(const int32_t cid, const ::thrift_codegen::RObject& msgRouter) {
// Your implementation goes here
printf("Client_RemoveMessageRouter\n");
}
int32_t Browser_Create(const int32_t cid, const ::thrift_codegen::RObject& requestContextHandler) {
// Your implementation goes here
printf("Browser_Create\n");
}
void Browser_StartNativeCreation(const int32_t bid, const std::string& url) {
// Your implementation goes here
printf("Browser_StartNativeCreation\n");
}
void Browser_OpenDevTools(const int32_t bid, const int32_t x, const int32_t y) {
// Your implementation goes here
printf("Browser_OpenDevTools\n");
}
void Browser_Close(const int32_t bid) {
// Your implementation goes here
printf("Browser_Close\n");
}
void Browser_CloseDevTools(const int32_t bid) {
// Your implementation goes here
printf("Browser_CloseDevTools\n");
}
void Browser_Reload(const int32_t bid) {
// Your implementation goes here
printf("Browser_Reload\n");
}
void Browser_ReloadIgnoreCache(const int32_t bid) {
// Your implementation goes here
printf("Browser_ReloadIgnoreCache\n");
}
void Browser_LoadURL(const int32_t bid, const std::string& url) {
// Your implementation goes here
printf("Browser_LoadURL\n");
}
void Browser_LoadRequest(const int32_t bid, const ::thrift_codegen::RObject& request) {
// Your implementation goes here
printf("Browser_LoadRequest\n");
}
void Browser_GetURL(std::string& _return, const int32_t bid) {
// Your implementation goes here
printf("Browser_GetURL\n");
}
void Browser_ExecuteJavaScript(const int32_t bid, const std::string& code, const std::string& url, const int32_t line) {
// Your implementation goes here
printf("Browser_ExecuteJavaScript\n");
}
void Browser_WasResized(const int32_t bid) {
// Your implementation goes here
printf("Browser_WasResized\n");
}
void Browser_NotifyScreenInfoChanged(const int32_t bid) {
// Your implementation goes here
printf("Browser_NotifyScreenInfoChanged\n");
}
void Browser_Invalidate(const int32_t bid) {
// Your implementation goes here
printf("Browser_Invalidate\n");
}
void Browser_SendCefKeyEvent(const int32_t bid, const CefKeyEventAttributes& event) {
// Your implementation goes here
printf("Browser_SendCefKeyEvent\n");
}
void Browser_SendMouseEvent(const int32_t bid, const int32_t event_type, const int32_t x, const int32_t y, const int32_t modifiers, const int32_t click_count, const int32_t button) {
// Your implementation goes here
printf("Browser_SendMouseEvent\n");
}
void Browser_SendMouseWheelEvent(const int32_t bid, const int32_t scroll_type, const int32_t x, const int32_t y, const int32_t modifiers, const int32_t delta, const int32_t units_to_scroll) {
// Your implementation goes here
printf("Browser_SendMouseWheelEvent\n");
}
bool Browser_CanGoForward(const int32_t bid) {
// Your implementation goes here
printf("Browser_CanGoForward\n");
}
bool Browser_CanGoBack(const int32_t bid) {
// Your implementation goes here
printf("Browser_CanGoBack\n");
}
void Browser_GoBack(const int32_t bid) {
// Your implementation goes here
printf("Browser_GoBack\n");
}
void Browser_GoForward(const int32_t bid) {
// Your implementation goes here
printf("Browser_GoForward\n");
}
bool Browser_IsLoading(const int32_t bid) {
// Your implementation goes here
printf("Browser_IsLoading\n");
}
void Browser_StopLoad(const int32_t bid) {
// Your implementation goes here
printf("Browser_StopLoad\n");
}
void Browser_GetMainFrame( ::thrift_codegen::RObject& _return, const int32_t bid) {
// Your implementation goes here
printf("Browser_GetMainFrame\n");
}
void Browser_GetFocusedFrame( ::thrift_codegen::RObject& _return, const int32_t bid) {
// Your implementation goes here
printf("Browser_GetFocusedFrame\n");
}
void Browser_GetFrameByIdentifier( ::thrift_codegen::RObject& _return, const int32_t bid, const std::string& identifier) {
// Your implementation goes here
printf("Browser_GetFrameByIdentifier\n");
}
void Browser_GetFrameByName( ::thrift_codegen::RObject& _return, const int32_t bid, const std::string& name) {
// Your implementation goes here
printf("Browser_GetFrameByName\n");
}
int32_t Browser_GetFrameCount(const int32_t bid) {
// Your implementation goes here
printf("Browser_GetFrameCount\n");
}
void Browser_GetFrameIdentifiers(std::vector<std::string> & _return, const int32_t bid) {
// Your implementation goes here
printf("Browser_GetFrameIdentifiers\n");
}
void Browser_GetFrameNames(std::vector<std::string> & _return, const int32_t bid) {
// Your implementation goes here
printf("Browser_GetFrameNames\n");
}
bool Browser_IsPopup(const int32_t bid) {
// Your implementation goes here
printf("Browser_IsPopup\n");
}
bool Browser_HasDocument(const int32_t bid) {
// Your implementation goes here
printf("Browser_HasDocument\n");
}
void Browser_ViewSource(const int32_t bid) {
// Your implementation goes here
printf("Browser_ViewSource\n");
}
void Browser_GetSource(const int32_t bid, const ::thrift_codegen::RObject& stringVisitor) {
// Your implementation goes here
printf("Browser_GetSource\n");
}
void Browser_GetText(const int32_t bid, const ::thrift_codegen::RObject& stringVisitor) {
// Your implementation goes here
printf("Browser_GetText\n");
}
void Browser_SetFocus(const int32_t bid, const bool enable) {
// Your implementation goes here
printf("Browser_SetFocus\n");
}
double Browser_GetZoomLevel(const int32_t bid) {
// Your implementation goes here
printf("Browser_GetZoomLevel\n");
}
void Browser_SetZoomLevel(const int32_t bid, const double val) {
// Your implementation goes here
printf("Browser_SetZoomLevel\n");
}
void Browser_StartDownload(const int32_t bid, const std::string& url) {
// Your implementation goes here
printf("Browser_StartDownload\n");
}
void Browser_Find(const int32_t bid, const std::string& searchText, const bool forward, const bool matchCase, const bool findNext) {
// Your implementation goes here
printf("Browser_Find\n");
}
void Browser_StopFinding(const int32_t bid, const bool clearSelection) {
// Your implementation goes here
printf("Browser_StopFinding\n");
}
void Browser_ReplaceMisspelling(const int32_t bid, const std::string& word) {
// Your implementation goes here
printf("Browser_ReplaceMisspelling\n");
}
void Browser_SetFrameRate(const int32_t bid, const int32_t val) {
// Your implementation goes here
printf("Browser_SetFrameRate\n");
}
void Browser_AddDevToolsMessageObserver( ::thrift_codegen::RObject& _return, const int32_t bid, const ::thrift_codegen::RObject& observer) {
// Your implementation goes here
printf("Browser_AddDevToolsMessageObserver\n");
}
void Browser_ExecuteDevToolsMethod(const int32_t bid, const std::string& method, const std::string& parametersAsJson, const ::thrift_codegen::RObject& intCallback) {
// Your implementation goes here
printf("Browser_ExecuteDevToolsMethod\n");
}
void Browser_RunFileDialog(const int32_t bid, const std::string& mode, const std::string& title, const std::string& defaultFilePath, const std::vector<std::string> & acceptFilters, const ::thrift_codegen::RObject& runFileDialogCallback) {
// Your implementation goes here
printf("Browser_RunFileDialog\n");
}
void Browser_PrintToPDF(const int32_t bid, const std::string& path, const std::map<std::string, std::string> & pdfPrintSettings, const ::thrift_codegen::RObject& pdfPrintCallback) {
// Your implementation goes here
printf("Browser_PrintToPDF\n");
}
void Browser_Print(const int32_t bid) {
// Your implementation goes here
printf("Browser_Print\n");
}
void Browser_ImeSetComposition(const int32_t bid, const std::string& text, const std::vector< ::thrift_codegen::CompositionUnderline> & underlines, const ::thrift_codegen::Range& replacementRange, const ::thrift_codegen::Range& selectionRange) {
// Your implementation goes here
printf("Browser_ImeSetComposition\n");
}
void Browser_ImeCommitText(const int32_t bid, const std::string& text, const ::thrift_codegen::Range& replacementRange, const int32_t relativeCursorPos) {
// Your implementation goes here
printf("Browser_ImeCommitText\n");
}
void Browser_ImeFinishComposingText(const int32_t bid, const bool keepSelection) {
// Your implementation goes here
printf("Browser_ImeFinishComposingText\n");
}
void Browser_ImeCancelComposing(const int32_t bid) {
// Your implementation goes here
printf("Browser_ImeCancelComposing\n");
}
void Frame_ExecuteJavaScript(const int32_t frameId, const std::string& code, const std::string& url, const int32_t line) {
// Your implementation goes here
printf("Frame_ExecuteJavaScript\n");
}
void Frame_Dispose(const int32_t frameId) {
// Your implementation goes here
printf("Frame_Dispose\n");
}
void Frame_GetParent( ::thrift_codegen::RObject& _return, const int32_t frameId) {
// Your implementation goes here
printf("Frame_GetParent\n");
}
void Frame_Undo(const int32_t frameId) {
// Your implementation goes here
printf("Frame_Undo\n");
}
void Frame_Redo(const int32_t frameId) {
// Your implementation goes here
printf("Frame_Redo\n");
}
void Frame_Cut(const int32_t frameId) {
// Your implementation goes here
printf("Frame_Cut\n");
}
void Frame_Copy(const int32_t frameId) {
// Your implementation goes here
printf("Frame_Copy\n");
}
void Frame_Paste(const int32_t frameId) {
// Your implementation goes here
printf("Frame_Paste\n");
}
void Frame_Delete(const int32_t frameId) {
// Your implementation goes here
printf("Frame_Delete\n");
}
void Frame_SelectAll(const int32_t frameId) {
// Your implementation goes here
printf("Frame_SelectAll\n");
}
void Request_Create( ::thrift_codegen::RObject& _return) {
// Your implementation goes here
printf("Request_Create\n");
}
void Request_Dispose(const int32_t requestId) {
// Your implementation goes here
printf("Request_Dispose\n");
}
void Request_Update(const ::thrift_codegen::RObject& request) {
// Your implementation goes here
printf("Request_Update\n");
}
void Request_GetPostData( ::thrift_codegen::PostData& _return, const ::thrift_codegen::RObject& request) {
// Your implementation goes here
printf("Request_GetPostData\n");
}
void Request_SetPostData(const ::thrift_codegen::RObject& request, const ::thrift_codegen::PostData& postData) {
// Your implementation goes here
printf("Request_SetPostData\n");
}
void Request_GetHeaderByName(std::string& _return, const ::thrift_codegen::RObject& request, const std::string& name) {
// Your implementation goes here
printf("Request_GetHeaderByName\n");
}
void Request_SetHeaderByName(const ::thrift_codegen::RObject& request, const std::string& name, const std::string& value, const bool overwrite) {
// Your implementation goes here
printf("Request_SetHeaderByName\n");
}
void Request_GetHeaderMap(std::map<std::string, std::string> & _return, const ::thrift_codegen::RObject& request) {
// Your implementation goes here
printf("Request_GetHeaderMap\n");
}
void Request_SetHeaderMap(const ::thrift_codegen::RObject& request, const std::map<std::string, std::string> & headerMap) {
// Your implementation goes here
printf("Request_SetHeaderMap\n");
}
void Request_Set(const ::thrift_codegen::RObject& request, const std::string& url, const std::string& method, const ::thrift_codegen::PostData& postData, const std::map<std::string, std::string> & headerMap) {
// Your implementation goes here
printf("Request_Set\n");
}
void Response_Update(const ::thrift_codegen::RObject& response) {
// Your implementation goes here
printf("Response_Update\n");
}
void Response_GetHeaderByName(std::string& _return, const ::thrift_codegen::RObject& response, const std::string& name) {
// Your implementation goes here
printf("Response_GetHeaderByName\n");
}
void Response_SetHeaderByName(const ::thrift_codegen::RObject& response, const std::string& name, const std::string& value, const bool overwrite) {
// Your implementation goes here
printf("Response_SetHeaderByName\n");
}
void Response_GetHeaderMap(std::map<std::string, std::string> & _return, const ::thrift_codegen::RObject& response) {
// Your implementation goes here
printf("Response_GetHeaderMap\n");
}
void Response_SetHeaderMap(const ::thrift_codegen::RObject& response, const std::map<std::string, std::string> & headerMap) {
// Your implementation goes here
printf("Response_SetHeaderMap\n");
}
void Callback_Dispose(const ::thrift_codegen::RObject& callback) {
// Your implementation goes here
printf("Callback_Dispose\n");
}
void Callback_Continue(const ::thrift_codegen::RObject& callback) {
// Your implementation goes here
printf("Callback_Continue\n");
}
void Callback_Cancel(const ::thrift_codegen::RObject& callback) {
// Your implementation goes here
printf("Callback_Cancel\n");
}
void AuthCallback_Dispose(const ::thrift_codegen::RObject& authCallback) {
// Your implementation goes here
printf("AuthCallback_Dispose\n");
}
void AuthCallback_Continue(const ::thrift_codegen::RObject& authCallback, const std::string& username, const std::string& password) {
// Your implementation goes here
printf("AuthCallback_Continue\n");
}
void AuthCallback_Cancel(const ::thrift_codegen::RObject& authCallback) {
// Your implementation goes here
printf("AuthCallback_Cancel\n");
}
void CefRunContextMenuCallback_Dispose(const ::thrift_codegen::RObject& self) {
// Your implementation goes here
printf("CefRunContextMenuCallback_Dispose\n");
}
void CefRunContextMenuCallback_Continue(const ::thrift_codegen::RObject& self, const int32_t command_id, const int32_t event_flag) {
// Your implementation goes here
printf("CefRunContextMenuCallback_Continue\n");
}
void CefRunContextMenuCallback_Cancel(const ::thrift_codegen::RObject& self) {
// Your implementation goes here
printf("CefRunContextMenuCallback_Cancel\n");
}
void MessageRouter_Create( ::thrift_codegen::RObject& _return, const std::string& query, const std::string& cancel) {
// Your implementation goes here
printf("MessageRouter_Create\n");
}
void MessageRouter_Dispose(const ::thrift_codegen::RObject& msgRouter) {
// Your implementation goes here
printf("MessageRouter_Dispose\n");
}
void MessageRouter_AddHandler(const ::thrift_codegen::RObject& msgRouter, const ::thrift_codegen::RObject& handler, const bool first) {
// Your implementation goes here
printf("MessageRouter_AddHandler\n");
}
void MessageRouter_RemoveHandler(const ::thrift_codegen::RObject& msgRouter, const ::thrift_codegen::RObject& handler) {
// Your implementation goes here
printf("MessageRouter_RemoveHandler\n");
}
void MessageRouter_CancelPending(const ::thrift_codegen::RObject& msgRouter, const int32_t bid, const ::thrift_codegen::RObject& handler) {
// Your implementation goes here
printf("MessageRouter_CancelPending\n");
}
void QueryCallback_Dispose(const ::thrift_codegen::RObject& qcallback) {
// Your implementation goes here
printf("QueryCallback_Dispose\n");
}
void QueryCallback_Success(const ::thrift_codegen::RObject& qcallback, const std::string& response) {
// Your implementation goes here
printf("QueryCallback_Success\n");
}
void QueryCallback_Failure(const ::thrift_codegen::RObject& qcallback, const int32_t error_code, const std::string& error_message) {
// Your implementation goes here
printf("QueryCallback_Failure\n");
}
void SchemeHandlerFactory_Register(const std::string& schemeName, const std::string& domainName, const ::thrift_codegen::RObject& schemeHandlerFactory) {
// Your implementation goes here
printf("SchemeHandlerFactory_Register\n");
}
void ClearAllSchemeHandlerFactories() {
// Your implementation goes here
printf("ClearAllSchemeHandlerFactories\n");
}
void RequestContext_ClearCertificateExceptions(const int32_t bid, const ::thrift_codegen::RObject& completionCallback) {
// Your implementation goes here
printf("RequestContext_ClearCertificateExceptions\n");
}
void RequestContext_CloseAllConnections(const int32_t bid, const ::thrift_codegen::RObject& completionCallback) {
// Your implementation goes here
printf("RequestContext_CloseAllConnections\n");
}
void CookieManager_Create( ::thrift_codegen::RObject& _return) {
// Your implementation goes here
printf("CookieManager_Create\n");
}
void CookieManager_Dispose(const ::thrift_codegen::RObject& cookieManager) {
// Your implementation goes here
printf("CookieManager_Dispose\n");
}
bool CookieManager_VisitAllCookies(const ::thrift_codegen::RObject& cookieManager, const ::thrift_codegen::RObject& visitor) {
// Your implementation goes here
printf("CookieManager_VisitAllCookies\n");
}
bool CookieManager_VisitUrlCookies(const ::thrift_codegen::RObject& cookieManager, const ::thrift_codegen::RObject& visitor, const std::string& url, const bool includeHttpOnly) {
// Your implementation goes here
printf("CookieManager_VisitUrlCookies\n");
}
bool CookieManager_SetCookie(const ::thrift_codegen::RObject& cookieManager, const std::string& url, const ::thrift_codegen::Cookie& cookie) {
// Your implementation goes here
printf("CookieManager_SetCookie\n");
}
bool CookieManager_DeleteCookies(const ::thrift_codegen::RObject& cookieManager, const std::string& url, const std::string& cookieName) {
// Your implementation goes here
printf("CookieManager_DeleteCookies\n");
}
bool CookieManager_FlushStore(const ::thrift_codegen::RObject& cookieManager, const ::thrift_codegen::RObject& completionCallback) {
// Your implementation goes here
printf("CookieManager_FlushStore\n");
}
void Registration_Dispose(const ::thrift_codegen::RObject& registration) {
// Your implementation goes here
printf("Registration_Dispose\n");
}
void MediaAccessCallback_Dispose(const ::thrift_codegen::RObject& mediaAccessCallback) {
// Your implementation goes here
printf("MediaAccessCallback_Dispose\n");
}
void MediaAccessCallback_Continue(const ::thrift_codegen::RObject& mediaAccessCallback, const int32_t allowed_permissions) {
// Your implementation goes here
printf("MediaAccessCallback_Continue\n");
}
void MediaAccessCallback_Cancel(const ::thrift_codegen::RObject& mediaAccessCallback) {
// Your implementation goes here
printf("MediaAccessCallback_Cancel\n");
}
};
int main(int argc, char **argv) {
int port = 9090;
::std::shared_ptr<ServerHandler> handler(new ServerHandler());
::std::shared_ptr<TProcessor> processor(new ServerProcessor(handler));
::std::shared_ptr<TServerTransport> serverTransport(new TServerSocket(port));
::std::shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
::std::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
server.serve();
return 0;
}