haiku/headers/os/package/GlobalSettingsFileInfo.h
Ingo Weinhold fe707a23fc hpkg format: Add attributes for declaring settings files
Global and user settings files can be declared. For global ones an
update policy can be specified. If not specified, the settings file is
not included in the package, but created by the program (or user) later.
If an update type is specified, it defines what to do with the settings
file when updating the package to a newer version.

User settings files are never included in the package; they are always
created by the program or the user. If the package contains a template/
default settings file, it can be declared, but for informative purposes
only.
2013-05-25 01:12:34 +02:00

42 lines
872 B
C++

/*
* Copyright 2013, Haiku, Inc.
* Distributed under the terms of the MIT License.
*/
#ifndef _PACKAGE__GLOBAL_SETTINGS_FILE_INFO_H_
#define _PACKAGE__GLOBAL_SETTINGS_FILE_INFO_H_
#include <package/SettingsFileUpdateType.h>
#include <String.h>
namespace BPackageKit {
class BGlobalSettingsFileInfo {
public:
BGlobalSettingsFileInfo();
BGlobalSettingsFileInfo(const BString& path,
BSettingsFileUpdateType updateType);
~BGlobalSettingsFileInfo();
status_t InitCheck() const;
const BString& Path() const;
bool IsIncluded() const;
BSettingsFileUpdateType UpdateType() const;
void SetTo(const BString& path,
BSettingsFileUpdateType updateType);
private:
BString fPath;
BSettingsFileUpdateType fUpdateType;
};
} // namespace BPackageKit
#endif // _PACKAGE__GLOBAL_SETTINGS_FILE_INFO_H_