| 1 | /* |
| 2 | Copyright 2014 Canonical Ltd. |
| 3 | |
| 4 | This program is free software: you can redistribute it and/or modify it |
| 5 | under the terms of the GNU General Public License version 3, as published |
| 6 | by the Free Software Foundation. |
| 7 | |
| 8 | This program is distributed in the hope that it will be useful, but |
| 9 | WITHOUT ANY WARRANTY; without even the implied warranties of |
| 10 | MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
| 11 | PURPOSE. See the GNU General Public License for more details. |
| 12 | |
| 13 | You should have received a copy of the GNU General Public License along |
| 14 | with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ |
| 16 | |
| 17 | // package curldispatcher wraps lomiri-url-dispatcher |
| 18 | package curldispatcher |
| 19 | |
| 20 | /* |
| 21 | #cgo pkg-config: lomiri-url-dispatcher |
| 22 | |
| 23 | #include <lomiri-url-dispatcher.h> |
| 24 | #include <glib.h> |
| 25 | |
| 26 | char* handleDispatchURLResult(const gchar * url, gboolean success, gpointer user_data); |
| 27 | |
| 28 | static void url_dispatch_callback(const gchar * url, gboolean success, gpointer user_data) { |
| 29 | handleDispatchURLResult(url, success, user_data); |
| 30 | } |
| 31 | |
| 32 | void dispatch_url(const gchar* url, gpointer user_data) { |
| 33 | lomiri_url_dispatch_send(url, (LomiriURLDispatchCallback)url_dispatch_callback, user_data); |
| 34 | } |
| 35 | |
| 36 | gchar** test_url(const gchar** urls) { |
| 37 | char** result = lomiri_url_dispatch_url_appid(urls); |
| 38 | return result; |
| 39 | } |
| 40 | */ |
| 41 | import "C" |