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