Update copyright information
[connman] / include / iface.h
index b9ade5e..3530f23 100644 (file)
@@ -2,7 +2,7 @@
  *
  *  Connection Manager
  *
- *  Copyright (C) 2007  Intel Corporation. All rights reserved.
+ *  Copyright (C) 2007-2008  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
@@ -38,10 +38,15 @@ enum connman_iface_type {
 };
 
 enum connman_iface_flags {
-       CONNMAN_IFACE_FLAG_RTNL     = (1 << 0),
-       CONNMAN_IFACE_FLAG_IPV4     = (1 << 1),
-       CONNMAN_IFACE_FLAG_IPV6     = (1 << 2),
-       CONNMAN_IFACE_FLAG_SCANNING = (1 << 3),
+       CONNMAN_IFACE_FLAG_RTNL      = (1 << 0),
+       CONNMAN_IFACE_FLAG_IPV4      = (1 << 1),
+       CONNMAN_IFACE_FLAG_IPV6      = (1 << 2),
+       CONNMAN_IFACE_FLAG_SCANNING  = (1 << 3),
+       CONNMAN_IFACE_FLAG_NOCARRIER = (1 << 4),
+
+       CONNMAN_IFACE_FLAG_STARTED   = (1 << 16),
+       CONNMAN_IFACE_FLAG_RUNNING   = (1 << 17),
+       CONNMAN_IFACE_FLAG_DHCP      = (1 << 18),
 };
 
 enum connman_iface_state {
@@ -83,8 +88,10 @@ struct connman_ipv4 {
 };
 
 struct connman_network {
-       char *essid;
-       char *psk;
+       struct connman_iface *iface;
+       char *path;
+       char *identifier;
+       char *passphrase;
 };
 
 struct connman_iface {
@@ -94,7 +101,7 @@ struct connman_iface {
        char *identifier;
        int index;
        enum connman_iface_type type;
-       enum connman_iface_flags flags;
+       unsigned long flags;
        enum connman_iface_state state;
        enum connman_iface_policy policy;
        struct connman_network network;
@@ -127,11 +134,6 @@ struct connman_iface_driver {
                                        struct connman_network *network);
        int (*disconnect) (struct connman_iface *iface);
 
-       void (*set_network) (struct connman_iface *iface,
-                                               const char *network);
-       void (*set_passphrase) (struct connman_iface *iface,
-                                               const char *passphrase);
-
        void (*rtnl_carrier) (struct connman_iface *iface, int carrier);
        void (*rtnl_wireless) (struct connman_iface *iface,
                                        void *data, unsigned short len);
@@ -151,8 +153,8 @@ static inline void connman_iface_set_data(struct connman_iface *iface,
        iface->driver_data = data;
 }
 
-extern void connman_iface_indicate_enabled(struct connman_iface *iface);
-extern void connman_iface_indicate_disabled(struct connman_iface *iface);
+extern void connman_iface_indicate_ifup(struct connman_iface *iface);
+extern void connman_iface_indicate_ifdown(struct connman_iface *iface);
 extern void connman_iface_indicate_connected(struct connman_iface *iface);
 extern void connman_iface_indicate_carrier_on(struct connman_iface *iface);
 extern void connman_iface_indicate_carrier_off(struct connman_iface *iface);