Skip to content

Commit

Permalink
Added okhttp3 library
Browse files Browse the repository at this point in the history
  • Loading branch information
marchbold committed Apr 20, 2020
1 parent c7174bf commit e1b8a99
Show file tree
Hide file tree
Showing 61 changed files with 673 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@


###### 2020.04.20 [v3.0.0]

```
Added okhttp3 library
```


###### 2020.04.02 [v2.0.0]

```
Expand Down
4 changes: 4 additions & 0 deletions example/okhttp3/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bin-debug
bin
out
*Distriqt*
Binary file added example/okhttp3/simple/src/Assets.car
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/Default@2x~iphone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/Default~iphone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions example/okhttp3/simple/src/Testokhttp3-app.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/32.0">
<id>com.distriqt.test</id>
<filename>Testokhttp3</filename>
<name>Testokhttp3</name>
<versionNumber>0.0.1</versionNumber>

<initialWindow>
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
<autoOrients>false</autoOrients>
<fullScreen>false</fullScreen>
<visible>true</visible>
</initialWindow>

<icon>
<image16x16>icons/icon16x16.png</image16x16>
<image29x29>icons/icon29x29.png</image29x29>
<image32x32>icons/icon32x32.png</image32x32>
<image36x36>icons/icon36x36.png</image36x36>
<image48x48>icons/icon48x48.png</image48x48>
<image57x57>icons/icon57x57.png</image57x57>
<image72x72>icons/icon72x72.png</image72x72>
<image76x76>icons/icon76x76.png</image76x76>
<image114x114>icons/icon114x114.png</image114x114>
<image120x120>icons/icon120x120.png</image120x120>
<image128x128>icons/icon128x128.png</image128x128>
<image152x152>icons/icon152x152.png</image152x152>
<image512x512>icons/icon512x512.png</image512x512>
</icon>

<iPhone>
<InfoAdditions><![CDATA[
<key>UIDeviceFamily</key>
<array>
<string>1</string>
<string>2</string>
</array>
]]></InfoAdditions>
<requestedDisplayResolution>high</requestedDisplayResolution>
<Entitlements>
<![CDATA[
]]>
</Entitlements>
</iPhone>

<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
]]></manifestAdditions>
</android>

<extensions>
<extensionID>com.distriqt.Core</extensionID>
<extensionID>com.distriqt.okhttp3</extensionID>
</extensions>

</application>
141 changes: 141 additions & 0 deletions example/okhttp3/simple/src/Testokhttp3.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
/**
* __ __ __
* ____/ /_ ____/ /______ _ ___ / /_
* / __ / / ___/ __/ ___/ / __ `/ __/
* / /_/ / (__ ) / / / / / /_/ / /
* \__,_/_/____/_/ /_/ /_/\__, /_/
* / /
* \/
* http://distriqt.com
*
* This is a test application for the distriqt extension
*
* @author Michael Archbold & Shane Korin
*
*/
package
{
import com.distriqt.extension.okhttp3.okhttp3;

import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFormat;


/**
* Sample application for using the okhttp3 Native Extension
*/
public class Testokhttp3 extends Sprite
{

//
// VARIABLES
//


private var _text : TextField;


/**
* Class constructor
*/
public function Testokhttp3()
{
super();
create();
init();
}



//
// INITIALISATION
//

private function create( ):void
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;

_text = new TextField();
_text.defaultTextFormat = new TextFormat( "_typewriter", 18 );
addChild( _text );

stage.addEventListener( Event.RESIZE, stage_resizeHandler, false, 0, true );
stage.addEventListener( MouseEvent.CLICK, mouseClickHandler, false, 0, true );

addEventListener( Event.ACTIVATE, activateHandler, false, 0, true );
addEventListener( Event.DEACTIVATE, deactivateHandler, false, 0, true );
}


private function init( ):void
{
try
{
message( "okhttp3 Supported: " + okhttp3.isSupported );
message( "okhttp3 Version: " + okhttp3.service.version );

//
// Add test inits here
//
}
catch (e:Error)
{
message( "ERROR::"+e.message );
}
}


//
// FUNCTIONALITY
//

private function message( str:String ):void
{
trace( str );
_text.appendText(str+"\n");
}


//
// EVENT HANDLERS
//

private function stage_resizeHandler( event:Event ):void
{
_text.width = stage.stageWidth;
_text.height = stage.stageHeight - 100;
}


private function mouseClickHandler( event:MouseEvent ):void
{
//
// Do something when user clicks screen?
//
}


private function activateHandler( event:Event ):void
{
}

private function deactivateHandler( event:Event ):void
{
}


//
// EXTENSION HANDLERS
//



}
}

