Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Side by Side Diff: content/browser/geolocation/osx_wifi.h

Issue 6597044: Revert 76228 - Move core pieces of geolocation from chrome to content.This is... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // The remainder of this file is copied from the Google Gear project:
6 // http://code.google.com/p/gears/source/browse/trunk/gears/geolocation/osx_wifi .h
7
8 // The contents of this file are taken from Apple80211.h from the iStumbler
9 // project (http://www.istumbler.net). This project is released under the BSD
10 // license with the following restrictions.
11 //
12 // Copyright (c) 02006, Alf Watt (alf@istumbler.net). All rights reserved.
13 //
14 // Redistribution and use in source and binary forms, with or without
15 // modification, are permitted provided that the following conditions
16 // are met:
17 //
18 // * Redistributions of source code must retain the above copyright
19 // notice, this list of conditions and the following disclaimer.
20 //
21 // * Redistributions in binary form must reproduce the above copyright
22 // notice, this list of conditions and the following disclaimer in the
23 // documentation and/or other materials provided with the distribution.
24 //
25 // * Neither the name of iStumbler nor the names of its contributors may be
26 // used to endorse or promote products derived from this software without
27 // specific prior written permission.
28 //
29 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
30 // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
31 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
32 // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
33 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
34 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
35 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
36 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
37 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
38 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
39 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 //
41 // This is the reverse engineered header for the Apple80211 private framework.
42 // The framework can be found at
43 // /System/Library/PrivateFrameworks/Apple80211.framework.
44
45 #ifndef CONTENT_BROWSER_GEOLOCATION_OSX_WIFI_H_
46 #define CONTENT_BROWSER_GEOLOCATION_OSX_WIFI_H_
47 #pragma once
48
49 #include <CoreFoundation/CoreFoundation.h>
50
51 extern "C" {
52
53 typedef SInt32 WIErr;
54
55 // A WirelessContext should be created using WirelessAttach
56 // before any other Wireless functions are called. WirelessDetach
57 // is used to dispose of a WirelessContext.
58 struct WirelessContext;
59
60 // WirelessAttach
61 //
62 // This should be called before all other wireless functions.
63 typedef WIErr (*WirelessAttachFunction)(WirelessContext** outContext,
64 const UInt32);
65
66 // WirelessDetach
67 //
68 // This should be called after all other wireless functions.
69 typedef WIErr (*WirelessDetachFunction)(WirelessContext* inContext);
70
71 typedef UInt16 WINetworkInfoFlags;
72
73 struct WirelessNetworkInfo
74 {
75 UInt16 channel; // Channel for the network.
76 SInt16 noise; // Noise for the network. 0 for Adhoc.
77 SInt16 signal; // Signal strength of the network. 0 for Adhoc.
78 UInt8 macAddress[6]; // MAC address of the wireless access point.
79 UInt16 beaconInterval; // Beacon interval in milliseconds
80 WINetworkInfoFlags flags; // Flags for the network
81 UInt16 nameLen;
82 SInt8 name[32];
83 };
84
85 // WirelessScanSplit
86 //
87 // WirelessScanSplit scans for available wireless networks. It will allocate 2
88 // CFArrays to store a list of managed and adhoc networks. The arrays hold
89 // CFData objects which contain WirelessNetworkInfo structures.
90 //
91 // Note: An adhoc network created on the computer the scan is running on will
92 // not be found. WirelessGetInfo can be used to find info about a local adhoc
93 // network.
94 //
95 // If stripDups != 0 only one bases tation for each SSID will be returned.
96 typedef WIErr (*WirelessScanSplitFunction)(WirelessContext* inContext,
97 CFArrayRef* apList,
98 CFArrayRef* adhocList,
99 const UInt32 stripDups);
100
101 } // extern "C"
102
103 #endif // CONTENT_BROWSER_GEOLOCATION_OSX_WIFI_H_
OLDNEW
« no previous file with comments | « content/browser/geolocation/network_location_request.cc ('k') | content/browser/geolocation/wifi_data_provider_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698