5f50e25535
This method takes a string such as "this/is/a/relative/path" and returns "[addon=ADDON_ID]this/is/a/relative/path", substituting the add-on identifier for ADDON_ID. This way, add-on authors don't even have to know the special syntax '[addon=ADDON_ID]relative/path' used for add-on-specific resource paths, and don't need to hardcode their add-on identifier inside each such path either.
70 lines
1.8 KiB
C++
70 lines
1.8 KiB
C++
// -*- coding: utf-8 -*-
|
|
//
|
|
// addon_fwd.hxx --- Forward declarations for the FlightGear add-on
|
|
// infrastructure
|
|
// Copyright (C) 2017 Florent Rougon
|
|
//
|
|
// 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.
|
|
|
|
#ifndef FG_ADDON_FWD_HXX
|
|
#define FG_ADDON_FWD_HXX
|
|
|
|
#include <simgear/structure/SGSharedPtr.hxx>
|
|
|
|
namespace flightgear
|
|
{
|
|
|
|
namespace addons
|
|
{
|
|
|
|
class Addon;
|
|
class AddonManager;
|
|
class AddonVersion;
|
|
class AddonVersionSuffix;
|
|
class ResourceProvider;
|
|
|
|
enum class UrlType;
|
|
class QualifiedUrl;
|
|
|
|
enum class ContactType;
|
|
class Contact;
|
|
class Author;
|
|
class Maintainer;
|
|
|
|
using AddonRef = SGSharedPtr<Addon>;
|
|
using AddonVersionRef = SGSharedPtr<AddonVersion>;
|
|
using ContactRef = SGSharedPtr<Contact>;
|
|
using AuthorRef = SGSharedPtr<Author>;
|
|
using MaintainerRef = SGSharedPtr<Maintainer>;
|
|
|
|
namespace errors
|
|
{
|
|
|
|
class error;
|
|
class error_loading_config_file;
|
|
class no_metadata_file_found;
|
|
class error_loading_metadata_file;
|
|
class duplicate_registration_attempt;
|
|
class fg_version_too_old;
|
|
class fg_version_too_recent;
|
|
class invalid_resource_path;
|
|
|
|
} // of namespace errors
|
|
|
|
} // of namespace addons
|
|
|
|
} // of namespace flightgear
|
|
|
|
#endif // of FG_ADDON_FWD_HXX
|