include/storage.h include/service.h \
include/resolver.h include/ipconfig.h \
include/device.h include/network.h include/inet.h \
- include/ondemand.h include/tethering.h
+ include/ondemand.h
nodist_include_HEADERS = include/version.h
struct connman_technology;
+void connman_technology_tethering_notify(struct connman_technology *technology,
+ connman_bool_t enabled);
+
struct connman_technology_driver {
const char *name;
enum connman_service_type type;
+++ /dev/null
-/*
- *
- * Connection Manager
- *
- * Copyright (C) 2007-2010 Intel Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * 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 St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#ifndef __CONNMAN_TETHERING_H
-#define __CONNMAN_TETHERING_H
-
-void connman_tethering_enabled(void);
-void connman_tethering_disabled(void);
-
-#endif
#include <connman/technology.h>
#include <connman/device.h>
#include <connman/inet.h>
-#include <connman/tethering.h>
#include <connman/dbus.h>
#include <connman/log.h>
dbus_message_unref(reply);
dbus_pending_call_unref(call);
- connman_tethering_enabled();
+ connman_technology_tethering_notify(NULL, TRUE);
}
static void server_unregister_reply(DBusPendingCall *call, void *user_data)
dbus_message_unref(reply);
dbus_pending_call_unref(call);
- connman_tethering_disabled();
+ connman_technology_tethering_notify(NULL, FALSE);
}
connman_bool_t __connman_tethering_get_status(void);
int __connman_tethering_set_status(connman_bool_t status);
void __connman_tethering_update_interface(const char *interface);
+void __connman_tethering_set_enabled(void);
+void __connman_tethering_set_disabled(void);
#include <connman/provider.h>
int __connman_provider_create_and_connect(DBusMessage *msg);
const char * __connman_provider_get_ident(struct connman_provider *provider);
int __connman_provider_indicate_state(struct connman_provider *provider,
- enum connman_provider_state state);
+ enum connman_provider_state state);
int __connman_provider_indicate_error(struct connman_provider *provider,
- enum connman_provider_error error);
+ enum connman_provider_error error);
int __connman_provider_connect(struct connman_provider *provider);
int __connman_provider_disconnect(struct connman_provider *provider);
int __connman_provider_remove(const char *path);
}
}
+void connman_technology_tethering_notify(struct connman_technology *technology,
+ connman_bool_t enabled)
+{
+ DBG("technology %p enabled %u", technology, enabled);
+
+ if (enabled == TRUE)
+ __connman_tethering_set_enabled();
+ else
+ __connman_tethering_set_disabled();
+}
+
static int set_tethering(const char *bridge, connman_bool_t enabled)
{
GSList *list;
#include "connman.h"
-#include <connman/tethering.h>
-
#define BRIDGE_NAME "tether"
static connman_bool_t tethering_status = FALSE;
/* TODO: Flush nat POSTROUTING chain */
}
-void connman_tethering_enabled(void)
+void __connman_tethering_set_enabled(void)
{
if (tethering_status == FALSE)
return;
}
}
-void connman_tethering_disabled(void)
+void __connman_tethering_set_disabled(void)
{
if (tethering_status == FALSE)
return;