Commit Graph

84 Commits

Author SHA1 Message Date
paulc 7f38064c6d Added getInt64Value to NamedList and Configuration classes.
Added getIntValue and getBoolValue to Javascript ConfigFile and ConfigSection.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5930 acf43c95-373e-0410-b603-e72c3f656dc1
2014-12-22 11:56:16 +00:00
paulc 7f834fd8b8 Added engine and Javascript methods for packing and unpacking IP addresses.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5929 acf43c95-373e-0410-b603-e72c3f656dc1
2014-12-18 15:11:42 +00:00
paulc 48103e3e1b Preserve correct path when reloading JS scripts that were loaded on demand.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5926 acf43c95-373e-0410-b603-e72c3f656dc1
2014-12-09 11:33:04 +00:00
paulc e160c8595b Allow retrieving a pointer to native objects in JS Message, ConfigFile and XML.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5921 acf43c95-373e-0410-b603-e72c3f656dc1
2014-10-29 16:32:20 +00:00
paulc 063b8f7707 Added optional parameter to XML.xmlText() to indent with spaces.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5920 acf43c95-373e-0410-b603-e72c3f656dc1
2014-10-29 16:30:02 +00:00
paulc da44cbe85c Removed a harmless extra pair of brackets.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5919 acf43c95-373e-0410-b603-e72c3f656dc1
2014-10-29 16:27:35 +00:00
oana af150f67f0 Add option to dinamically load JS scripts through engine.command.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5917 acf43c95-373e-0410-b603-e72c3f656dc1
2014-10-16 12:39:59 +00:00
paulc 8558e81047 Added DNS.resolve() and DNS.local() methods in Javascript.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5909 acf43c95-373e-0410-b603-e72c3f656dc1
2014-08-26 17:21:36 +00:00
paulc dddac05512 Fixed a pushed down row in Javascript tabelar output functions.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5908 acf43c95-373e-0410-b603-e72c3f656dc1
2014-08-22 10:43:37 +00:00
paulc 011cafdb6c Fixed rows alignment in Javascript tabelar output functions.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5907 acf43c95-373e-0410-b603-e72c3f656dc1
2014-08-20 15:03:30 +00:00
paulc e183bd7020 Added JS methods to build or print a table from Array of Object or Object of Array.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5904 acf43c95-373e-0410-b603-e72c3f656dc1
2014-08-06 14:38:28 +00:00
paulc 771ee63ff3 Added support for creating scripting extensions in other modules.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5902 acf43c95-373e-0410-b603-e72c3f656dc1
2014-08-06 08:08:06 +00:00
paulc 7efd3b0747 Store TTL in retrieved DNS records.
Add ttl, order and preference to JS returned NAPTR and SRV records.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5889 acf43c95-373e-0410-b603-e72c3f656dc1
2014-07-31 13:32:54 +00:00
paulc f64803b64f Added Message.handlers() function to return list of installed message handlers.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5878 acf43c95-373e-0410-b603-e72c3f656dc1
2014-07-24 13:03:16 +00:00
paulc 7ddd7cf498 Use the proper JsObject constructor with prototype where applicable.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5876 acf43c95-373e-0410-b603-e72c3f656dc1
2014-07-22 11:41:55 +00:00
paulc bbcfbbb506 Added DNS resolver object in Javascript.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5875 acf43c95-373e-0410-b603-e72c3f656dc1
2014-07-22 11:04:28 +00:00
paulc f9a0ff7791 Fixed crash in JSON.stringify() for objects having no "__proto__".
git-svn-id: http://yate.null.ro/svn/yate/trunk@5872 acf43c95-373e-0410-b603-e72c3f656dc1
2014-07-21 15:33:46 +00:00
paulc 9b6259ac82 Added native JSON parser and stringifier.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5869 acf43c95-373e-0410-b603-e72c3f656dc1
2014-07-14 08:06:41 +00:00
paulc 0842fc2581 Extract native function arguments only after recognizing the function name.
This allows falling back to the native JsObject methods.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5868 acf43c95-373e-0410-b603-e72c3f656dc1
2014-07-11 16:54:28 +00:00
marian 99f1280a37 Added support for (un)hexify functions: btoh and htob.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5865 acf43c95-373e-0410-b603-e72c3f656dc1
2014-07-07 07:52:42 +00:00
marian 45931bec7f Use a boolean parameter to indicate hexified data in Hasher update and hmac methods.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5843 acf43c95-373e-0410-b603-e72c3f656dc1
2014-06-11 12:59:46 +00:00
marian 6bde44d9c9 Added Hasher object exposing Engine Hasher class methods.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5842 acf43c95-373e-0410-b603-e72c3f656dc1
2014-06-11 12:18:01 +00:00
marian 5cac753134 Return null object from XML constructor if parse fails.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5831 acf43c95-373e-0410-b603-e72c3f656dc1
2014-05-14 09:06:36 +00:00
paulc 401d4b8793 Added objects and methods for accessing COnfiguration files from Javascript.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5811 acf43c95-373e-0410-b603-e72c3f656dc1
2014-04-01 11:27:51 +00:00
paulc 5ef78fdfa4 Added Base64 handling methods to Javascript.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5807 acf43c95-373e-0410-b603-e72c3f656dc1
2014-03-26 10:45:01 +00:00
paulc 0e603be619 Added and extra include path (defaulting to config dir) for JS scripts.
Engine runtime parameters can be used in javascript.conf for script paths.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5799 acf43c95-373e-0410-b603-e72c3f656dc1
2014-03-14 14:45:41 +00:00
oana 6d2de9dfc8 Bug fix: properly set prototype property on JS Array objects.
Added JsObject::setPrototype() in order to set an objects prototype from given context.
Added new JsArray constructor which set its own prototype. Replaced use of constructor which returned Array prototype with this contructor.



