aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/bluetooth/Cargo.toml21
-rw-r--r--components/bluetooth/lib.rs (renamed from components/net/bluetooth_thread.rs)24
-rw-r--r--components/bluetooth_traits/Cargo.toml15
-rw-r--r--components/bluetooth_traits/lib.rs (renamed from components/net_traits/bluetooth_thread.rs)10
-rw-r--r--components/bluetooth_traits/scanfilter.rs (renamed from components/net_traits/bluetooth_scanfilter.rs)0
-rw-r--r--components/constellation/Cargo.toml1
-rw-r--r--components/constellation/constellation.rs2
-rw-r--r--components/constellation/lib.rs1
-rw-r--r--components/constellation/pipeline.rs2
-rw-r--r--components/net/Cargo.toml2
-rw-r--r--components/net/lib.rs3
-rw-r--r--components/net_traits/lib.rs2
-rw-r--r--components/script/Cargo.toml1
-rw-r--r--components/script/dom/bluetooth.rs6
-rw-r--r--components/script/dom/bluetoothremotegattcharacteristic.rs2
-rw-r--r--components/script/dom/bluetoothremotegattdescriptor.rs2
-rw-r--r--components/script/dom/bluetoothremotegattserver.rs2
-rw-r--r--components/script/dom/bluetoothremotegattservice.rs2
-rw-r--r--components/script/dom/window.rs2
-rw-r--r--components/script/lib.rs1
-rw-r--r--components/script/script_thread.rs2
-rw-r--r--components/script_traits/Cargo.toml1
-rw-r--r--components/script_traits/lib.rs3
-rw-r--r--components/servo/Cargo.lock29
-rw-r--r--components/servo/Cargo.toml2
-rw-r--r--components/servo/lib.rs6
-rw-r--r--docs/ORGANIZATION.md4
-rw-r--r--ports/cef/Cargo.lock29
28 files changed, 143 insertions, 34 deletions
diff --git a/components/bluetooth/Cargo.toml b/components/bluetooth/Cargo.toml
new file mode 100644
index 00000000000..e1ea441e267
--- /dev/null
+++ b/components/bluetooth/Cargo.toml
@@ -0,0 +1,21 @@
+[package]
+name = "bluetooth"
+version = "0.0.1"
+authors = ["The Servo Project Developers"]
+license = "MPL-2.0"
+publish = false
+
+[lib]
+name = "bluetooth"
+path = "lib.rs"
+
+[dependencies]
+bitflags = "0.7"
+bluetooth_traits = {path = "../bluetooth_traits"}
+device = {git = "https://github.com/servo/devices"}
+ipc-channel = "0.5"
+rand = "0.3"
+util = {path = "../util"}
+
+[target.'cfg(target_os = "linux")'.dependencies]
+tinyfiledialogs = {git = "https://github.com/jdm/tinyfiledialogs"}
diff --git a/components/net/bluetooth_thread.rs b/components/bluetooth/lib.rs
index bb71b27469b..12ba83244be 100644
--- a/components/net/bluetooth_thread.rs
+++ b/components/bluetooth/lib.rs
@@ -2,25 +2,33 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+#[macro_use]
+extern crate bitflags;
+extern crate bluetooth_traits;
+extern crate device;
+extern crate ipc_channel;
+extern crate rand;
+#[cfg(target_os = "linux")]
+extern crate tinyfiledialogs;
+extern crate util;
+
+use bluetooth_traits::{BluetoothCharacteristicMsg, BluetoothCharacteristicsMsg};
+use bluetooth_traits::{BluetoothDescriptorMsg, BluetoothDescriptorsMsg};
+use bluetooth_traits::{BluetoothDeviceMsg, BluetoothError, BluetoothMethodMsg};
+use bluetooth_traits::{BluetoothResult, BluetoothServiceMsg, BluetoothServicesMsg};
+use bluetooth_traits::scanfilter::{BluetoothScanfilter, BluetoothScanfilterSequence, RequestDeviceoptions};
use device::bluetooth::BluetoothAdapter;
use device::bluetooth::BluetoothDevice;
use device::bluetooth::BluetoothGATTCharacteristic;
use device::bluetooth::BluetoothGATTDescriptor;
use device::bluetooth::BluetoothGATTService;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
-use net_traits::bluetooth_scanfilter::{BluetoothScanfilter, BluetoothScanfilterSequence, RequestDeviceoptions};
-use net_traits::bluetooth_thread::{BluetoothCharacteristicMsg, BluetoothCharacteristicsMsg};
-use net_traits::bluetooth_thread::{BluetoothDescriptorMsg, BluetoothDescriptorsMsg};
-use net_traits::bluetooth_thread::{BluetoothDeviceMsg, BluetoothError, BluetoothMethodMsg};
-use net_traits::bluetooth_thread::{BluetoothResult, BluetoothServiceMsg, BluetoothServicesMsg};
-use rand::{self, Rng};
+use rand::Rng;
use std::borrow::ToOwned;
use std::collections::{HashMap, HashSet};
use std::string::String;
use std::thread;
use std::time::Duration;
-#[cfg(target_os = "linux")]
-use tinyfiledialogs;
use util::thread::spawn_named;
const ADAPTER_ERROR: &'static str = "No adapter found";
diff --git a/components/bluetooth_traits/Cargo.toml b/components/bluetooth_traits/Cargo.toml
new file mode 100644
index 00000000000..c562d679a38
--- /dev/null
+++ b/components/bluetooth_traits/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+name = "bluetooth_traits"
+version = "0.0.1"
+authors = ["The Servo Project Developers"]
+license = "MPL-2.0"
+publish = false
+
+[lib]
+name = "bluetooth_traits"
+path = "lib.rs"
+
+[dependencies]
+ipc-channel = "0.5"
+serde = "0.8"
+serde_derive = "0.8"
diff --git a/components/net_traits/bluetooth_thread.rs b/components/bluetooth_traits/lib.rs
index 48f64ff7474..dcff8cead91 100644
--- a/components/net_traits/bluetooth_thread.rs
+++ b/components/bluetooth_traits/lib.rs
@@ -2,8 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use bluetooth_scanfilter::RequestDeviceoptions;
+#![feature(proc_macro)]
+
+extern crate ipc_channel;
+#[macro_use]
+extern crate serde_derive;
+
+pub mod scanfilter;
+
use ipc_channel::ipc::IpcSender;
+use scanfilter::RequestDeviceoptions;
#[derive(Deserialize, Serialize)]
pub enum BluetoothError {
diff --git a/components/net_traits/bluetooth_scanfilter.rs b/components/bluetooth_traits/scanfilter.rs
index b5017de72ad..b5017de72ad 100644
--- a/components/net_traits/bluetooth_scanfilter.rs
+++ b/components/bluetooth_traits/scanfilter.rs
diff --git a/components/constellation/Cargo.toml b/components/constellation/Cargo.toml
index 6b3a864c88a..7ae0408d200 100644
--- a/components/constellation/Cargo.toml
+++ b/components/constellation/Cargo.toml
@@ -11,6 +11,7 @@ path = "lib.rs"
[dependencies]
backtrace = "0.2.1"
+bluetooth_traits = { path = "../bluetooth_traits" }
canvas = {path = "../canvas"}
canvas_traits = {path = "../canvas_traits"}
compositing = {path = "../compositing"}
diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs
index 96e22709d24..eed55cf3b25 100644
--- a/components/constellation/constellation.rs
+++ b/components/constellation/constellation.rs
@@ -10,6 +10,7 @@
//! `LayoutThread`, and `PaintThread`.
use backtrace::Backtrace;
+use bluetooth_traits::BluetoothMethodMsg;
use canvas::canvas_paint_thread::CanvasPaintThread;
use canvas::webgl_paint_thread::WebGLPaintThread;
use canvas_traits::CanvasMsg;
@@ -29,7 +30,6 @@ use msg::constellation_msg::{FrameId, FrameType, PipelineId};
use msg::constellation_msg::{Key, KeyModifiers, KeyState};
use msg::constellation_msg::{PipelineNamespace, PipelineNamespaceId, TraversalDirection};
use net_traits::{self, IpcSend, ResourceThreads};
-use net_traits::bluetooth_thread::BluetoothMethodMsg;
use net_traits::image_cache_thread::ImageCacheThread;
use net_traits::storage_thread::StorageThreadMsg;
use offscreen_gl_context::{GLContextAttributes, GLLimits};
diff --git a/components/constellation/lib.rs b/components/constellation/lib.rs
index fe3755ad88f..19b800baa19 100644
--- a/components/constellation/lib.rs
+++ b/components/constellation/lib.rs
@@ -11,6 +11,7 @@
#![deny(unsafe_code)]
extern crate backtrace;
+extern crate bluetooth_traits;
extern crate canvas;
extern crate canvas_traits;
extern crate compositing;
diff --git a/components/constellation/pipeline.rs b/components/constellation/pipeline.rs
index 9dafef6c3e5..66de70a9737 100644
--- a/components/constellation/pipeline.rs
+++ b/components/constellation/pipeline.rs
@@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+use bluetooth_traits::BluetoothMethodMsg;
use compositing::CompositionPipeline;
use compositing::CompositorProxy;
use compositing::compositor_thread::Msg as CompositorMsg;
@@ -17,7 +18,6 @@ use ipc_channel::router::ROUTER;
use layout_traits::LayoutThreadFactory;
use msg::constellation_msg::{FrameId, FrameType, PipelineId, PipelineNamespaceId};
use net_traits::{IpcSend, ResourceThreads};
-use net_traits::bluetooth_thread::BluetoothMethodMsg;
use net_traits::image_cache_thread::ImageCacheThread;
use profile_traits::mem as profile_mem;
use profile_traits::time;
diff --git a/components/net/Cargo.toml b/components/net/Cargo.toml
index b4f1689efe5..ff1b99a1ddc 100644
--- a/components/net/Cargo.toml
+++ b/components/net/Cargo.toml
@@ -14,7 +14,6 @@ bitflags = "0.7"
brotli = "1.0.6"
content-blocker = "0.2.1"
cookie = {version = "0.2.5", features = ["serialize-rustc"]}
-device = {git = "https://github.com/servo/devices"}
devtools_traits = {path = "../devtools_traits"}
flate2 = "0.2.0"
hyper = "0.9.9"
@@ -32,7 +31,6 @@ openssl = "0.7.6"
openssl-verify = "0.1"
plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"}
-rand = "0.3"
rustc-serialize = "0.3"
serde = "0.8"
serde_derive = "0.8"
diff --git a/components/net/lib.rs b/components/net/lib.rs
index f830eb2befa..af2d2e9db8c 100644
--- a/components/net/lib.rs
+++ b/components/net/lib.rs
@@ -16,7 +16,6 @@ extern crate bitflags;
extern crate brotli;
extern crate content_blocker as content_blocker_parser;
extern crate cookie as cookie_rs;
-extern crate device;
extern crate devtools_traits;
extern crate flate2;
extern crate hyper;
@@ -34,7 +33,6 @@ extern crate net_traits;
extern crate openssl;
extern crate openssl_verify;
extern crate profile_traits;
-extern crate rand;
extern crate rustc_serialize;
#[macro_use]
extern crate serde_derive;
@@ -51,7 +49,6 @@ extern crate websocket;
pub mod about_loader;
pub mod blob_loader;
-pub mod bluetooth_thread;
pub mod chrome_loader;
pub mod connector;
pub mod content_blocker;
diff --git a/components/net_traits/lib.rs b/components/net_traits/lib.rs
index e45e7e481bf..ce6b3e8b524 100644
--- a/components/net_traits/lib.rs
+++ b/components/net_traits/lib.rs
@@ -51,8 +51,6 @@ use url::Url;
use websocket::header;
pub mod blob_url_store;
-pub mod bluetooth_scanfilter;
-pub mod bluetooth_thread;
pub mod filemanager_thread;
pub mod hosts;
pub mod image_cache_thread;
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index 577b00c088a..5914dd6b0c0 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -25,6 +25,7 @@ angle = {git = "https://github.com/servo/angle", branch = "servo"}
app_units = "0.3"
audio-video-metadata = "0.1.2"
bitflags = "0.7"
+bluetooth_traits = {path = "../bluetooth_traits"}
canvas_traits = {path = "../canvas_traits"}
caseless = "0.1.0"
cookie = {version = "0.2.5", features = ["serialize-rustc"]}
diff --git a/components/script/dom/bluetooth.rs b/components/script/dom/bluetooth.rs
index 863d75bfec4..b6f8544aeab 100644
--- a/components/script/dom/bluetooth.rs
+++ b/components/script/dom/bluetooth.rs
@@ -3,6 +3,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use bluetooth_blacklist::{Blacklist, uuid_is_blacklisted};
+use bluetooth_traits::{BluetoothError, BluetoothMethodMsg};
+use bluetooth_traits::scanfilter::{BluetoothScanfilter, BluetoothScanfilterSequence};
+use bluetooth_traits::scanfilter::{RequestDeviceoptions, ServiceUUIDSequence};
use core::clone::Clone;
use dom::bindings::codegen::Bindings::BluetoothBinding::{self, BluetoothMethods, BluetoothRequestDeviceFilter};
use dom::bindings::codegen::Bindings::BluetoothBinding::RequestDeviceOptions;
@@ -18,9 +21,6 @@ use dom::globalscope::GlobalScope;
use dom::promise::Promise;
use ipc_channel::ipc::{self, IpcSender};
use js::conversions::ToJSValConvertible;
-use net_traits::bluetooth_scanfilter::{BluetoothScanfilter, BluetoothScanfilterSequence};
-use net_traits::bluetooth_scanfilter::{RequestDeviceoptions, ServiceUUIDSequence};
-use net_traits::bluetooth_thread::{BluetoothError, BluetoothMethodMsg};
use std::rc::Rc;
const FILTER_EMPTY_ERROR: &'static str = "'filters' member, if present, must be nonempty to find any devices.";
diff --git a/components/script/dom/bluetoothremotegattcharacteristic.rs b/components/script/dom/bluetoothremotegattcharacteristic.rs
index 95b26ff66c1..0fae7548ede 100644
--- a/components/script/dom/bluetoothremotegattcharacteristic.rs
+++ b/components/script/dom/bluetoothremotegattcharacteristic.rs
@@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use bluetooth_blacklist::{Blacklist, uuid_is_blacklisted};
+use bluetooth_traits::BluetoothMethodMsg;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::BluetoothCharacteristicPropertiesBinding::
BluetoothCharacteristicPropertiesMethods;
@@ -25,7 +26,6 @@ use dom::bluetoothuuid::{BluetoothDescriptorUUID, BluetoothUUID};
use dom::globalscope::GlobalScope;
use dom::promise::Promise;
use ipc_channel::ipc::{self, IpcSender};
-use net_traits::bluetooth_thread::BluetoothMethodMsg;
use std::rc::Rc;
// Maximum length of an attribute value.
diff --git a/components/script/dom/bluetoothremotegattdescriptor.rs b/components/script/dom/bluetoothremotegattdescriptor.rs
index f066bb9d22a..5ca51f45439 100644
--- a/components/script/dom/bluetoothremotegattdescriptor.rs
+++ b/components/script/dom/bluetoothremotegattdescriptor.rs
@@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use bluetooth_blacklist::{Blacklist, uuid_is_blacklisted};
+use bluetooth_traits::BluetoothMethodMsg;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDeviceMethods;
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTCharacteristicBinding::
@@ -21,7 +22,6 @@ use dom::bluetoothremotegattcharacteristic::{BluetoothRemoteGATTCharacteristic,
use dom::globalscope::GlobalScope;
use dom::promise::Promise;
use ipc_channel::ipc::{self, IpcSender};
-use net_traits::bluetooth_thread::BluetoothMethodMsg;
use std::rc::Rc;
// http://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattdescriptor
diff --git a/components/script/dom/bluetoothremotegattserver.rs b/components/script/dom/bluetoothremotegattserver.rs
index fe19651ebf4..5e589fe07af 100644
--- a/components/script/dom/bluetoothremotegattserver.rs
+++ b/components/script/dom/bluetoothremotegattserver.rs
@@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use bluetooth_blacklist::{Blacklist, uuid_is_blacklisted};
+use bluetooth_traits::BluetoothMethodMsg;
use dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDeviceMethods;
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding;
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
@@ -18,7 +19,6 @@ use dom::bluetoothuuid::{BluetoothServiceUUID, BluetoothUUID};
use dom::globalscope::GlobalScope;
use dom::promise::Promise;
use ipc_channel::ipc::{self, IpcSender};
-use net_traits::bluetooth_thread::BluetoothMethodMsg;
use std::cell::Cell;
use std::rc::Rc;
diff --git a/components/script/dom/bluetoothremotegattservice.rs b/components/script/dom/bluetoothremotegattservice.rs
index bce51131649..a4fc78c8d93 100644
--- a/components/script/dom/bluetoothremotegattservice.rs
+++ b/components/script/dom/bluetoothremotegattservice.rs
@@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use bluetooth_blacklist::{Blacklist, uuid_is_blacklisted};
+use bluetooth_traits::BluetoothMethodMsg;
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding;
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding::BluetoothRemoteGATTServiceMethods;
use dom::bindings::error::Error::{self, Security};
@@ -18,7 +19,6 @@ use dom::bluetoothuuid::{BluetoothCharacteristicUUID, BluetoothServiceUUID, Blue
use dom::globalscope::GlobalScope;
use dom::promise::Promise;
use ipc_channel::ipc::{self, IpcSender};
-use net_traits::bluetooth_thread::BluetoothMethodMsg;
use std::rc::Rc;
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 099e50f4820..2c083bc953c 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use app_units::Au;
+use bluetooth_traits::BluetoothMethodMsg;
use cssparser::Parser;
use devtools_traits::{ScriptToDevtoolsControlMsg, TimelineMarker, TimelineMarkerType};
use dom::bindings::callback::ExceptionHandling;
@@ -53,7 +54,6 @@ use js::jsval::UndefinedValue;
use js::rust::Runtime;
use msg::constellation_msg::{FrameType, PipelineId, ReferrerPolicy};
use net_traits::ResourceThreads;
-use net_traits::bluetooth_thread::BluetoothMethodMsg;
use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheThread};
use net_traits::storage_thread::StorageType;
use num_traits::ToPrimitive;
diff --git a/components/script/lib.rs b/components/script/lib.rs
index dd6299aa051..b9a8ddf5637 100644
--- a/components/script/lib.rs
+++ b/components/script/lib.rs
@@ -32,6 +32,7 @@ extern crate audio_video_metadata;
#[allow(unused_extern_crates)]
#[macro_use]
extern crate bitflags;
+extern crate bluetooth_traits;
extern crate canvas_traits;
extern crate caseless;
extern crate cookie as cookie_rs;
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index a028cd66ad5..7b60a6b8288 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -17,6 +17,7 @@
//! a page runs its course and the script thread returns to processing events in the main event
//! loop.
+use bluetooth_traits::BluetoothMethodMsg;
use devtools;
use devtools_traits::{DevtoolScriptControlMsg, DevtoolsPageInfo};
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
@@ -73,7 +74,6 @@ use layout_wrapper::ServoLayoutNode;
use mem::heap_size_of_self_and_children;
use msg::constellation_msg::{FrameType, PipelineId, PipelineNamespace, ReferrerPolicy};
use net_traits::{CoreResourceMsg, IpcSend, Metadata, ResourceThreads};
-use net_traits::bluetooth_thread::BluetoothMethodMsg;
use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheResult, ImageCacheThread};
use net_traits::request::{CredentialsMode, Destination, RequestInit};
use network_listener::NetworkListener;
diff --git a/components/script_traits/Cargo.toml b/components/script_traits/Cargo.toml
index 2b901f7c73d..b0e1669dd34 100644
--- a/components/script_traits/Cargo.toml
+++ b/components/script_traits/Cargo.toml
@@ -11,6 +11,7 @@ path = "lib.rs"
[dependencies]
app_units = "0.3"
+bluetooth_traits = {path = "../bluetooth_traits"}
canvas_traits = {path = "../canvas_traits"}
cookie = {version = "0.2.5", features = ["serialize-rustc"]}
devtools_traits = {path = "../devtools_traits"}
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 2617f745dbd..b28a7118790 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -11,6 +11,7 @@
#![deny(missing_docs)]
#![deny(unsafe_code)]
+extern crate bluetooth_traits;
extern crate canvas_traits;
extern crate cookie as cookie_rs;
extern crate devtools_traits;
@@ -37,6 +38,7 @@ extern crate url;
mod script_msg;
pub mod webdriver_msg;
+use bluetooth_traits::BluetoothMethodMsg;
use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId};
use euclid::Size2D;
use euclid::length::Length;
@@ -55,7 +57,6 @@ use libc::c_void;
use msg::constellation_msg::{FrameId, FrameType, Key, KeyModifiers, KeyState};
use msg::constellation_msg::{PipelineId, PipelineNamespaceId, ReferrerPolicy, TraversalDirection};
use net_traits::ResourceThreads;
-use net_traits::bluetooth_thread::BluetoothMethodMsg;
use net_traits::image::base::Image;
use net_traits::image_cache_thread::ImageCacheThread;
use net_traits::response::HttpsState;
diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock
index 94a45baed82..cb797b4bf9c 100644
--- a/components/servo/Cargo.lock
+++ b/components/servo/Cargo.lock
@@ -4,6 +4,8 @@ version = "0.0.1"
dependencies = [
"android_glue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bluetooth 0.0.1",
+ "bluetooth_traits 0.0.1",
"browserhtml 0.1.17 (git+https://github.com/browserhtml/browserhtml?branch=crate)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
@@ -187,6 +189,28 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "bluetooth"
+version = "0.0.1"
+dependencies = [
+ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bluetooth_traits 0.0.1",
+ "device 0.0.1 (git+https://github.com/servo/devices)",
+ "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
+ "util 0.0.1",
+]
+
+[[package]]
+name = "bluetooth_traits"
+version = "0.0.1"
+dependencies = [
+ "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "blurdroid"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -345,6 +369,7 @@ name = "constellation"
version = "0.0.1"
dependencies = [
"backtrace 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bluetooth_traits 0.0.1",
"canvas 0.0.1",
"canvas_traits 0.0.1",
"compositing 0.0.1",
@@ -1419,7 +1444,6 @@ dependencies = [
"brotli 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"content-blocker 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "device 0.0.1 (git+https://github.com/servo/devices)",
"devtools_traits 0.0.1",
"flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1437,7 +1461,6 @@ dependencies = [
"openssl-verify 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"profile_traits 0.0.1",
- "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1963,6 +1986,7 @@ dependencies = [
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"audio-video-metadata 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bluetooth_traits 0.0.1",
"canvas_traits 0.0.1",
"caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2061,6 +2085,7 @@ name = "script_traits"
version = "0.0.1"
dependencies = [
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bluetooth_traits 0.0.1",
"canvas_traits 0.0.1",
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1",
diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml
index 1ae8de5dbc2..b58726a2551 100644
--- a/components/servo/Cargo.toml
+++ b/components/servo/Cargo.toml
@@ -46,6 +46,8 @@ util_tests = {path = "../../tests/unit/util"}
[dependencies]
backtrace = "0.2"
+bluetooth_traits = {path = "../bluetooth_traits"}
+bluetooth = {path = "../bluetooth"}
browserhtml = {git = "https://github.com/browserhtml/browserhtml", branch = "crate"}
canvas = {path = "../canvas"}
canvas_traits = {path = "../canvas_traits"}
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index b715a9ebc35..a7ed6a04664 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -24,6 +24,8 @@ extern crate gaol;
extern crate gleam;
extern crate log;
+pub extern crate bluetooth;
+pub extern crate bluetooth_traits;
pub extern crate canvas;
pub extern crate canvas_traits;
pub extern crate compositing;
@@ -61,6 +63,8 @@ fn webdriver(port: u16, constellation: Sender<ConstellationMsg>) {
#[cfg(not(feature = "webdriver"))]
fn webdriver(_port: u16, _constellation: Sender<ConstellationMsg>) { }
+use bluetooth::BluetoothThreadFactory;
+use bluetooth_traits::BluetoothMethodMsg;
use compositing::{CompositorProxy, IOCompositor};
use compositing::compositor_thread::InitialCompositorState;
use compositing::windowing::WindowEvent;
@@ -75,11 +79,9 @@ use gaol::sandbox::{ChildSandbox, ChildSandboxMethods};
use gfx::font_cache_thread::FontCacheThread;
use ipc_channel::ipc::{self, IpcSender};
use log::{Log, LogMetadata, LogRecord};
-use net::bluetooth_thread::BluetoothThreadFactory;
use net::image_cache_thread::new_image_cache_thread;
use net::resource_thread::new_resource_threads;
use net_traits::IpcSend;
-use net_traits::bluetooth_thread::BluetoothMethodMsg;
use profile::mem as profile_mem;
use profile::time as profile_time;
use profile_traits::mem;
diff --git a/docs/ORGANIZATION.md b/docs/ORGANIZATION.md
index e69d0903158..ba6d1a0b1eb 100644
--- a/docs/ORGANIZATION.md
+++ b/docs/ORGANIZATION.md
@@ -1,5 +1,9 @@
# Servo's directory structure:
* components
+ * bluetooth
+ * Implementation the bluetooth thread.
+ * bluetooth_traits
+ * APIs to the bluetooth crate for crates that don't want to depend on the bluetooth crate for build speed reasons.
* canvas
* Implementation of painting threads for 2d and WebGL canvases.
* canvas_traits
diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock
index deb178707da..b58ae9e883b 100644
--- a/ports/cef/Cargo.lock
+++ b/ports/cef/Cargo.lock
@@ -160,6 +160,28 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "bluetooth"
+version = "0.0.1"
+dependencies = [
+ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bluetooth_traits 0.0.1",
+ "device 0.0.1 (git+https://github.com/servo/devices)",
+ "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
+ "tinyfiledialogs 0.1.0 (git+https://github.com/jdm/tinyfiledialogs)",
+ "util 0.0.1",
+]
+
+[[package]]
+name = "bluetooth_traits"
+version = "0.0.1"
+dependencies = [
+ "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "blurdroid"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -302,6 +324,7 @@ name = "constellation"
version = "0.0.1"
dependencies = [
"backtrace 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bluetooth_traits 0.0.1",
"canvas 0.0.1",
"canvas_traits 0.0.1",
"compositing 0.0.1",
@@ -1319,7 +1342,6 @@ dependencies = [
"brotli 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"content-blocker 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "device 0.0.1 (git+https://github.com/servo/devices)",
"devtools_traits 0.0.1",
"flate2 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1337,7 +1359,6 @@ dependencies = [
"openssl-verify 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"profile_traits 0.0.1",
- "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1814,6 +1835,7 @@ dependencies = [
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"audio-video-metadata 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bluetooth_traits 0.0.1",
"canvas_traits 0.0.1",
"caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1902,6 +1924,7 @@ name = "script_traits"
version = "0.0.1"
dependencies = [
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bluetooth_traits 0.0.1",
"canvas_traits 0.0.1",
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1",
@@ -1992,6 +2015,8 @@ version = "0.0.1"
dependencies = [
"android_glue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"backtrace 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bluetooth 0.0.1",
+ "bluetooth_traits 0.0.1",
"browserhtml 0.1.17 (git+https://github.com/browserhtml/browserhtml?branch=crate)",
"canvas 0.0.1",
"canvas_traits 0.0.1",