From ed13a41e18a8848868e341c262143f25950be786 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Tue, 26 Oct 2010 10:24:17 +0000 Subject: [PATCH] Fix the build, which was broken in r39147. I hope I didn't overlap too much on your shoes, Axel. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39155 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/net/NetworkNotifications.h | 24 +++++++++------- headers/private/net/net_notifications.h | 37 ++----------------------- 2 files changed, 16 insertions(+), 45 deletions(-) diff --git a/headers/os/net/NetworkNotifications.h b/headers/os/net/NetworkNotifications.h index a4edd6eec4..6523c16e68 100644 --- a/headers/os/net/NetworkNotifications.h +++ b/headers/os/net/NetworkNotifications.h @@ -9,10 +9,7 @@ #include -class BHandler; -class BLooper; -class BMessenger; - +// Flags for the start_watching_network() calls. #define B_NETWORK_INTERFACE_ADDED 0x0001 #define B_NETWORK_INTERFACE_REMOVED 0x0002 @@ -34,17 +31,24 @@ enum { #define B_NETWORK_MONITOR '_NTN' -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(_KERNEL_MODE) -status_t start_watching_network(uint32 flags, const BMessenger& target); -status_t start_watching_network(uint32 flags, const BHandler* handler, +// these are only needed for the function exports +#include + +class BHandler; +class BLooper; + + +extern status_t start_watching_network(uint32 flags, const BMessenger& target); +extern status_t start_watching_network(uint32 flags, const BHandler* handler, const BLooper* looper = NULL); -status_t stop_watching_network(const BMessenger& target); -status_t stop_watching_network(const BHandler* handler, +extern status_t stop_watching_network(const BMessenger& target); +extern status_t stop_watching_network(const BHandler* handler, const BLooper* looper = NULL); -#endif // __cplusplus +#endif // __cplusplus && !_KERNEL_MODE #endif // _NETWORK_NOTIFICATIONS_H diff --git a/headers/private/net/net_notifications.h b/headers/private/net/net_notifications.h index 9147b35b37..ffeab3ec3e 100644 --- a/headers/private/net/net_notifications.h +++ b/headers/private/net/net_notifications.h @@ -1,5 +1,5 @@ /* - * Copyright 2008, Haiku, Inc. All Rights Reserved. + * Copyright 2008-2010, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. */ #ifndef NET_NOTIFICATIONS_H @@ -7,6 +7,7 @@ #include +#include #define NET_NOTIFICATIONS_MODULE_NAME "network/notifications/v1" @@ -32,39 +33,5 @@ struct net_notifications_control { uint32 token; }; -// TODO: the following part of this header should end up in a public header -// some day! - -#define B_NETWORK_INTERFACE_ADDED 0x0001 -#define B_NETWORK_INTERFACE_REMOVED 0x0002 -#define B_NETWORK_INTERFACE_CHANGED 0x0003 -#define B_NETWORK_DEVICE_LINK_CHANGED 0x0010 -#define B_NETWORK_WLAN_JOINED 0x0100 -#define B_NETWORK_WLAN_LEFT 0x0200 -#define B_NETWORK_WLAN_SCANNED 0x0300 -#define B_NETWORK_WLAN_MESSAGE_INTEGRITY_FAILED 0x0400 - -// TODO: add routes, stack unloaded/loaded, ... events - -enum { - B_WATCH_NETWORK_INTERFACE_CHANGES = 0x000f, - B_WATCH_NETWORK_LINK_CHANGES = 0x00f0, - B_WATCH_NETWORK_WLAN_CHANGES = 0x0f00 -}; - -#define B_NETWORK_MONITOR '_NTN' - -#ifndef _KERNEL_MODE -# include - -status_t start_watching_network(uint32 flags, const BMessenger& target); -status_t start_watching_network(uint32 flags, const BHandler* handler, - const BLooper* looper = NULL); - -status_t stop_watching_network(const BMessenger& target); -status_t stop_watching_network(const BHandler* handler, - const BLooper* looper = NULL); - -#endif // _KERNEL_MODE #endif // NET_NOTIFICATIONS_H