aboutsummaryrefslogtreecommitdiffstats
path: root/src/beaver-util.h
blob: 2cee44a51daf902acbba776149402246b7e08fe7 (plain)
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
/*
 * Copyright (C) 2007, 2008 OpenedHand Ltd.
 * Authored by: Rob Bradford <rob@o-hand.com>
 *
 * This is free software: you can redistribute it and/or modify it under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation, version 2 of the License.
 *
 * This software 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 General Public License
 * for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _BEAVER_UTIL
#define _BEAVER_UTIL

#include <config.h>
#include <glib-object.h>

#include <dirent.h>
#include <errno.h>

#include <libanjuta/libanjuta.h>
#include <libanjuta/interfaces/ianjuta-message-manager.h>

#define MAX_CONFIG_LENGTH 2048
#define ENV_SCRIPT_FILE_PREFIX "environment-setup-"

void beaver_util_message_view_buffer_flushed_cb (IAnjutaMessageView *view, 
    gchar *data, gpointer userdata);
gchar **beaver_util_strv_concat (gchar **strv_1, gchar **strv_2);
gchar **beaver_util_strv_joinv (gchar **strv_1, ...);

gchar *beaver_util_get_archs(gchar *directory);
GHashTable *beaver_util_get_configs(gchar *filename);
gchar *get_host_triplet(gchar *env_file);

void update_env_hash(gchar *filename, GHashTable *hash_configs,
    GHashTable **old_hash_configs);
void update_combo_box(GtkWidget *combo_box, gchar *value);

#endif /* _BEAVER_UTIL */