xref: /haiku/src/apps/haikudepot/model/DeskbarLink.h (revision fc7456e9b1ec38c941134ed6d01c438cf289381e)
1 /*
2  * Copyright 2013, Stephan Aßmus <superstippi@gmx.de>.
3  * Copyright 2011, Ingo Weinhold, <ingo_weinhold@gmx.de>
4  * Copyright 2013, Rene Gollent, <rene@gollent.com>
5  * Copyright 2017, Julian Harnath <julian.harnath@rwth-aachen.de>.
6  * Copyright 2021-2024, Andrew Lindesay <apl@lindesay.co.nz>.
7  *
8  * All rights reserved. Distributed under the terms of the MIT License.
9  *
10  * Note that this file has been re-factored from `PackageManager.h` and
11  * copyrights have been carried across in 2021.
12  */
13 #ifndef DESKBAR_LINK_H
14 #define DESKBAR_LINK_H
15 
16 
17 #include <Archivable.h>
18 #include <String.h>
19 
20 
21 class DeskbarLink : public BArchivable {
22 public:
23 								DeskbarLink();
24 								DeskbarLink(const BString& path,
25 									const BString& link);
26 								DeskbarLink(const DeskbarLink& other);
27 								DeskbarLink(BMessage* from);
28 
29 	virtual						~DeskbarLink();
30 
31 	const	BString				Path() const;
32 	const	BString				Link() const;
33 	const	BString				Title() const;
34 
35 			bool				operator==(const DeskbarLink& other);
36 			bool				operator!=(const DeskbarLink& other);
37 			DeskbarLink&		operator=(const DeskbarLink& other);
38 
39 			status_t			Archive(BMessage* into, bool deep = true) const;
40 
41 private:
42 			BString				fPath;
43 			BString				fLink;
44 };
45 
46 
47 #endif // DESKBAR_LINK_H
48