Initial git release
[connectnow-hp] / src / connectnow-home-widget.h
1 /*
2  *  connectnow home widget for the maemo desktop.
3  *  Copyright (C) 2010 Nicolai Hess
4  *  
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *  
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *  
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  */
19 #ifndef CONNECTNOW_HOME_PLUGIN_H
20 #define CONNECTNOW_HOME_PLUGIN_H
21
22 #include <glib-object.h>
23 #include <conic.h>
24 #include <hildon/hildon.h>
25 #include <libhildondesktop/libhildondesktop.h>
26
27 static const gchar* GENERAL_CONNECTED = "connectnow_general_connected";
28 static const gchar* GENERAL_DISCONNECTED = "connectnow_general_disconnected";
29
30
31 G_BEGIN_DECLS
32
33 typedef struct _ConnectNowHomePlugin ConnectNowHomePlugin;
34 typedef struct _ConnectNowHomePluginClass ConnectNowHomePluginClass;
35
36 #define CONNECT_NOW_HOME_PLUGIN_TYPE (connect_now_home_plugin_get_type())
37
38 #define CONNECT_NOW_HOME_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
39                                                                  CONNECT_NOW_HOME_PLUGIN_TYPE, ConnectNowHomePlugin))
40
41 #define CONNECT_NOW_IS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
42                                                                 CONNECT_NOW_HOME_PLUGIN_TYPE))
43
44 #define CONNECT_NOW_HOME_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
45                                                                            CONNECT_NOW_HOME_PLUGIN_TYPE, ConnectNowHomePluginClass))
46
47 struct _ConnectNowHomePlugin
48 {
49   HDHomePluginItem hitem;
50   gchar* connection_id;
51   gchar* connection_name;
52   gchar* current_connection_id;
53   ConIcConnection* con;
54   gint this_connection_state;
55   gboolean connect_now;
56
57   gchar* iD;
58   gchar* connectedImageName;
59   gchar* disconnectedImageName;
60   GdkPixbuf* connectedImage;
61   GdkPixbuf* disconnectedImage;
62   guint widget_size;
63   gboolean hide_connection_name;
64
65 };
66
67 struct _ConnectNowHomePluginClass
68 {
69   HDHomePluginItemClass parent_class;
70
71 };
72
73 GType connect_now_home_plugin_get_type(void);
74
75 #endif