1/*
2 * Copyright 2011, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _PACKAGE__REPOSITORY_CONFIG_H_
6#define _PACKAGE__REPOSITORY_CONFIG_H_
7
8
9#include <Entry.h>
10#include <String.h>
11
12
13namespace BPackageKit {
14
15
16class BRepositoryConfig {
17public:
18								BRepositoryConfig();
19								BRepositoryConfig(const BString& name,
20									const BString& url, uint8 priority);
21								BRepositoryConfig(const BEntry& entry);
22	virtual						~BRepositoryConfig();
23
24			status_t			Store(const BEntry& entry) const;
25
26			status_t			SetTo(const BEntry& entry);
27			status_t			InitCheck() const;
28
29			const BString&		Name() const;
30			const BString&		BaseURL() const;
31			uint8				Priority() const;
32			bool				IsUserSpecific() const;
33
34			const BEntry&		Entry() const;
35
36			void				SetName(const BString& name);
37			void				SetBaseURL(const BString& url);
38			void				SetPriority(uint8 priority);
39			void				SetIsUserSpecific(bool isUserSpecific);
40
41public:
42	static	const uint8			kUnsetPriority = 0;
43
44private:
45			status_t			fInitStatus;
46
47			BString				fName;
48			BString				fBaseURL;
49			uint8				fPriority;
50			bool				fIsUserSpecific;
51
52			BEntry				fEntry;
53};
54
55
56}	// namespace BPackageKit
57
58
59#endif // _PACKAGE__REPOSITORY_CONFIG_H_
60