3 * A file-manager extension which offers configurable context menu actions.
5 * Copyright (C) 2005 The GNOME Foundation
6 * Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
7 * Copyright (C) 2009-2015 Pierre Wieser and others (see AUTHORS)
9 * FileManager-Actions 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 * FileManager-Actions 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 GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with FileManager-Actions; see the file COPYING. If not, see
21 * <http://www.gnu.org/licenses/>.
24 * Frederic Ruaudel <grumz@grumz.net>
25 * Rodrigo Moya <rodrigo@gnome-db.org>
26 * Pierre Wieser <pwieser@trychlos.org>
27 * ... and many others (see AUTHORS)
30 #ifndef __FILEMANAGER_ACTIONS_API_CORE_UTILS_H__
31 #define __FILEMANAGER_ACTIONS_API_CORE_UTILS_H__
36 * @short_description: The Core Library Utilities
37 * @include: filemanager-actions/fma-core-utils.h
44 /* boolean manipulation
46 gboolean
fma_core_utils_boolean_from_string( const gchar
*string
);
48 /* string manipulation
50 #ifdef FMA_ENABLE_DEPRECATED
51 gchar
*fma_core_utils_str_add_prefix( const gchar
*prefix
, const gchar
*str
);
53 int fma_core_utils_str_collate( const gchar
*str1
, const gchar
*str2
);
54 gchar
*fma_core_utils_str_remove_char( const gchar
*string
, const gchar
*to_remove
);
55 gchar
*fma_core_utils_str_remove_suffix( const gchar
*string
, const gchar
*suffix
);
56 void fma_core_utils_str_split_first_word( const gchar
*string
, gchar
**first
, gchar
**other
);
57 gchar
*fma_core_utils_str_subst( const gchar
*pattern
, const gchar
*key
, const gchar
*subst
);
59 /* some functions to get or set GSList list of strings
61 void fma_core_utils_slist_add_message( GSList
**list
, const gchar
*format
, ... );
62 GSList
*fma_core_utils_slist_duplicate( GSList
*slist
);
63 void fma_core_utils_slist_dump( const gchar
*prefix
, GSList
*list
);
64 GSList
*fma_core_utils_slist_from_array( const gchar
**str_array
);
65 GSList
*fma_core_utils_slist_from_split( const gchar
*text
, const gchar
*separator
);
66 gchar
*fma_core_utils_slist_join_at_end( GSList
*slist
, const gchar
*link
);
67 GSList
*fma_core_utils_slist_remove_ascii( GSList
*slist
, const gchar
*text
);
68 GSList
*fma_core_utils_slist_remove_utf8( GSList
*slist
, const gchar
*text
);
69 gchar
**fma_core_utils_slist_to_array( GSList
*slist
);
70 gchar
*fma_core_utils_slist_to_text( GSList
*slist
);
71 GSList
*fma_core_utils_slist_setup_element( GSList
*list
, const gchar
*element
, gboolean set
);
72 guint
fma_core_utils_slist_count( GSList
*list
, const gchar
*str
);
73 gboolean
fma_core_utils_slist_find_negated( GSList
*list
, const gchar
*str
);
74 gboolean
fma_core_utils_slist_are_equal( GSList
*a
, GSList
*b
);
75 void fma_core_utils_slist_free( GSList
*slist
);
77 /* some functions for GString manipulations.
79 gchar
*fma_core_utils_gstring_joinv( const gchar
*start
, const gchar
*separator
, gchar
**list
);
83 void fma_core_utils_selcount_get_ope_int( const gchar
*selection_count
, gchar
**ope
, gchar
**uint
);
85 /* directory management
87 gboolean
fma_core_utils_dir_is_writable_path( const gchar
*path
);
88 gboolean
fma_core_utils_dir_is_writable_uri ( const gchar
*uri
);
89 void fma_core_utils_dir_list_perms ( const gchar
*path
, const gchar
*message
);
90 void fma_core_utils_dir_split_ext ( const gchar
*string
, gchar
**first
, gchar
**ext
);
94 gboolean
fma_core_utils_file_delete ( const gchar
*path
);
95 gboolean
fma_core_utils_file_exists ( const gchar
*uri
);
96 gboolean
fma_core_utils_file_is_loadable ( const gchar
*uri
);
97 void fma_core_utils_file_list_perms ( const gchar
*path
, const gchar
*message
);
98 gchar
*fma_core_utils_file_load_from_uri( const gchar
*uri
, gsize
*length
);
102 void fma_core_utils_print_version( void );
106 #endif /* __FILEMANAGER_ACTIONS_API_CORE_UTILS_H__ */