var EXPORTED_SYMBOLS = [ 'dataSync_module' ]; var dataSync_module = { // module type, used to register/index the module and manage it through the // prefs service (datasync.module.moduleType.enabled boolean pref). it must // be unique, only contain /[0-9a-z_-]+/i, and be at least 6 characters long type: 'sample', // module name, used on the menu name: 'Sample', // module icon, used on the menu. this can be a chrome:// or data: URI icon: 'chrome://browser/skin/feeds/feedIcon16.png', // if you need to communicate a failure in the startup() and shutdown() // functions, 'throw' an error. it's alright to throw in the import() // and export() functions too, but it would be better to store the error // on .message and set .status to false in the return value instead. // .preferences() should not throw. // operations to perform on startup, optional /*startup: function() { // must return true to properly register return true; },*/ // operations to perform on shutdown, optional /*shutdown: function() { // no return value },*/ import: function(data) { // perform operations on the unencrypted data // return true for successful import, message optional return { status: true, message: null }; }, export: function() { // perform operations to gather the data, which will be automatically // encrypted by the gzIDataSync component. this can be text, binary // data, encoded json, serialized xml, etc var data = "data to export"; // return true for successful export , message optional, data required return { status: true, message: null, data: data }; }, // open a preferences window, optional /*preferences: function() { }*/ };