diff options
author | Diego Escalante Urrelo <descalante@igalia.com> | 2011-01-19 00:10:11 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <descalante@igalia.com> | 2011-03-08 04:34:52 +0800 |
commit | b9f9bf1a0763492f8bf41b8856bbd1149c5871a9 (patch) | |
tree | 92ad55101bff9eabcbc17afdba4a398ce4c4b709 /embed/ephy-embed-persist.h | |
parent | 7f7826a163f31bb662247ac4486dca0d01df35f6 (diff) | |
download | gsoc2013-epiphany-b9f9bf1a0763492f8bf41b8856bbd1149c5871a9.tar gsoc2013-epiphany-b9f9bf1a0763492f8bf41b8856bbd1149c5871a9.tar.gz gsoc2013-epiphany-b9f9bf1a0763492f8bf41b8856bbd1149c5871a9.tar.bz2 gsoc2013-epiphany-b9f9bf1a0763492f8bf41b8856bbd1149c5871a9.tar.lz gsoc2013-epiphany-b9f9bf1a0763492f8bf41b8856bbd1149c5871a9.tar.xz gsoc2013-epiphany-b9f9bf1a0763492f8bf41b8856bbd1149c5871a9.tar.zst gsoc2013-epiphany-b9f9bf1a0763492f8bf41b8856bbd1149c5871a9.zip |
ephy-download: add the new EphyDownload object
EphyDownload is a wrapper object around WebKitDownload that handles common
behavior in downloads: auto-destination, default action for the MIME type.
It can be used to wrap a WebKitDownload coming from a WebKitView or to download
a url: ephy_download_new_for_uri and ephy_download_new_for_download are
provided.
Its lifetime is not automagic like EphyEmbedPersist, so you have to unref it
when you no longer need it.
This new object replaces EphyEmbedPersist and enables us to use a single
codepath for downloads in all Epiphany.
Bug #618443
Diffstat (limited to 'embed/ephy-embed-persist.h')
-rw-r--r-- | embed/ephy-embed-persist.h | 132 |
1 files changed, 0 insertions, 132 deletions
diff --git a/embed/ephy-embed-persist.h b/embed/ephy-embed-persist.h deleted file mode 100644 index 8dcc848e0..000000000 --- a/embed/ephy-embed-persist.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright © 2000-2003 Marco Pesenti Gritti - * Copyright © 2003 Christian Persch - * - * 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. - * - */ - -#if !defined (__EPHY_EPIPHANY_H_INSIDE__) && !defined (EPIPHANY_COMPILATION) -#error "Only <epiphany/epiphany.h> can be included directly." -#endif - -#ifndef EPHY_EMBED_PERSIST_H -#define EPHY_EMBED_PERSIST_H - -#include "ephy-embed.h" - -#include <glib-object.h> -#include <glib.h> - -#include <gtk/gtk.h> - -G_BEGIN_DECLS - -#define EPHY_TYPE_EMBED_PERSIST (ephy_embed_persist_get_type ()) -#define EPHY_EMBED_PERSIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_EMBED_PERSIST, EphyEmbedPersist)) -#define EPHY_EMBED_PERSIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_EMBED_PERSIST, EphyEmbedPersistClass)) -#define EPHY_IS_EMBED_PERSIST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_EMBED_PERSIST)) -#define EPHY_IS_EMBED_PERSIST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_EMBED_PERSIST)) -#define EPHY_EMBED_PERSIST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_EMBED_PERSIST, EphyEmbedPersistClass)) - -typedef struct _EphyEmbedPersistClass EphyEmbedPersistClass; -typedef struct _EphyEmbedPersist EphyEmbedPersist; -typedef struct _EphyEmbedPersistPrivate EphyEmbedPersistPrivate; - -typedef enum -{ - EPHY_EMBED_PERSIST_COPY_PAGE = 1 << 0, - EPHY_EMBED_PERSIST_MAINDOC = 1 << 1, - EPHY_EMBED_PERSIST_NO_VIEW = 1 << 2, - EPHY_EMBED_PERSIST_ASK_DESTINATION = 1 << 3, - EPHY_EMBED_PERSIST_DO_CONVERSION = 1 << 4, - EPHY_EMBED_PERSIST_FROM_CACHE = 1 << 5, - EPHY_EMBED_PERSIST_NO_CERTDIALOGS = 1 << 6, - EPHY_EMBED_PERSIST_NO_COOKIES = 1 << 7 -} EphyEmbedPersistFlags; - -struct _EphyEmbedPersist -{ - GObject parent; - - /*< private >*/ - EphyEmbedPersistPrivate *priv; -}; - -struct _EphyEmbedPersistClass -{ - GObjectClass parent_class; - - void (* completed) (EphyEmbedPersist *persist); - void (* cancelled) (EphyEmbedPersist *persist); -}; - -GType ephy_embed_persist_flags_get_type (void); - -GType ephy_embed_persist_get_type (void); - -gboolean ephy_embed_persist_save (EphyEmbedPersist *persist); - -void ephy_embed_persist_cancel (EphyEmbedPersist *persist); - -void ephy_embed_persist_set_dest (EphyEmbedPersist *persist, - const char *value); - -void ephy_embed_persist_set_embed (EphyEmbedPersist *persist, - EphyEmbed *value); - -void ephy_embed_persist_set_fc_title (EphyEmbedPersist *persist, - const char *value); - -void ephy_embed_persist_set_fc_parent (EphyEmbedPersist *persist, - GtkWindow *value); - -void ephy_embed_persist_set_flags (EphyEmbedPersist *persist, - EphyEmbedPersistFlags value); - -void ephy_embed_persist_set_max_size (EphyEmbedPersist *persist, - gint64 value); - -void ephy_embed_persist_set_persist_key (EphyEmbedPersist *persist, - const char *value); - -void ephy_embed_persist_set_source (EphyEmbedPersist *persist, - const char *value); -void ephy_embed_persist_set_user_time (EphyEmbedPersist *persist, - guint32 user_time); - -const char *ephy_embed_persist_get_dest (EphyEmbedPersist *persist); - -EphyEmbed *ephy_embed_persist_get_embed (EphyEmbedPersist *persist); - -const char *ephy_embed_persist_get_fc_title (EphyEmbedPersist *persist); - -GtkWindow *ephy_embed_persist_get_fc_parent (EphyEmbedPersist *persist); - -EphyEmbedPersistFlags ephy_embed_persist_get_flags (EphyEmbedPersist *persist); - -gint64 ephy_embed_persist_get_max_size (EphyEmbedPersist *persist); - -const char *ephy_embed_persist_get_persist_key (EphyEmbedPersist *persist); - -const char *ephy_embed_persist_get_source (EphyEmbedPersist *persist); - -guint32 ephy_embed_persist_get_user_time (EphyEmbedPersist *persist); - -char *ephy_embed_persist_to_string (EphyEmbedPersist *persist); - -G_END_DECLS - -#endif |