3 * A Nautilus extension which offers configurable context menu actions.
5 * Copyright (C) 2005 The GNOME Foundation
6 * Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
7 * Copyright (C) 2009 Pierre Wieser and others (see AUTHORS)
9 * This Program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
14 * This Program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public
20 * License along with this Library; see the file COPYING. If not,
21 * write to the Free Software Foundation, Inc., 59 Temple Place,
22 * Suite 330, Boston, MA 02111-1307, USA.
25 * Frederic Ruaudel <grumz@grumz.net>
26 * Rodrigo Moya <rodrigo@gnome-db.org>
27 * Pierre Wieser <pwieser@trychlos.org>
28 * ... and many others (see AUTHORS)
31 #ifndef __NA_ACTION_PROFILE_H__
32 #define __NA_ACTION_PROFILE_H__
35 * NactActionProfile class definition.
37 * This is a companion class of NactAction. It embeds the profile
38 * definition of an action.
40 * As NactAction itself, NactActionProfile class is derived from
41 * NAObject which takes care of i/o.
44 #include "na-object.h"
48 #define NA_ACTION_PROFILE_TYPE ( na_action_profile_get_type())
49 #define NA_ACTION_PROFILE( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, NA_ACTION_PROFILE_TYPE, NAActionProfile ))
50 #define NA_ACTION_PROFILE_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, NA_ACTION_PROFILE_TYPE, NAActionProfileClass ))
51 #define NA_IS_ACTION_PROFILE( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, NA_ACTION_PROFILE_TYPE ))
52 #define NA_IS_ACTION_PROFILE_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), NA_ACTION_PROFILE_TYPE ))
53 #define NA_ACTION_PROFILE_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), NA_ACTION_PROFILE_TYPE, NAActionProfileClass ))
55 typedef struct NAActionProfilePrivate NAActionProfilePrivate
;
59 NAActionProfilePrivate
*private;
63 typedef struct NAActionProfileClassPrivate NAActionProfileClassPrivate
;
67 NAActionProfileClassPrivate
*private;
71 /* instance properties
73 #define PROP_PROFILE_ACTION_STR "profile-action"
74 #define PROP_PROFILE_NAME_STR "profile-name"
75 #define PROP_PROFILE_LABEL_STR "profile-desc-name"
76 #define PROP_PROFILE_PATH_STR "profile-path"
77 #define PROP_PROFILE_PARAMETERS_STR "profile-parameters"
78 #define PROP_PROFILE_BASENAMES_STR "profile-basenames"
79 #define PROP_PROFILE_MATCHCASE_STR "profile-matchcase"
80 #define PROP_PROFILE_ISDIR_STR "profile-isdir"
81 #define PROP_PROFILE_ISFILE_STR "profile-isfile"
82 #define PROP_PROFILE_ACCEPT_MULTIPLE_STR "profile-accept-multiple-files"
83 #define PROP_PROFILE_MIMETYPES_STR "profile-mimetypes"
84 #define PROP_PROFILE_SCHEMES_STR "profile-schemes"
86 /* internal identifier of profiles must begin with the following prefix
87 * this let us identify a profile key versus an action key
88 * corollarily, no action entry must begin with this same prefix
90 #define ACTION_PROFILE_PREFIX "profile-"
92 GType
na_action_profile_get_type( void );
94 NAActionProfile
*na_action_profile_new( const NAObject
*action
, const gchar
*name
);
95 NAActionProfile
*na_action_profile_duplicate( const NAAction
*action
, const NAActionProfile
*profile
);
96 void na_action_profile_free( NAActionProfile
*profile
);
98 NAObject
*na_action_profile_get_action( const NAActionProfile
*profile
);
99 gchar
*na_action_profile_get_name( const NAActionProfile
*profile
);
100 gchar
*na_action_profile_get_label( const NAActionProfile
*profile
);
101 gchar
*na_action_profile_get_path( const NAActionProfile
*profile
);
102 gchar
*na_action_profile_get_parameters( const NAActionProfile
*profile
);
103 GSList
*na_action_profile_get_basenames( const NAActionProfile
*profile
);
104 gboolean
na_action_profile_get_matchcase( const NAActionProfile
*profile
);
105 GSList
*na_action_profile_get_mimetypes( const NAActionProfile
*profile
);
106 gboolean
na_action_profile_get_is_dir( const NAActionProfile
*profile
);
107 gboolean
na_action_profile_get_is_file( const NAActionProfile
*profile
);
108 gboolean
na_action_profile_get_multiple( const NAActionProfile
*profile
);
109 GSList
*na_action_profile_get_schemes( const NAActionProfile
*profile
);
111 gboolean
na_action_profile_are_equal( NAActionProfile
*first
, NAActionProfile
*second
);
113 void na_action_profile_set_label( NAActionProfile
*profile
, const gchar
*label
);
114 void na_action_profile_set_path( NAActionProfile
*profile
, const gchar
*path
);
115 void na_action_profile_set_parameters( NAActionProfile
*profile
, const gchar
*parameters
);
116 void na_action_profile_set_basenames( NAActionProfile
*profile
, GSList
*basenames
);
117 void na_action_profile_set_matchcase( NAActionProfile
*profile
, gboolean matchcase
);
118 void na_action_profile_set_mimetypes( NAActionProfile
*profile
, GSList
*mimetypes
);
119 void na_action_profile_set_isfile( NAActionProfile
*profile
, gboolean isfile
);
120 void na_action_profile_set_isdir( NAActionProfile
*profile
, gboolean isdir
);
121 void na_action_profile_set_isfiledir( NAActionProfile
*profile
, gboolean isfile
, gboolean isdir
);
122 void na_action_profile_set_multiple( NAActionProfile
*profile
, gboolean multiple
);
123 void na_action_profile_set_scheme( NAActionProfile
*profile
, const gchar
*scheme
, gboolean selected
);
124 void na_action_profile_set_schemes( NAActionProfile
*profile
, GSList
*schemes
);
126 gboolean
na_action_profile_is_candidate( const NAActionProfile
*profile
, GList
*files
);
127 gchar
*na_action_profile_parse_parameters( const NAActionProfile
*profile
, GList
*files
);
131 #endif /* __NA_ACTION_PROFILE_H__ */