File: gnome-vfs-mime-handlers.h

package info (click to toggle)
gnome-vfs 1%3A2.24.4-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 17,120 kB
  • ctags: 10,397
  • sloc: ansic: 78,516; sh: 10,341; makefile: 902; perl: 99
file content (127 lines) | stat: -rw-r--r-- 5,586 bytes parent folder | download | duplicates (5)
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
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */

/* gnome-vfs-mime-handlers.h - Mime type handlers for the GNOME Virtual
   File System.

   Copyright (C) 2000 Eazel, Inc.

   The Gnome Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   The Gnome 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
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with the Gnome Library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.

   Author: Maciej Stachowiak <mjs@eazel.com> */

#ifndef GNOME_VFS_MIME_HANDLERS_H
#define GNOME_VFS_MIME_HANDLERS_H

#include <libgnomevfs/gnome-vfs-result.h>
#include <libgnomevfs/gnome-vfs-mime-utils.h>
#include <libgnomevfs/gnome-vfs-uri.h>

G_BEGIN_DECLS

typedef enum {
	GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS,
	GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_PATHS,
	GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS_FOR_NON_FILES
} GnomeVFSMimeApplicationArgumentType;

typedef struct _GnomeVFSMimeApplicationPrivate GnomeVFSMimeApplicationPrivate;

/**
 * GnomeVFSMimeApplication:
 * @id: The desktop ID of the application.
 * @name: The user-visible name of the application.
 *
 * A struct encapsulating information about an
 * application known to the MIME database.
 *
 * Only very few fields of this information are actually
 * public, most of them must be queried using the
 * <literal>gnome_vfs_mime_application_*()</literal>
 * API.
 **/
typedef struct {
	/*< public > */
	char *id;
	char *name;

	/*< private > */
#ifndef GNOME_VFS_DISABLE_DEPRECATED
	char *command;
	gboolean can_open_multiple_files;
	GnomeVFSMimeApplicationArgumentType expects_uris;
	GList *supported_uri_schemes;
#else
	char *_command;
	gboolean _can_open_multiple_files;
	GnomeVFSMimeApplicationArgumentType _expects_uris;
	GList *_supported_uri_schemes;
#endif
	gboolean requires_terminal;

	/* Padded to avoid future breaks in ABI compatibility */
	void *reserved1;

	GnomeVFSMimeApplicationPrivate *priv;
} GnomeVFSMimeApplication;

/* Database */

GnomeVFSMimeApplication *gnome_vfs_mime_get_default_application                   (const char              *mime_type);
GnomeVFSMimeApplication *gnome_vfs_mime_get_default_application_for_uri           (const char		   *uri,
									           const char              *mime_type);
GList *                  gnome_vfs_mime_get_all_applications                      (const char              *mime_type);
GList *			 gnome_vfs_mime_get_all_applications_for_uri	          (const char              *uri,
									           const char              *mime_type);
/* MIME types */

const char 	        *gnome_vfs_mime_get_description   		          (const char              *mime_type);
gboolean 	         gnome_vfs_mime_can_be_executable   		          (const char              *mime_type);

/* Application */

GnomeVFSMimeApplication *gnome_vfs_mime_application_new_from_desktop_id           (const char              *id);
GnomeVFSResult           gnome_vfs_mime_application_launch                        (GnomeVFSMimeApplication *app,
									           GList                   *uris);
GnomeVFSResult           gnome_vfs_mime_application_launch_with_env	          (GnomeVFSMimeApplication *app,
									           GList                   *uris,
									           char                   **envp);
const char		*gnome_vfs_mime_application_get_desktop_id	          (GnomeVFSMimeApplication *app);
const char		*gnome_vfs_mime_application_get_desktop_file_path         (GnomeVFSMimeApplication *app);
const char		*gnome_vfs_mime_application_get_name                      (GnomeVFSMimeApplication *app);
const char              *gnome_vfs_mime_application_get_generic_name              (GnomeVFSMimeApplication *app);
const char              *gnome_vfs_mime_application_get_icon                      (GnomeVFSMimeApplication *app);
const char		*gnome_vfs_mime_application_get_exec		          (GnomeVFSMimeApplication *app);
const char		*gnome_vfs_mime_application_get_binary_name	          (GnomeVFSMimeApplication *app);
gboolean		 gnome_vfs_mime_application_supports_uris	          (GnomeVFSMimeApplication *app);
gboolean		 gnome_vfs_mime_application_requires_terminal             (GnomeVFSMimeApplication *app);
gboolean		 gnome_vfs_mime_application_supports_startup_notification (GnomeVFSMimeApplication *app);
const char		*gnome_vfs_mime_application_get_startup_wm_class          (GnomeVFSMimeApplication *app);
GnomeVFSMimeApplication *gnome_vfs_mime_application_copy                          (GnomeVFSMimeApplication *application);
gboolean		 gnome_vfs_mime_application_equal		          (GnomeVFSMimeApplication *app_a,
									           GnomeVFSMimeApplication *app_b);
void                     gnome_vfs_mime_application_free                          (GnomeVFSMimeApplication *application);

/* Lists */

void                     gnome_vfs_mime_application_list_free                     (GList                   *list);

G_END_DECLS

#ifndef GNOME_VFS_DISABLE_DEPRECATED
#include <libgnomevfs/gnome-vfs-mime-deprecated.h>
#endif

#endif /* GNOME_VFS_MIME_HANDLERS_H */