8 #include "desktopfile.h"
9 #include "desktopfileentry.h"
11 namespace linuxdeploy {
12 namespace desktopfile {
13 class DesktopFileWriter {
15 // opaque data class pattern
17 std::shared_ptr<PrivateData> d;
20 // default constructor
23 // construct from data
24 explicit DesktopFileWriter(DesktopFile::sections_t data);
27 DesktopFileWriter(const DesktopFileWriter& other);
29 // copy assignment constructor
30 DesktopFileWriter& operator=(const DesktopFileWriter& other);
32 // move assignment operator
33 DesktopFileWriter& operator=(DesktopFileWriter&& other) noexcept;
36 bool operator==(const DesktopFileWriter& other) const;
38 // inequality operator
39 bool operator!=(const DesktopFileWriter& other) const;
42 // returns desktop file path
43 DesktopFile::sections_t data() const;
47 void save(const std::string& path);
49 // save to given ostream
50 void save(std::ostream& os);