aboutsummaryrefslogtreecommitdiffstats
path: root/embed/webkit/webkit-embed-persist.c
blob: 24b467d42ddd712d43f52655bbfa8b58fa3f9da7 (plain) (blame)
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
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
/*
 *  Copyright © 2007 Xan Lopez <xan@gnome.org>
 *
 *  This program 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; either version 2, or (at your option)
 *  any later version.
 *
 *  This program 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, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 */

#include "webkit-embed-persist.h"

static void     webkit_embed_persist_class_init (WebKitEmbedPersistClass *klass);
static void     webkit_embed_persist_init       (WebKitEmbedPersist *persist);

#define WEBKIT_EMBED_PERSIST_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), WEBKIT_TYPE_EMBED_PERSIST, WebKitEmbedPersistPrivate))

G_DEFINE_TYPE (WebKitEmbedPersist, webkit_embed_persist, EPHY_TYPE_EMBED_PERSIST)

static void
impl_cancel (EphyEmbedPersist *persist)
{
  g_object_unref (persist);
}

static gboolean
impl_save (EphyEmbedPersist *persist)
{
  g_object_ref (persist);

  return FALSE;
}

static char *
impl_to_string (EphyEmbedPersist *persist)
{
  return NULL;
}

static void
webkit_embed_persist_class_init (WebKitEmbedPersistClass *klass)
{
  EphyEmbedPersistClass *persist_class = EPHY_EMBED_PERSIST_CLASS (klass);
    
  persist_class->save = impl_save;
  persist_class->cancel = impl_cancel;
  persist_class->to_string = impl_to_string;
}

static void
webkit_embed_persist_init (WebKitEmbedPersist *persist)
{
}

void
webkit_embed_persist_completed (WebKitEmbedPersist *persist)
{
  g_signal_emit_by_name (persist, "completed");
  g_object_unref (persist);
}

void
webkit_embed_persist_cancelled (WebKitEmbedPersist *persist)
{
  g_signal_emit_by_name (persist, "cancelled");
  g_object_unref (persist);
}