aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugin.h
blob: 20e5d298c6f04ac37a4a74a9bc03e52d93dd89e2 (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
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
128
129
130
131
/*
 * Copyright (C) 2007 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 _ANJUTA_PLUGIN_SDK_H_
#define _ANJUTA_PLUGIN_SDK_H_

#include <libanjuta/anjuta-plugin.h>
#include <libanjuta/interfaces/ianjuta-message-manager.h>
#include <libanjuta/interfaces/ianjuta-buildable.h>
#include <libanjuta/anjuta-launcher.h>

typedef struct _AnjutaPluginSdk AnjutaPluginSdk;
typedef struct _AnjutaPluginSdkClass AnjutaPluginSdkClass;

/*
 * State enum for the deployment state machine
 */
typedef enum
{
  DEPLOY_STATE_INITIAL,
  DEPLOY_STATE_LOCAL_INSTALL,
  DEPLOY_STATE_COPY,
  DEPLOY_STATE_DELETE,
  DEPLOY_STATE_FINISHED,
  DEPLOY_STATE_ERROR
} DeployState;

typedef enum
{
  POKY_MODE_TOOLCHAIN = 0,
  POKY_MODE_FULL
} PokyMode;

struct _AnjutaPluginSdk
{
  AnjutaPlugin parent;

  AnjutaPreferences *prefs;

  GtkWidget *sdk_root_chooser;
  GtkWidget *triplet_entry;
  GtkWidget *rootfs_chooser;
  GtkWidget *kernel_chooser;
  GtkWidget *poky_root_chooser;

  GtkActionGroup *action_group;

  guint sdk_root_notifyid;
  guint triplet_notifyid;
  guint kernel_notifyid;
  guint rootfs_notifyid;
  guint poky_root_notifyid;
  guint poky_mode_notifyid;

  guint update_environment_idle;
  guint qemu_settings_changed_idle;

  guint remote_gdb_timeout;

  gchar *triplet;
  gchar *sdk_root;
  gchar *poky_root;
  PokyMode poky_mode;

  gchar *kernel;
  gchar *rootfs;

  gchar *path_component;
  gchar *poky_scripts_dir;
  gchar *poky_host_staging_bin_dir;
  gchar *poky_cross_dir;

  gint uiid;

  guint project_root_uri_watch;

  gchar *project_root_uri;

  IAnjutaMessageView *deploy_msg_view;
  IAnjutaMessageView *qemu_msg_view;
  IAnjutaMessageView *remote_msg_view;

  AnjutaLauncher *deploy_launcher;
  AnjutaLauncher *qemu_launcher;
  AnjutaLauncher *remote_launcher;
  AnjutaLauncher *remote_gdb_launcher;
  AnjutaLauncher *oprofileui_launcher;

  gchar *deploy_path;
  DeployState deploy_state;

  GtkAction *deploy_action;
  GtkAction *qemu_start_action;
  GtkAction *qemu_shutdown_action;
  GtkAction *remote_run_action;
  GtkAction *remote_debug_action;
  GtkAction *remote_debug_stop_action;
  GtkAction *remote_profile_action;

  AnjutaSession *session;
  AnjutaPluginManager *plugin_manager;

  GtkWidget *dialog;
  GdkPixbuf *prefs_icon;

  gchar *gdb_local_path;
  gchar *gdb_remote_command;
  gchar *remote_command;

  IAnjutaBuildable *buildable;
};

struct _AnjutaPluginSdkClass
{
  AnjutaPluginClass parent_class;
};
#endif