summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@dfupdate.se>2023-01-02 23:14:25 +0100
committerMarcus Lundblad <ml@dfupdate.se>2023-01-04 23:04:05 +0100
commit1d442af6e26e132a70245e73afd3c679ce53c1c1 (patch)
tree4d10a2499e5d41594c1317be4e709d336abb3065
parentf07a54aa044ae4848314087aeeca1e88ca0c98bd (diff)
downloadgnome-maps-wip/mlundblad/osm-proxy-call-js.tar.gz
Remove C implementation of OAuth2ProxyCallwip/mlundblad/osm-proxy-call-js
-rw-r--r--lib/maps-osm-oauth-proxy-call.c101
-rw-r--r--lib/maps-osm-oauth-proxy-call.h58
-rw-r--r--lib/meson.build3
3 files changed, 0 insertions, 162 deletions
diff --git a/lib/maps-osm-oauth-proxy-call.c b/lib/maps-osm-oauth-proxy-call.c
deleted file mode 100644
index 47359c60..00000000
--- a/lib/maps-osm-oauth-proxy-call.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2015 Marcus Lundblad
- *
- * GNOME Maps 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 of the License, or (at your
- * option) any later version.
- *
- * GNOME Maps 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 GNOME Maps; if not, see <http://www.gnu.org/licenses/>
- *
- * Author: Marcus Lundblad <ml@update.uu.se>
- */
-
-#include "maps-osm-oauth-proxy-call.h"
-
-#include <glib.h>
-#include <rest/rest-proxy-call.h>
-#include <string.h>
-
-#define MAPS_OSM_OAUTH_PROXY_CALL_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE((obj), MAPS_TYPE_OSM_OAUTH_PROXY_CALL,\
- MapsOSMOAuthProxyCallPrivate))
-
-struct _MapsOSMOAuthProxyCallPrivate
-{
- char *payload;
-};
-
-G_DEFINE_TYPE_WITH_PRIVATE(MapsOSMOAuthProxyCall, maps_osm_oauth_proxy_call,
- REST_TYPE_OAUTH2_PROXY_CALL);
-
-static gboolean
-maps_osm_oauth_proxy_call_serialize_params (RestProxyCall *call,
- gchar **content_type,
- gchar **content,
- gsize *content_len,
- GError **error)
-{
- g_return_val_if_fail(MAPS_IS_OSM_OAUTH_PROXY_CALL (call), FALSE);
- g_return_val_if_fail(content_type != NULL, FALSE);
- g_return_val_if_fail(content != NULL, FALSE);
- g_return_val_if_fail(content_len != NULL, FALSE);
-
- gchar *payload = (MAPS_OSM_OAUTH_PROXY_CALL (call))->priv->payload;
-
- *content_type = g_strdup ("text/xml");
- *content = g_strdup (payload);
- *content_len = strlen (payload);
-
- return TRUE;
-}
-
-static void
-maps_osm_oauth_proxy_call_dispose (GObject *object)
-{
- MapsOSMOAuthProxyCall *call = MAPS_OSM_OAUTH_PROXY_CALL (object);
-
- g_free (call->priv->payload);
- call->priv->payload = NULL;
-
- G_OBJECT_CLASS (maps_osm_oauth_proxy_call_parent_class)->dispose (object);
-}
-
-static void
-maps_osm_oauth_proxy_call_class_init (MapsOSMOAuthProxyCallClass *klass)
-{
- RestProxyCallClass *proxy_call_class = REST_PROXY_CALL_CLASS (klass);
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
- proxy_call_class->serialize_params =
- maps_osm_oauth_proxy_call_serialize_params;
- gobject_class->dispose = maps_osm_oauth_proxy_call_dispose;
-}
-
-static void
-maps_osm_oauth_proxy_call_init (MapsOSMOAuthProxyCall *call)
-{
- call->priv = MAPS_OSM_OAUTH_PROXY_CALL_GET_PRIVATE (call);
-}
-
-MapsOSMOAuthProxyCall *
-maps_osm_oauth_proxy_call_new (RestOAuth2Proxy *proxy, const char *payload)
-{
- g_return_val_if_fail (REST_IS_OAUTH2_PROXY (proxy), NULL);
- g_return_val_if_fail (payload != NULL, NULL);
-
- MapsOSMOAuthProxyCall *call =
- g_object_new (MAPS_TYPE_OSM_OAUTH_PROXY_CALL, "proxy", proxy, NULL);
-
- call->priv->payload = g_strdup (payload);
-
- return call;
-}
-
-
diff --git a/lib/maps-osm-oauth-proxy-call.h b/lib/maps-osm-oauth-proxy-call.h
deleted file mode 100644
index 03c6a363..00000000
--- a/lib/maps-osm-oauth-proxy-call.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2015 Marcus Lundblad
- *
- * GNOME Maps 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 of the License, or (at your
- * option) any later version.
- *
- * GNOME Maps 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 GNOME Maps; if not, see <http://www.gnu.org/licenses/>
- *
- * Author: Marcus Lundblad <ml@update.uu.se>
- */
-
-#ifndef MAPS_OSM_OAUTH_PROXY_CALL_H
-#define MAPS_OSM_OAUTH_PROXY_CALL_H
-
-#include <glib-object.h>
-
-#include <rest/rest-oauth2-proxy-call.h>
-#include <rest/rest-oauth2-proxy.h>
-
-G_BEGIN_DECLS
-
-#define MAPS_TYPE_OSM_OAUTH_PROXY_CALL (maps_osm_oauth_proxy_call_get_type ())
-#define MAPS_OSM_OAUTH_PROXY_CALL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAPS_TYPE_OSM_OAUTH_PROXY_CALL, MapsOSMOAuthProxyCall))
-#define MAPS_OSM_OAUTH_PROXY_CALL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MAPS_TYPE_OSM_OAUTH_PROXY_CALL, MapsOSMOAuthProxyCallClass))
-#define MAPS_IS_OSM_OAUTH_PROXY_CALL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAPS_TYPE_OSM_OAUTH_PROXY_CALL))
-#define MAPS_IS_OSM_OAUTH_PROXY_CALL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MAPS_TYPE_OSM_OAUTH_PROXY_CALL))
-#define MAPS_OSM_OAUTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MAPS_TYPE_OSM_OAUTH_PROXY_CALL, MapsOSMOAuthProxyCallClass))
-
-typedef struct _MapsOSMOAuthProxyCall MapsOSMOAuthProxyCall;
-typedef struct _MapsOSMOAuthProxyCallPrivate MapsOSMOAuthProxyCallPrivate;
-typedef struct _MapsOSMOAuthProxyCallClass MapsOSMOAuthProxyCallClass;
-
-struct _MapsOSMOAuthProxyCall
-{
- RestOAuth2ProxyCall parent;
- MapsOSMOAuthProxyCallPrivate *priv;
-};
-
-struct _MapsOSMOAuthProxyCallClass
-{
- RestOAuth2ProxyCallClass parent_class;
-};
-
-GType maps_osm_oauth_proxy_call_get_type(void);
-MapsOSMOAuthProxyCall *maps_osm_oauth_proxy_call_new (RestOAuth2Proxy *proxy,
- const char *content);
-
-G_END_DECLS
-
-#endif /* MAPS_OSM_OAUTH_PROXY_CALL_H */
diff --git a/lib/meson.build b/lib/meson.build
index 82824e8c..fc15c349 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -6,7 +6,6 @@ headers_private = files(
'maps-osm-object.h',
'maps-osm-way.h',
'maps-osm-relation.h',
- 'maps-osm-oauth-proxy-call.h',
'maps-sync-map-source.h'
)
@@ -18,7 +17,6 @@ sources = files(
'maps-osm-object.c',
'maps-osm-way.c',
'maps-osm-relation.c',
- 'maps-osm-oauth-proxy-call.c',
'maps-sync-map-source.c'
)
@@ -49,7 +47,6 @@ gnome.generate_gir(
includes: [
'GLib-2.0',
'GObject-2.0',
- 'Rest-1.0',
'Shumate-1.0'
],
install: true,