|
degate 0.1.1
|
00001 /* -*-c++-*- 00002 00003 This file is part of the IC reverse engineering tool degate. 00004 00005 Copyright 2008, 2009, 2010 by Martin Schobert 00006 00007 Degate is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 any later version. 00011 00012 Degate is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with degate. If not, see <http://www.gnu.org/licenses/>. 00019 00020 */ 00021 00022 #ifndef __XMLRPC_H__ 00023 #define __XMLRPC_H__ 00024 00025 #include <LogicModel.h> 00026 #include <xmlrpc-c/girerr.hpp> 00027 #include <xmlrpc-c/base.hpp> 00028 #include <xmlrpc-c/client_simple.hpp> 00029 00030 namespace degate { 00031 00032 /** 00033 * Convinience method to call remote methods. 00034 */ 00035 00036 xmlrpc_c::value remote_method_call(std::string const& server_url, 00037 std::string const& method_name, 00038 xmlrpc_c::paramList const& params); 00039 00040 /** 00041 * Push objects from the logic model to a remote server. 00042 */ 00043 00044 void push_changes_to_server(std::string const& server_url, LogicModel_shptr lmodel); 00045 00046 /** 00047 * Pull objects from a remote server into the logic model. 00048 * @exception XMLRPCException This exception is thrown, if the XMLRPC fails for some reason. 00049 */ 00050 00051 transaction_id_t pull_changes_from_server(std::string const& server_url, LogicModel_shptr lmodel, 00052 transaction_id_t start_tid); 00053 00054 /** 00055 * Parse an execute a command. 00056 * @exception XMLRPCException This exception is thrown, if commands cannot be parsed. 00057 */ 00058 void process_changelog_command(LogicModel_shptr lmodel, 00059 transaction_id_t transaction_id, 00060 std::vector<xmlrpc_c::value> const& command); 00061 } 00062 00063 #endif
1.7.4