├── .gitignore ├── deps └── libexpat │ ├── doc │ ├── expat.png │ ├── valid-xhtml10.png │ └── style.css │ ├── lib │ ├── Makefile.MPW │ ├── winconfig.h │ ├── amigaconfig.h │ ├── xmltok_impl.h │ ├── macconfig.h │ ├── asciitab.h │ ├── utf8tab.h │ ├── latin1tab.h │ ├── iasciitab.h │ ├── ascii.h │ ├── libexpat.def │ ├── libexpatw.def │ ├── internal.h │ ├── xmlrole.h │ ├── xmltok_ns.c │ └── expat_external.h │ ├── win32 │ ├── expat.iss │ ├── MANIFEST.txt │ └── README.txt │ ├── bcb5 │ ├── elements.bpf │ ├── outline.bpf │ ├── expat_static.bpf │ ├── expatw_static.bpf │ ├── expat.bpf │ ├── expatw.bpf │ ├── xmlwf.bpf │ ├── setup.bat │ ├── makefile.mak │ ├── all_projects.bpg │ ├── outline.bpr │ ├── expat_static.bpr │ ├── xmlwf.bpr │ └── expat.bpr │ ├── tests │ ├── runtestspp.cpp │ ├── README.txt │ ├── benchmark │ │ ├── README.txt │ │ ├── benchmark.dsw │ │ ├── benchmark.dsp │ │ └── benchmark.c │ ├── chardata.h │ ├── minicheck.h │ ├── chardata.c │ └── xmltest.sh │ ├── xmlwf │ ├── codepage.h │ ├── xmlurl.h │ ├── filemap.h │ ├── xmlmime.h │ ├── xmlfile.h │ ├── xmltchar.h │ ├── unixfilemap.c │ ├── codepage.c │ ├── readfilemap.c │ ├── win32filemap.c │ ├── ct.c │ └── xmlmime.c │ ├── version.c │ ├── expat.pc.in │ ├── vms │ ├── README.vms │ ├── expat_config.h │ └── descrip.mms │ ├── m4 │ └── ltversion.m4 │ ├── conftools │ ├── mkinstalldirs │ ├── get-version.sh │ ├── expat.m4 │ ├── PrintPath │ └── ac_c_bigendian_cross.m4 │ ├── COPYING │ ├── amiga │ ├── expat_base.h │ ├── include │ │ └── proto │ │ │ └── expat.h │ ├── launch.c │ ├── README.txt │ └── expat_68k.h │ ├── ConfigureChecks.cmake │ ├── CMake.README │ ├── examples │ ├── elements.c │ ├── outline.c │ ├── outline.dsp │ └── elements.dsp │ ├── libexpat.gyp │ ├── expat.dsw │ ├── expat_config.h.cmake │ ├── expat_config.h.in │ ├── MANIFEST │ └── expat_config.h ├── examples ├── set_max_received_size.js ├── signal.js ├── hello.js ├── invalid_args.js ├── error_handling.js ├── multi_connection.js ├── get_property.js ├── method.js └── service.js ├── .clang-format ├── src ├── signal.h ├── decoder.h ├── connection.h ├── object_handler.h ├── introspect.h ├── encoder.h ├── dbus.h └── signal.cc ├── test ├── error.test.js ├── client-disconnect.test.js ├── client-signal.test.js ├── service-disconnect.test.js ├── client-call-timeout.test.js ├── with-service.js ├── client-call-intdict.test.js ├── client-property-error.test.js ├── client-call-add.test.js ├── client-call-noargs.test.js ├── client-call-object.test.js ├── service-client-disconnect.test.js ├── service-duplicate-error.test.js ├── service-emit-after-disconnect.test.js ├── client-call-error.test.js ├── client-property.test.js ├── service-dynamic.js ├── client-use-after-disconnect.test.js ├── service-create-remove-object.test.js └── service.js ├── lib ├── error.js ├── service.js ├── utils.js └── dbus.js ├── .travis.yml ├── package.json ├── LICENSE └── binding.gyp /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.log 3 | *.o 4 | *.swp 5 | *.node 6 | node_modules 7 | .idea -------------------------------------------------------------------------------- /deps/libexpat/doc/expat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shouqun/node-dbus/HEAD/deps/libexpat/doc/expat.png -------------------------------------------------------------------------------- /deps/libexpat/lib/Makefile.MPW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shouqun/node-dbus/HEAD/deps/libexpat/lib/Makefile.MPW -------------------------------------------------------------------------------- /deps/libexpat/win32/expat.iss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shouqun/node-dbus/HEAD/deps/libexpat/win32/expat.iss -------------------------------------------------------------------------------- /deps/libexpat/doc/valid-xhtml10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shouqun/node-dbus/HEAD/deps/libexpat/doc/valid-xhtml10.png -------------------------------------------------------------------------------- /examples/set_max_received_size.js: -------------------------------------------------------------------------------- 1 | var DBus = require('../'); 2 | 3 | var bus = DBus.getBus('session'); 4 | 5 | bus.setMaxMessageSize(5000000); 6 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/elements.bpf: -------------------------------------------------------------------------------- 1 | USEUNIT("..\examples\elements.c"); 2 | USELIB("Release\libexpats_mtd.lib"); 3 | //--------------------------------------------------------------------------- 4 | main 5 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/outline.bpf: -------------------------------------------------------------------------------- 1 | USEUNIT("..\examples\outline.c"); 2 | USELIB("Release\libexpat_mtd.lib"); 3 | //--------------------------------------------------------------------------- 4 | main 5 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | # Defines the Google C++ style for automatic reformatting. 2 | # http://clang.llvm.org/docs/ClangFormatStyleOptions.html 3 | BasedOnStyle: Google 4 | DerivePointerAlignment: false 5 | MaxEmptyLinesToKeep: 1 6 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/expat_static.bpf: -------------------------------------------------------------------------------- 1 | USEUNIT("..\lib\xmlparse.c"); 2 | USEUNIT("..\lib\xmlrole.c"); 3 | USEUNIT("..\lib\xmltok.c"); 4 | //--------------------------------------------------------------------------- 5 | #define Library 6 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/expatw_static.bpf: -------------------------------------------------------------------------------- 1 | USEUNIT("..\lib\xmlparse.c"); 2 | USEUNIT("..\lib\xmlrole.c"); 3 | USEUNIT("..\lib\xmltok.c"); 4 | //--------------------------------------------------------------------------- 5 | #define Library 6 | -------------------------------------------------------------------------------- /deps/libexpat/tests/runtestspp.cpp: -------------------------------------------------------------------------------- 1 | // C++ compilation harness for the test suite. 2 | // 3 | // This is used to ensure the Expat headers can be included from C++ 4 | // and have everything work as expected. 5 | // 6 | #include "runtests.c" 7 | -------------------------------------------------------------------------------- /deps/libexpat/xmlwf/codepage.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | int codepageMap(int cp, int *map); 6 | int codepageConvert(int cp, const char *p); 7 | -------------------------------------------------------------------------------- /deps/libexpat/version.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main () { 5 | XML_Expat_Version v; 6 | v = XML_ExpatVersionInfo(); 7 | printf("Using libexpat v%d.%d.%d\n", v.major, v.minor, v.micro); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/expat.bpf: -------------------------------------------------------------------------------- 1 | USEUNIT("..\lib\xmlparse.c"); 2 | USEUNIT("..\lib\xmlrole.c"); 3 | USEUNIT("..\lib\xmltok.c"); 4 | USEDEF("libexpat_mtd.def"); 5 | //--------------------------------------------------------------------------- 6 | #define DllEntryPoint 7 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/expatw.bpf: -------------------------------------------------------------------------------- 1 | USEUNIT("..\lib\xmlparse.c"); 2 | USEUNIT("..\lib\xmlrole.c"); 3 | USEUNIT("..\lib\xmltok.c"); 4 | USEDEF("libexpatw_mtd.def"); 5 | //--------------------------------------------------------------------------- 6 | #define DllEntryPoint 7 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/xmlwf.bpf: -------------------------------------------------------------------------------- 1 | USEUNIT("..\xmlwf\codepage.c"); 2 | USEUNIT("..\xmlwf\win32filemap.c"); 3 | USEUNIT("..\xmlwf\xmlfile.c"); 4 | USEUNIT("..\xmlwf\xmlwf.c"); 5 | USELIB("Release\libexpat_mtd.lib"); 6 | //--------------------------------------------------------------------------- 7 | main 8 | -------------------------------------------------------------------------------- /deps/libexpat/expat.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: expat 7 | Version: @PACKAGE_VERSION@ 8 | Description: expat XML parser 9 | URL: http://www.libexpat.org 10 | Libs: -L${libdir} -lexpat 11 | Cflags: -I${includedir} 12 | -------------------------------------------------------------------------------- /deps/libexpat/xmlwf/xmlurl.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | int XML_URLInit(); 6 | void XML_URLUninit(); 7 | int XML_ProcessURL(XML_Parser parser, 8 | const XML_Char *url, 9 | unsigned flags); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /src/signal.h: -------------------------------------------------------------------------------- 1 | #ifndef SIGNAL_H_ 2 | #define SIGNAL_H_ 3 | 4 | namespace Signal { 5 | 6 | using namespace node; 7 | using namespace v8; 8 | using namespace std; 9 | 10 | void DispatchSignal(Local info[]); 11 | NAN_METHOD(EmitSignal); 12 | NAN_METHOD(SetSignalHandler); 13 | } // namespace Signal 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/decoder.h: -------------------------------------------------------------------------------- 1 | #ifndef DECODER_H_ 2 | #define DECODER_H_ 3 | 4 | namespace Decoder { 5 | 6 | using namespace node; 7 | using namespace v8; 8 | using namespace std; 9 | 10 | Local DecodeMessage(DBusMessage* message); 11 | Local DecodeArguments(DBusMessage* message); 12 | } // namespace Decoder 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /examples/signal.js: -------------------------------------------------------------------------------- 1 | var DBus = require('../'); 2 | 3 | var bus = DBus.getBus('session'); 4 | 5 | bus.getInterface('nodejs.dbus.ExampleService', '/nodejs/dbus/ExampleService', 'nodejs.dbus.ExampleService.Interface1', function(err, iface) { 6 | 7 | iface.on('pump', function(count) { 8 | console.log(count); 9 | }); 10 | 11 | }); 12 | -------------------------------------------------------------------------------- /src/connection.h: -------------------------------------------------------------------------------- 1 | #ifndef CONNECTION_H_ 2 | #define CONNECTION_H_ 3 | 4 | namespace node_dbus { 5 | struct BusObject; 6 | } 7 | 8 | namespace Connection { 9 | 10 | using namespace node; 11 | using namespace v8; 12 | using namespace std; 13 | 14 | void Init(node_dbus::BusObject* bus); 15 | void UnInit(node_dbus::BusObject* bus); 16 | } // namespace Connection 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /examples/hello.js: -------------------------------------------------------------------------------- 1 | var DBus = require('../'); 2 | 3 | var bus = DBus.getBus('session'); 4 | 5 | bus.getInterface('nodejs.dbus.ExampleService', '/nodejs/dbus/ExampleService', 'nodejs.dbus.ExampleService.Interface1', function(err, iface) { 6 | 7 | iface.Hello({ timeout: 1000 }, function(err, result) { 8 | if (err) { 9 | return console.log(err); 10 | } 11 | 12 | console.log(result); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /examples/invalid_args.js: -------------------------------------------------------------------------------- 1 | var DBus = require('../'); 2 | 3 | var bus = DBus.getBus('session'); 4 | 5 | bus.getInterface('nodejs.dbus.ExampleService', '/nodejs/dbus/ExampleService', 'nodejs.dbus.ExampleService.Interface1', function(err, iface) { 6 | iface.Equal({ timeout: 1000 }, function(err, result) { 7 | if (err) { 8 | return console.log(err); 9 | } 10 | 11 | console.log(result); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /test/error.test.js: -------------------------------------------------------------------------------- 1 | var tap = require('tap'); 2 | var DBus = require('../'); 3 | 4 | tap.plan(5); 5 | 6 | var baseError = new DBus.Error('test.dbus.TestService.BaseError', 'Basic error'); 7 | tap.type(baseError, Error); 8 | tap.type(baseError, DBus.Error); 9 | tap.equal(baseError.dbusName, 'test.dbus.TestService.BaseError'); 10 | tap.equal(baseError.message, 'Basic error'); 11 | tap.match(baseError.toString(), /DBusError/); 12 | -------------------------------------------------------------------------------- /examples/error_handling.js: -------------------------------------------------------------------------------- 1 | var DBus = require('../'); 2 | 3 | var bus = DBus.getBus('session'); 4 | 5 | bus.getInterface('nodejs.dbus.ExampleService', '/nodejs/dbus/ExampleService', 'nodejs.dbus.ExampleService.Interface1', function(err, iface) { 6 | 7 | iface.MakeError({ timeout: 1000 }, function(err, result) { 8 | if (err) { 9 | console.log(err); 10 | return; 11 | } 12 | 13 | console.log(result); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /src/object_handler.h: -------------------------------------------------------------------------------- 1 | #ifndef OBJECT_HANDLER_H_ 2 | #define OBJECT_HANDLER_H_ 3 | 4 | namespace ObjectHandler { 5 | 6 | using namespace node; 7 | using namespace v8; 8 | using namespace std; 9 | 10 | NAN_METHOD(RegisterObjectPath); 11 | NAN_METHOD(UnregisterObjectPath); 12 | NAN_METHOD(SendMessageReply); 13 | NAN_METHOD(SendErrorMessageReply); 14 | NAN_METHOD(SetObjectHandler); 15 | } // namespace ObjectHandler 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /test/client-disconnect.test.js: -------------------------------------------------------------------------------- 1 | var tap = require('tap'); 2 | var DBus = require('../'); 3 | 4 | var bus = DBus.getBus('session'); 5 | 6 | tap.plan(1); 7 | 8 | var timeout = setTimeout(function() { 9 | tap.fail('Should have disconnected by now'); 10 | process.exit(); 11 | }, 1000); 12 | timeout.unref(); 13 | 14 | tap.ok('This is a dummy test. The real test is whether the tap.fail gets called on the timeout.'); 15 | bus.disconnect(); 16 | -------------------------------------------------------------------------------- /test/client-signal.test.js: -------------------------------------------------------------------------------- 1 | var withService = require('./with-service'); 2 | var tap = require('tap'); 3 | var DBus = require('../'); 4 | 5 | tap.plan(1); 6 | withService('service.js', function(err, done) { 7 | if (err) throw err; 8 | 9 | var bus = DBus.getBus('session'); 10 | 11 | bus.getInterface('test.dbus.TestService', '/test/dbus/TestService', 'test.dbus.TestService.Interface1', function(err, iface) { 12 | iface.on('pump', function() { 13 | tap.pass('Signal received'); 14 | done(); 15 | bus.disconnect(); 16 | }); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /lib/error.js: -------------------------------------------------------------------------------- 1 | var util = require('util'); 2 | 3 | function DBusError(name, message) { 4 | Error.call(this, message); 5 | this.message = message; 6 | this.dbusName = name; 7 | 8 | if (Error.captureStackTrace) { 9 | Error.captureStackTrace(this, 'DBusError'); 10 | } 11 | else { 12 | Object.defineProperty(this, 'stack', { value: (new Error()).stack }); 13 | } 14 | } 15 | 16 | util.inherits(DBusError, Error); 17 | 18 | DBusError.prototype.toString = function() { 19 | return 'DBusError: ' + this.message; 20 | } 21 | 22 | module.exports = DBusError; 23 | -------------------------------------------------------------------------------- /test/service-disconnect.test.js: -------------------------------------------------------------------------------- 1 | var tap = require('tap'); 2 | var DBus = require('../'); 3 | 4 | tap.plan(1); 5 | 6 | var service = DBus.registerService('session', 'test.dbus.TestService'); 7 | service.createObject('/test/dbus/TestService'); 8 | 9 | var timeout = setTimeout(function() { 10 | tap.fail('Should have disconnected by now'); 11 | process.exit(); 12 | }, 1000); 13 | timeout.unref(); 14 | 15 | tap.ok('This is a dummy test. The real test is whether the tap.fail gets called on the timeout.'); 16 | setTimeout(function() { 17 | service.disconnect(); 18 | }, 50); 19 | -------------------------------------------------------------------------------- /deps/libexpat/xmlwf/filemap.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | #include 6 | 7 | #ifdef XML_UNICODE 8 | int filemap(const wchar_t *name, 9 | void (*processor)(const void *, size_t, 10 | const wchar_t *, void *arg), 11 | void *arg); 12 | #else 13 | int filemap(const char *name, 14 | void (*processor)(const void *, size_t, 15 | const char *, void *arg), 16 | void *arg); 17 | #endif 18 | -------------------------------------------------------------------------------- /deps/libexpat/xmlwf/xmlmime.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | /* Registered charset names are at most 40 characters long. */ 6 | 7 | #define CHARSET_MAX 41 8 | 9 | /* Figure out the charset to use from the ContentType. 10 | buf contains the body of the header field (the part after "Content-Type:"). 11 | charset gets the charset to use. It must be at least CHARSET_MAX chars 12 | long. charset will be empty if the default charset should be used. 13 | */ 14 | 15 | void getXMLCharset(const char *buf, char *charset); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/setup.bat: -------------------------------------------------------------------------------- 1 | REM CommandInterpreter: $(COMSPEC) 2 | if not exist .\release\nul mkdir release 3 | if not exist .\release\obj\nul mkdir release\obj 4 | if not exist .\release\obj\libexpat\nul mkdir release\obj\libexpat 5 | if not exist .\release\obj\libexpatw\nul mkdir release\obj\libexpatw 6 | if not exist .\release\obj\libexpat_static\nul mkdir release\obj\libexpat_static 7 | if not exist .\release\obj\libexpatw_static\nul mkdir release\obj\libexpatw_static 8 | if not exist .\release\obj\examples\nul mkdir release\obj\examples 9 | if not exist .\release\obj\xmlwf\nul mkdir release\obj\xmlwf 10 | -------------------------------------------------------------------------------- /test/client-call-timeout.test.js: -------------------------------------------------------------------------------- 1 | var withService = require('./with-service'); 2 | var tap = require('tap'); 3 | var DBus = require('../'); 4 | 5 | tap.plan(2); 6 | withService('service.js', function(err, done) { 7 | if (err) throw err; 8 | 9 | var bus = DBus.getBus('session'); 10 | 11 | bus.getInterface('test.dbus.TestService', '/test/dbus/TestService', 'test.dbus.TestService.Interface1', function(err, iface) { 12 | iface.LongProcess({ timeout: 1000 }, function(err, result) { 13 | tap.notSame(err, null); 14 | tap.same(result, null); 15 | done(); 16 | bus.disconnect(); 17 | }); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /deps/libexpat/xmlwf/xmlfile.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | #define XML_MAP_FILE 01 6 | #define XML_EXTERNAL_ENTITIES 02 7 | 8 | #ifdef XML_LARGE_SIZE 9 | #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 10 | #define XML_FMT_INT_MOD "I64" 11 | #else 12 | #define XML_FMT_INT_MOD "ll" 13 | #endif 14 | #else 15 | #define XML_FMT_INT_MOD "l" 16 | #endif 17 | 18 | extern int XML_ProcessFile(XML_Parser parser, 19 | const XML_Char *filename, 20 | unsigned flags); 21 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | 3 | language: node_js 4 | node_js: 5 | - '8' 6 | - '10' 7 | - '12' 8 | - '13' 9 | - 'lts/*' 10 | 11 | env: 12 | - CXX=g++-4.8 13 | 14 | before_install: 15 | - sudo apt-get -qq update 16 | - sudo apt-get install -y dbus 17 | - sudo apt-get install -y libdbus-1-dev 18 | - sudo apt-get install -y libglib2.0-dev 19 | - sudo apt-get install -y dbus-x11 20 | 21 | addons: 22 | apt: 23 | sources: 24 | - ubuntu-toolchain-r-test 25 | packages: 26 | - g++-4.8 27 | - gcc-4.8 28 | 29 | before_script: npm install -g standard 30 | 31 | script: dbus-launch -- npm test 32 | -------------------------------------------------------------------------------- /deps/libexpat/tests/README.txt: -------------------------------------------------------------------------------- 1 | This directory contains the (fledgling) test suite for Expat. The 2 | tests provide general unit testing and regression coverage. The tests 3 | are not expected to be useful examples of Expat usage; see the 4 | examples/ directory for that. 5 | 6 | The Expat tests use a partial internal implementation of the "Check" 7 | unit testing framework for C. More information on Check can be found at: 8 | 9 | http://check.sourceforge.net/ 10 | 11 | Expat must be built and, depending on platform, must be installed, before "make check" can be executed. 12 | 13 | This test suite can all change in a later version. 14 | -------------------------------------------------------------------------------- /deps/libexpat/tests/benchmark/README.txt: -------------------------------------------------------------------------------- 1 | Use this benchmark command line utility as follows: 2 | 3 | benchmark [-n] <# iterations> 4 | 5 | The command line arguments are: 6 | 7 | -n ... optional; if supplied, namespace processing is turned on 8 | ... name/path of test xml file 9 | ... size of processing buffer; 10 | the file is parsed in chunks of this size 11 | <# iterations> ... how often will the file be parsed 12 | 13 | Returns: 14 | 15 | The time (in seconds) it takes to parse the test file, 16 | averaged over the number of iterations.@ 17 | -------------------------------------------------------------------------------- /examples/multi_connection.js: -------------------------------------------------------------------------------- 1 | var DBus = require('../'); 2 | 3 | var bus1 = DBus.getBus('session'); 4 | 5 | bus1.getInterface('nodejs.dbus.ExampleService', '/nodejs/dbus/ExampleService', 'nodejs.dbus.ExampleService.Interface1', function(err, iface) { 6 | 7 | iface.Hello({ timeout: 1000 }, function(result) { 8 | console.log(result); 9 | }); 10 | 11 | }); 12 | 13 | var bus2 = DBus.getBus('session'); 14 | 15 | bus2.getInterface('nodejs.dbus.ExampleService', '/nodejs/dbus/ExampleService', 'nodejs.dbus.ExampleService.Interface1', function(err, iface) { 16 | 17 | iface.Hello({ timeout: 1000 }, function(result) { 18 | console.log(result); 19 | }); 20 | 21 | }); 22 | 23 | -------------------------------------------------------------------------------- /test/with-service.js: -------------------------------------------------------------------------------- 1 | var child_process = require('child_process'); 2 | var path = require('path'); 3 | 4 | function withService(name, callback) { 5 | // Start a new process with our service code. 6 | var p = child_process.fork(path.join(__dirname, name)); 7 | 8 | var done = function() { 9 | p.send({ message: 'done' }); 10 | } 11 | 12 | done.process = p; 13 | 14 | p.on('message', function(m) { 15 | if (m.message === 'ready') { 16 | // When the service process has started and notifies us that it 17 | // is ready, we call the callback so that the test code can 18 | // proceed. 19 | callback(null, done); 20 | } 21 | }); 22 | } 23 | 24 | module.exports = withService; 25 | -------------------------------------------------------------------------------- /deps/libexpat/vms/README.vms: -------------------------------------------------------------------------------- 1 | 4-jun-2002 Craig A. Berry 2 | Added rudimentary build procedures for 3 | OpenVMS based on work by Martin Vorlaender. 4 | 5 | 6 | You'll need MMS or its freeware equivalent MMK. Just go to the 7 | top-level directory and type 8 | 9 | $ MMS/DESCRIPTION=[.vms] 10 | 11 | or 12 | 13 | $ MMK/DESCRIPTION=[.vms] 14 | 15 | You'll end up with the object library expat.olb. For now, installation 16 | consists merely of copying the object library, include files, and 17 | documentation to a suitable location. 18 | 19 | To-do list: 20 | 21 | -- create a shareable image 22 | -- build and run the tests and build the xmlwf utility 23 | -- create an install target 24 | -------------------------------------------------------------------------------- /examples/get_property.js: -------------------------------------------------------------------------------- 1 | var DBus = require('../'); 2 | 3 | var bus = DBus.getBus('session'); 4 | 5 | bus.getInterface('nodejs.dbus.ExampleService', '/nodejs/dbus/ExampleService', 'nodejs.dbus.ExampleService.Interface1', function(err, iface) { 6 | 7 | iface.getProperty('Author', function(err, value) { 8 | console.log(value); 9 | }); 10 | 11 | iface.getProperty('JavaScriptOS', function(err, value) { 12 | console.log(value); 13 | }); 14 | 15 | iface.getProperty('URL', function(err, value) { 16 | console.log(value); 17 | }); 18 | 19 | // Get all properties 20 | iface.getProperties(function(err, props) { 21 | console.log('Properties:'); 22 | console.log(props); 23 | }); 24 | 25 | }); 26 | -------------------------------------------------------------------------------- /test/client-call-intdict.test.js: -------------------------------------------------------------------------------- 1 | var withService = require('./with-service'); 2 | var tap = require('tap'); 3 | var DBus = require('../'); 4 | 5 | tap.plan(2); 6 | withService('service.js', function(err, done) { 7 | if (err) throw err; 8 | 9 | var dbus = new DBus(); 10 | var bus = dbus.getBus('session'); 11 | 12 | bus.getInterface('test.dbus.TestService', '/test/dbus/TestService', 'test.dbus.TestService.Interface1', function(err, iface) { 13 | // With options 14 | iface.IntDict({ 1: 'One', 42: 'Answer' }, { timeout: 1000 }, function(err, result) { 15 | tap.notSame(result, null); 16 | tap.same(result, [1, 42]); 17 | 18 | done(); 19 | bus.disconnect(); 20 | }); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /test/client-property-error.test.js: -------------------------------------------------------------------------------- 1 | var withService = require('./with-service'); 2 | var tap = require('tap'); 3 | var DBus = require('../'); 4 | 5 | tap.plan(4); 6 | withService('service.js', function(err, done) { 7 | if (err) throw err; 8 | 9 | var bus = DBus.getBus('session'); 10 | 11 | bus.getInterface('test.dbus.TestService', '/test/dbus/TestService', 'test.dbus.TestService.ErrorInterface', function(err, iface) { 12 | iface.getProperty('ErrorProperty', function(err, value) { 13 | tap.notSame(err, null); 14 | tap.same(value, null); 15 | tap.match(err.message, /from.*service/); 16 | tap.type(err, DBus.Error); 17 | done(); 18 | bus.disconnect(); 19 | }); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/introspect.h: -------------------------------------------------------------------------------- 1 | #ifndef INTROSPECT_H_ 2 | #define INTROSPECT_H_ 3 | 4 | namespace Introspect { 5 | 6 | using namespace node; 7 | using namespace v8; 8 | using namespace std; 9 | 10 | typedef enum { 11 | INTROSPECT_NONE, 12 | INTROSPECT_ROOT, 13 | INTROSPECT_METHOD, 14 | INTROSPECT_PROPERTY, 15 | INTROSPECT_SIGNAL 16 | } IntrospectClass; 17 | 18 | typedef struct { 19 | Nan::Persistent obj; 20 | Nan::Persistent current_interface; 21 | Nan::Persistent current_method; 22 | Nan::Persistent current_signal; 23 | IntrospectClass current_class; 24 | } IntrospectObject; 25 | 26 | Local CreateObject(const char* source); 27 | } // namespace Introspect 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/makefile.mak: -------------------------------------------------------------------------------- 1 | all: setup expat expatw expat_static expatw_static elements outline xmlwf 2 | 3 | setup: 4 | setup 5 | 6 | expat: 7 | make -l -fexpat.mak 8 | 9 | expatw: 10 | make -l -fexpatw.mak 11 | 12 | expat_static: 13 | make -l -fexpat_static.mak 14 | 15 | expatw_static: 16 | make -l -fexpatw_static.mak 17 | 18 | elements: 19 | make -l -felements.mak 20 | 21 | outline: 22 | make -l -foutline.mak 23 | 24 | xmlwf: 25 | make -l -fxmlwf.mak 26 | 27 | clean: 28 | # works on Win98/ME 29 | # deltree /y release\obj 30 | # works on WinNT/2000 31 | del /s/f/q release\obj 32 | 33 | distclean: 34 | # works on Win98/ME 35 | # deltree /y release\*.* 36 | # works on WinNT/2000 37 | del /s/f/q release\* 38 | -------------------------------------------------------------------------------- /test/client-call-add.test.js: -------------------------------------------------------------------------------- 1 | var withService = require('./with-service'); 2 | var tap = require('tap'); 3 | var DBus = require('../'); 4 | 5 | tap.plan(2); 6 | withService('service.js', function(err, done) { 7 | if (err) throw err; 8 | 9 | var bus = DBus.getBus('session'); 10 | 11 | bus.getInterface('test.dbus.TestService', '/test/dbus/TestService', 'test.dbus.TestService.Interface1', function(err, iface) { 12 | // With options 13 | iface.Add(109, 201, { timeout: 1000 }, function(err, result) { 14 | tap.equal(result, 310); 15 | 16 | // Without options 17 | iface.Add(109, 201, function(err, result) { 18 | tap.equal(result, 310); 19 | done(); 20 | bus.disconnect(); 21 | }); 22 | }); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /test/client-call-noargs.test.js: -------------------------------------------------------------------------------- 1 | var withService = require('./with-service'); 2 | var tap = require('tap'); 3 | var DBus = require('../'); 4 | 5 | tap.plan(2); 6 | withService('service.js', function(err, done) { 7 | if (err) throw err; 8 | 9 | var bus = DBus.getBus('session'); 10 | 11 | bus.getInterface('test.dbus.TestService', '/test/dbus/TestService', 'test.dbus.TestService.Interface1', function(err, iface) { 12 | // With options 13 | iface.NoArgs({ timeout: 1000 }, function(err, result) { 14 | tap.equal(result, 'result!'); 15 | 16 | // Without options 17 | iface.NoArgs(function(err, result) { 18 | tap.equal(result, 'result!'); 19 | done(); 20 | bus.disconnect(); 21 | }); 22 | }); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /test/client-call-object.test.js: -------------------------------------------------------------------------------- 1 | var withService = require('./with-service'); 2 | var tap = require('tap'); 3 | var DBus = require('../'); 4 | 5 | tap.plan(3); 6 | withService('service.js', function(err, done) { 7 | if (err) throw err; 8 | 9 | var dbus = new DBus(); 10 | var bus = dbus.getBus('session'); 11 | 12 | bus.getInterface('test.dbus.TestService', '/test/dbus/TestService', 'test.dbus.TestService.Interface1', function(err, iface) { 13 | // With options 14 | iface.Object({ one: 'One', two: [1,2] }, { timeout: 1000 }, function(err, result) { 15 | tap.notSame(result, null); 16 | tap.equal(result.one, 'One'); 17 | tap.same(result.two, [1, 2]); 18 | 19 | done(); 20 | bus.disconnect(); 21 | }); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /test/service-client-disconnect.test.js: -------------------------------------------------------------------------------- 1 | var tap = require('tap'); 2 | var DBus = require('../'); 3 | 4 | tap.plan(1); 5 | 6 | var client = DBus.getBus('session'); 7 | 8 | var timeout = setTimeout(function() { 9 | tap.fail('Should have disconnected by now'); 10 | process.exit(); 11 | }, 1000); 12 | timeout.unref(); 13 | 14 | tap.ok('This is a dummy test. The real test is whether the tap.fail gets called on the timeout.'); 15 | setTimeout(function() { 16 | client.disconnect(); 17 | }, 50); 18 | 19 | setTimeout(function() { 20 | var service = DBus.registerService('session', 'test.dbus.TestService'); 21 | service.createObject('/test/dbus/TestService'); 22 | setImmediate(function() { 23 | service.disconnect(); 24 | }); 25 | }, 100); 26 | -------------------------------------------------------------------------------- /test/service-duplicate-error.test.js: -------------------------------------------------------------------------------- 1 | var tap = require('tap'); 2 | var DBus = require('../'); 3 | 4 | tap.plan(1); 5 | 6 | var service = DBus.registerService('session', 'test.dbus.TestService'); 7 | var object = service.createObject('/test/dbus/TestService'); 8 | var iface = object.createInterface('test.dbus.TestService.Interface1'); 9 | iface.addSignal('Test', { types: [DBus.Define(String)] }); 10 | iface.update() 11 | 12 | setTimeout(function() { 13 | tap.throws(function() { 14 | var objectd = service.createObject('/test/dbus/TestService'); 15 | var ifaced = objectd.createInterface('test.dbus.TestService.Interface1'); 16 | ifaced.addSignal('Test', { types: [DBus.Define(String)] }); 17 | ifaced.update(); 18 | }) 19 | 20 | service.disconnect() 21 | }, 100); 22 | -------------------------------------------------------------------------------- /deps/libexpat/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 3293 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4]) 16 | m4_define([LT_PACKAGE_REVISION], [1.3293]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4' 20 | macro_revision='1.3293' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /deps/libexpat/lib/winconfig.h: -------------------------------------------------------------------------------- 1 | /*================================================================ 2 | ** Copyright 2000, Clark Cooper 3 | ** All rights reserved. 4 | ** 5 | ** This is free software. You are permitted to copy, distribute, or modify 6 | ** it under the terms of the MIT/X license (contained in the COPYING file 7 | ** with this distribution.) 8 | */ 9 | 10 | #ifndef WINCONFIG_H 11 | #define WINCONFIG_H 12 | 13 | #define WIN32_LEAN_AND_MEAN 14 | #include 15 | #undef WIN32_LEAN_AND_MEAN 16 | 17 | #include 18 | #include 19 | 20 | #define XML_NS 1 21 | #define XML_DTD 1 22 | #define XML_CONTEXT_BYTES 1024 23 | 24 | /* we will assume all Windows platforms are little endian */ 25 | #define BYTEORDER 1234 26 | 27 | /* Windows has memmove() available. */ 28 | #define HAVE_MEMMOVE 29 | 30 | #endif /* ndef WINCONFIG_H */ 31 | -------------------------------------------------------------------------------- /deps/libexpat/lib/amigaconfig.h: -------------------------------------------------------------------------------- 1 | #ifndef AMIGACONFIG_H 2 | #define AMIGACONFIG_H 3 | 4 | /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ 5 | #define BYTEORDER 4321 6 | 7 | /* Define to 1 if you have the `bcopy' function. */ 8 | #define HAVE_BCOPY 1 9 | 10 | /* Define to 1 if you have the `memmove' function. */ 11 | #define HAVE_MEMMOVE 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_UNISTD_H 1 15 | 16 | /* whether byteorder is bigendian */ 17 | #define WORDS_BIGENDIAN 18 | 19 | /* Define to specify how much context to retain around the current parse 20 | point. */ 21 | #define XML_CONTEXT_BYTES 1024 22 | 23 | /* Define to make parameter entity parsing functionality available. */ 24 | #define XML_DTD 25 | 26 | /* Define to make XML Namespaces functionality available. */ 27 | #define XML_NS 28 | 29 | #endif /* AMIGACONFIG_H */ 30 | -------------------------------------------------------------------------------- /deps/libexpat/lib/xmltok_impl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 3 | See the file COPYING for copying permission. 4 | */ 5 | 6 | enum { 7 | BT_NONXML, 8 | BT_MALFORM, 9 | BT_LT, 10 | BT_AMP, 11 | BT_RSQB, 12 | BT_LEAD2, 13 | BT_LEAD3, 14 | BT_LEAD4, 15 | BT_TRAIL, 16 | BT_CR, 17 | BT_LF, 18 | BT_GT, 19 | BT_QUOT, 20 | BT_APOS, 21 | BT_EQUALS, 22 | BT_QUEST, 23 | BT_EXCL, 24 | BT_SOL, 25 | BT_SEMI, 26 | BT_NUM, 27 | BT_LSQB, 28 | BT_S, 29 | BT_NMSTRT, 30 | BT_COLON, 31 | BT_HEX, 32 | BT_DIGIT, 33 | BT_NAME, 34 | BT_MINUS, 35 | BT_OTHER, /* known not to be a name or name start character */ 36 | BT_NONASCII, /* might be a name or name start character */ 37 | BT_PERCNT, 38 | BT_LPAR, 39 | BT_RPAR, 40 | BT_AST, 41 | BT_PLUS, 42 | BT_COMMA, 43 | BT_VERBAR 44 | }; 45 | 46 | #include 47 | -------------------------------------------------------------------------------- /test/service-emit-after-disconnect.test.js: -------------------------------------------------------------------------------- 1 | var tap = require('tap'); 2 | var DBus = require('../'); 3 | 4 | tap.plan(2); 5 | 6 | var service = DBus.registerService('session', 'test.dbus.TestService'); 7 | var object = service.createObject('/test/dbus/TestService'); 8 | var iface = object.createInterface('test.dbus.TestService.Interface1'); 9 | 10 | iface.addSignal('Test', { types: [DBus.Define(String)] }); 11 | 12 | var timeout = setTimeout(function() { 13 | tap.fail('Should have disconnected by now'); 14 | process.exit(); 15 | }, 1000); 16 | timeout.unref(); 17 | 18 | tap.ok('This is a dummy test. The real test is whether the tap.fail gets called on the timeout.'); 19 | setTimeout(function() { 20 | service.disconnect(); 21 | }, 50); 22 | setTimeout(function() { 23 | tap.throws(function() { 24 | iface.emitSignal('Test', 'test'); 25 | }, /no.*connected/, 'Emit throws an error after disconnect'); 26 | }, 100); 27 | -------------------------------------------------------------------------------- /deps/libexpat/conftools/mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | # Author: Noah Friedman 4 | # Created: 1993-05-16 5 | # Public domain 6 | 7 | # $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $ 8 | 9 | errstatus=0 10 | 11 | for file 12 | do 13 | set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` 14 | shift 15 | 16 | pathcomp= 17 | for d 18 | do 19 | pathcomp="$pathcomp$d" 20 | case "$pathcomp" in 21 | -* ) pathcomp=./$pathcomp ;; 22 | esac 23 | 24 | if test ! -d "$pathcomp"; then 25 | echo "mkdir $pathcomp" 26 | 27 | mkdir "$pathcomp" || lasterr=$? 28 | 29 | if test ! -d "$pathcomp"; then 30 | errstatus=$lasterr 31 | fi 32 | fi 33 | 34 | pathcomp="$pathcomp/" 35 | done 36 | done 37 | 38 | exit $errstatus 39 | 40 | # mkinstalldirs ends here 41 | -------------------------------------------------------------------------------- /deps/libexpat/tests/chardata.h: -------------------------------------------------------------------------------- 1 | /* chardata.h 2 | 3 | Interface to some helper routines used to accumulate and check text 4 | and attribute content. 5 | */ 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #ifndef XML_CHARDATA_H 12 | #define XML_CHARDATA_H 1 13 | 14 | #ifndef XML_VERSION 15 | #include "expat.h" /* need XML_Char */ 16 | #endif 17 | 18 | 19 | typedef struct { 20 | int count; /* # of chars, < 0 if not set */ 21 | XML_Char data[1024]; 22 | } CharData; 23 | 24 | 25 | void CharData_Init(CharData *storage); 26 | 27 | void CharData_AppendString(CharData *storage, const char *s); 28 | 29 | void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len); 30 | 31 | int CharData_CheckString(CharData *storage, const char *s); 32 | 33 | int CharData_CheckXMLChars(CharData *storage, const XML_Char *s); 34 | 35 | 36 | #endif /* XML_CHARDATA_H */ 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | -------------------------------------------------------------------------------- /deps/libexpat/xmlwf/xmltchar.h: -------------------------------------------------------------------------------- 1 | #ifdef XML_UNICODE 2 | #ifndef XML_UNICODE_WCHAR_T 3 | #error xmlwf requires a 16-bit Unicode-compatible wchar_t 4 | #endif 5 | #define T(x) L ## x 6 | #define ftprintf fwprintf 7 | #define tfopen _wfopen 8 | #define fputts fputws 9 | #define puttc putwc 10 | #define tcscmp wcscmp 11 | #define tcscpy wcscpy 12 | #define tcscat wcscat 13 | #define tcschr wcschr 14 | #define tcsrchr wcsrchr 15 | #define tcslen wcslen 16 | #define tperror _wperror 17 | #define topen _wopen 18 | #define tmain wmain 19 | #define tremove _wremove 20 | #else /* not XML_UNICODE */ 21 | #define T(x) x 22 | #define ftprintf fprintf 23 | #define tfopen fopen 24 | #define fputts fputs 25 | #define puttc putc 26 | #define tcscmp strcmp 27 | #define tcscpy strcpy 28 | #define tcscat strcat 29 | #define tcschr strchr 30 | #define tcsrchr strrchr 31 | #define tcslen strlen 32 | #define tperror perror 33 | #define topen open 34 | #define tmain main 35 | #define tremove remove 36 | #endif /* not XML_UNICODE */ 37 | -------------------------------------------------------------------------------- /deps/libexpat/tests/benchmark/benchmark.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "benchmark"=.\benchmark.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | Begin Project Dependency 15 | Project_Dep_Name expat 16 | End Project Dependency 17 | }}} 18 | 19 | ############################################################################### 20 | 21 | Project: "expat"=..\..\lib\expat.dsp - Package Owner=<4> 22 | 23 | Package=<5> 24 | {{{ 25 | }}} 26 | 27 | Package=<4> 28 | {{{ 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Global: 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<3> 40 | {{{ 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | -------------------------------------------------------------------------------- /examples/method.js: -------------------------------------------------------------------------------- 1 | var DBus = require('../'); 2 | 3 | var bus = DBus.getBus('session'); 4 | 5 | bus.getInterface('nodejs.dbus.ExampleService', '/nodejs/dbus/ExampleService', 'nodejs.dbus.ExampleService.Interface1', function(err, iface) { 6 | 7 | iface.SendObject({ 8 | name: 'Fred', 9 | email: 'cfsghost@gmail.com' 10 | }, { timeout: 1000 }, function(err, result) { 11 | console.log(result); 12 | }); 13 | 14 | // Blank object 15 | iface.SendObject({}, { timeout: 1000 }, function(err, result) { 16 | }); 17 | 18 | // Testing method with no return value 19 | iface.Dummy({ timeout: 1000 }, function(err) { 20 | console.log('Dummy'); 21 | }); 22 | 23 | // Testing method with complex dictionary object 24 | iface.GetContacts({ timeout: 1000 }, function(err, contacts) { 25 | console.log(contacts); 26 | }); 27 | 28 | // Error handling 29 | iface.SendObject('Wrong arguments', function(err, result) { 30 | if (err) { 31 | return console.log(err); 32 | } 33 | 34 | console.log(result); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /test/client-call-error.test.js: -------------------------------------------------------------------------------- 1 | var withService = require('./with-service'); 2 | var tap = require('tap'); 3 | var DBus = require('../'); 4 | 5 | tap.plan(10); 6 | withService('service.js', function(err, done) { 7 | if (err) throw err; 8 | 9 | var bus = DBus.getBus('session'); 10 | 11 | bus.getInterface('test.dbus.TestService', '/test/dbus/TestService', 'test.dbus.TestService.ErrorInterface', function(err, iface) { 12 | iface.ThrowsError({ timeout: 1000 }, function(err, result) { 13 | tap.notSame(err, null); 14 | tap.same(result, null); 15 | tap.match(err.message, /from.*service/); 16 | tap.match(err.dbusName, 'org.freedesktop.DBus.Error.Failed'); 17 | tap.type(err, DBus.Error); 18 | 19 | iface.ThrowsCustomError({ timeout: 1000 }, function(err, result) { 20 | tap.notSame(err, null); 21 | tap.same(result, null); 22 | tap.match(err.message, /from.*service/); 23 | tap.match(err.dbusName, 'test.dbus.TestService.Error'); 24 | tap.type(err, DBus.Error); 25 | done(); 26 | bus.disconnect(); 27 | }); 28 | }); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /test/client-property.test.js: -------------------------------------------------------------------------------- 1 | var withService = require('./with-service'); 2 | var tap = require('tap'); 3 | var DBus = require('../'); 4 | 5 | tap.plan(5); 6 | withService('service.js', function(err, done) { 7 | if (err) throw err; 8 | 9 | var bus = DBus.getBus('session'); 10 | 11 | bus.getInterface('test.dbus.TestService', '/test/dbus/TestService', 'test.dbus.TestService.Interface1', function(err, iface) { 12 | iface.getProperty('Author', function(err, value) { 13 | tap.equal(value, 'Fred Chien'); 14 | 15 | iface.setProperty('Author', 'Douglas Adams', function(err) { 16 | iface.getProperty('Author', function(err, value) { 17 | tap.equal(value, 'Douglas Adams'); 18 | 19 | iface.getProperty('URL', function(err, value) { 20 | tap.equal(value, 'http://stem.mandice.org'); 21 | 22 | iface.getProperties(function(err, props) { 23 | tap.equal(props.Author, 'Douglas Adams'); 24 | tap.equal(props.URL, 'http://stem.mandice.org'); 25 | done(); 26 | bus.disconnect(); 27 | }); 28 | }); 29 | }); 30 | }); 31 | }); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dbus", 3 | "version": "1.0.7", 4 | "description": "A D-Bus binding for Node", 5 | "author": "Shouqun Liu ", 6 | "contributors": [ 7 | "Fred Chien ", 8 | "Bryan Burgers ", 9 | "Artem Derevnjuk ", 10 | "Thiago Cardoso " 11 | ], 12 | "license": "MIT", 13 | "repository": { 14 | "type": "git", 15 | "url": "git://github.com/Shouqun/node-dbus.git" 16 | }, 17 | "engines": { 18 | "node": ">= 0.12.0" 19 | }, 20 | "main": "./lib/dbus", 21 | "scripts": { 22 | "node-gyp": "node_modules/.bin/node-gyp", 23 | "install": "npm run build:release", 24 | "test": "tap test/**/*.test.js", 25 | "build:release": "node-gyp configure build", 26 | "build:debug": "node-gyp configure build --debug" 27 | }, 28 | "dependencies": { 29 | "minimist": "^1.2.5", 30 | "nan": "^2.14.0" 31 | }, 32 | "os": [ 33 | "!win32" 34 | ], 35 | "devDependencies": { 36 | "node-gyp": "^4.0.0", 37 | "tap": "^13.1.11" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/encoder.h: -------------------------------------------------------------------------------- 1 | #ifndef ENCODER_H_ 2 | #define ENCODER_H_ 3 | 4 | namespace Encoder { 5 | 6 | using namespace node; 7 | using namespace v8; 8 | using namespace std; 9 | 10 | string GetSignatureFromV8Type(Local& value); 11 | 12 | // expects two signatures - one for the type signature as DBus will see it, 13 | // and a second that is the same as the first, except that variants requiring 14 | // a particular concrete type inside should be replaced by their required 15 | // concrete type. 16 | // 17 | // for example, when writing a property, the property value in the Get method is 18 | // a variant at the DBus interface level, but should only actually be encoded 19 | // with the actual concrete type declared for the property. 20 | // 21 | // If the concrete type is nullptr or the same as the main one, types of variant 22 | // elements will be inferred based on the V8 type (and, in the case of numbers, 23 | // their values) 24 | bool EncodeObject(Local value, DBusMessageIter* iter, 25 | const DBusSignatureIter* siter, 26 | const DBusSignatureIter* concreteSiter = nullptr); 27 | } // namespace Encoder 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /deps/libexpat/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper 2 | Copyright (c) 2001-2016 Expat maintainers 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/dbus.h: -------------------------------------------------------------------------------- 1 | #ifndef NODE_DBUS_H_ 2 | #define NODE_DBUS_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace node_dbus { 9 | 10 | using namespace node; 11 | using namespace v8; 12 | using namespace std; 13 | 14 | #define NATIVE_NODE_DEFINE_CONSTANT(target, name, constant) \ 15 | (target)->Set( \ 16 | v8::String::NewSymbol(name), v8::Integer::New(constant), \ 17 | static_cast(v8::ReadOnly | v8::DontDelete)) 18 | 19 | typedef struct DBusAsyncData { 20 | // Nan::Persistent callback; 21 | Nan::Callback* callback; 22 | DBusPendingCall* pending; 23 | Nan::Callback* createError; 24 | 25 | ~DBusAsyncData() { 26 | delete createError; 27 | delete callback; 28 | } 29 | } DBusAsyncData; 30 | 31 | typedef enum { NODE_DBUS_BUS_SYSTEM, NODE_DBUS_BUS_SESSION } BusType; 32 | 33 | typedef struct BusObject { 34 | BusType type; 35 | DBusConnection* connection; 36 | uv_async_t* loop; 37 | } BusObject; 38 | 39 | typedef struct { 40 | BusObject* bus; 41 | std::string service; 42 | std::string object_path; 43 | std::string interface; 44 | } InterfaceObject; 45 | 46 | void EmitSignal(Local info); 47 | 48 | } // namespace node_dbus 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /deps/libexpat/win32/MANIFEST.txt: -------------------------------------------------------------------------------- 1 | Overview of the Expat distribution 2 | 3 | The Expat distribution creates several subdirectories on your system. 4 | Some of these directories contain components of interest to all Expat 5 | users, and some contain material of interest to developers who wish to 6 | use Expat in their applications. In the list below, is the 7 | directory you specified to the installer. 8 | 9 | Directory Contents 10 | --------------------------------------------------------------------- 11 | \ Some general information files. 12 | 13 | \Doc\ API documentation for developers. 14 | 15 | \Bin\ Pre-compiled dynamic libraries for developers. 16 | Pre-compiled static libraries for developers (*MT.lib). 17 | The XML well-formedness checker xmlwf. 18 | 19 | \Source\ Source code, which may interest some developers, 20 | including a workspace for Microsft Visual C++. 21 | The source code includes the parser, the well- 22 | formedness checker, and a couple of small sample 23 | applications. 24 | 25 | \Source\bcb5\ Project files for Borland C++ Builder 5 and BCC 5.5. 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/service-dynamic.js: -------------------------------------------------------------------------------- 1 | var DBus = require('../'); 2 | 3 | // Create a new service, object and interface 4 | var service = DBus.registerService('session', 'test.dbus.DynamicTestService'); 5 | var obj = service.createObject('/test/dbus/DynamicTestService'); 6 | 7 | var subobjs = {}; 8 | 9 | process.on('message', function(msg) { 10 | if (msg.type === 'add') { 11 | var value = msg.value.toString(); 12 | var subobj = service.createObject('/test/dbus/DynamicTestService/subs/' + value); 13 | var subiface = subobj.createInterface('test.dbus.DynamicTestService.DynamicInterface1'); 14 | subiface.addProperty('Value', { 15 | type: DBus.Define(String), 16 | getter: function(callback) { 17 | callback(null, value); 18 | } 19 | }); 20 | subiface.update(); 21 | subobjs[value] = subobj; 22 | process.send({ type: 'add', value: value }); 23 | } 24 | else if (msg.type === 'remove') { 25 | var value = msg.value.toString(); 26 | if (subobjs[value]) { 27 | var subobj = subobjs[value]; 28 | service.removeObject(subobj); 29 | delete subobjs[value]; 30 | process.send({ type: 'remove', value: value }); 31 | } 32 | else { 33 | process.send({ type: 'remove', value: value }); 34 | } 35 | } 36 | else if (msg.message === 'done') { 37 | service.disconnect(); 38 | process.removeAllListeners('message'); 39 | } 40 | }); 41 | 42 | process.send({ message: 'ready' }); 43 | -------------------------------------------------------------------------------- /binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | 'targets': [ 3 | { 4 | 'target_name': 'dbus', 5 | 'sources': [ 6 | 'src/dbus.cc', 7 | 'src/connection.cc', 8 | 'src/signal.cc', 9 | 'src/encoder.cc', 10 | 'src/decoder.cc', 11 | 'src/introspect.cc', 12 | 'src/object_handler.cc' 13 | ], 14 | 'include_dirs': [ 15 | " doesn't define. */ 16 | #undef off_t 17 | 18 | /* Define to `unsigned' if doesn't define. */ 19 | #undef size_t 20 | 21 | /* Define if your processor stores words with the most significant 22 | byte first (like Motorola and SPARC, unlike Intel and VAX). */ 23 | #undef WORDS_BIGENDIAN 24 | 25 | /* Define if you have the bcopy function. */ 26 | #undef HAVE_BCOPY 27 | 28 | /* Define if you have the memmove function. */ 29 | #define HAVE_MEMMOVE 1 30 | 31 | /* Define if you have the header file. */ 32 | #define HAVE_UNISTD_H 1 33 | 34 | #define XML_NS 35 | #define XML_DTD 36 | 37 | #ifdef WORDS_BIGENDIAN 38 | #define XML_BYTE_ORDER 21 39 | #else 40 | #define XML_BYTE_ORDER 12 41 | #endif 42 | 43 | #define XML_CONTEXT_BYTES 1024 44 | 45 | #ifndef HAVE_MEMMOVE 46 | #ifdef HAVE_BCOPY 47 | #define memmove(d,s,l) bcopy((s),(d),(l)) 48 | #else 49 | #define memmove(d,s,l) ;punting on memmove; 50 | #endif 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /deps/libexpat/conftools/get-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # USAGE: get-version.sh path/to/expat.h 4 | # 5 | # This script will print Expat's version number on stdout. For example: 6 | # 7 | # $ ./conftools/get-version.sh ./lib/expat.h 8 | # 1.95.3 9 | # $ 10 | # 11 | 12 | if test $# = 0; then 13 | echo "ERROR: pathname for expat.h was not provided." 14 | echo "" 15 | echo "USAGE: $0 path/to/expat.h" 16 | exit 1 17 | fi 18 | if test $# != 1; then 19 | echo "ERROR: too many arguments were provided." 20 | echo "" 21 | echo "USAGE: $0 path/to/expat.h" 22 | exit 1 23 | fi 24 | 25 | hdr="$1" 26 | if test ! -r "$hdr"; then 27 | echo "ERROR: '$hdr' does not exist, or is not readable." 28 | exit 1 29 | fi 30 | 31 | MAJOR_VERSION="`sed -n -e '/MAJOR_VERSION/s/[^0-9]*//gp' $hdr`" 32 | MINOR_VERSION="`sed -n -e '/MINOR_VERSION/s/[^0-9]*//gp' $hdr`" 33 | MICRO_VERSION="`sed -n -e '/MICRO_VERSION/s/[^0-9]*//gp' $hdr`" 34 | 35 | # Determine how to tell echo not to print the trailing \n. This is 36 | # similar to Autoconf's @ECHO_C@ and @ECHO_N@; however, we don't 37 | # generate this file via autoconf (in fact, get-version.sh is used 38 | # to *create* ./configure), so we just do something similar inline. 39 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in 40 | *c*,-n*) ECHO_N= ECHO_C=' 41 | ' ;; 42 | *c*,* ) ECHO_N=-n ECHO_C= ;; 43 | *) ECHO_N= ECHO_C='\c' ;; 44 | esac 45 | 46 | echo $ECHO_N "$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$ECHO_C" 47 | -------------------------------------------------------------------------------- /lib/service.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var util = require('util'); 4 | var events = require('events'); 5 | var ServiceObject = require('./service_object'); 6 | 7 | var Service = module.exports = function(bus, serviceName) { 8 | var self = this; 9 | 10 | self.bus = bus; 11 | self.serviceName = serviceName; 12 | self.objects = {}; 13 | 14 | self.on('request', function(uniqueName, sender, objectPath, interfaceName, member, message, args) { 15 | var iface = self.objects[objectPath]['interfaces'][interfaceName]; 16 | if (!iface) 17 | return; 18 | 19 | iface.call.apply(iface, [ member, message, args ]); 20 | }); 21 | }; 22 | 23 | util.inherits(Service, events.EventEmitter); 24 | 25 | Object.defineProperty(Service.prototype, 'connected', { 26 | get: function() { 27 | return this.bus.connected; 28 | } 29 | }); 30 | 31 | Service.prototype.createObject = function(objectPath) { 32 | var self = this; 33 | 34 | if (!self.objects[objectPath]) 35 | self.objects[objectPath] = new ServiceObject(self, objectPath); 36 | 37 | // Register object 38 | self.bus._dbus.registerObjectPath(self.bus.connection, objectPath); 39 | 40 | return self.objects[objectPath]; 41 | }; 42 | 43 | Service.prototype.removeObject = function(object) { 44 | var self = this; 45 | 46 | self.bus._dbus.unregisterObjectPath(self.bus.connection, object.path); 47 | 48 | delete self.objects[object.path]; 49 | }; 50 | 51 | Service.prototype.disconnect = function() { 52 | var self = this; 53 | 54 | self.bus.disconnect(); 55 | }; 56 | -------------------------------------------------------------------------------- /deps/libexpat/lib/macconfig.h: -------------------------------------------------------------------------------- 1 | /*================================================================ 2 | ** Copyright 2000, Clark Cooper 3 | ** All rights reserved. 4 | ** 5 | ** This is free software. You are permitted to copy, distribute, or modify 6 | ** it under the terms of the MIT/X license (contained in the COPYING file 7 | ** with this distribution.) 8 | ** 9 | */ 10 | 11 | #ifndef MACCONFIG_H 12 | #define MACCONFIG_H 13 | 14 | 15 | /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ 16 | #define BYTEORDER 4321 17 | 18 | /* Define to 1 if you have the `bcopy' function. */ 19 | #undef HAVE_BCOPY 20 | 21 | /* Define to 1 if you have the `memmove' function. */ 22 | #define HAVE_MEMMOVE 23 | 24 | /* Define to 1 if you have a working `mmap' system call. */ 25 | #undef HAVE_MMAP 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_UNISTD_H 29 | 30 | /* whether byteorder is bigendian */ 31 | #define WORDS_BIGENDIAN 32 | 33 | /* Define to specify how much context to retain around the current parse 34 | point. */ 35 | #undef XML_CONTEXT_BYTES 36 | 37 | /* Define to make parameter entity parsing functionality available. */ 38 | #define XML_DTD 39 | 40 | /* Define to make XML Namespaces functionality available. */ 41 | #define XML_NS 42 | 43 | /* Define to empty if `const' does not conform to ANSI C. */ 44 | #undef const 45 | 46 | /* Define to `long' if does not define. */ 47 | #define off_t long 48 | 49 | /* Define to `unsigned' if does not define. */ 50 | #undef size_t 51 | 52 | 53 | #endif /* ifndef MACCONFIG_H */ 54 | -------------------------------------------------------------------------------- /deps/libexpat/amiga/expat_base.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (c) 2001-2009 Expat maintainers. 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person obtaining 5 | ** a copy of this software and associated documentation files (the 6 | ** "Software"), to deal in the Software without restriction, including 7 | ** without limitation the rights to use, copy, modify, merge, publish, 8 | ** distribute, sublicense, and/or sell copies of the Software, and to 9 | ** permit persons to whom the Software is furnished to do so, subject to 10 | ** the following conditions: 11 | ** 12 | ** The above copyright notice and this permission notice shall be included 13 | ** in all copies or substantial portions of the Software. 14 | ** 15 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | */ 23 | 24 | #ifndef EXPAT_BASE_H 25 | #define EXPAT_BASE_H 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | 33 | struct ExpatBase { 34 | struct Library libNode; 35 | uint16 pad; 36 | BPTR SegList; 37 | struct ExecIFace *IExec; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /deps/libexpat/xmlwf/unixfilemap.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #ifndef MAP_FILE 15 | #define MAP_FILE 0 16 | #endif 17 | 18 | #include "filemap.h" 19 | 20 | int 21 | filemap(const char *name, 22 | void (*processor)(const void *, size_t, const char *, void *arg), 23 | void *arg) 24 | { 25 | int fd; 26 | size_t nbytes; 27 | struct stat sb; 28 | void *p; 29 | 30 | fd = open(name, O_RDONLY); 31 | if (fd < 0) { 32 | perror(name); 33 | return 0; 34 | } 35 | if (fstat(fd, &sb) < 0) { 36 | perror(name); 37 | close(fd); 38 | return 0; 39 | } 40 | if (!S_ISREG(sb.st_mode)) { 41 | close(fd); 42 | fprintf(stderr, "%s: not a regular file\n", name); 43 | return 0; 44 | } 45 | 46 | nbytes = sb.st_size; 47 | /* mmap fails for zero length files */ 48 | if (nbytes == 0) { 49 | static const char c = '\0'; 50 | processor(&c, 0, name, arg); 51 | close(fd); 52 | return 1; 53 | } 54 | p = (void *)mmap((void *)0, (size_t)nbytes, PROT_READ, 55 | MAP_FILE|MAP_PRIVATE, fd, (off_t)0); 56 | if (p == (void *)-1) { 57 | perror(name); 58 | close(fd); 59 | return 0; 60 | } 61 | processor(p, nbytes, name, arg); 62 | munmap((void *)p, nbytes); 63 | close(fd); 64 | return 1; 65 | } 66 | -------------------------------------------------------------------------------- /deps/libexpat/amiga/include/proto/expat.h: -------------------------------------------------------------------------------- 1 | #ifndef PROTO_EXPAT_H 2 | #define PROTO_EXPAT_H 3 | 4 | #ifndef LIBRARIES_EXPAT_H 5 | #include 6 | #endif 7 | 8 | /****************************************************************************/ 9 | 10 | #ifndef __NOLIBBASE__ 11 | #ifndef __USE_BASETYPE__ 12 | extern struct Library * ExpatBase; 13 | #else 14 | extern struct Library * ExpatBase; 15 | #endif /* __USE_BASETYPE__ */ 16 | #endif /* __NOLIBBASE__ */ 17 | 18 | /****************************************************************************/ 19 | 20 | #ifdef __amigaos4__ 21 | #include 22 | #ifdef __USE_INLINE__ 23 | #include 24 | #endif /* __USE_INLINE__ */ 25 | #ifndef CLIB_EXPAT_PROTOS_H 26 | #define CLIB_EXPAT_PROTOS_H 1 27 | #endif /* CLIB_EXPAT_PROTOS_H */ 28 | #ifndef __NOGLOBALIFACE__ 29 | extern struct ExpatIFace *IExpat; 30 | #endif /* __NOGLOBALIFACE__ */ 31 | #else /* __amigaos4__ */ 32 | #ifndef CLIB_EXPAT_PROTOS_H 33 | #include 34 | #endif /* CLIB_EXPAT_PROTOS_H */ 35 | #if defined(__GNUC__) 36 | #ifndef __PPC__ 37 | #include 38 | #else 39 | #include 40 | #endif /* __PPC__ */ 41 | #elif defined(__VBCC__) 42 | #ifndef __PPC__ 43 | #include 44 | #endif /* __PPC__ */ 45 | #else 46 | #include 47 | #endif /* __GNUC__ */ 48 | #endif /* __amigaos4__ */ 49 | 50 | /****************************************************************************/ 51 | 52 | #endif /* PROTO_EXPAT_H */ 53 | -------------------------------------------------------------------------------- /test/client-use-after-disconnect.test.js: -------------------------------------------------------------------------------- 1 | var tap = require('tap'); 2 | var DBus = require('../'); 3 | 4 | var bus = DBus.getBus('session'); 5 | 6 | tap.plan(11); 7 | 8 | var timeout = setTimeout(function() { 9 | tap.fail('Should have disconnected by now'); 10 | process.exit(); 11 | }, 1000); 12 | timeout.unref(); 13 | 14 | tap.ok('This is a dummy test. The real test is whether the tap.fail gets called on the timeout.'); 15 | 16 | bus.getInterface('org.freedesktop.DBus', '/', 'org.freedesktop.DBus', function(err, iface) { 17 | setTimeout(function() { 18 | bus.disconnect(); 19 | }, 50); 20 | 21 | setTimeout(function() { 22 | iface.getProperty('Test', function(err, value) { 23 | tap.type(err, Error); 24 | tap.match(err.message, /no.*connected/, 'getProperty returns the correct error'); 25 | }); 26 | iface.setProperty('Test', 'Value', function(err) { 27 | tap.type(err, Error); 28 | tap.match(err.message, /no.*connected/, 'setProperty returns the correct error'); 29 | }); 30 | iface.getProperties(function(err, values) { 31 | tap.type(err, Error); 32 | tap.match(err.message, /no.*connected/, 'getProperties returns the correct error'); 33 | }); 34 | iface.NameHasOwner('Test', function(err, result) { 35 | tap.type(err, Error); 36 | tap.match(err.message, /no.*connected/, 'call returns the correct error'); 37 | }); 38 | bus.getInterface('org.freedesktop.DBus', '/obj', 'org.freedesktop.DBus', function(err, iface) { 39 | tap.type(err, Error); 40 | tap.match(err.message, /no.*connected/, 'getInterface returns the correct error'); 41 | }); 42 | }, 100); 43 | }); 44 | -------------------------------------------------------------------------------- /deps/libexpat/conftools/expat.m4: -------------------------------------------------------------------------------- 1 | dnl Check if --with-expat[=PREFIX] is specified and 2 | dnl Expat >= 1.95.0 is installed in the system. 3 | dnl If yes, substitute EXPAT_CFLAGS, EXPAT_LIBS with regard to 4 | dnl the specified PREFIX and set with_expat to PREFIX, or 'yes' if PREFIX 5 | dnl has not been specified. Also HAVE_LIBEXPAT, HAVE_EXPAT_H are defined. 6 | dnl If --with-expat has not been specified, set with_expat to 'no'. 7 | dnl In addition, an Automake conditional EXPAT_INSTALLED is set accordingly. 8 | dnl This is necessary to adapt a whole lot of packages that have expat 9 | dnl bundled as a static library. 10 | AC_DEFUN([AM_WITH_EXPAT], 11 | [ AC_ARG_WITH(expat, 12 | [ --with-expat=PREFIX Use system Expat library], 13 | , with_expat=no) 14 | 15 | AM_CONDITIONAL(EXPAT_INSTALLED, test $with_expat != no) 16 | 17 | EXPAT_CFLAGS= 18 | EXPAT_LIBS= 19 | if test $with_expat != no; then 20 | if test $with_expat != yes; then 21 | EXPAT_CFLAGS="-I$with_expat/include" 22 | EXPAT_LIBS="-L$with_expat/lib" 23 | fi 24 | AC_CHECK_LIB(expat, XML_ParserCreate, 25 | [ EXPAT_LIBS="$EXPAT_LIBS -lexpat" 26 | expat_found=yes ], 27 | [ expat_found=no ], 28 | "$EXPAT_LIBS") 29 | if test $expat_found = no; then 30 | AC_MSG_ERROR([Could not find the Expat library]) 31 | fi 32 | expat_save_CFLAGS="$CFLAGS" 33 | CFLAGS="$CFLAGS $EXPAT_CFLAGS" 34 | AC_CHECK_HEADERS(expat.h, , expat_found=no) 35 | if test $expat_found = no; then 36 | AC_MSG_ERROR([Could not find expat.h]) 37 | fi 38 | CFLAGS="$expat_save_CFLAGS" 39 | fi 40 | 41 | AC_SUBST(EXPAT_CFLAGS) 42 | AC_SUBST(EXPAT_LIBS) 43 | ]) 44 | -------------------------------------------------------------------------------- /deps/libexpat/ConfigureChecks.cmake: -------------------------------------------------------------------------------- 1 | include(CheckIncludeFile) 2 | include(CheckIncludeFiles) 3 | include(CheckFunctionExists) 4 | include(CheckSymbolExists) 5 | include(TestBigEndian) 6 | 7 | check_include_file("dlfcn.h" HAVE_DLFCN_H) 8 | check_include_file("fcntl.h" HAVE_FCNTL_H) 9 | check_include_file("inttypes.h" HAVE_INTTYPES_H) 10 | check_include_file("memory.h" HAVE_MEMORY_H) 11 | check_include_file("stdint.h" HAVE_STDINT_H) 12 | check_include_file("stdlib.h" HAVE_STDLIB_H) 13 | check_include_file("strings.h" HAVE_STRINGS_H) 14 | check_include_file("string.h" HAVE_STRING_H) 15 | check_include_file("sys/stat.h" HAVE_SYS_STAT_H) 16 | check_include_file("sys/types.h" HAVE_SYS_TYPES_H) 17 | check_include_file("unistd.h" HAVE_UNISTD_H) 18 | 19 | check_function_exists("getpagesize" HAVE_GETPAGESIZE) 20 | check_function_exists("bcopy" HAVE_BCOPY) 21 | check_symbol_exists("memmove" "string.h" HAVE_MEMMOVE) 22 | check_function_exists("mmap" HAVE_MMAP) 23 | 24 | #/* Define to 1 if you have the ANSI C header files. */ 25 | check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS) 26 | 27 | test_big_endian(WORDS_BIGENDIAN) 28 | #/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ 29 | if(WORDS_BIGENDIAN) 30 | set(BYTEORDER 4321) 31 | else(WORDS_BIGENDIAN) 32 | set(BYTEORDER 1234) 33 | endif(WORDS_BIGENDIAN) 34 | 35 | if(HAVE_SYS_TYPES_H) 36 | check_symbol_exists("off_t" "sys/types.h" OFF_T) 37 | check_symbol_exists("size_t" "sys/types.h" SIZE_T) 38 | else(HAVE_SYS_TYPES_H) 39 | set(OFF_T "long") 40 | set(SIZE_T "unsigned") 41 | endif(HAVE_SYS_TYPES_H) 42 | 43 | configure_file(expat_config.h.cmake expat_config.h) 44 | add_definitions(-DHAVE_EXPAT_CONFIG_H) 45 | -------------------------------------------------------------------------------- /lib/utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var Define = function(type, name) { 4 | 5 | var dataDef = { 6 | type: Signature(type) 7 | }; 8 | 9 | if (name) 10 | dataDef.name = name; 11 | 12 | return dataDef; 13 | }; 14 | 15 | var Signature = function(type) { 16 | if (type == 'Auto') { 17 | return 'v'; 18 | } else if (type === String) { 19 | return 's'; 20 | } else if (type === Number) { 21 | return 'd'; 22 | } else if (type === Boolean) { 23 | return 'b'; 24 | } else if (type === Array) { 25 | return 'av'; 26 | } else if (type === Object) { 27 | return 'a{sv}'; 28 | } 29 | 30 | return 'v'; 31 | }; 32 | 33 | var ForEachAsync = function(arr, callback, complete) { 34 | var nextTick = process.nextTick; 35 | if (setImmediate) 36 | nextTick = setImmediate; 37 | 38 | function next(index, length) { 39 | var self = this; 40 | 41 | if (index >= length) { 42 | if (complete) 43 | complete.apply(this, [ true ]); 44 | 45 | return; 46 | } 47 | 48 | function _next(stop) { 49 | if (stop === false) { 50 | 51 | if (complete) 52 | complete.apply(this, [ false ]); 53 | 54 | return; 55 | } 56 | 57 | nextTick(function() { 58 | if (ret === false) { 59 | 60 | if (complete) 61 | complete.apply(this, [ false ]); 62 | 63 | return; 64 | } 65 | 66 | next.apply(self, [ index + 1, length ]); 67 | }); 68 | } 69 | 70 | var ret = callback.apply(self, [ arr[index], index, arr, _next ]); 71 | 72 | if (ret != true) 73 | _next(); 74 | } 75 | 76 | next.apply(this, [ 0, arr.length ]); 77 | }; 78 | 79 | module.exports = { 80 | Define: Define, 81 | Signature: Signature, 82 | ForEachAsync: ForEachAsync 83 | }; 84 | -------------------------------------------------------------------------------- /deps/libexpat/xmlwf/codepage.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | #include "codepage.h" 6 | #include "internal.h" /* for UNUSED_P only */ 7 | 8 | #if (defined(WIN32) || (defined(__WATCOMC__) && defined(__NT__))) 9 | #define STRICT 1 10 | #define WIN32_LEAN_AND_MEAN 1 11 | 12 | #include 13 | 14 | int 15 | codepageMap(int cp, int *map) 16 | { 17 | int i; 18 | CPINFO info; 19 | if (!GetCPInfo(cp, &info) || info.MaxCharSize > 2) 20 | return 0; 21 | for (i = 0; i < 256; i++) 22 | map[i] = -1; 23 | if (info.MaxCharSize > 1) { 24 | for (i = 0; i < MAX_LEADBYTES; i+=2) { 25 | int j, lim; 26 | if (info.LeadByte[i] == 0 && info.LeadByte[i + 1] == 0) 27 | break; 28 | lim = info.LeadByte[i + 1]; 29 | for (j = info.LeadByte[i]; j <= lim; j++) 30 | map[j] = -2; 31 | } 32 | } 33 | for (i = 0; i < 256; i++) { 34 | if (map[i] == -1) { 35 | char c = (char)i; 36 | unsigned short n; 37 | if (MultiByteToWideChar(cp, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS, 38 | &c, 1, &n, 1) == 1) 39 | map[i] = n; 40 | } 41 | } 42 | return 1; 43 | } 44 | 45 | int 46 | codepageConvert(int cp, const char *p) 47 | { 48 | unsigned short c; 49 | if (MultiByteToWideChar(cp, MB_PRECOMPOSED|MB_ERR_INVALID_CHARS, 50 | p, 2, &c, 1) == 1) 51 | return c; 52 | return -1; 53 | } 54 | 55 | #else /* not WIN32 */ 56 | 57 | int 58 | codepageMap(int UNUSED_P(cp), int *UNUSED_P(map)) 59 | { 60 | return 0; 61 | } 62 | 63 | int 64 | codepageConvert(int UNUSED_P(cp), const char *UNUSED_P(p)) 65 | { 66 | return -1; 67 | } 68 | 69 | #endif /* not WIN32 */ 70 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/all_projects.bpg: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------ 2 | VERSION = BWS.01 3 | #------------------------------------------------------------------------------ 4 | !ifndef ROOT 5 | ROOT = $(MAKEDIR)\.. 6 | !endif 7 | #------------------------------------------------------------------------------ 8 | MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** 9 | DCC = $(ROOT)\bin\dcc32.exe $** 10 | BRCC = $(ROOT)\bin\brcc32.exe $** 11 | #------------------------------------------------------------------------------ 12 | PROJECTS = setup libexpat_mtd.dll libexpats_mtd.lib libexpatw_mtd.dll \ 13 | libexpatws_mtd.lib elements.exe outline.exe xmlwf.exe 14 | #------------------------------------------------------------------------------ 15 | default: $(PROJECTS) 16 | #------------------------------------------------------------------------------ 17 | 18 | libexpat_mtd.dll: expat.bpr 19 | $(ROOT)\bin\bpr2mak $** 20 | $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak 21 | 22 | libexpats_mtd.lib: expat_static.bpr 23 | $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** 24 | $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak 25 | 26 | libexpatw_mtd.dll: expatw.bpr 27 | $(ROOT)\bin\bpr2mak $** 28 | $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak 29 | 30 | libexpatws_mtd.lib: expatw_static.bpr 31 | $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $** 32 | $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak 33 | 34 | elements.exe: elements.bpr 35 | $(ROOT)\bin\bpr2mak $** 36 | $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak 37 | 38 | outline.exe: outline.bpr 39 | $(ROOT)\bin\bpr2mak $** 40 | $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak 41 | 42 | xmlwf.exe: xmlwf.bpr 43 | $(ROOT)\bin\bpr2mak $** 44 | $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak 45 | 46 | setup: setup.bat 47 | call $** 48 | 49 | 50 | -------------------------------------------------------------------------------- /deps/libexpat/CMake.README: -------------------------------------------------------------------------------- 1 | == How to build expat with cmake (experimental) == 2 | 3 | The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual 4 | Studio) and should work on all other platform cmake supports. 5 | 6 | Assuming ~/expat-2.2.0 is the source directory of expat, add a subdirectory 7 | build and change into that directory: 8 | ~/expat-2.2.0$ mkdir build && cd build 9 | ~/expat-2.2.0/build$ 10 | 11 | From that directory, call cmake first, then call make, make test and 12 | make install in the usual way: 13 | ~/expat-2.2.0/build$ cmake .. 14 | -- The C compiler identification is GNU 15 | -- The CXX compiler identification is GNU 16 | .... 17 | -- Configuring done 18 | -- Generating done 19 | -- Build files have been written to: /home/patrick/expat-2.2.0/build 20 | 21 | If you want to specify the install location for your files, append 22 | -DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call. 23 | 24 | ~/expat-2.2.0/build$ make && make test && make install 25 | Scanning dependencies of target expat 26 | [ 5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o 27 | [ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o 28 | .... 29 | -- Installing: /usr/local/lib/pkgconfig/expat.pc 30 | -- Installing: /usr/local/bin/xmlwf 31 | -- Installing: /usr/local/share/man/man1/xmlwf.1 32 | 33 | For Windows builds, you must make sure to call cmake from an environment where 34 | your compiler is reachable, that means either you call it from the 35 | Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and 36 | make sure that gcc can be called. On Windows, you also might want to specify a 37 | special Generator for CMake: 38 | for Visual Studio builds do: 39 | cmake .. -G "Visual Studio 10" && vcexpress expat.sln 40 | for mingw builds do: 41 | cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install 42 | && gmake && gmake install 43 | -------------------------------------------------------------------------------- /deps/libexpat/lib/asciitab.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | /* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 6 | /* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 7 | /* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML, 8 | /* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML, 9 | /* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 10 | /* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 11 | /* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 12 | /* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 13 | /* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM, 14 | /* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS, 15 | /* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS, 16 | /* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL, 17 | /* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, 18 | /* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, 19 | /* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI, 20 | /* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST, 21 | /* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, 22 | /* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, 23 | /* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 24 | /* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 25 | /* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 26 | /* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 27 | /* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB, 28 | /* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT, 29 | /* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, 30 | /* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, 31 | /* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 32 | /* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 33 | /* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 34 | /* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 35 | /* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, 36 | /* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER, 37 | -------------------------------------------------------------------------------- /deps/libexpat/doc/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: white; 3 | border: 0px; 4 | margin: 0px; 5 | padding: 0px; 6 | } 7 | 8 | .corner { 9 | width: 200px; 10 | height: 80px; 11 | text-align: center; 12 | } 13 | 14 | .banner { 15 | background-color: rgb(110,139,61); 16 | color: rgb(255,236,176); 17 | padding-left: 2em; 18 | } 19 | 20 | .banner h1 { 21 | font-size: 200%; 22 | } 23 | 24 | .content { 25 | padding: 0em 2em 1em 2em; 26 | } 27 | 28 | .releaseno { 29 | background-color: rgb(110,139,61); 30 | color: rgb(255,236,176); 31 | padding-bottom: 0.3em; 32 | padding-top: 0.5em; 33 | text-align: center; 34 | font-weight: bold; 35 | } 36 | 37 | .noborder { 38 | border-width: 0px; 39 | } 40 | 41 | .eg { 42 | padding-left: 1em; 43 | padding-top: .5em; 44 | padding-bottom: .5em; 45 | border: solid thin; 46 | margin: 1em 0; 47 | background-color: tan; 48 | margin-left: 2em; 49 | margin-right: 10%; 50 | } 51 | 52 | .pseudocode { 53 | padding-left: 1em; 54 | padding-top: .5em; 55 | padding-bottom: .5em; 56 | border: solid thin; 57 | margin: 1em 0; 58 | background-color: rgb(250,220,180); 59 | margin-left: 2em; 60 | margin-right: 10%; 61 | } 62 | 63 | .handler { 64 | width: 100%; 65 | border-top-width: thin; 66 | margin-bottom: 1em; 67 | } 68 | 69 | .handler p { 70 | margin-left: 2em; 71 | } 72 | 73 | .setter { 74 | font-weight: bold; 75 | } 76 | 77 | .signature { 78 | color: navy; 79 | } 80 | 81 | .fcndec { 82 | width: 100%; 83 | border-top-width: thin; 84 | font-weight: bold; 85 | } 86 | 87 | .fcndef { 88 | margin-left: 2em; 89 | margin-bottom: 2em; 90 | } 91 | 92 | dd { 93 | margin-bottom: 2em; 94 | } 95 | 96 | .cpp-symbols dt { 97 | font-family: monospace; 98 | } 99 | .cpp-symbols dd { 100 | margin-bottom: 1em; 101 | } 102 | -------------------------------------------------------------------------------- /deps/libexpat/lib/utf8tab.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | 6 | /* 0x80 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 7 | /* 0x84 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 8 | /* 0x88 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 9 | /* 0x8C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 10 | /* 0x90 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 11 | /* 0x94 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 12 | /* 0x98 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 13 | /* 0x9C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 14 | /* 0xA0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 15 | /* 0xA4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 16 | /* 0xA8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 17 | /* 0xAC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 18 | /* 0xB0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 19 | /* 0xB4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 20 | /* 0xB8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 21 | /* 0xBC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL, 22 | /* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, 23 | /* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, 24 | /* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, 25 | /* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, 26 | /* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, 27 | /* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, 28 | /* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, 29 | /* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2, 30 | /* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3, 31 | /* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3, 32 | /* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3, 33 | /* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3, 34 | /* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4, 35 | /* 0xF4 */ BT_LEAD4, BT_NONXML, BT_NONXML, BT_NONXML, 36 | /* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 37 | /* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM, 38 | -------------------------------------------------------------------------------- /deps/libexpat/lib/latin1tab.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | /* 0x80 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 6 | /* 0x84 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 7 | /* 0x88 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 8 | /* 0x8C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 9 | /* 0x90 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 10 | /* 0x94 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 11 | /* 0x98 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 12 | /* 0x9C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 13 | /* 0xA0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 14 | /* 0xA4 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 15 | /* 0xA8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER, 16 | /* 0xAC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 17 | /* 0xB0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 18 | /* 0xB4 */ BT_OTHER, BT_NMSTRT, BT_OTHER, BT_NAME, 19 | /* 0xB8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER, 20 | /* 0xBC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER, 21 | /* 0xC0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 22 | /* 0xC4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 23 | /* 0xC8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 24 | /* 0xCC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 25 | /* 0xD0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 26 | /* 0xD4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, 27 | /* 0xD8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 28 | /* 0xDC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 29 | /* 0xE0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 30 | /* 0xE4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 31 | /* 0xE8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 32 | /* 0xEC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 33 | /* 0xF0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 34 | /* 0xF4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, 35 | /* 0xF8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 36 | /* 0xFC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 37 | -------------------------------------------------------------------------------- /deps/libexpat/lib/iasciitab.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | /* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */ 6 | /* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 7 | /* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 8 | /* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML, 9 | /* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML, 10 | /* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 11 | /* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 12 | /* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 13 | /* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML, 14 | /* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM, 15 | /* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS, 16 | /* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS, 17 | /* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL, 18 | /* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, 19 | /* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT, 20 | /* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI, 21 | /* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST, 22 | /* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, 23 | /* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, 24 | /* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 25 | /* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 26 | /* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 27 | /* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 28 | /* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB, 29 | /* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT, 30 | /* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX, 31 | /* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT, 32 | /* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 33 | /* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 34 | /* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 35 | /* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, 36 | /* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER, 37 | /* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER, 38 | -------------------------------------------------------------------------------- /deps/libexpat/amiga/launch.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (c) 2001-2009 Expat maintainers. 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person obtaining 5 | ** a copy of this software and associated documentation files (the 6 | ** "Software"), to deal in the Software without restriction, including 7 | ** without limitation the rights to use, copy, modify, merge, publish, 8 | ** distribute, sublicense, and/or sell copies of the Software, and to 9 | ** permit persons to whom the Software is furnished to do so, subject to 10 | ** the following conditions: 11 | ** 12 | ** The above copyright notice and this permission notice shall be included 13 | ** in all copies or substantial portions of the Software. 14 | ** 15 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | */ 23 | 24 | #ifdef __USE_INLINE__ 25 | #undef __USE_INLINE__ 26 | #endif 27 | 28 | #include 29 | #include 30 | 31 | struct Library* ExpatBase = 0; 32 | struct ExpatIFace* IExpat = 0; 33 | 34 | 35 | void setup() __attribute__((constructor)); 36 | void cleanup() __attribute__((destructor)); 37 | 38 | 39 | void setup() 40 | { 41 | ExpatBase = IExec->OpenLibrary("expat.library", 53); 42 | IExpat = (struct ExpatIFace*)IExec->GetInterface(ExpatBase, "main", 1, NULL); 43 | 44 | if ( IExpat == 0 ) { 45 | IExec->DebugPrintF("Can't open expat.library\n"); 46 | } 47 | } 48 | 49 | 50 | void cleanup() 51 | { 52 | IExec->DropInterface((struct Interface*)IExpat); 53 | IExpat = 0; 54 | 55 | IExec->CloseLibrary(ExpatBase); 56 | ExpatBase = 0; 57 | } 58 | -------------------------------------------------------------------------------- /deps/libexpat/examples/elements.c: -------------------------------------------------------------------------------- 1 | /* This is simple demonstration of how to use expat. This program 2 | reads an XML document from standard input and writes a line with 3 | the name of each element to standard output indenting child 4 | elements by one tab stop more than their parent element. 5 | It must be used with Expat compiled for UTF-8 output. 6 | */ 7 | 8 | #include 9 | #include "expat.h" 10 | 11 | #if defined(__amigaos__) && defined(__USE_INLINE__) 12 | #include 13 | #endif 14 | 15 | #ifdef XML_LARGE_SIZE 16 | #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 17 | #define XML_FMT_INT_MOD "I64" 18 | #else 19 | #define XML_FMT_INT_MOD "ll" 20 | #endif 21 | #else 22 | #define XML_FMT_INT_MOD "l" 23 | #endif 24 | 25 | static void XMLCALL 26 | startElement(void *userData, const char *name, const char **atts) 27 | { 28 | int i; 29 | int *depthPtr = (int *)userData; 30 | (void)atts; 31 | 32 | for (i = 0; i < *depthPtr; i++) 33 | putchar('\t'); 34 | puts(name); 35 | *depthPtr += 1; 36 | } 37 | 38 | static void XMLCALL 39 | endElement(void *userData, const char *name) 40 | { 41 | int *depthPtr = (int *)userData; 42 | (void)name; 43 | 44 | *depthPtr -= 1; 45 | } 46 | 47 | int 48 | main(int argc, char *argv[]) 49 | { 50 | char buf[BUFSIZ]; 51 | XML_Parser parser = XML_ParserCreate(NULL); 52 | int done; 53 | int depth = 0; 54 | (void)argc; 55 | (void)argv; 56 | 57 | XML_SetUserData(parser, &depth); 58 | XML_SetElementHandler(parser, startElement, endElement); 59 | do { 60 | size_t len = fread(buf, 1, sizeof(buf), stdin); 61 | done = len < sizeof(buf); 62 | if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) { 63 | fprintf(stderr, 64 | "%s at line %" XML_FMT_INT_MOD "u\n", 65 | XML_ErrorString(XML_GetErrorCode(parser)), 66 | XML_GetCurrentLineNumber(parser)); 67 | return 1; 68 | } 69 | } while (!done); 70 | XML_ParserFree(parser); 71 | return 0; 72 | } 73 | -------------------------------------------------------------------------------- /test/service-create-remove-object.test.js: -------------------------------------------------------------------------------- 1 | var withService = require('./with-service'); 2 | var tap = require('tap'); 3 | var DBus = require('../'); 4 | 5 | tap.plan(4); 6 | withService('service-dynamic.js', function(err, done) { 7 | if (err) throw err; 8 | 9 | var bus = DBus.getBus('session'); 10 | var process = done.process; 11 | 12 | addObject(process, '1', function() { 13 | checkInterface(bus, '1', function(err, result) { 14 | tap.equal(result, true); 15 | checkInterface(bus, '2', function(err, result) { 16 | tap.equal(result, false); 17 | addObject(process, '2', function() { 18 | checkInterface(bus, '2', function(err, result) { 19 | tap.equal(result, true); 20 | removeObject(process, '2', function() { 21 | checkInterface(bus, '2', function(err, result) { 22 | tap.equal(result, false); 23 | done(); 24 | bus.disconnect(); 25 | }); 26 | }); 27 | }); 28 | }); 29 | }); 30 | }); 31 | }); 32 | }); 33 | 34 | function addObject(process, value, callback) { 35 | process.once('message', function() { 36 | callback(); 37 | }); 38 | process.send({ type: 'add', value: value }); 39 | } 40 | 41 | function removeObject(process, value, callback) { 42 | process.once('message', function() { 43 | callback(); 44 | }); 45 | process.send({ type: 'remove', value: value }); 46 | } 47 | 48 | function checkInterface(bus, value, callback) { 49 | value = value.toString(); 50 | bus.getInterface('test.dbus.DynamicTestService', '/test/dbus/DynamicTestService/subs/' + value, 'test.dbus.DynamicTestService.DynamicInterface1', function(err, iface) { 51 | if (!err) { 52 | // We might have the interface cached. Let's actually 53 | // try to get a property. 54 | iface.getProperty('Value', function(err, result) { 55 | if (!err) { 56 | return callback(null, true); 57 | } 58 | if (err instanceof DBus.Error && /UnknownMethod/.test(err.dbusName)) { 59 | // This object doesn't exist. We're good. 60 | return callback(null, false); 61 | } 62 | return callback(err); 63 | }); 64 | return; 65 | } 66 | if (/interface/.test(err.message)) { 67 | return callback(null, false); 68 | } 69 | callback(err); 70 | }); 71 | } 72 | 73 | -------------------------------------------------------------------------------- /deps/libexpat/vms/descrip.mms: -------------------------------------------------------------------------------- 1 | # Bare bones description file (Makefile) for OpenVMS 2 | 3 | PACKAGE = expat 4 | VERSION = 1.95.8 5 | EXPAT_MAJOR_VERSION=1 6 | EXPAT_MINOR_VERSION=95 7 | EXPAT_EDIT=8 8 | 9 | O = .obj 10 | OLB = .olb 11 | 12 | LIBRARY = expat$(OLB) 13 | LIBDIR = [.lib] 14 | SOURCES = $(LIBDIR)xmlparse.c $(LIBDIR)xmltok.c $(LIBDIR)xmlrole.c 15 | OBJECTS = xmlparse$(O) xmltok$(O) xmlrole$(O) 16 | 17 | TEMPLATES = xmltok_impl.c xmltok_ns.c 18 | APIHEADER = $(LIBDIR)expat.h 19 | HEADERS = $(LIBDIR)ascii.h $(LIBDIR)iasciitab.h $(LIBDIR)utf8tab.h $(LIBDIR)xmltok.h \ 20 | $(LIBDIR)asciitab.h $(LIBDIR)latin1tab.h \ 21 | $(LIBDIR)nametab.h $(LIBDIR)xmldef.h $(LIBDIR)xmlrole.h $(LIBDIR)xmltok_impl.h 22 | 23 | CONFIG_HEADER = expat_config.h 24 | INCLUDES = /INCLUDE=([],[.lib]) 25 | DEFS = /DEFINE=(PACKAGE="""$(PACKAGE)""",VERSION="""$(PACKAGE)_$(VERSION)""",HAVE_EXPAT_CONFIG_H) 26 | LIBREVISION = 0 27 | LIBCURRENT = 1 28 | LIBAGE = 0 29 | # 30 | COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) 31 | # 32 | # DISTFILES = $(DIST_COMMON) $(SOURCES) $(TEMPLATES) $(APIHEADER) $(HEADERS) 33 | # 34 | # TAR = gtar 35 | # GZIP_ENV = --best 36 | # 37 | .FIRST : 38 | IF F$SEARCH("$(LIBRARY)") .EQS. "" THEN $(LIBR) /CREATE /OBJECT $(LIBRARY) 39 | 40 | all : $(LIBRARY) 41 | @ write sys$output "All made." 42 | 43 | .SUFFIXES : 44 | .SUFFIXES : $(OLB) $(O) .C .H 45 | 46 | .c$(O) : 47 | $(COMPILE) $(MMS$SOURCE) 48 | 49 | $(O)$(OLB) : 50 | @ IF F$SEARCH("$(MMS$TARGET)") .EQS. "" - 51 | THEN LIBRARY/CREATE/LOG $(MMS$TARGET) 52 | @ LIBRARY /REPLACE /LOG $(MMS$TARGET) $(MMS$SOURCE) 53 | 54 | clean : 55 | DELETE $(LIBRARY);*,*$(O);* 56 | 57 | $(LIBRARY) : $(LIBRARY)( $(OBJECTS) ) 58 | $(LIBR) /COMPRESS $(MMS$TARGET) 59 | 60 | $(CONFIG_HEADER) : [.vms]expat_config.h 61 | COPY/LOG $(MMS$SOURCE) $(MMS$TARGET) 62 | 63 | xmlparse$(O) : $(LIBDIR)xmlparse.c $(LIBDIR)expat.h $(LIBDIR)xmlrole.h $(LIBDIR)xmltok.h $(CONFIG_HEADER) 64 | 65 | xmlrole$(O) : $(LIBDIR)xmlrole.c $(LIBDIR)ascii.h $(LIBDIR)xmlrole.h $(CONFIG_HEADER) 66 | 67 | xmltok$(O) : $(LIBDIR)xmltok.c $(LIBDIR)xmltok_impl.c $(LIBDIR)xmltok_ns.c \ 68 | $(LIBDIR)ascii.h $(LIBDIR)asciitab.h $(LIBDIR)iasciitab.h $(LIBDIR)latin1tab.h \ 69 | $(LIBDIR)nametab.h $(LIBDIR)utf8tab.h $(LIBDIR)xmltok.h $(LIBDIR)xmltok_impl.h $(CONFIG_HEADER) 70 | 71 | -------------------------------------------------------------------------------- /deps/libexpat/lib/ascii.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | #define ASCII_A 0x41 6 | #define ASCII_B 0x42 7 | #define ASCII_C 0x43 8 | #define ASCII_D 0x44 9 | #define ASCII_E 0x45 10 | #define ASCII_F 0x46 11 | #define ASCII_G 0x47 12 | #define ASCII_H 0x48 13 | #define ASCII_I 0x49 14 | #define ASCII_J 0x4A 15 | #define ASCII_K 0x4B 16 | #define ASCII_L 0x4C 17 | #define ASCII_M 0x4D 18 | #define ASCII_N 0x4E 19 | #define ASCII_O 0x4F 20 | #define ASCII_P 0x50 21 | #define ASCII_Q 0x51 22 | #define ASCII_R 0x52 23 | #define ASCII_S 0x53 24 | #define ASCII_T 0x54 25 | #define ASCII_U 0x55 26 | #define ASCII_V 0x56 27 | #define ASCII_W 0x57 28 | #define ASCII_X 0x58 29 | #define ASCII_Y 0x59 30 | #define ASCII_Z 0x5A 31 | 32 | #define ASCII_a 0x61 33 | #define ASCII_b 0x62 34 | #define ASCII_c 0x63 35 | #define ASCII_d 0x64 36 | #define ASCII_e 0x65 37 | #define ASCII_f 0x66 38 | #define ASCII_g 0x67 39 | #define ASCII_h 0x68 40 | #define ASCII_i 0x69 41 | #define ASCII_j 0x6A 42 | #define ASCII_k 0x6B 43 | #define ASCII_l 0x6C 44 | #define ASCII_m 0x6D 45 | #define ASCII_n 0x6E 46 | #define ASCII_o 0x6F 47 | #define ASCII_p 0x70 48 | #define ASCII_q 0x71 49 | #define ASCII_r 0x72 50 | #define ASCII_s 0x73 51 | #define ASCII_t 0x74 52 | #define ASCII_u 0x75 53 | #define ASCII_v 0x76 54 | #define ASCII_w 0x77 55 | #define ASCII_x 0x78 56 | #define ASCII_y 0x79 57 | #define ASCII_z 0x7A 58 | 59 | #define ASCII_0 0x30 60 | #define ASCII_1 0x31 61 | #define ASCII_2 0x32 62 | #define ASCII_3 0x33 63 | #define ASCII_4 0x34 64 | #define ASCII_5 0x35 65 | #define ASCII_6 0x36 66 | #define ASCII_7 0x37 67 | #define ASCII_8 0x38 68 | #define ASCII_9 0x39 69 | 70 | #define ASCII_TAB 0x09 71 | #define ASCII_SPACE 0x20 72 | #define ASCII_EXCL 0x21 73 | #define ASCII_QUOT 0x22 74 | #define ASCII_AMP 0x26 75 | #define ASCII_APOS 0x27 76 | #define ASCII_MINUS 0x2D 77 | #define ASCII_PERIOD 0x2E 78 | #define ASCII_COLON 0x3A 79 | #define ASCII_SEMI 0x3B 80 | #define ASCII_LT 0x3C 81 | #define ASCII_EQUALS 0x3D 82 | #define ASCII_GT 0x3E 83 | #define ASCII_LSQB 0x5B 84 | #define ASCII_RSQB 0x5D 85 | #define ASCII_UNDERSCORE 0x5F 86 | #define ASCII_LPAREN 0x28 87 | #define ASCII_RPAREN 0x29 88 | #define ASCII_FF 0x0C 89 | #define ASCII_SLASH 0x2F 90 | #define ASCII_HASH 0x23 91 | #define ASCII_PIPE 0x7C 92 | #define ASCII_COMMA 0x2C 93 | -------------------------------------------------------------------------------- /deps/libexpat/lib/libexpat.def: -------------------------------------------------------------------------------- 1 | ; DEF file for MS VC++ 2 | 3 | LIBRARY 4 | EXPORTS 5 | XML_DefaultCurrent @1 6 | XML_ErrorString @2 7 | XML_ExpatVersion @3 8 | XML_ExpatVersionInfo @4 9 | XML_ExternalEntityParserCreate @5 10 | XML_GetBase @6 11 | XML_GetBuffer @7 12 | XML_GetCurrentByteCount @8 13 | XML_GetCurrentByteIndex @9 14 | XML_GetCurrentColumnNumber @10 15 | XML_GetCurrentLineNumber @11 16 | XML_GetErrorCode @12 17 | XML_GetIdAttributeIndex @13 18 | XML_GetInputContext @14 19 | XML_GetSpecifiedAttributeCount @15 20 | XML_Parse @16 21 | XML_ParseBuffer @17 22 | XML_ParserCreate @18 23 | XML_ParserCreateNS @19 24 | XML_ParserCreate_MM @20 25 | XML_ParserFree @21 26 | XML_SetAttlistDeclHandler @22 27 | XML_SetBase @23 28 | XML_SetCdataSectionHandler @24 29 | XML_SetCharacterDataHandler @25 30 | XML_SetCommentHandler @26 31 | XML_SetDefaultHandler @27 32 | XML_SetDefaultHandlerExpand @28 33 | XML_SetDoctypeDeclHandler @29 34 | XML_SetElementDeclHandler @30 35 | XML_SetElementHandler @31 36 | XML_SetEncoding @32 37 | XML_SetEndCdataSectionHandler @33 38 | XML_SetEndDoctypeDeclHandler @34 39 | XML_SetEndElementHandler @35 40 | XML_SetEndNamespaceDeclHandler @36 41 | XML_SetEntityDeclHandler @37 42 | XML_SetExternalEntityRefHandler @38 43 | XML_SetExternalEntityRefHandlerArg @39 44 | XML_SetNamespaceDeclHandler @40 45 | XML_SetNotStandaloneHandler @41 46 | XML_SetNotationDeclHandler @42 47 | XML_SetParamEntityParsing @43 48 | XML_SetProcessingInstructionHandler @44 49 | XML_SetReturnNSTriplet @45 50 | XML_SetStartCdataSectionHandler @46 51 | XML_SetStartDoctypeDeclHandler @47 52 | XML_SetStartElementHandler @48 53 | XML_SetStartNamespaceDeclHandler @49 54 | XML_SetUnknownEncodingHandler @50 55 | XML_SetUnparsedEntityDeclHandler @51 56 | XML_SetUserData @52 57 | XML_SetXmlDeclHandler @53 58 | XML_UseParserAsHandlerArg @54 59 | ; added with version 1.95.3 60 | XML_ParserReset @55 61 | XML_SetSkippedEntityHandler @56 62 | ; added with version 1.95.5 63 | XML_GetFeatureList @57 64 | XML_UseForeignDTD @58 65 | ; added with version 1.95.6 66 | XML_FreeContentModel @59 67 | XML_MemMalloc @60 68 | XML_MemRealloc @61 69 | XML_MemFree @62 70 | ; added with version 1.95.8 71 | XML_StopParser @63 72 | XML_ResumeParser @64 73 | XML_GetParsingStatus @65 74 | ; added with version 2.1.1 75 | ; XML_GetAttributeInfo @66 76 | XML_SetHashSalt @67@ 77 | -------------------------------------------------------------------------------- /deps/libexpat/lib/libexpatw.def: -------------------------------------------------------------------------------- 1 | ; DEF file for MS VC++ 2 | 3 | LIBRARY 4 | EXPORTS 5 | XML_DefaultCurrent @1 6 | XML_ErrorString @2 7 | XML_ExpatVersion @3 8 | XML_ExpatVersionInfo @4 9 | XML_ExternalEntityParserCreate @5 10 | XML_GetBase @6 11 | XML_GetBuffer @7 12 | XML_GetCurrentByteCount @8 13 | XML_GetCurrentByteIndex @9 14 | XML_GetCurrentColumnNumber @10 15 | XML_GetCurrentLineNumber @11 16 | XML_GetErrorCode @12 17 | XML_GetIdAttributeIndex @13 18 | XML_GetInputContext @14 19 | XML_GetSpecifiedAttributeCount @15 20 | XML_Parse @16 21 | XML_ParseBuffer @17 22 | XML_ParserCreate @18 23 | XML_ParserCreateNS @19 24 | XML_ParserCreate_MM @20 25 | XML_ParserFree @21 26 | XML_SetAttlistDeclHandler @22 27 | XML_SetBase @23 28 | XML_SetCdataSectionHandler @24 29 | XML_SetCharacterDataHandler @25 30 | XML_SetCommentHandler @26 31 | XML_SetDefaultHandler @27 32 | XML_SetDefaultHandlerExpand @28 33 | XML_SetDoctypeDeclHandler @29 34 | XML_SetElementDeclHandler @30 35 | XML_SetElementHandler @31 36 | XML_SetEncoding @32 37 | XML_SetEndCdataSectionHandler @33 38 | XML_SetEndDoctypeDeclHandler @34 39 | XML_SetEndElementHandler @35 40 | XML_SetEndNamespaceDeclHandler @36 41 | XML_SetEntityDeclHandler @37 42 | XML_SetExternalEntityRefHandler @38 43 | XML_SetExternalEntityRefHandlerArg @39 44 | XML_SetNamespaceDeclHandler @40 45 | XML_SetNotStandaloneHandler @41 46 | XML_SetNotationDeclHandler @42 47 | XML_SetParamEntityParsing @43 48 | XML_SetProcessingInstructionHandler @44 49 | XML_SetReturnNSTriplet @45 50 | XML_SetStartCdataSectionHandler @46 51 | XML_SetStartDoctypeDeclHandler @47 52 | XML_SetStartElementHandler @48 53 | XML_SetStartNamespaceDeclHandler @49 54 | XML_SetUnknownEncodingHandler @50 55 | XML_SetUnparsedEntityDeclHandler @51 56 | XML_SetUserData @52 57 | XML_SetXmlDeclHandler @53 58 | XML_UseParserAsHandlerArg @54 59 | ; added with version 1.95.3 60 | XML_ParserReset @55 61 | XML_SetSkippedEntityHandler @56 62 | ; added with version 1.95.5 63 | XML_GetFeatureList @57 64 | XML_UseForeignDTD @58 65 | ; added with version 1.95.6 66 | XML_FreeContentModel @59 67 | XML_MemMalloc @60 68 | XML_MemRealloc @61 69 | XML_MemFree @62 70 | ; added with version 1.95.8 71 | XML_StopParser @63 72 | XML_ResumeParser @64 73 | XML_GetParsingStatus @65 74 | ; added with version 2.1.1 75 | ; XML_GetAttributeInfo @66 76 | XML_SetHashSalt @67@ 77 | -------------------------------------------------------------------------------- /deps/libexpat/xmlwf/readfilemap.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | /* Functions close(2) and read(2) */ 12 | #ifdef __WATCOMC__ 13 | #ifndef __LINUX__ 14 | #include 15 | #else 16 | #include 17 | #endif 18 | #else 19 | # if !defined(WIN32) && !defined(_WIN32) && !defined(_WIN64) 20 | # include 21 | # endif 22 | #endif 23 | 24 | #ifndef S_ISREG 25 | #ifndef S_IFREG 26 | #define S_IFREG _S_IFREG 27 | #endif 28 | #ifndef S_IFMT 29 | #define S_IFMT _S_IFMT 30 | #endif 31 | #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) 32 | #endif /* not S_ISREG */ 33 | 34 | #ifndef O_BINARY 35 | #ifdef _O_BINARY 36 | #define O_BINARY _O_BINARY 37 | #else 38 | #define O_BINARY 0 39 | #endif 40 | #endif 41 | 42 | #include "filemap.h" 43 | 44 | int 45 | filemap(const char *name, 46 | void (*processor)(const void *, size_t, const char *, void *arg), 47 | void *arg) 48 | { 49 | size_t nbytes; 50 | int fd; 51 | int n; 52 | struct stat sb; 53 | void *p; 54 | 55 | fd = open(name, O_RDONLY|O_BINARY); 56 | if (fd < 0) { 57 | perror(name); 58 | return 0; 59 | } 60 | if (fstat(fd, &sb) < 0) { 61 | perror(name); 62 | close(fd); 63 | return 0; 64 | } 65 | if (!S_ISREG(sb.st_mode)) { 66 | fprintf(stderr, "%s: not a regular file\n", name); 67 | close(fd); 68 | return 0; 69 | } 70 | nbytes = sb.st_size; 71 | /* malloc will return NULL with nbytes == 0, handle files with size 0 */ 72 | if (nbytes == 0) { 73 | static const char c = '\0'; 74 | processor(&c, 0, name, arg); 75 | close(fd); 76 | return 1; 77 | } 78 | p = malloc(nbytes); 79 | if (!p) { 80 | fprintf(stderr, "%s: out of memory\n", name); 81 | close(fd); 82 | return 0; 83 | } 84 | n = read(fd, p, nbytes); 85 | if (n < 0) { 86 | perror(name); 87 | free(p); 88 | close(fd); 89 | return 0; 90 | } 91 | if (n != nbytes) { 92 | fprintf(stderr, "%s: read unexpected number of bytes\n", name); 93 | free(p); 94 | close(fd); 95 | return 0; 96 | } 97 | processor(p, nbytes, name, arg); 98 | free(p); 99 | close(fd); 100 | return 1; 101 | } 102 | -------------------------------------------------------------------------------- /deps/libexpat/libexpat.gyp: -------------------------------------------------------------------------------- 1 | # This file is used with the GYP meta build system. 2 | # http://code.google.com/p/gyp 3 | # To build try this: 4 | # svn co http://gyp.googlecode.com/svn/trunk gyp 5 | # ./gyp/gyp -f make --depth=`pwd` libexpat.gyp 6 | # make 7 | # ./out/Debug/test 8 | 9 | { 10 | 'target_defaults': { 11 | 'default_configuration': 'Debug', 12 | 'configurations': { 13 | # TODO: hoist these out and put them somewhere common, because 14 | # RuntimeLibrary MUST MATCH across the entire project 15 | 'Debug': { 16 | 'defines': [ 'DEBUG', '_DEBUG' ], 17 | 'msvs_settings': { 18 | 'VCCLCompilerTool': { 19 | 'RuntimeLibrary': 1, # static debug 20 | }, 21 | }, 22 | }, 23 | 'Release': { 24 | 'defines': [ 'NDEBUG' ], 25 | 'msvs_settings': { 26 | 'VCCLCompilerTool': { 27 | 'RuntimeLibrary': 0, # static release 28 | }, 29 | }, 30 | } 31 | }, 32 | 'msvs_settings': { 33 | 'VCCLCompilerTool': { 34 | }, 35 | 'VCLibrarianTool': { 36 | }, 37 | 'VCLinkerTool': { 38 | 'GenerateDebugInformation': 'true', 39 | }, 40 | }, 41 | }, 42 | 43 | 'targets': [ 44 | { 45 | 'variables': { 'target_arch%': 'ia32' }, # default for node v0.6.x 46 | 'target_name': 'expat', 47 | 'product_prefix': 'lib', 48 | 'type': 'static_library', 49 | 'sources': [ 50 | 'lib/xmlparse.c', 51 | 'lib/xmltok.c', 52 | 'lib/xmlrole.c', 53 | ], 54 | 'defines': [ 55 | 'PIC', 56 | 'HAVE_EXPAT_CONFIG_H' 57 | ], 58 | 'cflags': [ 59 | '-Wno-missing-field-initializers' 60 | ], 61 | 'xcode_settings': { 62 | 'OTHER_CFLAGS': [ 63 | '-Wno-missing-field-initializers' 64 | ] 65 | }, 66 | 'include_dirs': [ 67 | '.', 68 | 'lib', 69 | ], 70 | 'direct_dependent_settings': { 71 | 'include_dirs': [ 72 | '.', 73 | 'lib', 74 | ], 75 | 'conditions': [ 76 | ['OS=="win"', { 77 | 'defines': [ 78 | 'XML_STATIC' 79 | ] 80 | }] 81 | ], 82 | }, 83 | }, 84 | 85 | { 86 | 'target_name': 'version', 87 | 'type': 'executable', 88 | 'dependencies': [ 'expat' ], 89 | 'sources': [ 'version.c' ] 90 | }, 91 | ] 92 | } 93 | -------------------------------------------------------------------------------- /deps/libexpat/expat.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "elements"=.\examples\elements.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | Begin Project Dependency 15 | Project_Dep_Name expat_static 16 | End Project Dependency 17 | }}} 18 | 19 | ############################################################################### 20 | 21 | Project: "expat"=.\lib\expat.dsp - Package Owner=<4> 22 | 23 | Package=<5> 24 | {{{ 25 | }}} 26 | 27 | Package=<4> 28 | {{{ 29 | }}} 30 | 31 | ############################################################################### 32 | 33 | Project: "expat_static"=.\lib\expat_static.dsp - Package Owner=<4> 34 | 35 | Package=<5> 36 | {{{ 37 | }}} 38 | 39 | Package=<4> 40 | {{{ 41 | }}} 42 | 43 | ############################################################################### 44 | 45 | Project: "expatw"=.\lib\expatw.dsp - Package Owner=<4> 46 | 47 | Package=<5> 48 | {{{ 49 | }}} 50 | 51 | Package=<4> 52 | {{{ 53 | }}} 54 | 55 | ############################################################################### 56 | 57 | Project: "expatw_static"=.\lib\expatw_static.dsp - Package Owner=<4> 58 | 59 | Package=<5> 60 | {{{ 61 | }}} 62 | 63 | Package=<4> 64 | {{{ 65 | }}} 66 | 67 | ############################################################################### 68 | 69 | Project: "outline"=.\examples\outline.dsp - Package Owner=<4> 70 | 71 | Package=<5> 72 | {{{ 73 | }}} 74 | 75 | Package=<4> 76 | {{{ 77 | Begin Project Dependency 78 | Project_Dep_Name expat 79 | End Project Dependency 80 | }}} 81 | 82 | ############################################################################### 83 | 84 | Project: "xmlwf"=.\xmlwf\xmlwf.dsp - Package Owner=<4> 85 | 86 | Package=<5> 87 | {{{ 88 | }}} 89 | 90 | Package=<4> 91 | {{{ 92 | Begin Project Dependency 93 | Project_Dep_Name expat 94 | End Project Dependency 95 | }}} 96 | 97 | ############################################################################### 98 | 99 | Global: 100 | 101 | Package=<5> 102 | {{{ 103 | }}} 104 | 105 | Package=<3> 106 | {{{ 107 | }}} 108 | 109 | ############################################################################### 110 | 111 | -------------------------------------------------------------------------------- /deps/libexpat/xmlwf/win32filemap.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | #define STRICT 1 6 | #define WIN32_LEAN_AND_MEAN 1 7 | 8 | #ifdef XML_UNICODE_WCHAR_T 9 | #ifndef XML_UNICODE 10 | #define XML_UNICODE 11 | #endif 12 | #endif 13 | 14 | #ifdef XML_UNICODE 15 | #define UNICODE 16 | #define _UNICODE 17 | #endif /* XML_UNICODE */ 18 | #include 19 | #include 20 | #include 21 | #include "filemap.h" 22 | 23 | static void win32perror(const TCHAR *); 24 | 25 | int 26 | filemap(const TCHAR *name, 27 | void (*processor)(const void *, size_t, const TCHAR *, void *arg), 28 | void *arg) 29 | { 30 | HANDLE f; 31 | HANDLE m; 32 | DWORD size; 33 | DWORD sizeHi; 34 | void *p; 35 | 36 | f = CreateFile(name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 37 | FILE_FLAG_SEQUENTIAL_SCAN, NULL); 38 | if (f == INVALID_HANDLE_VALUE) { 39 | win32perror(name); 40 | return 0; 41 | } 42 | size = GetFileSize(f, &sizeHi); 43 | if (size == (DWORD)-1) { 44 | win32perror(name); 45 | return 0; 46 | } 47 | if (sizeHi) { 48 | _ftprintf(stderr, _T("%s: bigger than 2Gb\n"), name); 49 | return 0; 50 | } 51 | /* CreateFileMapping barfs on zero length files */ 52 | if (size == 0) { 53 | static const char c = '\0'; 54 | processor(&c, 0, name, arg); 55 | CloseHandle(f); 56 | return 1; 57 | } 58 | m = CreateFileMapping(f, NULL, PAGE_READONLY, 0, 0, NULL); 59 | if (m == NULL) { 60 | win32perror(name); 61 | CloseHandle(f); 62 | return 0; 63 | } 64 | p = MapViewOfFile(m, FILE_MAP_READ, 0, 0, 0); 65 | if (p == NULL) { 66 | win32perror(name); 67 | CloseHandle(m); 68 | CloseHandle(f); 69 | return 0; 70 | } 71 | processor(p, size, name, arg); 72 | UnmapViewOfFile(p); 73 | CloseHandle(m); 74 | CloseHandle(f); 75 | return 1; 76 | } 77 | 78 | static void 79 | win32perror(const TCHAR *s) 80 | { 81 | LPVOID buf; 82 | if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER 83 | | FORMAT_MESSAGE_FROM_SYSTEM, 84 | NULL, 85 | GetLastError(), 86 | MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 87 | (LPTSTR) &buf, 88 | 0, 89 | NULL)) { 90 | _ftprintf(stderr, _T("%s: %s"), s, buf); 91 | fflush(stderr); 92 | LocalFree(buf); 93 | } 94 | else 95 | _ftprintf(stderr, _T("%s: unknown Windows error\n"), s); 96 | } 97 | -------------------------------------------------------------------------------- /lib/dbus.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var _dbus = require('../build/Release/dbus.node'); 4 | 5 | var Utils = require('./utils'); 6 | var Bus = require('./bus'); 7 | var Service = require('./service'); 8 | var Error = require('./error'); 9 | 10 | var serviceMap = {}; 11 | 12 | var enabledSignal = false; 13 | 14 | // Dispatch events to service 15 | _dbus.setObjectHandler(function(uniqueName, sender, objectPath, interfaceName, member, message, args) { 16 | 17 | for (var hash in serviceMap) { 18 | var service = serviceMap[hash]; 19 | 20 | if (service.bus.connection.uniqueName != uniqueName) 21 | continue; 22 | 23 | // Fire event 24 | var newArgs = [ 'request' ].concat(Array.prototype.slice.call(arguments)); 25 | service.emit.apply(service, newArgs); 26 | 27 | break; 28 | } 29 | }); 30 | 31 | var DBus = module.exports = function(opts) { 32 | }; 33 | 34 | DBus.Define = Utils.Define; 35 | DBus.Signature = Utils.Signature; 36 | DBus.Error = Error; 37 | 38 | DBus.getBus = function(busName) { 39 | return new Bus(_dbus, DBus, busName); 40 | } 41 | 42 | /* Deprecated */ 43 | DBus.prototype.getBus = function(busName) { 44 | return DBus.getBus(busName); 45 | }; 46 | 47 | DBus.signalHandlers = {}; 48 | 49 | DBus.enableSignal = function() { 50 | if (!enabledSignal) { 51 | enabledSignal = true; 52 | 53 | _dbus.setSignalHandler(function(uniqueName) { 54 | 55 | if (DBus.signalHandlers[uniqueName]) { 56 | var args = [ 'signal' ].concat(Array.prototype.slice.call(arguments)); 57 | 58 | DBus.signalHandlers[uniqueName].emit.apply(DBus.signalHandlers[uniqueName], args); 59 | } 60 | }); 61 | } 62 | }; 63 | 64 | DBus.registerService = function(busName, serviceName) { 65 | var self = this; 66 | 67 | var _serviceName = serviceName || null; 68 | 69 | if (serviceName) { 70 | 71 | // Return bus existed 72 | var serviceHash = busName + ':' + _serviceName; 73 | if (serviceMap[serviceHash]) 74 | return serviceMap[serviceHash]; 75 | } 76 | 77 | // Get a connection 78 | var bus = DBus.getBus(busName); 79 | 80 | if (!serviceName) 81 | _serviceName = bus.connection.uniqueName; 82 | 83 | // Create service 84 | var service = new Service(bus, _serviceName); 85 | serviceMap[serviceHash] = service; 86 | 87 | if (serviceName) { 88 | DBus._requestName(bus, _serviceName); 89 | } 90 | 91 | return service 92 | }; 93 | 94 | /* Deprecated */ 95 | DBus.prototype.registerService = function(busName, serviceName) { 96 | return DBus.registerService(busName, serviceName); 97 | } 98 | 99 | DBus._requestName = function(bus, serviceName) { 100 | _dbus.requestName(bus.connection, serviceName); 101 | }; 102 | -------------------------------------------------------------------------------- /deps/libexpat/lib/internal.h: -------------------------------------------------------------------------------- 1 | /* internal.h 2 | 3 | Internal definitions used by Expat. This is not needed to compile 4 | client code. 5 | 6 | The following calling convention macros are defined for frequently 7 | called functions: 8 | 9 | FASTCALL - Used for those internal functions that have a simple 10 | body and a low number of arguments and local variables. 11 | 12 | PTRCALL - Used for functions called though function pointers. 13 | 14 | PTRFASTCALL - Like PTRCALL, but for low number of arguments. 15 | 16 | inline - Used for selected internal functions for which inlining 17 | may improve performance on some platforms. 18 | 19 | Note: Use of these macros is based on judgement, not hard rules, 20 | and therefore subject to change. 21 | */ 22 | 23 | #if defined(__GNUC__) && defined(__i386__) && !defined(__MINGW32__) 24 | /* We'll use this version by default only where we know it helps. 25 | 26 | regparm() generates warnings on Solaris boxes. See SF bug #692878. 27 | 28 | Instability reported with egcs on a RedHat Linux 7.3. 29 | Let's comment out: 30 | #define FASTCALL __attribute__((stdcall, regparm(3))) 31 | and let's try this: 32 | */ 33 | #define FASTCALL __attribute__((regparm(3))) 34 | #define PTRFASTCALL __attribute__((regparm(3))) 35 | #endif 36 | 37 | /* Using __fastcall seems to have an unexpected negative effect under 38 | MS VC++, especially for function pointers, so we won't use it for 39 | now on that platform. It may be reconsidered for a future release 40 | if it can be made more effective. 41 | Likely reason: __fastcall on Windows is like stdcall, therefore 42 | the compiler cannot perform stack optimizations for call clusters. 43 | */ 44 | 45 | /* Make sure all of these are defined if they aren't already. */ 46 | 47 | #ifndef FASTCALL 48 | #define FASTCALL 49 | #endif 50 | 51 | #ifndef PTRCALL 52 | #define PTRCALL 53 | #endif 54 | 55 | #ifndef PTRFASTCALL 56 | #define PTRFASTCALL 57 | #endif 58 | 59 | #ifndef XML_MIN_SIZE 60 | #if !defined(__cplusplus) && !defined(inline) 61 | #ifdef __GNUC__ 62 | #define inline __inline 63 | #endif /* __GNUC__ */ 64 | #endif 65 | #endif /* XML_MIN_SIZE */ 66 | 67 | #ifdef __cplusplus 68 | #define inline inline 69 | #else 70 | #ifndef inline 71 | #define inline 72 | #endif 73 | #endif 74 | 75 | #ifndef UNUSED_P 76 | # ifdef __GNUC__ 77 | # define UNUSED_P(p) UNUSED_ ## p __attribute__((__unused__)) 78 | # else 79 | # define UNUSED_P(p) UNUSED_ ## p 80 | # endif 81 | #endif 82 | 83 | 84 | #ifdef __cplusplus 85 | extern "C" { 86 | #endif 87 | 88 | 89 | void 90 | align_limit_to_full_utf8_characters(const char * from, const char ** fromLimRef); 91 | 92 | 93 | #ifdef __cplusplus 94 | } 95 | #endif 96 | -------------------------------------------------------------------------------- /deps/libexpat/tests/minicheck.h: -------------------------------------------------------------------------------- 1 | /* Miniature re-implementation of the "check" library. 2 | * 3 | * This is intended to support just enough of check to run the Expat 4 | * tests. This interface is based entirely on the portion of the 5 | * check library being used. 6 | * 7 | * This is *source* compatible, but not necessary *link* compatible. 8 | */ 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #define CK_NOFORK 0 15 | #define CK_FORK 1 16 | 17 | #define CK_SILENT 0 18 | #define CK_NORMAL 1 19 | #define CK_VERBOSE 2 20 | 21 | /* Workaround for Microsoft's compiler and Tru64 Unix systems where the 22 | C compiler has a working __func__, but the C++ compiler only has a 23 | working __FUNCTION__. This could be fixed in configure.in, but it's 24 | not worth it right now. */ 25 | #if defined (_MSC_VER) || (defined(__osf__) && defined(__cplusplus)) 26 | #define __func__ __FUNCTION__ 27 | #endif 28 | 29 | /* ISO C90 does not support '__func__' predefined identifier */ 30 | #if defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901) 31 | # define __func__ "(unknown)" 32 | #endif 33 | 34 | #define START_TEST(testname) static void testname(void) { \ 35 | _check_set_test_info(__func__, __FILE__, __LINE__); \ 36 | { 37 | #define END_TEST } } 38 | 39 | #define fail(msg) _fail_unless(0, __FILE__, __LINE__, msg) 40 | 41 | typedef void (*tcase_setup_function)(void); 42 | typedef void (*tcase_teardown_function)(void); 43 | typedef void (*tcase_test_function)(void); 44 | 45 | typedef struct SRunner SRunner; 46 | typedef struct Suite Suite; 47 | typedef struct TCase TCase; 48 | 49 | struct SRunner { 50 | Suite *suite; 51 | int nchecks; 52 | int nfailures; 53 | }; 54 | 55 | struct Suite { 56 | const char *name; 57 | TCase *tests; 58 | }; 59 | 60 | struct TCase { 61 | const char *name; 62 | tcase_setup_function setup; 63 | tcase_teardown_function teardown; 64 | tcase_test_function *tests; 65 | int ntests; 66 | int allocated; 67 | TCase *next_tcase; 68 | }; 69 | 70 | 71 | /* Internal helper. */ 72 | void _check_set_test_info(char const *function, 73 | char const *filename, int lineno); 74 | 75 | 76 | /* 77 | * Prototypes for the actual implementation. 78 | */ 79 | 80 | void _fail_unless(int condition, const char *file, int line, const char *msg); 81 | Suite *suite_create(const char *name); 82 | TCase *tcase_create(const char *name); 83 | void suite_add_tcase(Suite *suite, TCase *tc); 84 | void tcase_add_checked_fixture(TCase *, 85 | tcase_setup_function, 86 | tcase_teardown_function); 87 | void tcase_add_test(TCase *tc, tcase_test_function test); 88 | SRunner *srunner_create(Suite *suite); 89 | void srunner_run_all(SRunner *runner, int verbosity); 90 | int srunner_ntests_failed(SRunner *runner); 91 | void srunner_free(SRunner *runner); 92 | 93 | #ifdef __cplusplus 94 | } 95 | #endif 96 | -------------------------------------------------------------------------------- /deps/libexpat/expat_config.h.cmake: -------------------------------------------------------------------------------- 1 | /* expat_config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ 4 | #cmakedefine BYTEORDER @BYTEORDER@ 5 | 6 | /* Define to 1 if you have the `bcopy' function. */ 7 | #cmakedefine HAVE_BCOPY 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #cmakedefine HAVE_DLFCN_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #cmakedefine HAVE_FCNTL_H 14 | 15 | /* Define to 1 if you have the `getpagesize' function. */ 16 | #cmakedefine HAVE_GETPAGESIZE 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #cmakedefine HAVE_INTTYPES_H 20 | 21 | /* Define to 1 if you have the `memmove' function. */ 22 | #cmakedefine HAVE_MEMMOVE 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #cmakedefine HAVE_MEMORY_H 26 | 27 | /* Define to 1 if you have a working `mmap' system call. */ 28 | #cmakedefine HAVE_MMAP 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #cmakedefine HAVE_STDINT_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #cmakedefine HAVE_STDLIB_H 35 | 36 | /* Define to 1 if you have the header file. */ 37 | #cmakedefine HAVE_STRINGS_H 38 | 39 | /* Define to 1 if you have the header file. */ 40 | #cmakedefine HAVE_STRING_H 41 | 42 | /* Define to 1 if you have the header file. */ 43 | #cmakedefine HAVE_SYS_STAT_H 44 | 45 | /* Define to 1 if you have the header file. */ 46 | #cmakedefine HAVE_SYS_TYPES_H 47 | 48 | /* Define to 1 if you have the header file. */ 49 | #cmakedefine HAVE_UNISTD_H 50 | 51 | /* Define to the address where bug reports for this package should be sent. */ 52 | #cmakedefine PACKAGE_BUGREPORT 53 | 54 | /* Define to the full name of this package. */ 55 | #cmakedefine PACKAGE_NAME 56 | 57 | /* Define to the full name and version of this package. */ 58 | #cmakedefine PACKAGE_STRING 59 | 60 | /* Define to the one symbol short name of this package. */ 61 | #cmakedefine PACKAGE_TARNAME 62 | 63 | /* Define to the version of this package. */ 64 | #cmakedefine PACKAGE_VERSION 65 | 66 | /* Define to 1 if you have the ANSI C header files. */ 67 | #cmakedefine STDC_HEADERS 68 | 69 | /* whether byteorder is bigendian */ 70 | #cmakedefine WORDS_BIGENDIAN 71 | 72 | /* Define to specify how much context to retain around the current parse 73 | point. */ 74 | #cmakedefine XML_CONTEXT_BYTES @XML_CONTEXT_BYTES@ 75 | 76 | /* Define to make parameter entity parsing functionality available. */ 77 | #cmakedefine XML_DTD 78 | 79 | /* Define to make XML Namespaces functionality available. */ 80 | #cmakedefine XML_NS 81 | 82 | /* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */ 83 | #ifdef _MSC_VER 84 | # define __func__ __FUNCTION__ 85 | #endif 86 | 87 | /* Define to `long' if does not define. */ 88 | #cmakedefine off_t @OFF_T@ 89 | 90 | /* Define to `unsigned' if does not define. */ 91 | #cmakedefine size_t @SIZE_T@ 92 | -------------------------------------------------------------------------------- /deps/libexpat/examples/outline.c: -------------------------------------------------------------------------------- 1 | /***************************************************************** 2 | * outline.c 3 | * 4 | * Copyright 1999, Clark Cooper 5 | * All rights reserved. 6 | * 7 | * This program is free software; you can redistribute it and/or 8 | * modify it under the terms of the license contained in the 9 | * COPYING file that comes with the expat distribution. 10 | * 11 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 12 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 13 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 14 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 15 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 16 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 17 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | * 19 | * Read an XML document from standard input and print an element 20 | * outline on standard output. 21 | * Must be used with Expat compiled for UTF-8 output. 22 | */ 23 | 24 | 25 | #include 26 | #include 27 | 28 | #if defined(__amigaos__) && defined(__USE_INLINE__) 29 | #include 30 | #endif 31 | 32 | #ifdef XML_LARGE_SIZE 33 | #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 34 | #define XML_FMT_INT_MOD "I64" 35 | #else 36 | #define XML_FMT_INT_MOD "ll" 37 | #endif 38 | #else 39 | #define XML_FMT_INT_MOD "l" 40 | #endif 41 | 42 | #define BUFFSIZE 8192 43 | 44 | char Buff[BUFFSIZE]; 45 | 46 | int Depth; 47 | 48 | static void XMLCALL 49 | start(void *data, const char *el, const char **attr) 50 | { 51 | int i; 52 | (void)data; 53 | 54 | for (i = 0; i < Depth; i++) 55 | printf(" "); 56 | 57 | printf("%s", el); 58 | 59 | for (i = 0; attr[i]; i += 2) { 60 | printf(" %s='%s'", attr[i], attr[i + 1]); 61 | } 62 | 63 | printf("\n"); 64 | Depth++; 65 | } 66 | 67 | static void XMLCALL 68 | end(void *data, const char *el) 69 | { 70 | (void)data; 71 | (void)el; 72 | 73 | Depth--; 74 | } 75 | 76 | int 77 | main(int argc, char *argv[]) 78 | { 79 | XML_Parser p = XML_ParserCreate(NULL); 80 | (void)argc; 81 | (void)argv; 82 | 83 | if (! p) { 84 | fprintf(stderr, "Couldn't allocate memory for parser\n"); 85 | exit(-1); 86 | } 87 | 88 | XML_SetElementHandler(p, start, end); 89 | 90 | for (;;) { 91 | int done; 92 | int len; 93 | 94 | len = (int)fread(Buff, 1, BUFFSIZE, stdin); 95 | if (ferror(stdin)) { 96 | fprintf(stderr, "Read error\n"); 97 | exit(-1); 98 | } 99 | done = feof(stdin); 100 | 101 | if (XML_Parse(p, Buff, len, done) == XML_STATUS_ERROR) { 102 | fprintf(stderr, "Parse error at line %" XML_FMT_INT_MOD "u:\n%s\n", 103 | XML_GetCurrentLineNumber(p), 104 | XML_ErrorString(XML_GetErrorCode(p))); 105 | exit(-1); 106 | } 107 | 108 | if (done) 109 | break; 110 | } 111 | XML_ParserFree(p); 112 | return 0; 113 | } 114 | -------------------------------------------------------------------------------- /deps/libexpat/conftools/PrintPath: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Look for program[s] somewhere in $PATH. 3 | # 4 | # Options: 5 | # -s 6 | # Do not print out full pathname. (silent) 7 | # -pPATHNAME 8 | # Look in PATHNAME instead of $PATH 9 | # 10 | # Usage: 11 | # PrintPath [-s] [-pPATHNAME] program [program ...] 12 | # 13 | # Initially written by Jim Jagielski for the Apache configuration mechanism 14 | # (with kudos to Kernighan/Pike) 15 | # 16 | # This script falls under the Apache License. 17 | # See http://www.apache.org/licenses/LICENSE 18 | 19 | ## 20 | # Some "constants" 21 | ## 22 | pathname=$PATH 23 | echo="yes" 24 | 25 | ## 26 | # Find out what OS we are running for later on 27 | ## 28 | os=`(uname) 2>/dev/null` 29 | 30 | ## 31 | # Parse command line 32 | ## 33 | for args in $* 34 | do 35 | case $args in 36 | -s ) echo="no" ;; 37 | -p* ) pathname="`echo $args | sed 's/^..//'`" ;; 38 | * ) programs="$programs $args" ;; 39 | esac 40 | done 41 | 42 | ## 43 | # Now we make the adjustments required for OS/2 and everyone 44 | # else :) 45 | # 46 | # First of all, all OS/2 programs have the '.exe' extension. 47 | # Next, we adjust PATH (or what was given to us as PATH) to 48 | # be whitespace separated directories. 49 | # Finally, we try to determine the best flag to use for 50 | # test/[] to look for an executable file. OS/2 just has '-r' 51 | # but with other OSs, we do some funny stuff to check to see 52 | # if test/[] knows about -x, which is the preferred flag. 53 | ## 54 | 55 | if [ "x$os" = "xOS/2" ] 56 | then 57 | ext=".exe" 58 | pathname=`echo -E $pathname | 59 | sed 's/^;/.;/ 60 | s/;;/;.;/g 61 | s/;$/;./ 62 | s/;/ /g 63 | s/\\\\/\\//g' ` 64 | test_exec_flag="-r" 65 | else 66 | ext="" # No default extensions 67 | pathname=`echo $pathname | 68 | sed 's/^:/.:/ 69 | s/::/:.:/g 70 | s/:$/:./ 71 | s/:/ /g' ` 72 | # Here is how we test to see if test/[] can handle -x 73 | testfile="pp.t.$$" 74 | 75 | cat > $testfile </dev/null`; then 84 | test_exec_flag="-x" 85 | else 86 | test_exec_flag="-r" 87 | fi 88 | rm -f $testfile 89 | fi 90 | 91 | for program in $programs 92 | do 93 | for path in $pathname 94 | do 95 | if [ $test_exec_flag $path/${program}${ext} ] && \ 96 | [ ! -d $path/${program}${ext} ]; then 97 | if [ "x$echo" = "xyes" ]; then 98 | echo $path/${program}${ext} 99 | fi 100 | exit 0 101 | fi 102 | 103 | # Next try without extension (if one was used above) 104 | if [ "x$ext" != "x" ]; then 105 | if [ $test_exec_flag $path/${program} ] && \ 106 | [ ! -d $path/${program} ]; then 107 | if [ "x$echo" = "xyes" ]; then 108 | echo $path/${program} 109 | fi 110 | exit 0 111 | fi 112 | fi 113 | done 114 | done 115 | exit 1 116 | 117 | -------------------------------------------------------------------------------- /deps/libexpat/expat_config.h.in: -------------------------------------------------------------------------------- 1 | /* expat_config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ 4 | #undef BYTEORDER 5 | 6 | /* Define to 1 if you have the `bcopy' function. */ 7 | #undef HAVE_BCOPY 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_DLFCN_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_FCNTL_H 14 | 15 | /* Define to 1 if you have the `getpagesize' function. */ 16 | #undef HAVE_GETPAGESIZE 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_INTTYPES_H 20 | 21 | /* Define to 1 if you have the `memmove' function. */ 22 | #undef HAVE_MEMMOVE 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_MEMORY_H 26 | 27 | /* Define to 1 if you have a working `mmap' system call. */ 28 | #undef HAVE_MMAP 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_STDINT_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_STDLIB_H 35 | 36 | /* Define to 1 if you have the header file. */ 37 | #undef HAVE_STRINGS_H 38 | 39 | /* Define to 1 if you have the header file. */ 40 | #undef HAVE_STRING_H 41 | 42 | /* Define to 1 if you have the header file. */ 43 | #undef HAVE_SYS_PARAM_H 44 | 45 | /* Define to 1 if you have the header file. */ 46 | #undef HAVE_SYS_STAT_H 47 | 48 | /* Define to 1 if you have the header file. */ 49 | #undef HAVE_SYS_TYPES_H 50 | 51 | /* Define to 1 if you have the header file. */ 52 | #undef HAVE_UNISTD_H 53 | 54 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 55 | */ 56 | #undef LT_OBJDIR 57 | 58 | /* Define to the address where bug reports for this package should be sent. */ 59 | #undef PACKAGE_BUGREPORT 60 | 61 | /* Define to the full name of this package. */ 62 | #undef PACKAGE_NAME 63 | 64 | /* Define to the full name and version of this package. */ 65 | #undef PACKAGE_STRING 66 | 67 | /* Define to the one symbol short name of this package. */ 68 | #undef PACKAGE_TARNAME 69 | 70 | /* Define to the home page for this package. */ 71 | #undef PACKAGE_URL 72 | 73 | /* Define to the version of this package. */ 74 | #undef PACKAGE_VERSION 75 | 76 | /* Define to 1 if you have the ANSI C header files. */ 77 | #undef STDC_HEADERS 78 | 79 | /* whether byteorder is bigendian */ 80 | #undef WORDS_BIGENDIAN 81 | 82 | /* Define to specify how much context to retain around the current parse 83 | point. */ 84 | #undef XML_CONTEXT_BYTES 85 | 86 | /* Define to make parameter entity parsing functionality available. */ 87 | #undef XML_DTD 88 | 89 | /* Define to make XML Namespaces functionality available. */ 90 | #undef XML_NS 91 | 92 | /* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */ 93 | #undef __func__ 94 | 95 | /* Define to empty if `const' does not conform to ANSI C. */ 96 | #undef const 97 | 98 | /* Define to `long int' if does not define. */ 99 | #undef off_t 100 | 101 | /* Define to `unsigned int' if does not define. */ 102 | #undef size_t 103 | -------------------------------------------------------------------------------- /deps/libexpat/MANIFEST: -------------------------------------------------------------------------------- 1 | amiga/launch.c 2 | amiga/expat_68k.c 3 | amiga/expat_68k.h 4 | amiga/expat_68k_handler_stubs.c 5 | amiga/expat_base.h 6 | amiga/expat_vectors.c 7 | amiga/expat_lib.c 8 | amiga/expat.xml 9 | amiga/README.txt 10 | amiga/Makefile 11 | amiga/include/proto/expat.h 12 | amiga/include/libraries/expat.h 13 | amiga/include/interfaces/expat.h 14 | amiga/include/inline4/expat.h 15 | bcb5/README.txt 16 | bcb5/all_projects.bpg 17 | bcb5/elements.bpf 18 | bcb5/elements.bpr 19 | bcb5/elements.mak 20 | bcb5/expat.bpf 21 | bcb5/expat.bpr 22 | bcb5/expat.mak 23 | bcb5/expat_static.bpf 24 | bcb5/expat_static.bpr 25 | bcb5/expat_static.mak 26 | bcb5/expatw.bpf 27 | bcb5/expatw.bpr 28 | bcb5/expatw.mak 29 | bcb5/expatw_static.bpf 30 | bcb5/expatw_static.bpr 31 | bcb5/expatw_static.mak 32 | bcb5/libexpat_mtd.def 33 | bcb5/libexpatw_mtd.def 34 | bcb5/makefile.mak 35 | bcb5/outline.bpf 36 | bcb5/outline.bpr 37 | bcb5/outline.mak 38 | bcb5/setup.bat 39 | bcb5/xmlwf.bpf 40 | bcb5/xmlwf.bpr 41 | bcb5/xmlwf.mak 42 | doc/expat.png 43 | doc/reference.html 44 | doc/style.css 45 | doc/valid-xhtml10.png 46 | doc/xmlwf.1 47 | doc/xmlwf.xml 48 | CMakeLists.txt 49 | CMake.README 50 | COPYING 51 | Changes 52 | ConfigureChecks.cmake 53 | MANIFEST 54 | Makefile.in 55 | README 56 | configure 57 | configure.ac 58 | expat_config.h.in 59 | expat_config.h.cmake 60 | expat.pc.in 61 | expat.dsw 62 | aclocal.m4 63 | conftools/PrintPath 64 | conftools/ac_c_bigendian_cross.m4 65 | conftools/expat.m4 66 | conftools/get-version.sh 67 | conftools/mkinstalldirs 68 | conftools/config.guess 69 | conftools/config.sub 70 | conftools/install-sh 71 | conftools/ltmain.sh 72 | m4/libtool.m4 73 | m4/ltversion.m4 74 | m4/ltoptions.m4 75 | m4/ltsugar.m4 76 | m4/lt~obsolete.m4 77 | examples/elements.c 78 | examples/elements.dsp 79 | examples/outline.c 80 | examples/outline.dsp 81 | lib/Makefile.MPW 82 | lib/amigaconfig.h 83 | lib/ascii.h 84 | lib/asciitab.h 85 | lib/expat.dsp 86 | lib/expat.h 87 | lib/expat_external.h 88 | lib/expat_static.dsp 89 | lib/expatw.dsp 90 | lib/expatw_static.dsp 91 | lib/iasciitab.h 92 | lib/internal.h 93 | lib/latin1tab.h 94 | lib/libexpat.def 95 | lib/libexpatw.def 96 | lib/macconfig.h 97 | lib/nametab.h 98 | lib/utf8tab.h 99 | lib/winconfig.h 100 | lib/xmlparse.c 101 | lib/xmlrole.c 102 | lib/xmlrole.h 103 | lib/xmltok.c 104 | lib/xmltok.h 105 | lib/xmltok_impl.c 106 | lib/xmltok_impl.h 107 | lib/xmltok_ns.c 108 | tests/benchmark/README.txt 109 | tests/benchmark/benchmark.c 110 | tests/benchmark/benchmark.dsp 111 | tests/benchmark/benchmark.dsw 112 | tests/README.txt 113 | tests/chardata.c 114 | tests/chardata.h 115 | tests/minicheck.c 116 | tests/minicheck.h 117 | tests/runtests.c 118 | tests/runtestspp.cpp 119 | tests/xmltest.sh 120 | vms/README.vms 121 | vms/descrip.mms 122 | vms/expat_config.h 123 | win32/MANIFEST.txt 124 | win32/README.txt 125 | win32/expat.iss 126 | xmlwf/codepage.c 127 | xmlwf/codepage.h 128 | xmlwf/ct.c 129 | xmlwf/filemap.h 130 | xmlwf/readfilemap.c 131 | xmlwf/unixfilemap.c 132 | xmlwf/win32filemap.c 133 | xmlwf/xmlfile.c 134 | xmlwf/xmlfile.h 135 | xmlwf/xmlmime.c 136 | xmlwf/xmlmime.h 137 | xmlwf/xmltchar.h 138 | xmlwf/xmlurl.h 139 | xmlwf/xmlwf.c 140 | xmlwf/xmlwf.dsp 141 | xmlwf/xmlwin32url.cxx 142 | -------------------------------------------------------------------------------- /deps/libexpat/tests/benchmark/benchmark.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="benchmark" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 | 7 | CFG=benchmark - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "benchmark.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "benchmark.mak" CFG="benchmark - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "benchmark - Win32 Release" (based on "Win32 (x86) Console Application") 21 | !MESSAGE "benchmark - Win32 Debug" (based on "Win32 (x86) Console Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "benchmark - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 0 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "Release" 36 | # PROP BASE Intermediate_Dir "Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 0 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "Release" 41 | # PROP Intermediate_Dir "Release" 42 | # PROP Target_Dir "" 43 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 44 | # ADD CPP /nologo /W3 /GX /O2 /I "..\..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 45 | # ADD BASE RSC /l 0x1009 /d "NDEBUG" 46 | # ADD RSC /l 0x1009 /d "NDEBUG" 47 | BSC32=bscmake.exe 48 | # ADD BASE BSC32 /nologo 49 | # ADD BSC32 /nologo 50 | LINK32=link.exe 51 | # ADD BASE LINK32 /nologo /subsystem:console /machine:I386 52 | # ADD LINK32 libexpat.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\win32\bin\Release" 53 | 54 | !ELSEIF "$(CFG)" == "benchmark - Win32 Debug" 55 | 56 | # PROP BASE Use_MFC 0 57 | # PROP BASE Use_Debug_Libraries 1 58 | # PROP BASE Output_Dir "Debug" 59 | # PROP BASE Intermediate_Dir "Debug" 60 | # PROP BASE Target_Dir "" 61 | # PROP Use_MFC 0 62 | # PROP Use_Debug_Libraries 1 63 | # PROP Output_Dir "Debug" 64 | # PROP Intermediate_Dir "Debug" 65 | # PROP Target_Dir "" 66 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 67 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 68 | # ADD BASE RSC /l 0x1009 /d "_DEBUG" 69 | # ADD RSC /l 0x1009 /d "_DEBUG" 70 | BSC32=bscmake.exe 71 | # ADD BASE BSC32 /nologo 72 | # ADD BSC32 /nologo 73 | LINK32=link.exe 74 | # ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 75 | # ADD LINK32 libexpat.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\win32\bin\Debug" 76 | 77 | !ENDIF 78 | 79 | # Begin Target 80 | 81 | # Name "benchmark - Win32 Release" 82 | # Name "benchmark - Win32 Debug" 83 | # Begin Source File 84 | 85 | SOURCE=.\benchmark.c 86 | # End Source File 87 | # End Target 88 | # End Project 89 | -------------------------------------------------------------------------------- /deps/libexpat/conftools/ac_c_bigendian_cross.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AC_C_BIGENDIAN_CROSS 2 | dnl 3 | dnl Check endianess even when crosscompiling 4 | dnl (partially based on the original AC_C_BIGENDIAN). 5 | dnl 6 | dnl The implementation will create a binary, and instead of running 7 | dnl the binary it will be grep'ed for some symbols that will look 8 | dnl different for different endianess of the binary. 9 | dnl 10 | dnl @version $Id: ac_c_bigendian_cross.m4,v 1.1 2001/07/24 19:51:35 fdrake Exp $ 11 | dnl @author Guido Draheim 12 | dnl 13 | AC_DEFUN([AC_C_BIGENDIAN_CROSS], 14 | [AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian, 15 | [ac_cv_c_bigendian=unknown 16 | # See if sys/param.h defines the BYTE_ORDER macro. 17 | AC_TRY_COMPILE([#include 18 | #include ], [ 19 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN 20 | bogus endian macros 21 | #endif], [# It does; now see whether it defined to BIG_ENDIAN or not. 22 | AC_TRY_COMPILE([#include 23 | #include ], [ 24 | #if BYTE_ORDER != BIG_ENDIAN 25 | not big endian 26 | #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)]) 27 | if test $ac_cv_c_bigendian = unknown; then 28 | AC_TRY_RUN([main () { 29 | /* Are we little or big endian? From Harbison&Steele. */ 30 | union 31 | { 32 | long l; 33 | char c[sizeof (long)]; 34 | } u; 35 | u.l = 1; 36 | exit (u.c[sizeof (long) - 1] == 1); 37 | }], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes, 38 | [ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ]) 39 | fi]) 40 | if test $ac_cv_c_bigendian = unknown; then 41 | AC_MSG_CHECKING(to probe for byte ordering) 42 | [ 43 | cat >conftest.c <&AC_FD_MSG 56 | ac_cv_c_bigendian=yes 57 | fi 58 | if test `grep -l LiTTleEnDian conftest.o` ; then 59 | echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG 60 | if test $ac_cv_c_bigendian = yes ; then 61 | ac_cv_c_bigendian=unknown; 62 | else 63 | ac_cv_c_bigendian=no 64 | fi 65 | fi 66 | echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG 67 | fi 68 | fi 69 | AC_MSG_RESULT($ac_cv_c_bigendian) 70 | fi 71 | if test $ac_cv_c_bigendian = yes; then 72 | AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian]) 73 | BYTEORDER=4321 74 | else 75 | BYTEORDER=1234 76 | fi 77 | AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN]) 78 | if test $ac_cv_c_bigendian = unknown; then 79 | AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian) 80 | fi 81 | ]) 82 | -------------------------------------------------------------------------------- /test/service.js: -------------------------------------------------------------------------------- 1 | var DBus = require('../'); 2 | 3 | // Create a new service, object and interface 4 | var service = DBus.registerService('session', 'test.dbus.TestService'); 5 | var obj = service.createObject('/test/dbus/TestService'); 6 | 7 | // Create interface 8 | 9 | var iface1 = obj.createInterface('test.dbus.TestService.Interface1'); 10 | 11 | iface1.addMethod('NoArgs', { out: DBus.Define(String) }, function(callback) { 12 | callback(null, 'result!'); 13 | }); 14 | 15 | iface1.addMethod('Add', { in: [DBus.Define(Number), DBus.Define(Number)], out: DBus.Define(Number) }, function(n1, n2, callback) { 16 | callback(null, n1 + n2); 17 | }); 18 | 19 | iface1.addMethod('Object', { in: [DBus.Define(Object)], out: DBus.Define(Object) }, function(obj, callback) { 20 | callback(null, obj); 21 | }); 22 | 23 | iface1.addMethod('IntDict', { in: [{ type: 'a{ys}' }], out: { type: 'ay' }}, function (dict, callback) { 24 | callback(null, Object.keys(dict).sort()); 25 | }) 26 | 27 | iface1.addMethod('LongProcess', { out: DBus.Define(Number) }, function(callback) { 28 | setTimeout(function() { 29 | callback(null, 0); 30 | }, 5000).unref(); 31 | }); 32 | 33 | var author = 'Fred Chien'; 34 | iface1.addProperty('Author', { 35 | type: DBus.Define(String), 36 | getter: function(callback) { 37 | callback(null, author); 38 | }, 39 | setter: function(value, callback) { 40 | author = value; 41 | 42 | callback(); 43 | } 44 | }); 45 | 46 | // Read-only property 47 | var url = 'http://stem.mandice.org'; 48 | iface1.addProperty('URL', { 49 | type: DBus.Define(String), 50 | getter: function(callback) { 51 | callback(null, url); 52 | } 53 | }); 54 | 55 | // Signal 56 | var counter = 0; 57 | iface1.addSignal('pump', { 58 | types: [ 59 | DBus.Define(Number) 60 | ] 61 | }); 62 | 63 | iface1.update(); 64 | 65 | // Emit signal per one second 66 | var interval = setInterval(function() { 67 | counter++; 68 | iface1.emit('pump', counter); 69 | }, 1000); 70 | interval.unref(); 71 | 72 | var errors = obj.createInterface('test.dbus.TestService.ErrorInterface'); 73 | 74 | errors.addMethod('ThrowsError', { out: DBus.Define(Number) }, function(callback) { 75 | setTimeout(function() { 76 | callback(new Error('This is an error thrown from the service')); 77 | }, 100); 78 | }); 79 | 80 | errors.addMethod('ThrowsCustomError', { out: DBus.Define(Number) }, function(callback) { 81 | setTimeout(function() { 82 | var error = new DBus.Error('test.dbus.TestService.Error', 'This is an error thrown from the service'); 83 | callback(error); 84 | }, 100); 85 | }); 86 | 87 | errors.addProperty('ErrorProperty', { 88 | type: DBus.Define(String), 89 | getter: function(callback) { 90 | callback(new Error('This is an error thrown from the service')); 91 | } 92 | }); 93 | 94 | errors.update(); 95 | 96 | // Create second interface 97 | var iface2 = obj.createInterface('test.dbus.TestService.Interface2'); 98 | 99 | iface2.addMethod('Hello', { out: DBus.Define(String) }, function(callback) { 100 | callback(null, 'Hello There!'); 101 | }); 102 | 103 | iface2.update(); 104 | 105 | process.send({ message: 'ready' }); 106 | process.on('message', function(msg) { 107 | if (msg.message === 'done') { 108 | clearInterval(interval); 109 | service.disconnect(); 110 | process.removeAllListeners('message'); 111 | } 112 | }); 113 | -------------------------------------------------------------------------------- /deps/libexpat/tests/benchmark/benchmark.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "expat.h" 6 | 7 | #if defined(__amigaos__) && defined(__USE_INLINE__) 8 | #include 9 | #endif 10 | 11 | #ifdef XML_LARGE_SIZE 12 | #define XML_FMT_INT_MOD "ll" 13 | #else 14 | #define XML_FMT_INT_MOD "l" 15 | #endif 16 | 17 | static void 18 | usage(const char *prog, int rc) 19 | { 20 | fprintf(stderr, 21 | "usage: %s [-n] filename bufferSize nr_of_loops\n", prog); 22 | exit(rc); 23 | } 24 | 25 | int main (int argc, char *argv[]) 26 | { 27 | XML_Parser parser; 28 | char *XMLBuf, *XMLBufEnd, *XMLBufPtr; 29 | FILE *fd; 30 | struct stat fileAttr; 31 | int nrOfLoops, bufferSize, fileSize, i, isFinal; 32 | int j = 0, ns = 0; 33 | clock_t tstart, tend; 34 | double cpuTime = 0.0; 35 | 36 | if (argc > 1) { 37 | if (argv[1][0] == '-') { 38 | if (argv[1][1] == 'n' && argv[1][2] == '\0') { 39 | ns = 1; 40 | j = 1; 41 | } 42 | else 43 | usage(argv[0], 1); 44 | } 45 | } 46 | 47 | if (argc != j + 4) 48 | usage(argv[0], 1); 49 | 50 | if (stat (argv[j + 1], &fileAttr) != 0) { 51 | fprintf (stderr, "could not access file '%s'\n", argv[j + 1]); 52 | return 2; 53 | } 54 | 55 | fd = fopen (argv[j + 1], "r"); 56 | if (!fd) { 57 | fprintf (stderr, "could not open file '%s'\n", argv[j + 1]); 58 | exit(2); 59 | } 60 | 61 | bufferSize = atoi (argv[j + 2]); 62 | nrOfLoops = atoi (argv[j + 3]); 63 | if (bufferSize <= 0 || nrOfLoops <= 0) { 64 | fprintf (stderr, 65 | "buffer size and nr of loops must be greater than zero.\n"); 66 | exit(3); 67 | } 68 | 69 | XMLBuf = malloc (fileAttr.st_size); 70 | fileSize = fread (XMLBuf, sizeof (char), fileAttr.st_size, fd); 71 | fclose (fd); 72 | 73 | if (ns) 74 | parser = XML_ParserCreateNS(NULL, '!'); 75 | else 76 | parser = XML_ParserCreate(NULL); 77 | 78 | i = 0; 79 | XMLBufEnd = XMLBuf + fileSize; 80 | while (i < nrOfLoops) { 81 | XMLBufPtr = XMLBuf; 82 | isFinal = 0; 83 | tstart = clock(); 84 | do { 85 | int parseBufferSize = XMLBufEnd - XMLBufPtr; 86 | if (parseBufferSize <= bufferSize) 87 | isFinal = 1; 88 | else 89 | parseBufferSize = bufferSize; 90 | if (!XML_Parse (parser, XMLBufPtr, parseBufferSize, isFinal)) { 91 | fprintf (stderr, "error '%s' at line %" XML_FMT_INT_MOD \ 92 | "u character %" XML_FMT_INT_MOD "u\n", 93 | XML_ErrorString (XML_GetErrorCode (parser)), 94 | XML_GetCurrentLineNumber (parser), 95 | XML_GetCurrentColumnNumber (parser)); 96 | free (XMLBuf); 97 | XML_ParserFree (parser); 98 | exit (4); 99 | } 100 | XMLBufPtr += bufferSize; 101 | } while (!isFinal); 102 | tend = clock(); 103 | cpuTime += ((double) (tend - tstart)) / CLOCKS_PER_SEC; 104 | XML_ParserReset(parser, NULL); 105 | i++; 106 | } 107 | 108 | XML_ParserFree (parser); 109 | free (XMLBuf); 110 | 111 | printf ("%d loops, with buffer size %d. Average time per loop: %f\n", 112 | nrOfLoops, bufferSize, cpuTime / (double) nrOfLoops); 113 | return 0; 114 | } 115 | -------------------------------------------------------------------------------- /deps/libexpat/expat_config.h: -------------------------------------------------------------------------------- 1 | /* expat_config.h. Generated from expat_config.h.in by configure. */ 2 | /* expat_config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ 5 | #define BYTEORDER 1234 6 | 7 | /* Define to 1 if you have the `bcopy' function. */ 8 | #define HAVE_BCOPY 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_DLFCN_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_FCNTL_H 1 15 | 16 | /* Define to 1 if you have the `getpagesize' function. */ 17 | #define HAVE_GETPAGESIZE 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_INTTYPES_H 1 21 | 22 | /* Define to 1 if you have the `memmove' function. */ 23 | #define HAVE_MEMMOVE 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_MEMORY_H 1 27 | 28 | /* Define to 1 if you have a working `mmap' system call. */ 29 | #define HAVE_MMAP 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_STDINT_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_STDLIB_H 1 36 | 37 | /* Define to 1 if you have the header file. */ 38 | #define HAVE_STRINGS_H 1 39 | 40 | /* Define to 1 if you have the header file. */ 41 | #define HAVE_STRING_H 1 42 | 43 | /* Define to 1 if you have the header file. */ 44 | #define HAVE_SYS_PARAM_H 1 45 | 46 | /* Define to 1 if you have the header file. */ 47 | #define HAVE_SYS_STAT_H 1 48 | 49 | /* Define to 1 if you have the header file. */ 50 | #define HAVE_SYS_TYPES_H 1 51 | 52 | /* Define to 1 if you have the header file. */ 53 | #define HAVE_UNISTD_H 1 54 | 55 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 56 | */ 57 | #define LT_OBJDIR ".libs/" 58 | 59 | /* Define to the address where bug reports for this package should be sent. */ 60 | #define PACKAGE_BUGREPORT "expat-bugs@libexpat.org" 61 | 62 | /* Define to the full name of this package. */ 63 | #define PACKAGE_NAME "expat" 64 | 65 | /* Define to the full name and version of this package. */ 66 | #define PACKAGE_STRING "expat 2.1.0" 67 | 68 | /* Define to the one symbol short name of this package. */ 69 | #define PACKAGE_TARNAME "expat" 70 | 71 | /* Define to the home page for this package. */ 72 | #define PACKAGE_URL "" 73 | 74 | /* Define to the version of this package. */ 75 | #define PACKAGE_VERSION "2.1.0" 76 | 77 | /* Define to 1 if you have the ANSI C header files. */ 78 | #define STDC_HEADERS 1 79 | 80 | /* whether byteorder is bigendian */ 81 | /* #undef WORDS_BIGENDIAN */ 82 | 83 | /* Define to specify how much context to retain around the current parse 84 | point. */ 85 | #define XML_CONTEXT_BYTES 1024 86 | 87 | /* Define to make parameter entity parsing functionality available. */ 88 | #define XML_DTD 1 89 | 90 | /* Define to make XML Namespaces functionality available. */ 91 | #define XML_NS 1 92 | 93 | /* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */ 94 | /* #undef __func__ */ 95 | 96 | /* Define to empty if `const' does not conform to ANSI C. */ 97 | /* #undef const */ 98 | 99 | /* Define to `long int' if does not define. */ 100 | /* #undef off_t */ 101 | 102 | /* Define to `unsigned int' if does not define. */ 103 | /* #undef size_t */ 104 | -------------------------------------------------------------------------------- /deps/libexpat/amiga/README.txt: -------------------------------------------------------------------------------- 1 | SUMMARY 2 | ======= 3 | This is a port of expat for AmigaOS 4.x which includes the 4 | SDK, some XML tools and the libraries. 5 | 6 | Four library flavours are supported: 7 | 1. static clib2 (libexpat.a) 8 | 2. static newlib (libexpat.a) 9 | 3. AmigaOS library (expat.library) 10 | 4. AmigaOS shared object library (libexpat.so) 11 | 12 | The AmigaOS library version is based on the work of Fredrik Wikstrom. 13 | 14 | 15 | BUILDING 16 | ======== 17 | To build all the library flavours, all the tools, examples and run the 18 | test suite, simply type 'make all' in the amiga subdirectory. 19 | 20 | 21 | INSTALLATION 22 | ============ 23 | To install expat into the standard AmigaOS SDK type 'make install' 24 | in the amiga subdirectory. 25 | 26 | 27 | CONFIGURATION 28 | ============= 29 | You may want to edit the lib/amigaconfig.h file to remove 30 | DTD and/or XML namespace support if they are not required by your 31 | specific application for a smaller and faster implementation. 32 | 33 | 34 | SOURCE CODE 35 | =========== 36 | The source code is actively maintained and merged with the official 37 | Expat repository available at http://expat.sourceforge.net/ 38 | 39 | 40 | HISTORY 41 | ======= 42 | 53.1 - bumped version to match AmigaOS streaming 43 | - modified to remove all global variables (except INewLib) 44 | - removed replacements for malloc(), etc. which are now 45 | handled by the respective C library 46 | - compiled with the latest binutils which bumps the 47 | AMIGAOS_DYNVERSION to 2 for the libexpat.so target 48 | - now strips the expat.library binary 49 | 50 | 5.2 - fixed XML_Parse 68k stub which enables xmlviewer to work 51 | without crashing 52 | - added some new functions to the 68k jump table available 53 | in the latest expat.library for AmigaOS 3.x 54 | - patches provided by Fredrik Wikstrom 55 | 56 | 5.1 - fixed package archive which was missing libexpat.so 57 | - fixed library protection bits 58 | - fixed up copyright notices 59 | 60 | 5.0 - integrated 68k patches from Fredrik Wikstrom which means 61 | expat.library is now callable from 68k code 62 | - bumped version for the addition of the 68k interface so 63 | executables can explicitly ask for version 5 and know 64 | it includes the 68k interface 65 | - refactored Makefile to avoid recursive make calls and 66 | build all the library flavours 67 | - added static newlib version 68 | - added shared objects version 69 | - added package target to Makefile 70 | - compiled with SDK 53.13 (GCC 4.2.4) at -O3 71 | 72 | 4.2 - updated to correspond to Expat 2.0.1 release 73 | - bumped copyright banners and versions 74 | - simplified amigaconfig.h 75 | - updated include/libraries/expat.h file 76 | - modified launch.c to use contructor/deconstructor 77 | - removed need for amiga_main() from expat utilities 78 | 79 | 4.1 - fixed memory freeing bug in shared library version 80 | - now allocates shared memory 81 | 82 | 4.0 - updated for corresponding Expat 2.0 release 83 | - some minor CVS related changes 84 | 85 | 3.1 - removed obsolete sfd file 86 | - added library description xml file 87 | - refactored Makefile 88 | - removed extraneous VARARGS68K keywords 89 | - reworked default memory handling functions in shared lib 90 | - updated amigaconfig.h 91 | 92 | 3.0 - initial release 93 | - based on expat 1.95.8 94 | 95 | 96 | TO DO 97 | ===== 98 | - wide character support (UTF-16) 99 | -------------------------------------------------------------------------------- /deps/libexpat/win32/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Expat can be built on Windows in three ways: 3 | using MS Visual C++ (6.0 or .NET), Borland C++ Builder 5 or Cygwin. 4 | 5 | * Cygwin: 6 | This follows the Unix build procedures. 7 | 8 | * C++ Builder 5: 9 | Possible with make files in the BCB5 subdirectory. 10 | Details can be found in the ReadMe file located there. 11 | 12 | * MS Visual C++ 6: 13 | Based on the workspace file expat.dsw. The related project 14 | files (.dsp) are located in the lib subdirectory. 15 | 16 | * MS Visual Studio .NET 2002, 2003, 2005, 2008, 2010: 17 | The VC++ 6 workspace file (expat.dsw) and project files (.dsp) 18 | can be opened and imported in VS.NET without problems. 19 | Note: Tests have their own *.dsw files. 20 | 21 | * MS Visual Studio 2013 and 2015: 22 | A solution file for Visual Studio 2013 is provided: expat.sln. 23 | The associated project files (*.vcxproj) reside in the appropriate 24 | project directories. This solution file can be opened in VS 2015 25 | and should be upgraded automatically if VS 2013 is not also installed. 26 | Note: Tests have their own solution files. 27 | 28 | * All MS C/C++ compilers: 29 | The output for all projects will be generated in the win32\bin 30 | directory, intermediate files will be located in project-specific 31 | subdirectories of win32\tmp. 32 | 33 | * Creating MinGW dynamic libraries from MS VC++ DLLs: 34 | 35 | On the command line, execute these steps: 36 | pexports libexpat.dll > expat.def 37 | pexports libexpatw.dll > expatw.def 38 | dlltool -d expat.def -l libexpat.a 39 | dlltool -d expatw.def -l libexpatw.a 40 | 41 | The *.a files are mingw libraries. 42 | 43 | * Special note about MS VC++ and runtime libraries: 44 | 45 | There are three possible configurations: using the 46 | single threaded or multithreaded run-time library, 47 | or using the multi-threaded run-time Dll. That is, 48 | one can build three different Expat libraries depending 49 | on the needs of the application. 50 | 51 | Dynamic Linking: 52 | 53 | By default the Expat Dlls are built to link statically 54 | with the multi-threaded run-time library. 55 | The libraries are named 56 | - libexpat(w).dll 57 | - libexpat(w).lib (import library) 58 | The "w" indicates the UTF-16 version of the library. 59 | 60 | One rarely uses other versions of the Dll, but they can 61 | be built easily by specifying a different RTL linkage in 62 | the IDE on the C/C++ tab under the category Code Generation. 63 | 64 | Static Linking: 65 | 66 | The libraries should be named like this: 67 | Single-theaded: libexpat(w)ML.lib 68 | Multi-threaded: libexpat(w)MT.lib 69 | Multi-threaded Dll: libexpat(w)MD.lib 70 | The suffixes conform to the compiler switch settings 71 | /ML, /MT and /MD for MS VC++. 72 | 73 | Note: In Visual Studio 2005 (Visual C++ 8.0) and later, the 74 | single-threaded runtime library is not supported anymore. 75 | 76 | By default, the expat-static and expatw-static projects are set up 77 | to link statically against the multithreaded run-time library, 78 | so they will build libexpatMT.lib or libexpatwMT.lib files. 79 | 80 | To build the other versions of the static library, 81 | go to Project - Settings: 82 | - specify a different RTL linkage on the C/C++ tab 83 | under the category Code Generation. 84 | - then, on the Library tab, change the output file name 85 | accordingly, as described above 86 | 87 | An application linking to the static libraries must 88 | have the global macro XML_STATIC defined. 89 | -------------------------------------------------------------------------------- /deps/libexpat/lib/xmlrole.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | #ifndef XmlRole_INCLUDED 6 | #define XmlRole_INCLUDED 1 7 | 8 | #ifdef __VMS 9 | /* 0 1 2 3 0 1 2 3 10 | 1234567890123456789012345678901 1234567890123456789012345678901 */ 11 | #define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt 12 | #endif 13 | 14 | #include "xmltok.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | enum { 21 | XML_ROLE_ERROR = -1, 22 | XML_ROLE_NONE = 0, 23 | XML_ROLE_XML_DECL, 24 | XML_ROLE_INSTANCE_START, 25 | XML_ROLE_DOCTYPE_NONE, 26 | XML_ROLE_DOCTYPE_NAME, 27 | XML_ROLE_DOCTYPE_SYSTEM_ID, 28 | XML_ROLE_DOCTYPE_PUBLIC_ID, 29 | XML_ROLE_DOCTYPE_INTERNAL_SUBSET, 30 | XML_ROLE_DOCTYPE_CLOSE, 31 | XML_ROLE_GENERAL_ENTITY_NAME, 32 | XML_ROLE_PARAM_ENTITY_NAME, 33 | XML_ROLE_ENTITY_NONE, 34 | XML_ROLE_ENTITY_VALUE, 35 | XML_ROLE_ENTITY_SYSTEM_ID, 36 | XML_ROLE_ENTITY_PUBLIC_ID, 37 | XML_ROLE_ENTITY_COMPLETE, 38 | XML_ROLE_ENTITY_NOTATION_NAME, 39 | XML_ROLE_NOTATION_NONE, 40 | XML_ROLE_NOTATION_NAME, 41 | XML_ROLE_NOTATION_SYSTEM_ID, 42 | XML_ROLE_NOTATION_NO_SYSTEM_ID, 43 | XML_ROLE_NOTATION_PUBLIC_ID, 44 | XML_ROLE_ATTRIBUTE_NAME, 45 | XML_ROLE_ATTRIBUTE_TYPE_CDATA, 46 | XML_ROLE_ATTRIBUTE_TYPE_ID, 47 | XML_ROLE_ATTRIBUTE_TYPE_IDREF, 48 | XML_ROLE_ATTRIBUTE_TYPE_IDREFS, 49 | XML_ROLE_ATTRIBUTE_TYPE_ENTITY, 50 | XML_ROLE_ATTRIBUTE_TYPE_ENTITIES, 51 | XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN, 52 | XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS, 53 | XML_ROLE_ATTRIBUTE_ENUM_VALUE, 54 | XML_ROLE_ATTRIBUTE_NOTATION_VALUE, 55 | XML_ROLE_ATTLIST_NONE, 56 | XML_ROLE_ATTLIST_ELEMENT_NAME, 57 | XML_ROLE_IMPLIED_ATTRIBUTE_VALUE, 58 | XML_ROLE_REQUIRED_ATTRIBUTE_VALUE, 59 | XML_ROLE_DEFAULT_ATTRIBUTE_VALUE, 60 | XML_ROLE_FIXED_ATTRIBUTE_VALUE, 61 | XML_ROLE_ELEMENT_NONE, 62 | XML_ROLE_ELEMENT_NAME, 63 | XML_ROLE_CONTENT_ANY, 64 | XML_ROLE_CONTENT_EMPTY, 65 | XML_ROLE_CONTENT_PCDATA, 66 | XML_ROLE_GROUP_OPEN, 67 | XML_ROLE_GROUP_CLOSE, 68 | XML_ROLE_GROUP_CLOSE_REP, 69 | XML_ROLE_GROUP_CLOSE_OPT, 70 | XML_ROLE_GROUP_CLOSE_PLUS, 71 | XML_ROLE_GROUP_CHOICE, 72 | XML_ROLE_GROUP_SEQUENCE, 73 | XML_ROLE_CONTENT_ELEMENT, 74 | XML_ROLE_CONTENT_ELEMENT_REP, 75 | XML_ROLE_CONTENT_ELEMENT_OPT, 76 | XML_ROLE_CONTENT_ELEMENT_PLUS, 77 | XML_ROLE_PI, 78 | XML_ROLE_COMMENT, 79 | #ifdef XML_DTD 80 | XML_ROLE_TEXT_DECL, 81 | XML_ROLE_IGNORE_SECT, 82 | XML_ROLE_INNER_PARAM_ENTITY_REF, 83 | #endif /* XML_DTD */ 84 | XML_ROLE_PARAM_ENTITY_REF 85 | }; 86 | 87 | typedef struct prolog_state { 88 | int (PTRCALL *handler) (struct prolog_state *state, 89 | int tok, 90 | const char *ptr, 91 | const char *end, 92 | const ENCODING *enc); 93 | unsigned level; 94 | int role_none; 95 | #ifdef XML_DTD 96 | unsigned includeLevel; 97 | int documentEntity; 98 | int inEntityValue; 99 | #endif /* XML_DTD */ 100 | } PROLOG_STATE; 101 | 102 | void XmlPrologStateInit(PROLOG_STATE *); 103 | #ifdef XML_DTD 104 | void XmlPrologStateInitExternalEntity(PROLOG_STATE *); 105 | #endif /* XML_DTD */ 106 | 107 | #define XmlTokenRole(state, tok, ptr, end, enc) \ 108 | (((state)->handler)(state, tok, ptr, end, enc)) 109 | 110 | #ifdef __cplusplus 111 | } 112 | #endif 113 | 114 | #endif /* not XmlRole_INCLUDED */ 115 | -------------------------------------------------------------------------------- /deps/libexpat/tests/chardata.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998-2003 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | 4 | chardata.c 5 | */ 6 | 7 | #ifdef HAVE_EXPAT_CONFIG_H 8 | #include 9 | #endif 10 | #include "minicheck.h" 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include "chardata.h" 17 | 18 | 19 | static int 20 | xmlstrlen(const XML_Char *s) 21 | { 22 | int len = 0; 23 | assert(s != NULL); 24 | while (s[len] != 0) 25 | ++len; 26 | return len; 27 | } 28 | 29 | 30 | void 31 | CharData_Init(CharData *storage) 32 | { 33 | assert(storage != NULL); 34 | storage->count = -1; 35 | } 36 | 37 | void 38 | CharData_AppendString(CharData *storage, const char *s) 39 | { 40 | int maxchars = sizeof(storage->data) / sizeof(storage->data[0]); 41 | int len; 42 | 43 | assert(s != NULL); 44 | len = strlen(s); 45 | if (storage->count < 0) 46 | storage->count = 0; 47 | if ((len + storage->count) > maxchars) { 48 | len = (maxchars - storage->count); 49 | } 50 | if (len + storage->count < (int)sizeof(storage->data)) { 51 | memcpy(storage->data + storage->count, s, len); 52 | storage->count += len; 53 | } 54 | } 55 | 56 | void 57 | CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len) 58 | { 59 | int maxchars; 60 | 61 | assert(storage != NULL); 62 | assert(s != NULL); 63 | maxchars = sizeof(storage->data) / sizeof(storage->data[0]); 64 | if (storage->count < 0) 65 | storage->count = 0; 66 | if (len < 0) 67 | len = xmlstrlen(s); 68 | if ((len + storage->count) > maxchars) { 69 | len = (maxchars - storage->count); 70 | } 71 | if (len + storage->count < (int)sizeof(storage->data)) { 72 | memcpy(storage->data + storage->count, s, 73 | len * sizeof(storage->data[0])); 74 | storage->count += len; 75 | } 76 | } 77 | 78 | int 79 | CharData_CheckString(CharData *storage, const char *expected) 80 | { 81 | char buffer[1280]; 82 | int len; 83 | int count; 84 | 85 | assert(storage != NULL); 86 | assert(expected != NULL); 87 | count = (storage->count < 0) ? 0 : storage->count; 88 | len = strlen(expected); 89 | if (len != count) { 90 | if (sizeof(XML_Char) == 1) 91 | sprintf(buffer, "wrong number of data characters:" 92 | " got %d, expected %d:\n%s", count, len, storage->data); 93 | else 94 | sprintf(buffer, 95 | "wrong number of data characters: got %d, expected %d", 96 | count, len); 97 | fail(buffer); 98 | return 0; 99 | } 100 | if (memcmp(expected, storage->data, len) != 0) { 101 | fail("got bad data bytes"); 102 | return 0; 103 | } 104 | return 1; 105 | } 106 | 107 | int 108 | CharData_CheckXMLChars(CharData *storage, const XML_Char *expected) 109 | { 110 | char buffer[1024]; 111 | int len = xmlstrlen(expected); 112 | int count; 113 | 114 | assert(storage != NULL); 115 | count = (storage->count < 0) ? 0 : storage->count; 116 | if (len != count) { 117 | sprintf(buffer, "wrong number of data characters: got %d, expected %d", 118 | count, len); 119 | fail(buffer); 120 | return 0; 121 | } 122 | if (memcmp(expected, storage->data, len * sizeof(storage->data[0])) != 0) { 123 | fail("got bad data bytes"); 124 | return 0; 125 | } 126 | return 1; 127 | } 128 | -------------------------------------------------------------------------------- /deps/libexpat/xmlwf/ct.c: -------------------------------------------------------------------------------- 1 | #define CHARSET_MAX 41 2 | 3 | static const char * 4 | getTok(const char **pp) 5 | { 6 | enum { inAtom, inString, init, inComment }; 7 | int state = init; 8 | const char *tokStart = 0; 9 | for (;;) { 10 | switch (**pp) { 11 | case '\0': 12 | return 0; 13 | case ' ': 14 | case '\r': 15 | case '\t': 16 | case '\n': 17 | if (state == inAtom) 18 | return tokStart; 19 | break; 20 | case '(': 21 | if (state == inAtom) 22 | return tokStart; 23 | if (state != inString) 24 | state++; 25 | break; 26 | case ')': 27 | if (state > init) 28 | --state; 29 | else if (state != inString) 30 | return 0; 31 | break; 32 | case ';': 33 | case '/': 34 | case '=': 35 | if (state == inAtom) 36 | return tokStart; 37 | if (state == init) 38 | return (*pp)++; 39 | break; 40 | case '\\': 41 | ++*pp; 42 | if (**pp == '\0') 43 | return 0; 44 | break; 45 | case '"': 46 | switch (state) { 47 | case inString: 48 | ++*pp; 49 | return tokStart; 50 | case inAtom: 51 | return tokStart; 52 | case init: 53 | tokStart = *pp; 54 | state = inString; 55 | break; 56 | } 57 | break; 58 | default: 59 | if (state == init) { 60 | tokStart = *pp; 61 | state = inAtom; 62 | } 63 | break; 64 | } 65 | ++*pp; 66 | } 67 | /* not reached */ 68 | } 69 | 70 | /* key must be lowercase ASCII */ 71 | 72 | static int 73 | matchkey(const char *start, const char *end, const char *key) 74 | { 75 | if (!start) 76 | return 0; 77 | for (; start != end; start++, key++) 78 | if (*start != *key && *start != 'A' + (*key - 'a')) 79 | return 0; 80 | return *key == '\0'; 81 | } 82 | 83 | void 84 | getXMLCharset(const char *buf, char *charset) 85 | { 86 | const char *next, *p; 87 | 88 | charset[0] = '\0'; 89 | next = buf; 90 | p = getTok(&next); 91 | if (matchkey(p, next, "text")) 92 | strcpy(charset, "us-ascii"); 93 | else if (!matchkey(p, next, "application")) 94 | return; 95 | p = getTok(&next); 96 | if (!p || *p != '/') 97 | return; 98 | p = getTok(&next); 99 | if (matchkey(p, next, "xml")) 100 | isXml = 1; 101 | p = getTok(&next); 102 | while (p) { 103 | if (*p == ';') { 104 | p = getTok(&next); 105 | if (matchkey(p, next, "charset")) { 106 | p = getTok(&next); 107 | if (p && *p == '=') { 108 | p = getTok(&next); 109 | if (p) { 110 | char *s = charset; 111 | if (*p == '"') { 112 | while (++p != next - 1) { 113 | if (*p == '\\') 114 | ++p; 115 | if (s == charset + CHARSET_MAX - 1) { 116 | charset[0] = '\0'; 117 | break; 118 | } 119 | *s++ = *p; 120 | } 121 | *s++ = '\0'; 122 | } 123 | else { 124 | if (next - p > CHARSET_MAX - 1) 125 | break; 126 | while (p != next) 127 | *s++ = *p++; 128 | *s = 0; 129 | break; 130 | } 131 | } 132 | } 133 | } 134 | } 135 | else 136 | p = getTok(&next); 137 | } 138 | } 139 | 140 | int 141 | main(int argc, char **argv) 142 | { 143 | char buf[CHARSET_MAX]; 144 | getXMLCharset(argv[1], buf); 145 | printf("charset = \"%s\"\n", buf); 146 | return 0; 147 | } 148 | -------------------------------------------------------------------------------- /deps/libexpat/lib/xmltok_ns.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | /* This file is included! */ 6 | #ifdef XML_TOK_NS_C 7 | 8 | const ENCODING * 9 | NS(XmlGetUtf8InternalEncoding)(void) 10 | { 11 | return &ns(internal_utf8_encoding).enc; 12 | } 13 | 14 | const ENCODING * 15 | NS(XmlGetUtf16InternalEncoding)(void) 16 | { 17 | #if BYTEORDER == 1234 18 | return &ns(internal_little2_encoding).enc; 19 | #elif BYTEORDER == 4321 20 | return &ns(internal_big2_encoding).enc; 21 | #else 22 | const short n = 1; 23 | return (*(const char *)&n 24 | ? &ns(internal_little2_encoding).enc 25 | : &ns(internal_big2_encoding).enc); 26 | #endif 27 | } 28 | 29 | static const ENCODING * const NS(encodings)[] = { 30 | &ns(latin1_encoding).enc, 31 | &ns(ascii_encoding).enc, 32 | &ns(utf8_encoding).enc, 33 | &ns(big2_encoding).enc, 34 | &ns(big2_encoding).enc, 35 | &ns(little2_encoding).enc, 36 | &ns(utf8_encoding).enc /* NO_ENC */ 37 | }; 38 | 39 | static int PTRCALL 40 | NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end, 41 | const char **nextTokPtr) 42 | { 43 | return initScan(NS(encodings), (const INIT_ENCODING *)enc, 44 | XML_PROLOG_STATE, ptr, end, nextTokPtr); 45 | } 46 | 47 | static int PTRCALL 48 | NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end, 49 | const char **nextTokPtr) 50 | { 51 | return initScan(NS(encodings), (const INIT_ENCODING *)enc, 52 | XML_CONTENT_STATE, ptr, end, nextTokPtr); 53 | } 54 | 55 | int 56 | NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr, 57 | const char *name) 58 | { 59 | int i = getEncodingIndex(name); 60 | if (i == UNKNOWN_ENC) 61 | return 0; 62 | SET_INIT_ENC_INDEX(p, i); 63 | p->initEnc.scanners[XML_PROLOG_STATE] = NS(initScanProlog); 64 | p->initEnc.scanners[XML_CONTENT_STATE] = NS(initScanContent); 65 | p->initEnc.updatePosition = initUpdatePosition; 66 | p->encPtr = encPtr; 67 | *encPtr = &(p->initEnc); 68 | return 1; 69 | } 70 | 71 | static const ENCODING * 72 | NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end) 73 | { 74 | #define ENCODING_MAX 128 75 | char buf[ENCODING_MAX]; 76 | char *p = buf; 77 | int i; 78 | XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1); 79 | if (ptr != end) 80 | return 0; 81 | *p = 0; 82 | if (streqci(buf, KW_UTF_16) && enc->minBytesPerChar == 2) 83 | return enc; 84 | i = getEncodingIndex(buf); 85 | if (i == UNKNOWN_ENC) 86 | return 0; 87 | return NS(encodings)[i]; 88 | } 89 | 90 | int 91 | NS(XmlParseXmlDecl)(int isGeneralTextEntity, 92 | const ENCODING *enc, 93 | const char *ptr, 94 | const char *end, 95 | const char **badPtr, 96 | const char **versionPtr, 97 | const char **versionEndPtr, 98 | const char **encodingName, 99 | const ENCODING **encoding, 100 | int *standalone) 101 | { 102 | return doParseXmlDecl(NS(findEncoding), 103 | isGeneralTextEntity, 104 | enc, 105 | ptr, 106 | end, 107 | badPtr, 108 | versionPtr, 109 | versionEndPtr, 110 | encodingName, 111 | encoding, 112 | standalone); 113 | } 114 | 115 | #endif /* XML_TOK_NS_C */ 116 | -------------------------------------------------------------------------------- /deps/libexpat/examples/outline.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="outline" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 | 7 | CFG=outline - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "outline.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "outline.mak" CFG="outline - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "outline - Win32 Release" (based on "Win32 (x86) Console Application") 21 | !MESSAGE "outline - Win32 Debug" (based on "Win32 (x86) Console Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "outline - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 0 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "Release" 36 | # PROP BASE Intermediate_Dir "Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 0 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "..\win32\bin\Release" 41 | # PROP Intermediate_Dir "..\win32\tmp\Release-outline" 42 | # PROP Ignore_Export_Lib 0 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c 46 | # SUBTRACT CPP /X /YX 47 | # ADD BASE RSC /l 0x409 /d "NDEBUG" 48 | # ADD RSC /l 0x409 /d "NDEBUG" 49 | BSC32=bscmake.exe 50 | # ADD BASE BSC32 /nologo 51 | # ADD BSC32 /nologo 52 | LINK32=link.exe 53 | # ADD BASE LINK32 /nologo /subsystem:console /machine:I386 54 | # ADD LINK32 libexpat.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release" /out:"..\win32\bin\Release\outline.exe" 55 | 56 | !ELSEIF "$(CFG)" == "outline - Win32 Debug" 57 | 58 | # PROP BASE Use_MFC 0 59 | # PROP BASE Use_Debug_Libraries 1 60 | # PROP BASE Output_Dir "Debug" 61 | # PROP BASE Intermediate_Dir "Debug" 62 | # PROP BASE Target_Dir "" 63 | # PROP Use_MFC 0 64 | # PROP Use_Debug_Libraries 1 65 | # PROP Output_Dir "..\win32\bin\Debug" 66 | # PROP Intermediate_Dir "..\win32\tmp\Debug-outline" 67 | # PROP Ignore_Export_Lib 0 68 | # PROP Target_Dir "" 69 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 70 | # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c 71 | # ADD BASE RSC /l 0x409 /d "_DEBUG" 72 | # ADD RSC /l 0x409 /d "_DEBUG" 73 | BSC32=bscmake.exe 74 | # ADD BASE BSC32 /nologo 75 | # ADD BSC32 /nologo 76 | LINK32=link.exe 77 | # ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 78 | # ADD LINK32 libexpat.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug" /out:"..\win32\bin\Debug\outline.exe" 79 | 80 | !ENDIF 81 | 82 | # Begin Target 83 | 84 | # Name "outline - Win32 Release" 85 | # Name "outline - Win32 Debug" 86 | # Begin Group "Source Files" 87 | 88 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 89 | # Begin Source File 90 | 91 | SOURCE=.\outline.c 92 | # End Source File 93 | # End Group 94 | # Begin Group "Header Files" 95 | 96 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 97 | # End Group 98 | # Begin Group "Resource Files" 99 | 100 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 101 | # End Group 102 | # End Target 103 | # End Project 104 | -------------------------------------------------------------------------------- /deps/libexpat/examples/elements.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="elements" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 | 7 | CFG=elements - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "elements.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "elements.mak" CFG="elements - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "elements - Win32 Release" (based on "Win32 (x86) Console Application") 21 | !MESSAGE "elements - Win32 Debug" (based on "Win32 (x86) Console Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "elements - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 0 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "Release" 36 | # PROP BASE Intermediate_Dir "Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 0 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "..\win32\bin\Release" 41 | # PROP Intermediate_Dir "..\win32\tmp\Release-elements" 42 | # PROP Ignore_Export_Lib 0 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FD /c 46 | # SUBTRACT CPP /X /YX 47 | # ADD BASE RSC /l 0x409 /d "NDEBUG" 48 | # ADD RSC /l 0x409 /d "NDEBUG" 49 | BSC32=bscmake.exe 50 | # ADD BASE BSC32 /nologo 51 | # ADD BSC32 /nologo 52 | LINK32=link.exe 53 | # ADD BASE LINK32 /nologo /subsystem:console /machine:I386 54 | # ADD LINK32 libexpatMT.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\win32\bin\Release" /out:"..\win32\bin\Release\elements.exe" 55 | 56 | !ELSEIF "$(CFG)" == "elements - Win32 Debug" 57 | 58 | # PROP BASE Use_MFC 0 59 | # PROP BASE Use_Debug_Libraries 1 60 | # PROP BASE Output_Dir "Debug" 61 | # PROP BASE Intermediate_Dir "Debug" 62 | # PROP BASE Target_Dir "" 63 | # PROP Use_MFC 0 64 | # PROP Use_Debug_Libraries 1 65 | # PROP Output_Dir "..\win32\bin\Debug" 66 | # PROP Intermediate_Dir "..\win32\tmp\Debug-elements" 67 | # PROP Ignore_Export_Lib 0 68 | # PROP Target_Dir "" 69 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 70 | # ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FR /FD /GZ /c 71 | # ADD BASE RSC /l 0x409 /d "_DEBUG" 72 | # ADD RSC /l 0x409 /d "_DEBUG" 73 | BSC32=bscmake.exe 74 | # ADD BASE BSC32 /nologo 75 | # ADD BSC32 /nologo 76 | LINK32=link.exe 77 | # ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 78 | # ADD LINK32 libexpatMT.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\win32\bin\Debug" /out:"..\win32\bin\Debug\elements.exe" 79 | 80 | !ENDIF 81 | 82 | # Begin Target 83 | 84 | # Name "elements - Win32 Release" 85 | # Name "elements - Win32 Debug" 86 | # Begin Group "Source Files" 87 | 88 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 89 | # Begin Source File 90 | 91 | SOURCE=.\elements.c 92 | # End Source File 93 | # End Group 94 | # Begin Group "Header Files" 95 | 96 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 97 | # End Group 98 | # Begin Group "Resource Files" 99 | 100 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 101 | # End Group 102 | # End Target 103 | # End Project 104 | -------------------------------------------------------------------------------- /deps/libexpat/xmlwf/xmlmime.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "xmlmime.h" 3 | 4 | static const char * 5 | getTok(const char **pp) 6 | { 7 | /* inComment means one level of nesting; inComment+1 means two levels etc */ 8 | enum { inAtom, inString, init, inComment }; 9 | int state = init; 10 | const char *tokStart = 0; 11 | for (;;) { 12 | switch (**pp) { 13 | case '\0': 14 | if (state == inAtom) 15 | return tokStart; 16 | return 0; 17 | case ' ': 18 | case '\r': 19 | case '\t': 20 | case '\n': 21 | if (state == inAtom) 22 | return tokStart; 23 | break; 24 | case '(': 25 | if (state == inAtom) 26 | return tokStart; 27 | if (state != inString) 28 | state++; 29 | break; 30 | case ')': 31 | if (state > init) 32 | --state; 33 | else if (state != inString) 34 | return 0; 35 | break; 36 | case ';': 37 | case '/': 38 | case '=': 39 | if (state == inAtom) 40 | return tokStart; 41 | if (state == init) 42 | return (*pp)++; 43 | break; 44 | case '\\': 45 | ++*pp; 46 | if (**pp == '\0') 47 | return 0; 48 | break; 49 | case '"': 50 | switch (state) { 51 | case inString: 52 | ++*pp; 53 | return tokStart; 54 | case inAtom: 55 | return tokStart; 56 | case init: 57 | tokStart = *pp; 58 | state = inString; 59 | break; 60 | } 61 | break; 62 | default: 63 | if (state == init) { 64 | tokStart = *pp; 65 | state = inAtom; 66 | } 67 | break; 68 | } 69 | ++*pp; 70 | } 71 | /* not reached */ 72 | } 73 | 74 | /* key must be lowercase ASCII */ 75 | 76 | static int 77 | matchkey(const char *start, const char *end, const char *key) 78 | { 79 | if (!start) 80 | return 0; 81 | for (; start != end; start++, key++) 82 | if (*start != *key && *start != 'A' + (*key - 'a')) 83 | return 0; 84 | return *key == '\0'; 85 | } 86 | 87 | void 88 | getXMLCharset(const char *buf, char *charset) 89 | { 90 | const char *next, *p; 91 | 92 | charset[0] = '\0'; 93 | next = buf; 94 | p = getTok(&next); 95 | if (matchkey(p, next, "text")) 96 | strcpy(charset, "us-ascii"); 97 | else if (!matchkey(p, next, "application")) 98 | return; 99 | p = getTok(&next); 100 | if (!p || *p != '/') 101 | return; 102 | p = getTok(&next); 103 | #if 0 104 | if (!matchkey(p, next, "xml") && charset[0] == '\0') 105 | return; 106 | #endif 107 | p = getTok(&next); 108 | while (p) { 109 | if (*p == ';') { 110 | p = getTok(&next); 111 | if (matchkey(p, next, "charset")) { 112 | p = getTok(&next); 113 | if (p && *p == '=') { 114 | p = getTok(&next); 115 | if (p) { 116 | char *s = charset; 117 | if (*p == '"') { 118 | while (++p != next - 1) { 119 | if (*p == '\\') 120 | ++p; 121 | if (s == charset + CHARSET_MAX - 1) { 122 | charset[0] = '\0'; 123 | break; 124 | } 125 | *s++ = *p; 126 | } 127 | *s++ = '\0'; 128 | } 129 | else { 130 | if (next - p > CHARSET_MAX - 1) 131 | break; 132 | while (p != next) 133 | *s++ = *p++; 134 | *s = 0; 135 | break; 136 | } 137 | } 138 | } 139 | break; 140 | } 141 | } 142 | else 143 | p = getTok(&next); 144 | } 145 | } 146 | 147 | #ifdef TEST 148 | 149 | #include 150 | 151 | int 152 | main(int argc, char *argv[]) 153 | { 154 | char buf[CHARSET_MAX]; 155 | if (argc <= 1) 156 | return 1; 157 | printf("%s\n", argv[1]); 158 | getXMLCharset(argv[1], buf); 159 | printf("charset=\"%s\"\n", buf); 160 | return 0; 161 | } 162 | 163 | #endif /* TEST */ 164 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/outline.bpr: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | [Version Info] 49 | IncludeVerInfo=0 50 | AutoIncBuild=0 51 | MajorVer=1 52 | MinorVer=0 53 | Release=0 54 | Build=0 55 | Debug=0 56 | PreRelease=0 57 | Special=0 58 | Private=0 59 | DLL=0 60 | Locale=1033 61 | CodePage=1252 62 | 63 | [Version Info Keys] 64 | CompanyName= 65 | FileDescription= 66 | FileVersion=1.0.0.0 67 | InternalName= 68 | LegalCopyright= 69 | LegalTrademarks= 70 | OriginalFilename= 71 | ProductName= 72 | ProductVersion=1.0.0.0 73 | Comments= 74 | 75 | [HistoryLists\hlIncludePath] 76 | Count=3 77 | Item0=..\examples;$(BCB)\include 78 | Item1=$(BCB)\include 79 | Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; 80 | 81 | [HistoryLists\hlLibraryPath] 82 | Count=4 83 | Item0=..\examples;$(BCB)\lib;$(RELEASELIBPATH) 84 | Item1=..\examples;$(BCB)\lib;..\examples\$(RELEASELIBPATH) 85 | Item2=$(BCB)\lib;$(RELEASELIBPATH) 86 | Item3=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; 87 | 88 | [HistoryLists\hlDebugSourcePath] 89 | Count=1 90 | Item0=$(BCB)\source\vcl 91 | 92 | [HistoryLists\hlConditionals] 93 | Count=6 94 | Item0=WIN32;NDEBUG;_CONSOLE 95 | Item1=WIN32;NDEBUG;_CONSOLE;XML_STATIC 96 | Item2=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_STATIC 97 | Item3=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE;XML_STATIC 98 | Item4=WIN32;NDEBUG;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE 99 | Item5=WIN32;NDEBUG;_CONSOLE;_DEBUG 100 | 101 | [HistoryLists\hlIntOutputDir] 102 | Count=4 103 | Item0=Release\obj\examples 104 | Item1=Release\obj\outline 105 | Item2=..\examples\Release 106 | Item3=Release 107 | 108 | [HistoryLists\hlFinalOutputDir] 109 | Count=1 110 | Item0=Release\ 111 | 112 | [Debugging] 113 | DebugSourceDirs= 114 | 115 | [Parameters] 116 | RunParams= 117 | HostApplication= 118 | RemoteHost= 119 | RemotePath= 120 | RemoteDebug=0 121 | 122 | [Compiler] 123 | ShowInfoMsgs=0 124 | LinkDebugVcl=0 125 | LinkCGLIB=0 126 | 127 | [Language] 128 | ActiveLang= 129 | ProjectLang= 130 | RootDir= 131 | 132 | @ 133 | -------------------------------------------------------------------------------- /examples/service.js: -------------------------------------------------------------------------------- 1 | var DBus = require('../'); 2 | 3 | // Create a new service, object and interface 4 | var service = DBus.registerService('session', 'nodejs.dbus.ExampleService'); 5 | var obj = service.createObject('/nodejs/dbus/ExampleService'); 6 | 7 | // Create interface 8 | 9 | var iface1 = obj.createInterface('nodejs.dbus.ExampleService.Interface1'); 10 | 11 | iface1.addMethod('Dummy', {}, function(callback) { 12 | setTimeout(function() { 13 | callback(); 14 | }, 1000); 15 | }); 16 | 17 | iface1.addMethod('MakeError', { out: DBus.Define(String) }, function(callback) { 18 | callback(new DBus.Error('nodejs.dbus.ExampleService.ErrorTest', 'Some error')); 19 | }); 20 | 21 | iface1.addMethod('Hello', { out: DBus.Define(String) }, function(callback) { 22 | callback(null, 'Hello There!'); 23 | }); 24 | 25 | iface1.addMethod('SendObject', { in: [ DBus.Define(Object) ], out: DBus.Define(Object) }, function(obj, callback) { 26 | callback(null, obj); 27 | }); 28 | 29 | iface1.addMethod('SendVarient', { in: [ DBus.Define('Auto') ], out: DBus.Define('Auto') }, function(obj, callback) { 30 | console.log(obj); 31 | callback(null, obj); 32 | }); 33 | 34 | iface1.addMethod('Ping', { out: DBus.Define(String) }, function(callback) { 35 | callback('Pong!'); 36 | }); 37 | 38 | iface1.addMethod('Equal', { 39 | in: [ 40 | DBus.Define(Number), 41 | DBus.Define(Number) 42 | ], 43 | out: DBus.Define(Boolean) 44 | }, function(a, b, callback) { 45 | 46 | if (a == b) 47 | callback(null, true); 48 | else 49 | callback(null, false); 50 | 51 | }); 52 | 53 | iface1.addMethod('GetNameList', { out: DBus.Define(Array, 'list') }, function(callback) { 54 | callback(null, [ 55 | 'Fred', 56 | 'Stacy', 57 | 'Charles', 58 | 'Rance', 59 | 'Wesley', 60 | 'Frankie' 61 | ]); 62 | }); 63 | 64 | iface1.addMethod('GetContacts', { out: DBus.Define(Object, 'contacts') }, function(callback) { 65 | callback(null, { 66 | Fred: { 67 | email: 'fred@mandice.com', 68 | url: 'http://fred-zone.blogspot.com/', 69 | age: 28, 70 | tel: [ 71 | '09263335xx', 72 | '0936123456' 73 | ] 74 | }, 75 | Stacy: { 76 | email: 'stacy@mandice.com', 77 | age: 28, 78 | url: 'http://www.mandice.com/' 79 | }, 80 | Charles: { 81 | email: 'charles@mandice.com', 82 | url: 'http://www.mandice.com/' 83 | }, 84 | Rance: { 85 | email: 'lzy@mandice.com', 86 | url: 'http://www.mandice.com/' 87 | }, 88 | Wesley: { 89 | email: 'wesley@mandice.org', 90 | url: 'http://www.mandice.org/' 91 | }, 92 | Frankie: { 93 | email: 'frankie@mandice.com', 94 | address: [ 95 | { 96 | country: 'Taipei' 97 | }, 98 | { 99 | country: 'New Taipei' 100 | } 101 | ] 102 | } 103 | }); 104 | }); 105 | 106 | // Writable property 107 | var author = 'Fred Chien'; 108 | iface1.addProperty('Author', { 109 | type: DBus.Define(String), 110 | getter: function(callback) { 111 | callback(null, author); 112 | }, 113 | setter: function(value, complete) { 114 | author = value; 115 | 116 | complete(); 117 | } 118 | }); 119 | 120 | // Read-only property 121 | var url = 'http://stem.mandice.org'; 122 | iface1.addProperty('URL', { 123 | type: DBus.Define(String), 124 | getter: function(callback) { 125 | callback(null, url); 126 | } 127 | }); 128 | 129 | // Read-only property 130 | var jsOS = 'Stem OS'; 131 | iface1.addProperty('JavaScriptOS', { 132 | type: DBus.Define(String), 133 | getter: function(callback) { 134 | callback(null, jsOS); 135 | } 136 | }); 137 | 138 | // Signal 139 | var counter = 0; 140 | iface1.addSignal('pump', { 141 | types: [ 142 | DBus.Define(Number) 143 | ] 144 | }); 145 | 146 | iface1.update(); 147 | 148 | // Emit signal per one second 149 | setInterval(function() { 150 | counter++; 151 | iface1.emit('pump', counter); 152 | }, 1000); 153 | 154 | // Create second interface 155 | var iface2 = obj.createInterface('nodejs.dbus.ExampleService.Interface2'); 156 | 157 | iface2.addMethod('Hello', { out: DBus.Define(String) }, function(callback) { 158 | callback(null, 'Hello There!'); 159 | }); 160 | 161 | iface2.update(); 162 | 163 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/expat_static.bpr: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | [Version Info] 49 | IncludeVerInfo=0 50 | AutoIncBuild=0 51 | MajorVer=1 52 | MinorVer=0 53 | Release=0 54 | Build=0 55 | Debug=0 56 | PreRelease=0 57 | Special=0 58 | Private=0 59 | DLL=0 60 | Locale=1033 61 | CodePage=1252 62 | 63 | [Version Info Keys] 64 | CompanyName= 65 | FileDescription= 66 | FileVersion=1.0.0.0 67 | InternalName= 68 | LegalCopyright= 69 | LegalTrademarks= 70 | OriginalFilename= 71 | ProductName= 72 | ProductVersion=1.0.0.0 73 | Comments= 74 | 75 | [HistoryLists\hlIncludePath] 76 | Count=4 77 | Item0=..\lib;$(BCB)\include 78 | Item1=$(BCB)\include 79 | Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl 80 | Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; 81 | 82 | [HistoryLists\hlLibraryPath] 83 | Count=5 84 | Item0=..\lib;$(BCB)\lib;$(RELEASELIBPATH) 85 | Item1=..\lib;$(BCB)\lib;..\lib\$(RELEASELIBPATH) 86 | Item2=$(BCB)\lib;$(RELEASELIBPATH) 87 | Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk 88 | Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; 89 | 90 | [HistoryLists\hlDebugSourcePath] 91 | Count=1 92 | Item0=$(BCB)\source\vcl 93 | 94 | [HistoryLists\hlConditionals] 95 | Count=7 96 | Item0=_WINDOWS;WIN32;NDEBUG;_LIB;XML_STATIC 97 | Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_LIB;XML_STATIC 98 | Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_LIB;XML_STATIC 99 | Item3=WIN32;_WINDOWS;NDEBUG;_LIB;_DEBUG 100 | Item4=WIN32;_WINDOWS;NDEBUG;_LIB 101 | Item5=WIN32;_WINDOWS;NDEBUG;_LIB;_MBCS 102 | Item6=WIN32;_WINDOWS;NDEBUG;_MBCS;_LIB 103 | 104 | [HistoryLists\hlIntOutputDir] 105 | Count=6 106 | Item0=Release\obj\libexpat_static 107 | Item1=Release\obj\mts 108 | Item2=Release\obj\mt 109 | Item3=Release 110 | Item4=..\lib\Release_static 111 | Item5=Release_static 112 | 113 | [HistoryLists\hlFinalOutputDir] 114 | Count=3 115 | Item0=Release\ 116 | Item1=Release 117 | Item2=Release_static\ 118 | 119 | [HistoryLists\hlTlibPageSize] 120 | Count=1 121 | Item0=0x0010 122 | 123 | [Debugging] 124 | DebugSourceDirs= 125 | 126 | [Parameters] 127 | RunParams= 128 | HostApplication= 129 | RemoteHost= 130 | RemotePath= 131 | RemoteDebug=0 132 | 133 | [Compiler] 134 | ShowInfoMsgs=0 135 | LinkDebugVcl=0 136 | LinkCGLIB=0 137 | 138 | [Language] 139 | ActiveLang= 140 | ProjectLang= 141 | RootDir= 142 | 143 | @ 144 | -------------------------------------------------------------------------------- /src/signal.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "dbus.h" 8 | #include "encoder.h" 9 | #include "signal.h" 10 | 11 | namespace Signal { 12 | 13 | using namespace node; 14 | using namespace v8; 15 | using namespace std; 16 | 17 | // Persistent handler = 18 | // Nan::Persistent::New(Handle::Cast(Nan::Null())); 19 | bool hookSignal = false; 20 | Nan::Persistent handler; 21 | 22 | void DispatchSignal(Local info[]) { 23 | Nan::HandleScope scope; 24 | 25 | if (!hookSignal) return; 26 | 27 | // MakeCallback(handler, handler, 6, info); 28 | Nan::MakeCallback(Nan::GetCurrentContext()->Global(), Nan::New(handler), 6, 29 | info); 30 | } 31 | 32 | NAN_METHOD(SetSignalHandler) { 33 | // handler.Dispose(); 34 | // handler.Clear(); 35 | 36 | hookSignal = true; 37 | handler.Reset(info[0].As()); 38 | // handler = 39 | //Nan::Persistent::New(Handle::Cast(info[0])); 40 | 41 | return; 42 | } 43 | 44 | NAN_METHOD(EmitSignal) { 45 | DBusError error; 46 | 47 | if (!info[0]->IsObject()) { 48 | return Nan::ThrowTypeError("First parameter must be an object"); 49 | } 50 | 51 | // Object path 52 | if (!info[1]->IsString()) { 53 | return Nan::ThrowTypeError("Require object path"); 54 | } 55 | 56 | // Interface name 57 | if (!info[2]->IsString()) { 58 | return Nan::ThrowTypeError("Require interface"); 59 | } 60 | 61 | // Signal name 62 | if (!info[3]->IsString()) { 63 | return Nan::ThrowTypeError("Require signal name"); 64 | } 65 | 66 | // Arguments 67 | if (!info[4]->IsArray()) { 68 | return Nan::ThrowTypeError("Require arguments"); 69 | } 70 | 71 | // Signatures 72 | if (!info[5]->IsArray()) { 73 | return Nan::ThrowTypeError("Require signature"); 74 | } 75 | 76 | node_dbus::BusObject* bus = static_cast( 77 | Nan::GetInternalFieldPointer(info[0]->ToObject( 78 | Nan::GetCurrentContext()).ToLocalChecked(), 0)); 79 | DBusMessage* message; 80 | DBusMessageIter iter; 81 | 82 | // Create a signal 83 | char* path = strdup(*String::Utf8Value( 84 | v8::Isolate::GetCurrent(), 85 | info[1]->ToString(Nan::GetCurrentContext()).ToLocalChecked())); 86 | char* interface = strdup(*String::Utf8Value( 87 | v8::Isolate::GetCurrent(), 88 | info[2]->ToString(Nan::GetCurrentContext()).ToLocalChecked())); 89 | char* signal = strdup(*String::Utf8Value( 90 | v8::Isolate::GetCurrent(), 91 | info[3]->ToString(Nan::GetCurrentContext()).ToLocalChecked())); 92 | message = dbus_message_new_signal(path, interface, signal); 93 | 94 | // Initializing error handler 95 | dbus_error_init(&error); 96 | 97 | // Preparing message 98 | dbus_message_iter_init_append(message, &iter); 99 | 100 | // Preparing arguments 101 | Local arguments = Local::Cast(info[4]); 102 | Local signatures = Local::Cast(info[5]); 103 | for (unsigned int i = 0; i < arguments->Length(); ++i) { 104 | Local arg = arguments->Get( 105 | Nan::GetCurrentContext(), i).ToLocalChecked(); 106 | DBusSignatureIter siter; 107 | 108 | char* sig = strdup(*String::Utf8Value( 109 | v8::Isolate::GetCurrent(), 110 | signatures->Get(Nan::GetCurrentContext(), i).ToLocalChecked()-> 111 | ToString(Nan::GetCurrentContext()).ToLocalChecked())); 112 | if (!dbus_signature_validate(sig, &error)) { 113 | return Nan::ThrowError(error.message); 114 | } 115 | 116 | dbus_signature_iter_init(&siter, sig); 117 | if (!Encoder::EncodeObject(arg, &iter, &siter)) { 118 | dbus_free(sig); 119 | printf("Failed to encode arguments of signal\n"); 120 | break; 121 | } 122 | 123 | dbus_free(sig); 124 | } 125 | 126 | // Send out message 127 | dbus_connection_send(bus->connection, message, nullptr); 128 | dbus_connection_flush(bus->connection); 129 | dbus_message_unref(message); 130 | 131 | dbus_free(path); 132 | dbus_free(interface); 133 | dbus_free(signal); 134 | 135 | return; 136 | } 137 | } // namespace Signal 138 | -------------------------------------------------------------------------------- /deps/libexpat/tests/xmltest.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | # EXPAT TEST SCRIPT FOR W3C XML TEST SUITE 4 | 5 | # This script can be used to exercise Expat against the 6 | # w3c.org xml test suite, available from 7 | # http://www.w3.org/XML/Test/xmlts20020606.zip. 8 | 9 | # To run this script, first set XMLWF below so that xmlwf can be 10 | # found, then set the output directory with OUTPUT. 11 | 12 | # The script lists all test cases where Expat shows a discrepancy 13 | # from the expected result. Test cases where only the canonical 14 | # output differs are prefixed with "Output differs:", and a diff file 15 | # is generated in the appropriate subdirectory under $OUTPUT. 16 | 17 | # If there are output files provided, the script will use 18 | # output from xmlwf and compare the desired output against it. 19 | # However, one has to take into account that the canonical output 20 | # produced by xmlwf conforms to an older definition of canonical XML 21 | # and does not generate notation declarations. 22 | 23 | shopt -s nullglob 24 | 25 | MYDIR="`dirname \"$0\"`" 26 | cd "$MYDIR" 27 | MYDIR="`pwd`" 28 | XMLWF="`dirname \"$MYDIR\"`/xmlwf/xmlwf" 29 | # XMLWF=/usr/local/bin/xmlwf 30 | TS="$MYDIR" 31 | # OUTPUT must terminate with the directory separator. 32 | OUTPUT="$TS/out/" 33 | # OUTPUT=/home/tmp/xml-testsuite-out/ 34 | 35 | 36 | # RunXmlwfNotWF file reldir 37 | # reldir includes trailing slash 38 | RunXmlwfNotWF() { 39 | file="$1" 40 | reldir="$2" 41 | $XMLWF -p "$file" > outfile || return $? 42 | read outdata < outfile 43 | if test "$outdata" = "" ; then 44 | echo "Expected not well-formed: $reldir$file" 45 | return 1 46 | else 47 | return 0 48 | fi 49 | } 50 | 51 | # RunXmlwfWF file reldir 52 | # reldir includes trailing slash 53 | RunXmlwfWF() { 54 | file="$1" 55 | reldir="$2" 56 | $XMLWF -p -d "$OUTPUT$reldir" "$file" > outfile || return $? 57 | read outdata < outfile 58 | if test "$outdata" = "" ; then 59 | if [ -f "out/$file" ] ; then 60 | diff -u "$OUTPUT$reldir$file" "out/$file" > outfile 61 | if [ -s outfile ] ; then 62 | cp outfile "$OUTPUT$reldir$file.diff" 63 | echo "Output differs: $reldir$file" 64 | return 1 65 | fi 66 | fi 67 | return 0 68 | else 69 | echo "In $reldir: $outdata" 70 | return 1 71 | fi 72 | } 73 | 74 | SUCCESS=0 75 | ERROR=0 76 | 77 | UpdateStatus() { 78 | if [ "$1" -eq 0 ] ; then 79 | SUCCESS=`expr $SUCCESS + 1` 80 | else 81 | ERROR=`expr $ERROR + 1` 82 | fi 83 | } 84 | 85 | ########################## 86 | # well-formed test cases # 87 | ########################## 88 | 89 | cd "$TS/xmlconf" 90 | for xmldir in ibm/valid/P* \ 91 | ibm/invalid/P* \ 92 | xmltest/valid/ext-sa \ 93 | xmltest/valid/not-sa \ 94 | xmltest/invalid \ 95 | xmltest/invalid/not-sa \ 96 | xmltest/valid/sa \ 97 | sun/valid \ 98 | sun/invalid ; do 99 | cd "$TS/xmlconf/$xmldir" 100 | mkdir -p "$OUTPUT$xmldir" 101 | for xmlfile in *.xml ; do 102 | RunXmlwfWF "$xmlfile" "$xmldir/" 103 | UpdateStatus $? 104 | done 105 | rm -f outfile 106 | done 107 | 108 | cd "$TS/xmlconf/oasis" 109 | mkdir -p "$OUTPUT"oasis 110 | for xmlfile in *pass*.xml ; do 111 | RunXmlwfWF "$xmlfile" "oasis/" 112 | UpdateStatus $? 113 | done 114 | rm outfile 115 | 116 | ############################## 117 | # not well-formed test cases # 118 | ############################## 119 | 120 | cd "$TS/xmlconf" 121 | for xmldir in ibm/not-wf/P* \ 122 | ibm/not-wf/p28a \ 123 | ibm/not-wf/misc \ 124 | xmltest/not-wf/ext-sa \ 125 | xmltest/not-wf/not-sa \ 126 | xmltest/not-wf/sa \ 127 | sun/not-wf ; do 128 | cd "$TS/xmlconf/$xmldir" 129 | for xmlfile in *.xml ; do 130 | RunXmlwfNotWF "$xmlfile" "$xmldir/" 131 | UpdateStatus $? 132 | done 133 | rm outfile 134 | done 135 | 136 | cd "$TS/xmlconf/oasis" 137 | for xmlfile in *fail*.xml ; do 138 | RunXmlwfNotWF "$xmlfile" "oasis/" 139 | UpdateStatus $? 140 | done 141 | rm outfile 142 | 143 | echo "Passed: $SUCCESS" 144 | echo "Failed: $ERROR" 145 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/xmlwf.bpr: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | [Version Info] 50 | IncludeVerInfo=0 51 | AutoIncBuild=0 52 | MajorVer=1 53 | MinorVer=0 54 | Release=0 55 | Build=0 56 | Debug=0 57 | PreRelease=0 58 | Special=0 59 | Private=0 60 | DLL=0 61 | Locale=1033 62 | CodePage=1252 63 | 64 | [Version Info Keys] 65 | CompanyName= 66 | FileDescription= 67 | FileVersion=1.0.0.0 68 | InternalName= 69 | LegalCopyright= 70 | LegalTrademarks= 71 | OriginalFilename= 72 | ProductName= 73 | ProductVersion=1.0.0.0 74 | Comments= 75 | 76 | [HistoryLists\hlIncludePath] 77 | Count=4 78 | Item0=..\xmlwf;$(BCB)\include 79 | Item1=$(BCB)\include 80 | Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl 81 | Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; 82 | 83 | [HistoryLists\hlLibraryPath] 84 | Count=5 85 | Item0=..\xmlwf;$(BCB)\lib;$(RELEASELIBPATH) 86 | Item1=..\xmlwf;$(BCB)\lib;..\xmlwf\$(RELEASELIBPATH) 87 | Item2=$(BCB)\lib;$(RELEASELIBPATH) 88 | Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk 89 | Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; 90 | 91 | [HistoryLists\hlDebugSourcePath] 92 | Count=1 93 | Item0=$(BCB)\source\vcl 94 | 95 | [HistoryLists\hlConditionals] 96 | Count=6 97 | Item0=NDEBUG;WIN32;_CONSOLE 98 | Item1=NDEBUG;WIN32;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T;_UNICODE 99 | Item2=NDEBUG;WIN32;_CONSOLE;_DEBUG;XML_UNICODE_WCHAR_T 100 | Item3=NDEBUG;WIN32;_CONSOLE;_DEBUG 101 | Item4=NDEBUG;WIN32;_CONSOLE;_DEBUG;_UNICODE;XML_UNICODE_WCHAR_T 102 | Item5=NDEBUG;WIN32;_CONSOLE;_DEBUG;_UNICODE 103 | 104 | [HistoryLists\hlIntOutputDir] 105 | Count=3 106 | Item0=Release\obj\xmlwf 107 | Item1=..\xmlwf\Release 108 | Item2=Release 109 | 110 | [HistoryLists\hlFinalOutputDir] 111 | Count=3 112 | Item0=Release\ 113 | Item1=Release 114 | Item2=.\Release\ 115 | 116 | [Debugging] 117 | DebugSourceDirs= 118 | 119 | [Parameters] 120 | RunParams=sample.xml 121 | HostApplication= 122 | RemoteHost= 123 | RemotePath= 124 | RemoteDebug=0 125 | 126 | [Compiler] 127 | ShowInfoMsgs=0 128 | LinkDebugVcl=0 129 | LinkCGLIB=0 130 | 131 | [Language] 132 | ActiveLang= 133 | ProjectLang= 134 | RootDir= 135 | 136 | @ 137 | -------------------------------------------------------------------------------- /deps/libexpat/amiga/expat_68k.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (c) 2001-2009 Expat maintainers. 3 | ** 4 | ** Permission is hereby granted, free of charge, to any person obtaining 5 | ** a copy of this software and associated documentation files (the 6 | ** "Software"), to deal in the Software without restriction, including 7 | ** without limitation the rights to use, copy, modify, merge, publish, 8 | ** distribute, sublicense, and/or sell copies of the Software, and to 9 | ** permit persons to whom the Software is furnished to do so, subject to 10 | ** the following conditions: 11 | ** 12 | ** The above copyright notice and this permission notice shall be included 13 | ** in all copies or substantial portions of the Software. 14 | ** 15 | ** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21 | ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | */ 23 | 24 | #ifndef EXPAT_68K_H 25 | #define EXPAT_68K_H 26 | 27 | #ifndef LIBRARIES_EXPAT_H 28 | #include 29 | #endif 30 | 31 | typedef struct M68kXML_ParserStruct { 32 | XML_Parser p; 33 | struct ExecIFace *IExec; 34 | void *handlerarg; 35 | void *extenthandlerarg; 36 | void *enchandlerarg; 37 | void *startelementhandler; 38 | void *endelementhandler; 39 | void *chardatahandler; 40 | void *procinsthandler; 41 | void *commenthandler; 42 | void *startcdatahandler; 43 | void *endcdatahandler; 44 | void *defaulthandler; 45 | void *defaulthandlerexp; 46 | void *extentrefhandler; 47 | void *unknownenchandler; 48 | void *startnamespacehandler; 49 | void *endnamespacehandler; 50 | void *xmldeclhandler; 51 | void *startdoctypehandler; 52 | void *enddoctypehandler; 53 | void *elementdeclhandler; 54 | void *attlistdeclhandler; 55 | void *entitydeclhandler; 56 | void *unparseddeclhandler; 57 | void *notationdeclhandler; 58 | void *notstandalonehandler; 59 | void *skippedentityhandler; 60 | } *M68kXML_Parser; 61 | 62 | /* expat_68k_handler_stubs.c */ 63 | void _68k_startelementhandler(void *userdata, const char *name, const char **attrs); 64 | void _68k_endelementhandler(void *userdata, const char *name); 65 | void _68k_chardatahandler(void *userdata, const char *s, int len); 66 | void _68k_procinsthandler(void *userdata, const char *target, const char *data); 67 | void _68k_commenthandler(void *userdata, const char *data); 68 | void _68k_startcdatahandler(void *userdata); 69 | void _68k_endcdatahandler(void *userdata); 70 | void _68k_defaulthandler(void *userdata, const char *s, int len); 71 | void _68k_defaulthandlerexp(void *userdata, const char *s, int len); 72 | int _68k_extentrefhandler(XML_Parser parser, const char *context, const char *base, 73 | const char *sysid, const char *pubid); 74 | int _68k_unknownenchandler(void *enchandlerdata, const char *name, XML_Encoding *info); 75 | void _68k_startnamespacehandler(void *userdata, const char *prefix, const char *uri); 76 | void _68k_endnamespacehandler(void *userdata, const char *prefix); 77 | void _68k_xmldeclhandler(void *userdata, const char *version, const char *encoding, int standalone); 78 | void _68k_startdoctypehandler(void *userdata, const char *doctypename, 79 | const char *sysid, const char *pubid, int has_internal_subset); 80 | void _68k_enddoctypehandler(void *userdata); 81 | void _68k_elementdeclhandler(void *userdata, const char *name, XML_Content *model); 82 | void _68k_attlistdeclhandler(void *userdata, const char *elname, const char *attname, 83 | const char *att_type, const char *dflt, int isrequired); 84 | void _68k_entitydeclhandler(void *userdata, const char *entityname, int is_param_entity, 85 | const char *value, int value_length, const char *base, const char *sysid, const char *pubid, 86 | const char *notationname); 87 | void _68k_unparseddeclhandler(void *userdata, const char *entityname, const char *base, 88 | const char *sysid, const char *pubid, const char *notationname); 89 | void _68k_notationdeclhandler(void *userdata, const char *notationname, const char *base, 90 | const char *sysid, const char *pubid); 91 | int _68k_notstandalonehandler(void *userdata); 92 | void _68k_skippedentityhandler(void *userdata, const char *entityname, int is_param_entity); 93 | 94 | #endif 95 | -------------------------------------------------------------------------------- /deps/libexpat/lib/expat_external.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd 2 | See the file COPYING for copying permission. 3 | */ 4 | 5 | #ifndef Expat_External_INCLUDED 6 | #define Expat_External_INCLUDED 1 7 | 8 | /* External API definitions */ 9 | 10 | #if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) 11 | #define XML_USE_MSC_EXTENSIONS 1 12 | #endif 13 | 14 | /* Expat tries very hard to make the API boundary very specifically 15 | defined. There are two macros defined to control this boundary; 16 | each of these can be defined before including this header to 17 | achieve some different behavior, but doing so it not recommended or 18 | tested frequently. 19 | 20 | XMLCALL - The calling convention to use for all calls across the 21 | "library boundary." This will default to cdecl, and 22 | try really hard to tell the compiler that's what we 23 | want. 24 | 25 | XMLIMPORT - Whatever magic is needed to note that a function is 26 | to be imported from a dynamically loaded library 27 | (.dll, .so, or .sl, depending on your platform). 28 | 29 | The XMLCALL macro was added in Expat 1.95.7. The only one which is 30 | expected to be directly useful in client code is XMLCALL. 31 | 32 | Note that on at least some Unix versions, the Expat library must be 33 | compiled with the cdecl calling convention as the default since 34 | system headers may assume the cdecl convention. 35 | */ 36 | #ifndef XMLCALL 37 | #if defined(_MSC_VER) 38 | #define XMLCALL __cdecl 39 | #elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER) 40 | #define XMLCALL __attribute__((cdecl)) 41 | #else 42 | /* For any platform which uses this definition and supports more than 43 | one calling convention, we need to extend this definition to 44 | declare the convention used on that platform, if it's possible to 45 | do so. 46 | 47 | If this is the case for your platform, please file a bug report 48 | with information on how to identify your platform via the C 49 | pre-processor and how to specify the same calling convention as the 50 | platform's malloc() implementation. 51 | */ 52 | #define XMLCALL 53 | #endif 54 | #endif /* not defined XMLCALL */ 55 | 56 | 57 | #if !defined(XML_STATIC) && !defined(XMLIMPORT) 58 | #ifndef XML_BUILDING_EXPAT 59 | /* using Expat from an application */ 60 | 61 | #ifdef XML_USE_MSC_EXTENSIONS 62 | #define XMLIMPORT __declspec(dllimport) 63 | #endif 64 | 65 | #endif 66 | #endif /* not defined XML_STATIC */ 67 | 68 | #if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4) 69 | #define XMLIMPORT __attribute__ ((visibility ("default"))) 70 | #endif 71 | 72 | /* If we didn't define it above, define it away: */ 73 | #ifndef XMLIMPORT 74 | #define XMLIMPORT 75 | #endif 76 | 77 | #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) 78 | #define XML_ATTR_MALLOC __attribute__((__malloc__)) 79 | #else 80 | #define XML_ATTR_MALLOC 81 | #endif 82 | 83 | #if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) 84 | #define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) 85 | #else 86 | #define XML_ATTR_ALLOC_SIZE(x) 87 | #endif 88 | 89 | #define XMLPARSEAPI(type) XMLIMPORT type XMLCALL 90 | 91 | #ifdef __cplusplus 92 | extern "C" { 93 | #endif 94 | 95 | #ifdef XML_UNICODE_WCHAR_T 96 | #define XML_UNICODE 97 | #endif 98 | 99 | #ifdef XML_UNICODE /* Information is UTF-16 encoded. */ 100 | #ifdef XML_UNICODE_WCHAR_T 101 | typedef wchar_t XML_Char; 102 | typedef wchar_t XML_LChar; 103 | #else 104 | typedef unsigned short XML_Char; 105 | typedef char XML_LChar; 106 | #endif /* XML_UNICODE_WCHAR_T */ 107 | #else /* Information is UTF-8 encoded. */ 108 | typedef char XML_Char; 109 | typedef char XML_LChar; 110 | #endif /* XML_UNICODE */ 111 | 112 | #ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */ 113 | #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 114 | typedef __int64 XML_Index; 115 | typedef unsigned __int64 XML_Size; 116 | #else 117 | typedef long long XML_Index; 118 | typedef unsigned long long XML_Size; 119 | #endif 120 | #else 121 | typedef long XML_Index; 122 | typedef unsigned long XML_Size; 123 | #endif /* XML_LARGE_SIZE */ 124 | 125 | #ifdef __cplusplus 126 | } 127 | #endif 128 | 129 | #endif /* not Expat_External_INCLUDED */ 130 | -------------------------------------------------------------------------------- /deps/libexpat/bcb5/expat.bpr: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | [Version Info] 50 | IncludeVerInfo=0 51 | AutoIncBuild=0 52 | MajorVer=1 53 | MinorVer=0 54 | Release=0 55 | Build=0 56 | Debug=0 57 | PreRelease=0 58 | Special=0 59 | Private=0 60 | DLL=0 61 | Locale=1033 62 | CodePage=1252 63 | 64 | [Version Info Keys] 65 | CompanyName= 66 | FileDescription= 67 | FileVersion=1.0.0.0 68 | InternalName= 69 | LegalCopyright= 70 | LegalTrademarks= 71 | OriginalFilename= 72 | ProductName= 73 | ProductVersion=1.0.0.0 74 | Comments= 75 | 76 | [HistoryLists\hlIncludePath] 77 | Count=4 78 | Item0=..\lib;$(BCB)\include 79 | Item1=$(BCB)\include 80 | Item2=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl 81 | Item3=$(BCB)\include;$(BCB)\include\mfc;$(BCB)\include\atl; 82 | 83 | [HistoryLists\hlLibraryPath] 84 | Count=5 85 | Item0=..\lib;$(BCB)\lib;$(RELEASELIBPATH) 86 | Item1=..\lib;$(BCB)\lib;..\lib\$(RELEASELIBPATH) 87 | Item2=$(BCB)\lib;$(RELEASELIBPATH) 88 | Item3=$(BCB)\lib;$(RELEASELIBPATH);$(BCB)\lib\psdk 89 | Item4=$(BCB)\lib;$(RELEASELIBPATH);;$(BCB)\lib\psdk; 90 | 91 | [HistoryLists\hlDebugSourcePath] 92 | Count=1 93 | Item0=$(BCB)\source\vcl 94 | 95 | [HistoryLists\hlConditionals] 96 | Count=8 97 | Item0=_WINDOWS;WIN32;NDEBUG;_USRDLL;EXPAT_EXPORTS 98 | Item1=_WINDOWS;WIN32;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS 99 | Item2=WIN32;_WINDOWS;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS 100 | Item3=WIN32;_WINDOWS;NDEBUG;_DEBUG;_USRDLL;EXPAT_EXPORTS 101 | Item4=NDEBUG;WIN32;_WINDOWS;_USRDLL;_DEBUG;EXPAT_EXPORTS 102 | Item5=NDEBUG;WIN32;_WINDOWS;_USRDLL;EXPAT_EXPORTS;_DEBUG 103 | Item6=NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS;_DEBUG 104 | Item7=NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;EXPAT_EXPORTS 105 | 106 | [HistoryLists\hlIntOutputDir] 107 | Count=7 108 | Item0=Release\obj\libexpat 109 | Item1=Release\obj\libexpat_static 110 | Item2=Release\obj\mtd 111 | Item3=Release\obj\mt 112 | Item4=Release\obj 113 | Item5=Release 114 | Item6=..\lib\Release 115 | 116 | [HistoryLists\hlFinalOutputDir] 117 | Count=1 118 | Item0=Release\ 119 | 120 | [Debugging] 121 | DebugSourceDirs= 122 | 123 | [Parameters] 124 | RunParams= 125 | HostApplication= 126 | RemoteHost= 127 | RemotePath= 128 | RemoteDebug=0 129 | 130 | [Compiler] 131 | ShowInfoMsgs=0 132 | LinkDebugVcl=0 133 | LinkCGLIB=0 134 | 135 | [Language] 136 | ActiveLang= 137 | ProjectLang= 138 | RootDir= 139 | 140 | @ 141 | --------------------------------------------------------------------------------