1/*
2 * Copyright 2017 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Brian Hill
7 */
8#ifndef REPO_ROW_H
9#define REPO_ROW_H
10
11
12#include <ColumnListView.h>
13#include <String.h>
14
15
16enum {
17	kEnabledColumn,
18	kNameColumn,
19	kUrlColumn
20};
21
22
23class RepoRow : public BRow {
24public:
25								RepoRow(const char* repo_name,
26									const char* repo_url, bool enabled);
27
28			const char*			Name() const { return fName.String(); }
29			void				SetName(const char* name);
30			const char*			Url() const { return fUrl.String(); }
31			void				SetEnabled(bool enabled);
32			void				RefreshEnabledField();
33			bool				IsEnabled() { return fEnabled; }
34			void				SetTaskState(uint32 state);
35			uint32				TaskState() { return fTaskState; }
36			void				SetHasSiblings(bool hasSiblings)
37									{ fHasSiblings = hasSiblings; }
38			bool				HasSiblings() { return fHasSiblings; }
39
40private:
41			BString				fName;
42			BString				fUrl;
43			bool				fEnabled;
44			uint32				fTaskState;
45			bool				fHasSiblings;
46};
47
48
49#endif
50