as3corelib 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +5 -0
- data/Gemfile.lock +28 -0
- data/README.textile +79 -0
- data/Rakefile +3 -0
- data/as3corelib.gemspec +23 -0
- data/build/build.properties +48 -0
- data/build/build.xml +104 -0
- data/examples/JSONExample/JSONExample.mxml +73 -0
- data/lib/as3corelib.rb +15 -0
- data/src/com/adobe/air/crypto/EncryptionKeyGenerator.as +313 -0
- data/src/com/adobe/air/filesystem/FileMonitor.as +245 -0
- data/src/com/adobe/air/filesystem/FileUtil.as +63 -0
- data/src/com/adobe/air/filesystem/VolumeMonitor.as +184 -0
- data/src/com/adobe/air/filesystem/events/FileMonitorEvent.as +61 -0
- data/src/com/adobe/air/logging/FileTarget.as +95 -0
- data/src/com/adobe/air/net/ResourceCache.as +165 -0
- data/src/com/adobe/air/net/events/ResourceCacheEvent.as +70 -0
- data/src/com/adobe/crypto/HMAC.as +127 -0
- data/src/com/adobe/crypto/MD5.as +281 -0
- data/src/com/adobe/crypto/MD5Stream.as +402 -0
- data/src/com/adobe/crypto/SHA1.as +289 -0
- data/src/com/adobe/crypto/SHA224.as +257 -0
- data/src/com/adobe/crypto/SHA256.as +261 -0
- data/src/com/adobe/crypto/WSSEUsernameToken.as +114 -0
- data/src/com/adobe/errors/IllegalStateError.as +63 -0
- data/src/com/adobe/fileformats/vcard/Address.as +47 -0
- data/src/com/adobe/fileformats/vcard/Email.as +39 -0
- data/src/com/adobe/fileformats/vcard/Phone.as +39 -0
- data/src/com/adobe/fileformats/vcard/VCard.as +54 -0
- data/src/com/adobe/fileformats/vcard/VCardParser.as +246 -0
- data/src/com/adobe/images/BitString.as +39 -0
- data/src/com/adobe/images/JPGEncoder.as +648 -0
- data/src/com/adobe/images/PNGEncoder.as +141 -0
- data/src/com/adobe/net/DynamicURLLoader.as +55 -0
- data/src/com/adobe/net/IURIResolver.as +76 -0
- data/src/com/adobe/net/MimeTypeMap.as +200 -0
- data/src/com/adobe/net/URI.as +2466 -0
- data/src/com/adobe/net/URIEncodingBitmap.as +139 -0
- data/src/com/adobe/net/proxies/RFC2817Socket.as +198 -0
- data/src/com/adobe/protocols/dict/Database.as +66 -0
- data/src/com/adobe/protocols/dict/Definition.as +71 -0
- data/src/com/adobe/protocols/dict/Dict.as +360 -0
- data/src/com/adobe/protocols/dict/DictionaryServer.as +60 -0
- data/src/com/adobe/protocols/dict/MatchStrategy.as +66 -0
- data/src/com/adobe/protocols/dict/Response.as +71 -0
- data/src/com/adobe/protocols/dict/events/ConnectedEvent.as +53 -0
- data/src/com/adobe/protocols/dict/events/DatabaseEvent.as +67 -0
- data/src/com/adobe/protocols/dict/events/DefinitionEvent.as +70 -0
- data/src/com/adobe/protocols/dict/events/DefinitionHeaderEvent.as +69 -0
- data/src/com/adobe/protocols/dict/events/DictionaryServerEvent.as +69 -0
- data/src/com/adobe/protocols/dict/events/DisconnectedEvent.as +55 -0
- data/src/com/adobe/protocols/dict/events/ErrorEvent.as +80 -0
- data/src/com/adobe/protocols/dict/events/MatchEvent.as +67 -0
- data/src/com/adobe/protocols/dict/events/MatchStrategiesEvent.as +70 -0
- data/src/com/adobe/protocols/dict/events/NoMatchEvent.as +54 -0
- data/src/com/adobe/protocols/dict/util/CompleteResponseEvent.as +68 -0
- data/src/com/adobe/protocols/dict/util/SocketHelper.as +81 -0
- data/src/com/adobe/serialization/json/JSON.as +86 -0
- data/src/com/adobe/serialization/json/JSONDecoder.as +327 -0
- data/src/com/adobe/serialization/json/JSONEncoder.as +312 -0
- data/src/com/adobe/serialization/json/JSONParseError.as +87 -0
- data/src/com/adobe/serialization/json/JSONToken.as +104 -0
- data/src/com/adobe/serialization/json/JSONTokenType.as +69 -0
- data/src/com/adobe/serialization/json/JSONTokenizer.as +702 -0
- data/src/com/adobe/utils/ArrayUtil.as +187 -0
- data/src/com/adobe/utils/DateUtil.as +701 -0
- data/src/com/adobe/utils/DictionaryUtil.as +87 -0
- data/src/com/adobe/utils/IntUtil.as +99 -0
- data/src/com/adobe/utils/NumberFormatter.as +74 -0
- data/src/com/adobe/utils/StringUtil.as +239 -0
- data/src/com/adobe/utils/XMLUtil.as +168 -0
- data/src/com/adobe/webapis/ServiceBase.as +48 -0
- data/src/com/adobe/webapis/URLLoaderBase.as +108 -0
- data/src/com/adobe/webapis/events/ServiceEvent.as +82 -0
- data/tests/src/CoreLibTestRunner-app.xml +135 -0
- data/tests/src/CoreLibTestRunner.as +138 -0
- data/tests/src/CoreLibTestRunner.mxml +46 -0
- data/tests/src/com/adobe/air/crypto/EncryptionKeyGeneratorTest.as +176 -0
- data/tests/src/com/adobe/air/filesystem/FileMonitorTest.as +63 -0
- data/tests/src/com/adobe/air/filesystem/VolumeMonitorTest.as +57 -0
- data/tests/src/com/adobe/air/filesystem/events/FileMonitorEventTest.as +59 -0
- data/tests/src/com/adobe/air/net/events/ResourceCacheEventTest.as +72 -0
- data/tests/src/com/adobe/crypto/HMACMD5Test.as +134 -0
- data/tests/src/com/adobe/crypto/HMACSHA1Test.as +138 -0
- data/tests/src/com/adobe/crypto/MD5Test.as +82 -0
- data/tests/src/com/adobe/crypto/SHA1Test.as +151 -0
- data/tests/src/com/adobe/crypto/SHA224Test.as +104 -0
- data/tests/src/com/adobe/crypto/SHA256Test.as +116 -0
- data/tests/src/com/adobe/crypto/WSSEUsernameTokenTest.as +87 -0
- data/tests/src/com/adobe/images/JPGEncoderTest.as +54 -0
- data/tests/src/com/adobe/images/PNGEncoderTest.as +54 -0
- data/tests/src/com/adobe/net/URITest.as +589 -0
- data/tests/src/com/adobe/protocols/events/ConnectedEventTest.as +59 -0
- data/tests/src/com/adobe/protocols/events/DatabaseEventTest.as +62 -0
- data/tests/src/com/adobe/protocols/events/DefinitionEventTest.as +61 -0
- data/tests/src/com/adobe/protocols/events/DefinitionHeaderEventTest.as +61 -0
- data/tests/src/com/adobe/protocols/events/DictionaryServerEventTest.as +61 -0
- data/tests/src/com/adobe/protocols/events/DisconnectedEventTest.as +59 -0
- data/tests/src/com/adobe/protocols/events/ErrorEventTest.as +63 -0
- data/tests/src/com/adobe/protocols/events/MatchEventTest.as +61 -0
- data/tests/src/com/adobe/protocols/events/MatchStrategiesEventTest.as +61 -0
- data/tests/src/com/adobe/protocols/events/NoMatchEventTest.as +58 -0
- data/tests/src/com/adobe/protocols/util/CompletedResponseEventTest.as +60 -0
- data/tests/src/com/adobe/serialization/json/JSONTest.as +522 -0
- data/tests/src/com/adobe/serialization/json/SimpleClass.as +85 -0
- data/tests/src/com/adobe/utils/ArrayUtilTest.as +173 -0
- data/tests/src/com/adobe/utils/DateUtilTest.as +436 -0
- data/tests/src/com/adobe/utils/DictionaryUtilTest.as +93 -0
- data/tests/src/com/adobe/utils/IntUtilTest.as +73 -0
- data/tests/src/com/adobe/utils/NumberFormatterTest.as +70 -0
- data/tests/src/com/adobe/utils/StringUtilTest.as +304 -0
- data/tests/src/com/adobe/utils/XMLUtilTest.as +101 -0
- data/tests/src/com/adobe/webapis/events/ServiceEventTest.as +66 -0
- metadata +196 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2008, Adobe Systems Incorporated
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are
|
|
7
|
+
met:
|
|
8
|
+
|
|
9
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
10
|
+
this list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
13
|
+
notice, this list of conditions and the following disclaimer in the
|
|
14
|
+
documentation and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
21
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
22
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
23
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
24
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
25
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
26
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
27
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
28
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
29
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
30
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
package com.adobe.webapis
|
|
35
|
+
{
|
|
36
|
+
import flash.events.EventDispatcher;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Base class for remote service classes.
|
|
40
|
+
*/
|
|
41
|
+
public class ServiceBase extends EventDispatcher
|
|
42
|
+
{
|
|
43
|
+
public function ServiceBase()
|
|
44
|
+
{
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2008, Adobe Systems Incorporated
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are
|
|
7
|
+
met:
|
|
8
|
+
|
|
9
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
10
|
+
this list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
13
|
+
notice, this list of conditions and the following disclaimer in the
|
|
14
|
+
documentation and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
21
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
22
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
23
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
24
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
25
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
26
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
27
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
28
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
29
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
30
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
package com.adobe.webapis
|
|
34
|
+
{
|
|
35
|
+
import flash.events.IOErrorEvent;
|
|
36
|
+
import flash.events.SecurityErrorEvent;
|
|
37
|
+
import flash.events.ProgressEvent;
|
|
38
|
+
|
|
39
|
+
import com.adobe.net.DynamicURLLoader;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Dispatched when data is
|
|
43
|
+
* received as the download operation progresses.
|
|
44
|
+
*
|
|
45
|
+
* @eventType flash.events.ProgressEvent.PROGRESS
|
|
46
|
+
*
|
|
47
|
+
* @langversion ActionScript 3.0
|
|
48
|
+
* @playerversion Flash 9.0
|
|
49
|
+
*/
|
|
50
|
+
[Event(name="progress", type="flash.events.ProgressEvent")]
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Dispatched if a call to the server results in a fatal
|
|
54
|
+
* error that terminates the download.
|
|
55
|
+
*
|
|
56
|
+
* @eventType flash.events.IOErrorEvent.IO_ERROR
|
|
57
|
+
*
|
|
58
|
+
* @langversion ActionScript 3.0
|
|
59
|
+
* @playerversion Flash 9.0
|
|
60
|
+
*/
|
|
61
|
+
[Event(name="ioError", type="flash.events.IOErrorEvent")]
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* A securityError event occurs if a call attempts to
|
|
65
|
+
* load data from a server outside the security sandbox.
|
|
66
|
+
*
|
|
67
|
+
* @eventType flash.events.SecurityErrorEvent.SECURITY_ERROR
|
|
68
|
+
*
|
|
69
|
+
* @langversion ActionScript 3.0
|
|
70
|
+
* @playerversion Flash 9.0
|
|
71
|
+
*/
|
|
72
|
+
[Event(name="securityError", type="flash.events.SecurityErrorEvent")]
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Base class for services that utilize URLLoader
|
|
76
|
+
* to communicate with remote APIs / Services.
|
|
77
|
+
*
|
|
78
|
+
* @langversion ActionScript 3.0
|
|
79
|
+
* @playerversion Flash 9.0
|
|
80
|
+
*/
|
|
81
|
+
public class URLLoaderBase extends ServiceBase
|
|
82
|
+
{
|
|
83
|
+
protected function getURLLoader():DynamicURLLoader
|
|
84
|
+
{
|
|
85
|
+
var loader:DynamicURLLoader = new DynamicURLLoader();
|
|
86
|
+
loader.addEventListener("progress", onProgress);
|
|
87
|
+
loader.addEventListener("ioError", onIOError);
|
|
88
|
+
loader.addEventListener("securityError", onSecurityError);
|
|
89
|
+
|
|
90
|
+
return loader;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
private function onIOError(event:IOErrorEvent):void
|
|
94
|
+
{
|
|
95
|
+
dispatchEvent(event);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
private function onSecurityError(event:SecurityErrorEvent):void
|
|
99
|
+
{
|
|
100
|
+
dispatchEvent(event);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
private function onProgress(event:ProgressEvent):void
|
|
104
|
+
{
|
|
105
|
+
dispatchEvent(event);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2008, Adobe Systems Incorporated
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are
|
|
7
|
+
met:
|
|
8
|
+
|
|
9
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
10
|
+
this list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
13
|
+
notice, this list of conditions and the following disclaimer in the
|
|
14
|
+
documentation and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
21
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
22
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
23
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
24
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
25
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
26
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
27
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
28
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
29
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
30
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
package com.adobe.webapis.events
|
|
35
|
+
{
|
|
36
|
+
|
|
37
|
+
import flash.events.Event;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Event class that contains data loaded from remote services.
|
|
41
|
+
*
|
|
42
|
+
* @author Mike Chambers
|
|
43
|
+
*/
|
|
44
|
+
public class ServiceEvent extends Event
|
|
45
|
+
{
|
|
46
|
+
private var _data:Object = new Object();;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Constructor for ServiceEvent class.
|
|
50
|
+
*
|
|
51
|
+
* @param type The type of event that the instance represents.
|
|
52
|
+
*/
|
|
53
|
+
public function ServiceEvent(type:String, bubbles:Boolean = false,
|
|
54
|
+
cancelable:Boolean=false)
|
|
55
|
+
{
|
|
56
|
+
super(type, bubbles, cancelable);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* This object contains data loaded in response
|
|
61
|
+
* to remote service calls, and properties associated with that call.
|
|
62
|
+
*/
|
|
63
|
+
public function get data():Object
|
|
64
|
+
{
|
|
65
|
+
return _data;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public function set data(d:Object):void
|
|
69
|
+
{
|
|
70
|
+
_data = d;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
public override function clone():Event
|
|
74
|
+
{
|
|
75
|
+
var out:ServiceEvent = new ServiceEvent(type, bubbles, cancelable);
|
|
76
|
+
out.data = data;
|
|
77
|
+
|
|
78
|
+
return out;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<application xmlns="http://ns.adobe.com/air/application/1.5">
|
|
3
|
+
|
|
4
|
+
<!-- Adobe AIR Application Descriptor File Template.
|
|
5
|
+
|
|
6
|
+
Specifies parameters for identifying, installing, and launching AIR applications.
|
|
7
|
+
|
|
8
|
+
xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5
|
|
9
|
+
The last segment of the namespace specifies the version
|
|
10
|
+
of the AIR runtime required for this application to run.
|
|
11
|
+
|
|
12
|
+
minimumPatchLevel - The minimum patch level of the AIR runtime required to run
|
|
13
|
+
the application. Optional.
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
<!-- The application identifier string, unique to this application. Required. -->
|
|
17
|
+
<id>CoreLibTestRunner</id>
|
|
18
|
+
|
|
19
|
+
<!-- Used as the filename for the application. Required. -->
|
|
20
|
+
<filename>CoreLibTestRunner</filename>
|
|
21
|
+
|
|
22
|
+
<!-- The name that is displayed in the AIR application installer.
|
|
23
|
+
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
|
24
|
+
<name>CoreLibTestRunner</name>
|
|
25
|
+
|
|
26
|
+
<!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
|
|
27
|
+
<version>v1</version>
|
|
28
|
+
|
|
29
|
+
<!-- Description, displayed in the AIR application installer.
|
|
30
|
+
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
|
31
|
+
<!-- <description></description> -->
|
|
32
|
+
|
|
33
|
+
<!-- Copyright information. Optional -->
|
|
34
|
+
<!-- <copyright></copyright> -->
|
|
35
|
+
|
|
36
|
+
<!-- Settings for the application's initial window. Required. -->
|
|
37
|
+
<initialWindow>
|
|
38
|
+
<!-- The main SWF or HTML file of the application. Required. -->
|
|
39
|
+
<!-- Note: In Flex Builder, the SWF reference is set automatically. -->
|
|
40
|
+
<content>[This value will be overwritten by Flex Builder in the output app.xml]</content>
|
|
41
|
+
|
|
42
|
+
<!-- The title of the main window. Optional. -->
|
|
43
|
+
<!-- <title></title> -->
|
|
44
|
+
|
|
45
|
+
<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
|
|
46
|
+
<!-- <systemChrome></systemChrome> -->
|
|
47
|
+
|
|
48
|
+
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
|
|
49
|
+
<!-- <transparent></transparent> -->
|
|
50
|
+
|
|
51
|
+
<!-- Whether the window is initially visible. Optional. Default false. -->
|
|
52
|
+
<visible>true</visible>
|
|
53
|
+
|
|
54
|
+
<!-- Whether the user can minimize the window. Optional. Default true. -->
|
|
55
|
+
<!-- <minimizable></minimizable> -->
|
|
56
|
+
|
|
57
|
+
<!-- Whether the user can maximize the window. Optional. Default true. -->
|
|
58
|
+
<!-- <maximizable></maximizable> -->
|
|
59
|
+
|
|
60
|
+
<!-- Whether the user can resize the window. Optional. Default true. -->
|
|
61
|
+
<!-- <resizable></resizable> -->
|
|
62
|
+
|
|
63
|
+
<!-- The window's initial width. Optional. -->
|
|
64
|
+
<width>1000</width>
|
|
65
|
+
|
|
66
|
+
<!-- The window's initial height. Optional. -->
|
|
67
|
+
<height>700</height>
|
|
68
|
+
|
|
69
|
+
<!-- The window's initial x position. Optional. -->
|
|
70
|
+
<!-- <x></x> -->
|
|
71
|
+
|
|
72
|
+
<!-- The window's initial y position. Optional. -->
|
|
73
|
+
<!-- <y></y> -->
|
|
74
|
+
|
|
75
|
+
<!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
|
|
76
|
+
<!-- <minSize></minSize> -->
|
|
77
|
+
|
|
78
|
+
<!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
|
|
79
|
+
<!-- <maxSize></maxSize> -->
|
|
80
|
+
</initialWindow>
|
|
81
|
+
|
|
82
|
+
<!-- The subpath of the standard default installation location to use. Optional. -->
|
|
83
|
+
<!-- <installFolder></installFolder> -->
|
|
84
|
+
|
|
85
|
+
<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
|
|
86
|
+
<!-- <programMenuFolder></programMenuFolder> -->
|
|
87
|
+
|
|
88
|
+
<!-- The icon the system uses for the application. For at least one resolution,
|
|
89
|
+
specify the path to a PNG file included in the AIR package. Optional. -->
|
|
90
|
+
<!-- <icon>
|
|
91
|
+
<image16x16></image16x16>
|
|
92
|
+
<image32x32></image32x32>
|
|
93
|
+
<image48x48></image48x48>
|
|
94
|
+
<image128x128></image128x128>
|
|
95
|
+
</icon> -->
|
|
96
|
+
|
|
97
|
+
<!-- Whether the application handles the update when a user double-clicks an update version
|
|
98
|
+
of the AIR file (true), or the default AIR application installer handles the update (false).
|
|
99
|
+
Optional. Default false. -->
|
|
100
|
+
<!-- <customUpdateUI></customUpdateUI> -->
|
|
101
|
+
|
|
102
|
+
<!-- Whether the application can be launched when the user clicks a link in a web browser.
|
|
103
|
+
Optional. Default false. -->
|
|
104
|
+
<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
|
|
105
|
+
|
|
106
|
+
<!-- Listing of file types for which the application can register. Optional. -->
|
|
107
|
+
<!-- <fileTypes> -->
|
|
108
|
+
|
|
109
|
+
<!-- Defines one file type. Optional. -->
|
|
110
|
+
<!-- <fileType> -->
|
|
111
|
+
|
|
112
|
+
<!-- The name that the system displays for the registered file type. Required. -->
|
|
113
|
+
<!-- <name></name> -->
|
|
114
|
+
|
|
115
|
+
<!-- The extension to register. Required. -->
|
|
116
|
+
<!-- <extension></extension> -->
|
|
117
|
+
|
|
118
|
+
<!-- The description of the file type. Optional. -->
|
|
119
|
+
<!-- <description></description> -->
|
|
120
|
+
|
|
121
|
+
<!-- The MIME content type. -->
|
|
122
|
+
<!-- <contentType></contentType> -->
|
|
123
|
+
|
|
124
|
+
<!-- The icon to display for the file type. Optional. -->
|
|
125
|
+
<!-- <icon>
|
|
126
|
+
<image16x16></image16x16>
|
|
127
|
+
<image32x32></image32x32>
|
|
128
|
+
<image48x48></image48x48>
|
|
129
|
+
<image128x128></image128x128>
|
|
130
|
+
</icon> -->
|
|
131
|
+
|
|
132
|
+
<!-- </fileType> -->
|
|
133
|
+
<!-- </fileTypes> -->
|
|
134
|
+
|
|
135
|
+
</application>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2008, Adobe Systems Incorporated
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are
|
|
7
|
+
met:
|
|
8
|
+
|
|
9
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
10
|
+
this list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
13
|
+
notice, this list of conditions and the following disclaimer in the
|
|
14
|
+
documentation and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
21
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
22
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
23
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
24
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
25
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
26
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
27
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
28
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
29
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
30
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
import com.adobe.air.crypto.EncryptionKeyGeneratorTest;
|
|
34
|
+
import com.adobe.crypto.HMACMD5Test;
|
|
35
|
+
import com.adobe.crypto.HMACSHA1Test;
|
|
36
|
+
import com.adobe.crypto.MD5Test;
|
|
37
|
+
import com.adobe.crypto.SHA1Test;
|
|
38
|
+
import com.adobe.crypto.SHA224Test;
|
|
39
|
+
import com.adobe.crypto.SHA256Test;
|
|
40
|
+
import com.adobe.crypto.WSSEUsernameTokenTest;
|
|
41
|
+
import com.adobe.images.JPGEncoderTest;
|
|
42
|
+
import com.adobe.images.PNGEncoderTest;
|
|
43
|
+
import com.adobe.net.URITest;
|
|
44
|
+
import com.adobe.serialization.json.JSONTest;
|
|
45
|
+
import com.adobe.utils.ArrayUtilTest;
|
|
46
|
+
import com.adobe.utils.DateUtilTest;
|
|
47
|
+
import com.adobe.utils.DictionaryUtilTest;
|
|
48
|
+
import com.adobe.utils.IntUtilTest;
|
|
49
|
+
import com.adobe.utils.NumberFormatterTest;
|
|
50
|
+
import com.adobe.utils.StringUtilTest;
|
|
51
|
+
import com.adobe.utils.XMLUtilTest;
|
|
52
|
+
|
|
53
|
+
import flexunit.framework.TestSuite;
|
|
54
|
+
import com.adobe.air.filesystem.VolumeMonitorTest;
|
|
55
|
+
import com.adobe.air.filesystem.events.FileMonitorEventTest;
|
|
56
|
+
import com.adobe.air.net.events.ResourceCacheEventTest;
|
|
57
|
+
import com.adobe.protocols.events.ConnectedEventTest;
|
|
58
|
+
import com.adobe.protocols.events.DatabaseEventTest;
|
|
59
|
+
import com.adobe.protocols.events.DefinitionEventTest;
|
|
60
|
+
import com.adobe.protocols.events.DefinitionHeaderEventTest;
|
|
61
|
+
import com.adobe.protocols.events.DictionaryServerEventTest;
|
|
62
|
+
import com.adobe.protocols.events.DisconnectedEventTest;
|
|
63
|
+
import com.adobe.protocols.events.ErrorEventTest;
|
|
64
|
+
import com.adobe.protocols.events.MatchEventTest;
|
|
65
|
+
import com.adobe.protocols.events.MatchStrategiesEventTest;
|
|
66
|
+
import com.adobe.protocols.events.NoMatchEventTest;
|
|
67
|
+
import com.adobe.protocols.util.CompletedResponseEventTest;
|
|
68
|
+
import com.adobe.webapis.events.ServiceEventTest;
|
|
69
|
+
import com.adobe.air.filesystem.FileMonitorTest;
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
private function onCreationComplete():void
|
|
73
|
+
{
|
|
74
|
+
testRunner.test = createSuite();
|
|
75
|
+
testRunner.startTest();
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
private function createSuite():TestSuite
|
|
79
|
+
{
|
|
80
|
+
var ts:TestSuite = new TestSuite();
|
|
81
|
+
|
|
82
|
+
// utils
|
|
83
|
+
ts.addTestSuite( StringUtilTest );
|
|
84
|
+
ts.addTestSuite( NumberFormatterTest );
|
|
85
|
+
ts.addTestSuite( ArrayUtilTest );
|
|
86
|
+
ts.addTestSuite( DateUtilTest );
|
|
87
|
+
ts.addTestSuite( IntUtilTest );
|
|
88
|
+
ts.addTestSuite( XMLUtilTest );
|
|
89
|
+
ts.addTestSuite( DictionaryUtilTest );
|
|
90
|
+
|
|
91
|
+
// crypto
|
|
92
|
+
ts.addTestSuite( HMACSHA1Test );
|
|
93
|
+
ts.addTestSuite( HMACMD5Test );
|
|
94
|
+
ts.addTestSuite( MD5Test );
|
|
95
|
+
ts.addTestSuite( SHA1Test );
|
|
96
|
+
ts.addTestSuite( SHA224Test );
|
|
97
|
+
ts.addTestSuite( SHA256Test );
|
|
98
|
+
ts.addTestSuite( WSSEUsernameTokenTest );
|
|
99
|
+
|
|
100
|
+
// net
|
|
101
|
+
ts.addTestSuite( URITest );
|
|
102
|
+
|
|
103
|
+
// serialization
|
|
104
|
+
ts.addTestSuite( JSONTest );
|
|
105
|
+
|
|
106
|
+
//images
|
|
107
|
+
ts.addTestSuite( JPGEncoderTest );
|
|
108
|
+
ts.addTestSuite( PNGEncoderTest );
|
|
109
|
+
|
|
110
|
+
//protocols.dict
|
|
111
|
+
ts.addTestSuite(ConnectedEventTest);
|
|
112
|
+
ts.addTestSuite(DatabaseEventTest);
|
|
113
|
+
ts.addTestSuite(DefinitionEventTest);
|
|
114
|
+
ts.addTestSuite(DefinitionHeaderEventTest);
|
|
115
|
+
ts.addTestSuite(DictionaryServerEventTest);
|
|
116
|
+
ts.addTestSuite(DisconnectedEventTest);
|
|
117
|
+
ts.addTestSuite(ErrorEventTest);
|
|
118
|
+
ts.addTestSuite(MatchEventTest);
|
|
119
|
+
ts.addTestSuite(MatchStrategiesEventTest);
|
|
120
|
+
ts.addTestSuite(NoMatchEventTest);
|
|
121
|
+
ts.addTestSuite(CompletedResponseEventTest);
|
|
122
|
+
|
|
123
|
+
//webapis
|
|
124
|
+
ts.addTestSuite(ServiceEventTest);
|
|
125
|
+
|
|
126
|
+
// air.crypto
|
|
127
|
+
ts.addTestSuite( EncryptionKeyGeneratorTest );
|
|
128
|
+
|
|
129
|
+
//air.filesystem
|
|
130
|
+
ts.addTestSuite(VolumeMonitorTest);
|
|
131
|
+
ts.addTestSuite(FileMonitorTest);
|
|
132
|
+
ts.addTestSuite(FileMonitorEventTest);
|
|
133
|
+
|
|
134
|
+
//air.net
|
|
135
|
+
ts.addTestSuite(ResourceCacheEventTest);
|
|
136
|
+
|
|
137
|
+
return ts;
|
|
138
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
|
|
3
|
+
<!--
|
|
4
|
+
Copyright (c) 2008, Adobe Systems Incorporated
|
|
5
|
+
All rights reserved.
|
|
6
|
+
|
|
7
|
+
Redistribution and use in source and binary forms, with or without
|
|
8
|
+
modification, are permitted provided that the following conditions are
|
|
9
|
+
met:
|
|
10
|
+
|
|
11
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer.
|
|
13
|
+
|
|
14
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
15
|
+
notice, this list of conditions and the following disclaimer in the
|
|
16
|
+
documentation and/or other materials provided with the distribution.
|
|
17
|
+
|
|
18
|
+
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
19
|
+
contributors may be used to endorse or promote products derived from
|
|
20
|
+
this software without specific prior written permission.
|
|
21
|
+
|
|
22
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
23
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
24
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
25
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
26
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
27
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
28
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
29
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
30
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
31
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
32
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
33
|
+
-->
|
|
34
|
+
|
|
35
|
+
<mx:Application
|
|
36
|
+
xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
|
|
37
|
+
xmlns:flexunit="flexunit.flexui.*"
|
|
38
|
+
creationComplete="onCreationComplete()">
|
|
39
|
+
|
|
40
|
+
<mx:Script source="CoreLibTestRunner.as" />
|
|
41
|
+
|
|
42
|
+
<mx:Canvas width="100%" height="100%">
|
|
43
|
+
<flexunit:TestRunnerBase id="testRunner" width="100%" height="100%" />
|
|
44
|
+
|
|
45
|
+
</mx:Canvas>
|
|
46
|
+
</mx:Application>
|