/usr/include/simgear/scene/tsync/terrasync.hxx is in libsimgear-dev 3.4.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | // terrasync.hxx -- scenery fetcher
//
// Copyright (C) 2011 Thorsten Brehm <brehmt@gmail.com>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// $Id$
#ifndef TERRASYNC_HXX_
#define TERRASYNC_HXX_
#include <set>
#include <simgear/props/props.hxx>
#include <simgear/structure/subsystem_mgr.hxx>
#include <simgear/props/tiedpropertylist.hxx>
class SGPath;
class SGBucket;
namespace simgear
{
const int NOWHERE = -9999;
class BufferedLogCallback;
class SGTerraSync : public SGSubsystem
{
public:
SGTerraSync();
virtual ~SGTerraSync();
virtual void init();
virtual void shutdown();
virtual void reinit();
virtual void bind();
virtual void unbind();
virtual void update(double);
/// notify terrasync that the sim was repositioned, as opposed to
/// us travelling in a direction. Avoid last_lat / last_lon blocking
/// certain tiles when we reposition.
void reposition();
bool isIdle();
bool scheduleTile(const SGBucket& bucket);
void syncAreaByPath(const std::string& aPath);
void setRoot(SGPropertyNode_ptr root);
/// retrive the associated log object, for displaying log
/// output somewhere (a UI, presumably)
BufferedLogCallback* log() const
{ return _log; }
/**
* Test if a scenery directory is queued or actively syncing.
* File path is the tile name, eg 'e001n52' or 'w003n56'. Will return true
* if either the Terrain or Objects variant is being synced.
*
*/
bool isTileDirPending(const std::string& sceneryDir) const;
void scheduleDataDir(const std::string& dataDir);
bool isDataDirPending(const std::string& dataDir) const;
protected:
void syncAirportsModels();
class SvnThread;
private:
SvnThread* _svnThread;
SGPropertyNode_ptr _terraRoot;
SGPropertyNode_ptr _stalledNode;
SGPropertyNode_ptr _cacheHits;
// we manually bind+init TerraSync during early startup
// to get better overlap of slow operations (Shared Models sync
// and nav-cache rebuild). As a result we need to track the bind/init
// state explicitly to avoid duplicate calls.
bool _bound, _inited;
simgear::TiedPropertyList _tiedProperties;
BufferedLogCallback* _log;
typedef std::set<std::string> string_set;
string_set _activeTileDirs;
};
}
#endif /* TERRASYNC_HXX_ */
|