git-svn-id: http://yate.null.ro/svn/yate/trunk@5796 acf43c95-373e-0410-b603-e72c3f656dc1
2014-03-13 13:10:56 +00:00
paulc 90c08d207f Added an optional 2nd argument to callTo() and callJust() to set parameters.
Made callTo() and callJust() to be callable from pretty much anywhere.
Solves bug #338.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5791 acf43c95-373e-0410-b603-e72c3f656dc1
2014-02-26 14:57:57 +00:00
paulc d8e565816b Keep executing a channel script until callTo, callJust or hangup.
A different non-blocking function does not exit the script.
Fixes bug #336.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5790 acf43c95-373e-0410-b603-e72c3f656dc1
2014-02-26 14:51:15 +00:00
paulc 37a72e4bc1 Added copyright notices to sources and scripts missing them.
Updated copyright notices for 2014.
Fixed end of lines in many files.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5755 acf43c95-373e-0410-b603-e72c3f656dc1
2014-02-05 11:42:17 +00:00
marian 1229b07588 Added setText function to XML object. Added optional third argument to XML constructor used to take the xml from list parameter instead of making a copy.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5712 acf43c95-373e-0410-b603-e72c3f656dc1
2014-01-10 11:55:36 +00:00
paulc 150e763c0d Added JS static method Engine.runParams() and Message member msgTime()
git-svn-id: http://yate.null.ro/svn/yate/trunk@5688 acf43c95-373e-0410-b603-e72c3f656dc1
2013-11-05 15:50:09 +00:00
paulc d906455080 Limit Javascript debug output to DebugTest, not DebugGoOn.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5687 acf43c95-373e-0410-b603-e72c3f656dc1
2013-11-01 14:36:18 +00:00
oana c8f18f9d15 Fixed compile warnings which appear when compiling with xdebug.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5642 acf43c95-373e-0410-b603-e72c3f656dc1
2013-09-09 15:26:27 +00:00
paulc 58df5ea11b Check the timestamps of all files included in Javascript.
On initialization reload scripts if any included file has changed.
Reload routing script only if it has changed.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5631 acf43c95-373e-0410-b603-e72c3f656dc1
2013-08-28 13:19:42 +00:00
paulc 7c39b31458 Fixed warnings - mostly conversions - exposed by Visual C++ compiler.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5614 acf43c95-373e-0410-b603-e72c3f656dc1
2013-08-07 11:24:10 +00:00
paulc e81cbde58e More fixes related to 32 and 64 bit types usage in JS.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5613 acf43c95-373e-0410-b603-e72c3f656dc1
2013-08-07 10:18:23 +00:00
paulc 18ff43d395 Fixed 64 bit types usage in Javascript, was broken on 32 bit machines.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5612 acf43c95-373e-0410-b603-e72c3f656dc1
2013-08-07 09:49:52 +00:00
paulc cf5d0fd71a Changed license terms in each source file to reference an external file.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5609 acf43c95-373e-0410-b603-e72c3f656dc1
2013-08-06 13:38:10 +00:00
paulc bdcfd22d5b Added Javascript methods for enabling and controlling debug levels.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5605 acf43c95-373e-0410-b603-e72c3f656dc1
2013-08-05 09:56:52 +00:00
paulc 2d7d0489d5 Added Engine.alarm() method in Javascript.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5564 acf43c95-373e-0410-b603-e72c3f656dc1
2013-07-05 12:50:18 +00:00
paulc 6f028c32cb Added method to set the debug name of Javascript instances.
Implemented reentrant operation mode for JS Message.dispatch()


git-svn-id: http://yate.null.ro/svn/yate/trunk@5465 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 15:18:50 +00:00
andrei dffa68a0c1 Added support for timeouts and interval in JavaScript.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5457 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 14:00:39 +00:00
andrei fe4f9e7a18 Added MessageQueue support in JavaScript.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5456 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 13:56:00 +00:00
paulc 53b28b870a Added static method to set or retrieve the tracker name in JS handlers.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5445 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:55:51 +00:00
paulc 2f19c830c2 Store ExpOperations in JsObjects so the value type is preserved.
Automatically convert database results to numbers if possible.
Added faster method ExpOperation::typeOf()


git-svn-id: http://yate.null.ro/svn/yate/trunk@5444 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:54:30 +00:00
paulc d6476113c5 Allow specifying a filter for Javascript message handlers.
Mask message handlers early enough to avoid trace file races at shutdown.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5443 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:53:10 +00:00
paulc b3c4c0c694 Added support for tracing Javascript execution in KCacheGrind format.
Fixed line counting for a possible keyword or identifier at end of line.


git-svn-id: http://yate.null.ro/svn/yate/trunk@5439 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:46:21 +00:00
paulc 3854ec61c2 Allow manually evaluating JS expressions in a specific context.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5437 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:41:47 +00:00
oana 3d75d22828 Added functions unprefixedTag(), getTag(), removeAttribute() and clearChildren() to the Javascript XML API.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5434 acf43c95-373e-0410-b603-e72c3f656dc1
2013-04-12 12:08:13 +00:00