/usr/include/gnome-vfsmm-2.6/libgnomevfsmm/mime-application.h is in libgnome-vfsmm-2.6-dev 2.26.0-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | // -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMEVFSMM_MIME_APPLICATION_H
#define _LIBGNOMEVFSMM_MIME_APPLICATION_H
#include <glibmm.h>
/* Copyright 2003 gnome-vfsmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
#include <libgnomevfs/gnome-vfs-application-registry.h>
#include <libgnomevfsmm/enums.h>
#include <libgnomevfsmm/exception.h>
namespace Gnome
{
namespace Vfs
{
typedef Glib::ListHandle<Glib::ustring> ListHandleStrings;
//TODO: What is a MimeApplication? How can I get one. What could I do with one.
class MimeApplication
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef MimeApplication CppObjectType;
typedef GnomeVFSMimeApplication BaseObjectType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
MimeApplication();
// Use make_a_copy=true when getting it directly from a struct.
explicit MimeApplication(GnomeVFSMimeApplication* castitem, bool make_a_copy = false);
MimeApplication(const MimeApplication& src);
MimeApplication& operator=(const MimeApplication& src);
~MimeApplication();
GnomeVFSMimeApplication* gobj() { return gobject_; }
const GnomeVFSMimeApplication* gobj() const { return gobject_; }
///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
GnomeVFSMimeApplication* gobj_copy() const;
protected:
GnomeVFSMimeApplication* gobject_;
private:
public:
MimeApplication(const Glib::ustring& id);
MimeApplication(const Glib::ustring& id, const Glib::ustring& name,
const Glib::ustring& command, MimeApplicationArgumentType argument_type,
ListHandleStrings supported_uri_schemes, bool multiple_files, bool requires_terminal);
//Test whether this is a valid instance.
operator bool() const;
/** Get the id of this applicaiton.
* @return A string containing this application's id.
*/
Glib::ustring get_id() const;
/** Get the name of this application.
* @return A string containing this application's name.
*/
Glib::ustring get_name() const;
/** Get the command for this application.
* @return A string containing this application's command.
*/
Glib::ustring get_command() const;
/** Get the argument type for this application.
* @return An enum representing this application's argument type.
*/
MimeApplicationArgumentType get_argument_type() const;
/** Get a list of this application's supported uri schemes.
* @return A list of strings containing the uri schemes.
*/
Glib::ListHandle<Glib::ustring> get_supported_uri_schemes() const;
/** Test to see if this application can open multiple files.
* @return <tt>true</tt> if this application has this ability; <tt>false</tt> otherwise.
*/
bool can_open_multiple_files() const;
/** Test to see if this application requires the terminal.
* @return <tt>true</tt> if this application needs the terminal; <tt>false</tt> otherwise.
*/
bool requires_terminal() const;
//TODO: These don't seem to use g_strdup(), but they should.
void set_id(const Glib::ustring& value);
void set_name(const Glib::ustring& value);
void set_command(const Glib::ustring& value);
void set_argument_type(const MimeApplicationArgumentType& value);
void set_supported_uri_schemes(const Glib::ListHandle<Glib::ustring>& value);
void set_open_multiple_files(bool value = true);
void set_requires_terminal(bool value = true);
/*
* Application Registry convenience functions
*/
/** Checks whether this application is owned or not.
* By user owned, this means that the application is not a system application located in the prerequisite /usr area, but rather in the user's area.
* @param application C++ doesn't use this :).
* @return <tt>true</tt> if this application is user owned, otherwise <tt>false</tt>.
*/
bool is_user_owned() const;
bool exists_in_registry() const;
void remove_from_registry();
/** This will save to the registry the application that will be associated with
* a defined mime type. The defined mime type is located within the
* GnomeVFSMimeApplication structure. Changes are not realized until the
* gnome_vfs_application_registry_sync function is called.
* @param application Application associated with the mime type.
*/
void save_to_registry();
ListHandleStrings get_keys() const;
ListHandleStrings get_mime_types() const;
void clear_mime_types();
bool supports_mime_type(const Glib::ustring& mime_type) const;
bool supports_uri_scheme(const Glib::ustring& uri_scheme) const;
Glib::ustring get_value(const Glib::ustring& key) const;
bool get_value_bool(const Glib::ustring& key, bool& got_key) const;
bool get_value_bool(const Glib::ustring& key) const;
void set_value(const Glib::ustring& key, const Glib::ustring& value);
void set_value(const Glib::ustring& key, bool value);
void unset_key(const Glib::ustring& key);
void add_mime_type(const Glib::ustring& mime_type);
void remove_mime_type(const Glib::ustring& mime_type);
/*
* Mime Database convenience functions
*/
#ifdef GLIBMM_EXCEPTIONS_ENABLED
void set_default(const Glib::ustring& mime_type) throw(exception);
void add_to_short_list(const Glib::ustring& mime_type) throw(exception);
void remove_from_short_list(const Glib::ustring& mime_type) throw(exception);
void launch(const Glib::ListHandle<Glib::ustring>& uris) throw(exception);
void launch(const Glib::ListHandle<Glib::ustring>& uris, const Glib::ustring& envp) throw(exception);
#else
void set_default(const Glib::ustring& mime_type, std::auto_ptr<Gnome::Vfs::exception>& error);
void add_to_short_list(const Glib::ustring& mime_type, std::auto_ptr<Gnome::Vfs::exception>& error);
void remove_from_short_list(const Glib::ustring& mime_type, std::auto_ptr<Gnome::Vfs::exception>& error);
void launch(const Glib::ListHandle<Glib::ustring>& uris, std::auto_ptr<Gnome::Vfs::exception>& error);
void launch(const Glib::ListHandle<Glib::ustring>& uris, const Glib::ustring& envp, std::auto_ptr<Gnome::Vfs::exception>& error);
#endif
};
} // namespace Vfs
} // namespace Gnome
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates Gnome::Vfs::MimeApplication
*/
Gnome::Vfs::MimeApplication wrap(GnomeVFSMimeApplication* object, bool take_copy = false);
} // namespace Glib
#endif /* _LIBGNOMEVFSMM_MIME_APPLICATION_H */
|