Binary file added example/okhttp3/simple/src/icons/icon114x114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/icons/icon120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/icons/icon128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/icons/icon152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/icons/icon16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/icons/icon29x29.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/icons/icon32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/icons/icon36x36.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/icons/icon48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/icons/icon512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/icons/icon57x57.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/icons/icon72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/simple/src/icons/icon76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added example/okhttp3/starling/libs/feathers.swc
Binary file not shown.
Binary file added example/okhttp3/starling/libs/starling.swc
Binary file not shown.
Binary file added example/okhttp3/starling/src/Assets.car
Binary file not shown.
34 changes: 34 additions & 0 deletions example/okhttp3/starling/src/Config.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* __ __ __
* ____/ /_ ____/ /______ _ ___ / /_
* / __ / / ___/ __/ ___/ / __ `/ __/
* / /_/ / (__ ) / / / / / /_/ / /
* \__,_/_/____/_/ /_/ /_/\__, /_/
* / /
* \/
* http://distriqt.com
*
* @file Config.as
* @brief
* @author "Michael Archbold (ma&#64;distriqt.com)"
* @created 07/10/2014
* @copyright http://distriqt.com/copyright/license.txt
*/
package
{

/**
*
*/
public class Config
{

////////////////////////////////////////////////////////
// VARIABLES
//

public static var scale : Number = 1;


}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/okhttp3/starling/src/Default~iphone.png
72 changes: 72 additions & 0 deletions example/okhttp3/starling/src/Testokhttp3-app.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/32.0">
<id>com.distriqt.test</id>
<filename>Testokhttp3</filename>
<name>Testokhttp3</name>
<versionNumber>0.0.1</versionNumber>

<initialWindow>
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
<autoOrients>true</autoOrients>
<fullScreen>false</fullScreen>
<visible>true</visible>
<renderMode>direct</renderMode>
</initialWindow>

<icon>
<image16x16>icons/icon16x16.png</image16x16>
<image29x29>icons/icon29x29.png</image29x29>
<image32x32>icons/icon32x32.png</image32x32>
<image36x36>icons/icon36x36.png</image36x36>
<image48x48>icons/icon48x48.png</image48x48>
<image57x57>icons/icon57x57.png</image57x57>
<image72x72>icons/icon72x72.png</image72x72>
<image76x76>icons/icon76x76.png</image76x76>
<image114x114>icons/icon114x114.png</image114x114>
<image120x120>icons/icon120x120.png</image120x120>
<image128x128>icons/icon128x128.png</image128x128>
<image152x152>icons/icon152x152.png</image152x152>
<image512x512>icons/icon512x512.png</image512x512>
</icon>

<iPhone>
<InfoAdditions><![CDATA[
<key>UIDeviceFamily</key>
<array>
<string>1</string>
<string>2</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
]]></InfoAdditions>
<requestedDisplayResolution>high</requestedDisplayResolution>
<Entitlements>
<![CDATA[
]]>
</Entitlements>
</iPhone>

<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto" >
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.INTERNET"/>
<application android:hardwareAccelerated="true">
</application>
</manifest>
]]></manifestAdditions>
</android>

<extensions>
<extensionID>com.distriqt.Core</extensionID>
<extensionID>com.distriqt.okhttp3</extensionID>
</extensions>

</application>
Loading

0 comments on commit e1b8a99

Please sign in to comment.