Fix crash on startup if an LV2 plugin has a bad .ttl file.
[ardour.git] / libs / glibmm2 / gio / giomm / fileattributeinfo.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GIOMM_FILEATTRIBUTEINFO_H
4 #define _GIOMM_FILEATTRIBUTEINFO_H
5
6
7 #include <glibmm.h>
8
9 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
10
11 /* Copyright (C) 2007 The gtkmm Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Library General Public
15  * License as published by the Free Software Foundation; either
16  * version 2 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Library General Public License for more details.
22  *
23  * You should have received a copy of the GNU Library General Public
24  * License along with this library; if not, write to the Free
25  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26  */
27
28 #include <string>
29 #include <gio/gio.h> //TODO: avoid this include
30 #include <glibmm/object.h>
31
32
33 namespace Gio
34 {
35
36 //TODO: Fix the need for NO_GTYPE.
37 //It guesses gfile_attribute_type_get_type() instead of g_file_attribute_type_get_type(). murrayc.
38 /** @addtogroup giommEnums Enums and Flags */
39
40 /**
41  * @ingroup giommEnums
42  */
43 enum FileAttributeType
44 {
45   FILE_ATTRIBUTE_TYPE_INVALID,
46   FILE_ATTRIBUTE_TYPE_STRING,
47   FILE_ATTRIBUTE_TYPE_BYTE_STRING,
48   FILE_ATTRIBUTE_TYPE_BOOLEAN,
49   FILE_ATTRIBUTE_TYPE_UINT32,
50   FILE_ATTRIBUTE_TYPE_INT32,
51   FILE_ATTRIBUTE_TYPE_UINT64,
52   FILE_ATTRIBUTE_TYPE_INT64,
53   FILE_ATTRIBUTE_TYPE_OBJECT
54 };
55
56
57 /**
58  * @ingroup giommEnums
59  * @par Bitwise operators:
60  * <tt>%FileAttributeInfoFlags operator|(FileAttributeInfoFlags, FileAttributeInfoFlags)</tt><br>
61  * <tt>%FileAttributeInfoFlags operator&(FileAttributeInfoFlags, FileAttributeInfoFlags)</tt><br>
62  * <tt>%FileAttributeInfoFlags operator^(FileAttributeInfoFlags, FileAttributeInfoFlags)</tt><br>
63  * <tt>%FileAttributeInfoFlags operator~(FileAttributeInfoFlags)</tt><br>
64  * <tt>%FileAttributeInfoFlags& operator|=(FileAttributeInfoFlags&, FileAttributeInfoFlags)</tt><br>
65  * <tt>%FileAttributeInfoFlags& operator&=(FileAttributeInfoFlags&, FileAttributeInfoFlags)</tt><br>
66  * <tt>%FileAttributeInfoFlags& operator^=(FileAttributeInfoFlags&, FileAttributeInfoFlags)</tt><br>
67  */
68 enum FileAttributeInfoFlags
69 {
70   FILE_ATTRIBUTE_INFO_NONE = 0,
71   FILE_ATTRIBUTE_INFO_COPY_WITH_FILE = 1 << 0,
72   FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED = 1 << 1
73 };
74
75 /** @ingroup giommEnums */
76 inline FileAttributeInfoFlags operator|(FileAttributeInfoFlags lhs, FileAttributeInfoFlags rhs)
77   { return static_cast<FileAttributeInfoFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
78
79 /** @ingroup giommEnums */
80 inline FileAttributeInfoFlags operator&(FileAttributeInfoFlags lhs, FileAttributeInfoFlags rhs)
81   { return static_cast<FileAttributeInfoFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
82
83 /** @ingroup giommEnums */
84 inline FileAttributeInfoFlags operator^(FileAttributeInfoFlags lhs, FileAttributeInfoFlags rhs)
85   { return static_cast<FileAttributeInfoFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
86
87 /** @ingroup giommEnums */
88 inline FileAttributeInfoFlags operator~(FileAttributeInfoFlags flags)
89   { return static_cast<FileAttributeInfoFlags>(~static_cast<unsigned>(flags)); }
90
91 /** @ingroup giommEnums */
92 inline FileAttributeInfoFlags& operator|=(FileAttributeInfoFlags& lhs, FileAttributeInfoFlags rhs)
93   { return (lhs = static_cast<FileAttributeInfoFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
94
95 /** @ingroup giommEnums */
96 inline FileAttributeInfoFlags& operator&=(FileAttributeInfoFlags& lhs, FileAttributeInfoFlags rhs)
97   { return (lhs = static_cast<FileAttributeInfoFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
98
99 /** @ingroup giommEnums */
100 inline FileAttributeInfoFlags& operator^=(FileAttributeInfoFlags& lhs, FileAttributeInfoFlags rhs)
101   { return (lhs = static_cast<FileAttributeInfoFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
102
103
104 /**
105  * @ingroup giommEnums
106  */
107 enum FileAttributeStatus
108 {
109   FILE_ATTRIBUTE_STATUS_UNSET,
110   FILE_ATTRIBUTE_STATUS_SET,
111   FILE_ATTRIBUTE_STATUS_ERROR_SETTING
112 };
113
114
115 /** Information about a specific attribute - see FileAttributeInfoList.
116  *
117  * @newin2p16
118  */
119 class FileAttributeInfo
120 {
121   public:
122 #ifndef DOXYGEN_SHOULD_SKIP_THIS
123   typedef FileAttributeInfo CppObjectType;
124   typedef GFileAttributeInfo BaseObjectType;
125 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
126
127 private:
128
129 public:
130   explicit FileAttributeInfo(const GFileAttributeInfo* ginfo);
131
132   FileAttributeInfo(const FileAttributeInfo& other);
133   FileAttributeInfo& operator=(const FileAttributeInfo& other);
134
135   ~FileAttributeInfo();
136
137   std::string get_name() const;
138   FileAttributeType get_type() const;
139   FileAttributeInfoFlags get_flags() const;
140
141 protected:
142   std::string m_name;
143   FileAttributeType m_type;
144   FileAttributeInfoFlags m_flags;
145
146
147 };
148
149 } // namespace Gio
150
151
152 #endif /* _GIOMM_FILEATTRIBUTEINFO_H */
153