Cu.import("resource://gre/modules/CloudSync.jsm");
console.log(cloudSync); // Module is imported
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var methods = [ | |
'open', | |
'close', | |
'mkdir', | |
'rmdir', | |
'stat', | |
'fstat', | |
'link', | |
'unlink', | |
'read', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Filer Roadmap: | |
* ~~Support Brackets, and other applications~~ | |
* Support for DropBox and other clouds | |
* Shared cross-domain storage and API | |
* DropBox clone that isn't in the cloud | |
* Proxy API for postMessage into an iframe | |
* JavaScript lib that you include which handles proxy communication | |
* HTML page that can be put in an iframe to give a common domain (filer.io) | |
* `<script src="https://filer.io/filesystem.js">` that 3rd parties can use to have a shared filesystem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/services/cloudsync/CloudSync.js b/services/cloudsync/CloudSync.js | |
new file mode 100644 | |
index 0000000..8bdff6b | |
--- /dev/null | |
+++ b/services/cloudsync/CloudSync.js | |
@@ -0,0 +1,71 @@ | |
+/* This Source Code Form is subject to the terms of the Mozilla Public | |
+ * 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/. */ | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cu.import("resource://services-cloudsync/main.js"); | |
let service = Cc["@mozilla.org/cloudsync/service;1"] | |
.getService(Components.interfaces.nsISupports) | |
.wrappedJSObject; | |
service.whenLoaded().then(() => { | |
// Cloudsync is ready, do work | |
CloudSync.Local.id; // local device id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dgram = require('dgram'); | |
var path = require('path'); | |
var express = require('express'); | |
var EventEmitter = require('events').EventEmitter; | |
var app = express(); | |
var port = process.env.PORT = 9080; | |
var router = express.Router(); | |
var socket = dgram.createSocket('udp4'); | |
var scanEvents = new EventEmitter(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This Source Code Form is subject to the terms of the Mozilla Public | |
* 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/. */ | |
function test() { | |
let local = {}; | |
Components.utils.import("resource://gre/modules/CloudSync.jsm", local); | |
Components.utils.import("resource:///modules/sessionstore/TabState.jsm", local); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/node | |
/* creates a data channel between two peer connections and sends binary messages | |
* after ~4000 messages it will segfault | |
* reproducible with nodejs-0.10.31 & wrtc-0.0.29 | |
*/ | |
var servers = null, options = {optional: [{DtlsSrtpKeyAgreement:true}]}; | |
var rx, tx, tx_channel; | |
/* receiving peer */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include "cmd_def.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Server running at http://0.0.0.0:9000/ | |
/peer.html | |
/dist/wrtc.js | |
/peer.js | |
ws connected | |
WebRtc VoiceEngine codecs: | |
ISAC/16000/1 (103) | |
ISAC/32000/1 (104) | |
Warning(webrtcvoiceengine.cc:501): Unexpected codec: ISAC/48000/1 (105) | |
PCMU/8000/1 (0) |
OlderNewer