diff --git a/src/servo/net.rs b/src/servo/net.rs new file mode 100644 index 00000000000..47357c3cf08 --- /dev/null +++ b/src/servo/net.rs @@ -0,0 +1,25 @@ +export uri, input_stream, channel, io_service, file_channel; + +import uri::uri; + +iface input_stream { + fn close(); + fn read() -> [u8]; +} + +iface channel { + fn uri() -> uri; + fn open() -> input_stream; +} + +iface io_service { + fn new_uri(spec: str) -> uri; + fn new_channel(uri: uri) -> channel; +} + +class file_channel implements channel { + new() { } + + fn uri() -> uri { fail } + fn open() -> input_stream { fail } +} diff --git a/src/servo/net/uri.rs b/src/servo/net/uri.rs new file mode 100644 index 00000000000..e8541817dbd --- /dev/null +++ b/src/servo/net/uri.rs @@ -0,0 +1,13 @@ +export uri, build_uri; + +type uri = { + spec: str, + scheme: str, + host: option, + port: option, + path: str +}; + +fn build_uri(_spec: str) -> uri { + fail +} diff --git a/src/servo/servo.rc b/src/servo/servo.rc index 309dd818b9e..cb906505790 100755 --- a/src/servo/servo.rc +++ b/src/servo/servo.rc @@ -70,6 +70,10 @@ mod content { mod name_pool; } +mod net { + mod uri; +} + mod opts; mod engine;