Update copyright message
[nautilus-actions.git] / src / api / na-core-utils.h
blob9dcbe7ca0573c44a02206d82e8870c351d3ffbd3
1 /*
2 * Nautilus Actions
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, 2010, 2011 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.
24 * Authors:
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 __NAUTILUS_ACTIONS_API_NA_CORE_UTILS_H__
32 #define __NAUTILUS_ACTIONS_API_NA_CORE_UTILS_H__
34 /**
35 * SECTION: core-utils
36 * @title: Core Misc
37 * @short_description: The Core Library Utilities
38 * @include: nautilus-action/na-core-utils.h
41 #include <glib.h>
43 G_BEGIN_DECLS
45 /* boolean manipulation
47 gboolean na_core_utils_boolean_from_string( const gchar *string );
49 /* string manipulation
51 gchar *na_core_utils_str_add_prefix( const gchar *prefix, const gchar *str );
52 int na_core_utils_str_collate( const gchar *str1, const gchar *str2 );
53 gchar *na_core_utils_str_remove_char( const gchar *string, const gchar *to_remove );
54 gchar *na_core_utils_str_remove_suffix( const gchar *string, const gchar *suffix );
55 void na_core_utils_str_split_first_word( const gchar *string, gchar **first, gchar **other );
57 /* some functions to get or set GSList list of strings
59 void na_core_utils_slist_add_message( GSList **list, const gchar *format, ... );
60 GSList *na_core_utils_slist_duplicate( GSList *slist );
61 void na_core_utils_slist_dump( const gchar *prefix, GSList *list );
62 GSList *na_core_utils_slist_from_array( const gchar **str_array );
63 GSList *na_core_utils_slist_from_split( const gchar *text, const gchar *separator );
64 gchar *na_core_utils_slist_join_at_end( GSList *slist, const gchar *link );
65 GSList *na_core_utils_slist_remove_ascii( GSList *slist, const gchar *text );
66 GSList *na_core_utils_slist_remove_utf8( GSList *slist, const gchar *text );
67 gchar **na_core_utils_slist_to_array( GSList *slist );
68 gchar *na_core_utils_slist_to_text( GSList *slist );
69 GSList *na_core_utils_slist_setup_element( GSList *list, const gchar *element, gboolean set );
70 guint na_core_utils_slist_count( GSList *list, const gchar *str );
71 gboolean na_core_utils_slist_find_negated( GSList *list, const gchar *str );
72 gboolean na_core_utils_slist_are_equal( GSList *a, GSList *b );
73 void na_core_utils_slist_free( GSList *slist );
75 /* some functions for GString manipulations.
77 gchar *na_core_utils_gstring_joinv( const gchar *start, const gchar *separator, gchar **list );
79 /* selection count
81 void na_core_utils_selcount_get_ope_int( const gchar *selection_count, gchar **ope, gchar **uint );
83 /* directory management
85 gboolean na_core_utils_dir_is_writable_path( const gchar *path );
86 gboolean na_core_utils_dir_is_writable_uri( const gchar *uri );
87 void na_core_utils_dir_split_ext( const gchar *string, gchar **first, gchar **ext );
89 /* file management
91 gboolean na_core_utils_file_delete ( const gchar *path );
92 gboolean na_core_utils_file_exists ( const gchar *uri );
93 gchar *na_core_utils_file_load_from_uri( const gchar *uri, gsize *length );
95 /* miscellaneous
97 void na_core_utils_print_version( void );
99 G_END_DECLS
101 #endif /* __NAUTILUS_ACTIONS_API_NA_CORE_UTILS_H__ */