/gpump/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/gpump/trunk

« back to all changes in this revision

Viewing changes to src/GPumpAuth.h

  • Committer: Gustav Hartvigsson
  • Date: 2014-06-09 17:42:01 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140609174201-9j752hye8k69m9ze
* UI for preferences done, it is still not functional.
  * TODO: bind some functions to the different buttons and switches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil
2
 
 * vi: set shiftwidth=2 tabstop=2 expandtab:
3
 
 * :indentSize=2:tabSize=2:noTabs=true:
4
 
 */
5
 
 
6
 
 /*
7
 
  * The GPumpAuth class authenticates the user with a Pump.io node.
8
 
  * 
9
 
  * GPump contains a widget that needs to be associated with a top-level window,
10
 
  * or dialoug window associated a top level window.
11
 
  *
12
 
  * The special widget is a dialoug box with a WebKitWebView that displays the
13
 
  * authentication page.
14
 
  * 
15
 
  * The keys are stored in the object untill they are gotten after which the
16
 
  * keys are freed and zeroed. After that point, the keys are not avalible for
17
 
  * this class.
18
 
  */
19
 
 
20
 
#include <gtk/gtk.h>
21
 
#include <gio/gio.h>
22
 
#include <rest/oauth2-proxy.h>
23
 
#include <rest/rest-proxy-call.h>
24
 
#include <stdlib.h>
25
 
#include <string.h>
26
 
#include <glib/gi18n.h>
27
 
 
28
 
#define GPUMP_TYPE_AUTH             (gpump_auth_get_type ())
29
 
#define GPUMP_AUTH(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), GPUMP_TYPE_AUTH, GPumpAuth))
30
 
#define GPUMP_AUTH_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), GPUMP_TYPE_AUTH, GPumpAUTHClass))
31
 
#define GPUMP_IS_AUTH(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPUMP_TYPE_AUTH))
32
 
#define GPUMP_IS_AUTH_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GPUMP_TYPE_AUTH))
33
 
#define GPUMP_AUTH_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GPUMP_TYPE_AUTH, GPumpAuthClass))
34
 
 
35
 
/*
36
 
 * NAMESPACE: gpump_*
37
 
 * 
38
 
 * The authenication widget that is use for authentication of the user with a
39
 
 * Pump.io node.
40
 
 * 
41
 
 * The parent is a GtkDialog and uses GtkWebkit.
42
 
 * 
43
 
 * CLASS NAMESPACE: gpump_auth_*
44
 
 */
45
 
 
46
 
 
47
 
typedef struct GPumpAuth GPumpAuth;
48
 
typedef struct GPumpAuthPrivate GPumpAuthPrivate;
49
 
typedef struct GPumpAuthClass GPumpAuthClass;
50
 
 
51
 
/**
52
 
 * GPumpAuth is a widget is used for getting the OAuth information from the
53
 
 * Pump.io node.
54
 
 */
55
 
struct GPumpAuth {
56
 
  GtkDialog parent;
57
 
  
58
 
};
59
 
 
60
 
struct GPumpAuthClass {
61
 
  GtkDialogClass parent_class;
62
 
};
63
 
 
64
 
GType gpump_auth_get_type (void) G_GNUC_CONST;
65
 
 
66
 
/**
67
 
 * 
68
 
 */
69
 
GPumpAuth * gpump_auth_new (void);
70