Overpass API regression suite coverage (Saxony) / overpass_api/dispatch/dispatcher_stub.h
overpass_api/dispatch/dispatcher_stub.h
3 of 4 instrumented lines run by the suite (75.0%) at 8edf11b0419c (this file on GitHub).
runnever runcolumns: line, executions, queries (click for the queries that run the line)
1/** Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Roland Olbricht et al.2 *3 * This file is part of Overpass_API.4 *5 * Overpass_API is free software: you can redistribute it and/or modify6 * it under the terms of the GNU Affero General Public License as7 * published by the Free Software Foundation, either version 3 of the8 * License, or (at your option) any later version.9 *10 * Overpass_API is distributed in the hope that it will be useful,11 * but WITHOUT ANY WARRANTY; without even the implied warranty of12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * GNU General Public License for more details.14 *15 * You should have received a copy of the GNU Affero General Public License16 * along with Overpass_API. If not, see <http://www.gnu.org/licenses/>.17 */19#ifndef DE__OSM3S___OVERPASS_API__DISPATCH__DISPATCHER_STUB_H20#define DE__OSM3S___OVERPASS_API__DISPATCH__DISPATCHER_STUB_H22#include "../dispatch/resource_manager.h"23#include "../../template_db/dispatcher_client.h"25#include <errno.h>26#include <fcntl.h>27#include <sys/mman.h>28#include <sys/select.h>29#include <sys/stat.h>30#include <sys/types.h>31#include <unistd.h>33#include <cstdint>34#include <cstdlib>35#include <cstring>36#include <fstream>37#include <iostream>38#include <sstream>39#include <string>40#include <vector>43struct Exit_Error {};46class Dispatcher_Stub : public Watchdog_Callback47{48public:49 // Opens the connection to the database, sets db_dir accordingly50 // and registers the process. error_output_ must remain valid over the51 // entire lifetime of this object.52 Dispatcher_Stub(53 std::string db_dir_, Error_Output* error_output_, const std::string& xml_raw, int area_level,54 uint32 max_allowed_time, uint64 max_allowed_space, Parsed_Query& global_settings_);56 // Called once per minute from the resource manager57 virtual void ping() const;59 ~Dispatcher_Stub();65 bool all_meta_empty() const;66 bool is_meta_file(const std::string& filename) const;67 bool all_attic_empty() const;68 bool is_attic_file(const std::string& filename) const;70private:71 std::string db_dir, timestamp, area_timestamp;73 Error_Output* error_output;74 Dispatcher_Client* dispatcher_client;75 Dispatcher_Client* area_dispatcher_client;76 Nonsynced_Transaction* transaction;77 Nonsynced_Transaction* area_transaction;78 Resource_Manager* rman;80 uint64_t full_hash;81 uint64_t anon_hash;82 uint32 client_token;83 std::string client_identifier;84};87#endif