From MozillaWiki
Jump to: navigation, search

Outdated links

See Labs/Weave/AddDataType for information on how to add new data types to Weave for synchronization.

See Labs/Weave/ReferenceServer for information on the reference Weave server, which is useful to use when doing Weave client development.

Old code

This is a place to dump useful code that was removed from the Weave codebase because it was no longer required, but may still be useful elsewhere.


runCmd: function Weave_runCmd() {
    var binary;
    var args = [];
    for (let i = 0; i < arguments.length; ++i) {

    if (args[0] instanceof Ci.nsIFile) {
      binary = args.shift();
    } else {
      binary = Cc[";1"].createInstance(Ci.nsILocalFile);

    var p = Cc[";1"].createInstance(Ci.nsIProcess);

    let log = Log4Moz.Service.getLogger("Service.Util");
    log.debug("Running command: " + binary.path + " " + args.join(" "));, args, args.length);
    return p.exitValue;