tauplatform 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG +10 -0
- data/lib/build/development/platform.rb +5 -1
- data/lib/build/development/web_server.rb +2 -0
- data/lib/commonAPI/coreapi/ext/shared/TimerImpl.cpp +10 -1
- data/lib/commonAPI/eventsource/ext/platform/android/ext_native.files +4 -4
- data/lib/commonAPI/eventsource/ext/shared/EventSource.h +2 -2
- data/lib/commonAPI/mediacapture/ext/camera.xml +16 -11
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraEclair.java +17 -6
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraObject.java +304 -294
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraRhoListener.java +528 -282
- data/lib/commonAPI/mediacapture/ext/platform/android/src/com/rho/camera/CameraSingletonObject.java +119 -94
- data/lib/commonAPI/mediacapture/ext/platform/wm/Mediacapture.vcproj +3 -3
- data/lib/commonAPI/mediacapture/ext/platform/wp8/src/Camera_impl.cs +63 -43
- data/lib/extensions/barcode-old/ext/barcode/platform/iphone/Rakefile +1 -1
- data/lib/framework/rhodes.rb +2 -2
- data/lib/framework/version.rb +2 -2
- data/lib/rhodes.rb +2 -2
- data/platform/android/Rhodes/jni/src/sslimpl.cpp +7 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/SSLImpl.java +11 -4
- data/platform/android/build/android.rake +6 -0
- data/platform/iphone/Classes/SimpleMainView.m +8 -3
- data/platform/iphone/Classes/URLProtocol/CRhoURLProtocol.m +1 -1
- data/platform/shared/common/RhodesApp.cpp +4 -0
- data/platform/shared/common/RhodesApp.h +8 -0
- data/platform/shared/net/CURLNetRequest.cpp +4 -2
- data/platform/shared/net/HttpServer.cpp +2 -2
- data/platform/shared/ruby/ext/rho/rhoruby.c +1 -1
- data/res/generators/templates/iphone_project/Bremen7.xcodeproj/project.pbxproj +3 -0
- data/version +1 -1
- metadata +2 -2
@@ -41,7 +41,7 @@ namespace "build" do
|
|
41
41
|
|
42
42
|
task :all => :config do
|
43
43
|
|
44
|
-
iphone_path = ENV['RHO_ROOT'] + '/lib/extensions/barcode/ext/barcode/platform/iphone'
|
44
|
+
iphone_path = ENV['RHO_ROOT'] + '/lib/extensions/barcode-old/ext/barcode/platform/iphone'
|
45
45
|
|
46
46
|
|
47
47
|
simulator = $sdk =~ /iphonesimulator/
|
data/lib/framework/rhodes.rb
CHANGED
data/lib/framework/version.rb
CHANGED
data/lib/rhodes.rb
CHANGED
@@ -102,7 +102,7 @@ SSLImpl::SSLImpl()
|
|
102
102
|
if (!cls) return;
|
103
103
|
midConstructor = getJNIClassMethod(env, cls, "<init>", "()V");
|
104
104
|
if (!midConstructor) return;
|
105
|
-
midConnect = getJNIClassMethod(env, cls, "connect", "(
|
105
|
+
midConnect = getJNIClassMethod(env, cls, "connect", "(IZLjava/lang/String;)Z");
|
106
106
|
if (!midConnect) return;
|
107
107
|
midShutdown = getJNIClassMethod(env, cls, "shutdown", "()V");
|
108
108
|
if (!midShutdown) return;
|
@@ -133,7 +133,12 @@ CURLcode SSLImpl::connect(int sockfd, int nonblocking, int *done, int ssl_verify
|
|
133
133
|
if (!storage) return CURLE_SSL_CONNECT_ERROR;
|
134
134
|
|
135
135
|
jobject obj = (jobject)storage;
|
136
|
-
|
136
|
+
|
137
|
+
JNIEnv* env = jnienv();
|
138
|
+
jhstring jHostname = rho_cast<jstring>(env, host_name);
|
139
|
+
|
140
|
+
|
141
|
+
jboolean result = jnienv()->CallBooleanMethod(obj, midConnect, sockfd, (jboolean)ssl_verify_peer, (jstring)jHostname.get());
|
137
142
|
if (!result)
|
138
143
|
return CURLE_SSL_CONNECT_ERROR;
|
139
144
|
|
@@ -61,6 +61,8 @@ import com.rhomobile.rhodes.Logger;
|
|
61
61
|
import com.rhomobile.rhodes.RhoConf;
|
62
62
|
import com.rhomobile.rhodes.file.RhoFileApi;
|
63
63
|
|
64
|
+
import java.util.StringTokenizer;
|
65
|
+
|
64
66
|
|
65
67
|
public class SSLImpl {
|
66
68
|
|
@@ -342,7 +344,7 @@ public class SSLImpl {
|
|
342
344
|
Logger.I(TAG, "Secure SSL factory initialization completed");
|
343
345
|
|
344
346
|
return (SSLSocketFactory)context.getSocketFactory();
|
345
|
-
|
347
|
+
|
346
348
|
}
|
347
349
|
|
348
350
|
private static SSLSocketFactory getFactory(boolean verify) throws NoSuchAlgorithmException, KeyManagementException, CertificateException, KeyStoreException, IOException, UnrecoverableKeyException {
|
@@ -357,18 +359,23 @@ public class SSLImpl {
|
|
357
359
|
SSLContext context = SSLContext.getInstance("TLS");
|
358
360
|
TrustManager[] managers = {new MyTrustManager()};
|
359
361
|
context.init(null, managers, new SecureRandom());
|
360
|
-
|
362
|
+
factory = context.getSocketFactory();
|
361
363
|
}
|
362
364
|
return factory;
|
363
365
|
}
|
364
366
|
|
365
|
-
public boolean connect(int fd, boolean sslVerifyPeer) {
|
367
|
+
public boolean connect(int fd, boolean sslVerifyPeer, String hostname ) {
|
366
368
|
try {
|
369
|
+
Logger.I(TAG, "SSL connect to " + hostname);
|
370
|
+
|
367
371
|
RhoSockAddr remote = getRemoteSockAddr(fd);
|
368
372
|
Socket s = new RhoSocket(fd, remote);
|
369
373
|
SSLSocketFactory f = getFactory(sslVerifyPeer);
|
370
374
|
|
371
|
-
|
375
|
+
StringTokenizer st = new StringTokenizer( hostname, ":" );
|
376
|
+
String host = st.nextToken();
|
377
|
+
|
378
|
+
SSLSocket aSock = (SSLSocket)f.createSocket(s, host, remote.port, true);
|
372
379
|
aSock.setUseClientMode(true);
|
373
380
|
|
374
381
|
synchronized (this) {
|
@@ -1932,6 +1932,12 @@ namespace "build" do
|
|
1932
1932
|
classpath += $path_separator + jar
|
1933
1933
|
end
|
1934
1934
|
|
1935
|
+
javalibsdir = Jake.get_absolute("platform/android/lib")
|
1936
|
+
|
1937
|
+
Dir.glob( File.join(javalibsdir,"*.jar" )) do |filepath|
|
1938
|
+
classpath += $path_separator + filepath
|
1939
|
+
end
|
1940
|
+
|
1935
1941
|
$ext_android_additional_sources.each do |extpath, list|
|
1936
1942
|
ext = File.basename(extpath)
|
1937
1943
|
ext_classpath = classpath
|
@@ -342,6 +342,7 @@ static BOOL makeHiddenUntilLoadContent = YES;
|
|
342
342
|
}
|
343
343
|
|
344
344
|
[toolbar removeFromSuperview];
|
345
|
+
|
345
346
|
//MOHUS
|
346
347
|
//assert(!toolbar || [toolbar retainCount] == 1);
|
347
348
|
self.toolbar = nil;
|
@@ -359,11 +360,15 @@ static BOOL makeHiddenUntilLoadContent = YES;
|
|
359
360
|
wFrame.origin.y = 0;
|
360
361
|
|
361
362
|
toolbar = [self newToolbar:bar_info frame:wFrame];
|
362
|
-
|
363
|
+
|
364
|
+
//MOHUS
|
365
|
+
//assert([toolbar retainCount] == 1);
|
363
366
|
toolbar.tag = RHO_TAG_TOOLBAR;
|
364
367
|
UIView* root = self.view;
|
365
368
|
[root addSubview:toolbar];
|
366
|
-
|
369
|
+
|
370
|
+
//MOHUS
|
371
|
+
//assert([toolbar retainCount] == 2);
|
367
372
|
|
368
373
|
CGRect tbFrame = toolbar.frame;
|
369
374
|
wFrame = [self getContentRect];
|
@@ -503,7 +508,7 @@ static BOOL makeHiddenUntilLoadContent = YES;
|
|
503
508
|
self.view = root;
|
504
509
|
|
505
510
|
[root release];
|
506
|
-
assert([root retainCount] == 1);
|
511
|
+
//assert([root retainCount] == 1);
|
507
512
|
}
|
508
513
|
|
509
514
|
- (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
|
@@ -206,7 +206,7 @@ int on_http_cb(http_parser* parser) { return 0; }
|
|
206
206
|
|
207
207
|
- (CRhoURLResponse*) makeDirectHttpRequest:(NSURL*)theUrl
|
208
208
|
{
|
209
|
-
NSLog(@"Will make local request to %@", [theUrl absoluteString]);
|
209
|
+
//NSLog(@"Will make local request to %@", [theUrl absoluteString]);
|
210
210
|
|
211
211
|
const char* uri = [[theUrl path] UTF8String];
|
212
212
|
const char* method = [[[self request] HTTPMethod] UTF8String];
|
@@ -2932,6 +2932,10 @@ void rho_rhodesapp_setStartParametersOriginal(const char* szParams)
|
|
2932
2932
|
RHODESAPP().setStartParametersOriginal(szParams? szParams:"");
|
2933
2933
|
}
|
2934
2934
|
|
2935
|
+
int rho_rhodesapp_is_application_active() {
|
2936
|
+
return RHODESAPP().isApplicationActive() ? 1 : 0;
|
2937
|
+
}
|
2938
|
+
|
2935
2939
|
int rho_rhodesapp_canstartapp(const char* szCmdLine, const char* szSeparators)
|
2936
2940
|
{
|
2937
2941
|
String strCmdLineSecToken;
|
@@ -112,6 +112,7 @@ namespace common {
|
|
112
112
|
virtual bool onReinstallConfigUpdate(const HashtablePtr<String,Vector<String>* >& conflicts) = 0;
|
113
113
|
virtual bool onMigrateSource() = 0;
|
114
114
|
virtual bool onDeviceScreenEvent(const int newState) = 0;
|
115
|
+
virtual bool isApplicationActive() = 0;
|
115
116
|
};
|
116
117
|
|
117
118
|
class ApplicationEventReceiver : public IApplicationEventReceiver
|
@@ -132,6 +133,8 @@ namespace common {
|
|
132
133
|
|
133
134
|
virtual bool isCallbackSet();
|
134
135
|
virtual void setCallback(apiGenerator::CMethodResult& oResult);
|
136
|
+
|
137
|
+
virtual bool isApplicationActive() { return m_app_state == applicationStateActivated; }
|
135
138
|
};
|
136
139
|
|
137
140
|
class CRhodesApp : public CRhodesAppBase
|
@@ -290,6 +293,8 @@ public:
|
|
290
293
|
#ifdef OS_WINCE
|
291
294
|
bool isWebkitOutofProcess();
|
292
295
|
#endif
|
296
|
+
|
297
|
+
virtual bool isApplicationActive() { return getApplicationEventReceiver()->isApplicationActive(); }
|
293
298
|
|
294
299
|
protected:
|
295
300
|
virtual void run();
|
@@ -410,6 +415,9 @@ void rho_platform_restart_application();
|
|
410
415
|
void rho_sys_set_network_status_notify(const char* url, int poll_interval);
|
411
416
|
void rho_sys_clear_network_status_notify();
|
412
417
|
|
418
|
+
int rho_rhodesapp_is_application_active();
|
419
|
+
|
420
|
+
|
413
421
|
#ifdef __cplusplus
|
414
422
|
};
|
415
423
|
#endif //__cplusplus
|
@@ -673,9 +673,11 @@ curl_slist *CURLNetRequest::CURLHolder::set_options(const char *method, const St
|
|
673
673
|
// could repeated twice or more times
|
674
674
|
if (RHODESAPP().isBaseUrl(strUrl))
|
675
675
|
{
|
676
|
-
|
677
|
-
|
676
|
+
timeout = 10*24*60*60;
|
677
|
+
curl_easy_setopt(m_curl, CURLOPT_CONNECTTIMEOUT, timeout);
|
678
|
+
curl_easy_setopt(m_curl, CURLOPT_TIMEOUT, timeout);
|
678
679
|
}
|
680
|
+
|
679
681
|
|
680
682
|
curl_slist *hdrs = NULL;
|
681
683
|
// Disable "Expect: 100-continue"
|
@@ -302,8 +302,8 @@ CHttpServer::CHttpServer(int port, String const &root, String const &user_root,
|
|
302
302
|
, m_localResponseWriter(0)
|
303
303
|
, m_pQueue(0)
|
304
304
|
#endif
|
305
|
-
{
|
306
|
-
m_enable_external_access =
|
305
|
+
{
|
306
|
+
m_enable_external_access = RHOCONF().getBool("enable_external_server_access");
|
307
307
|
m_started_as_separated_simple_server = false;
|
308
308
|
m_root = CFilePath::normalizePath(root);
|
309
309
|
#ifdef RHODES_EMULATOR
|
@@ -530,6 +530,7 @@
|
|
530
530
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
531
531
|
COMPRESS_PNG_FILES = NO;
|
532
532
|
COPY_PHASE_STRIP = NO;
|
533
|
+
ENABLE_BITCODE = NO;
|
533
534
|
GCC_DYNAMIC_NO_PIC = NO;
|
534
535
|
GCC_OPTIMIZATION_LEVEL = 0;
|
535
536
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
@@ -572,6 +573,7 @@
|
|
572
573
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
573
574
|
COMPRESS_PNG_FILES = NO;
|
574
575
|
COPY_PHASE_STRIP = YES;
|
576
|
+
ENABLE_BITCODE = NO;
|
575
577
|
EXTENSIONS_LDFLAGS = "-filelist $(TARGET_TEMP_DIR)/rhodeslibs.txt";
|
576
578
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
577
579
|
GCC_PREFIX_HEADER = rhorunner_Prefix.pch;
|
@@ -629,6 +631,7 @@
|
|
629
631
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
630
632
|
COMPRESS_PNG_FILES = NO;
|
631
633
|
COPY_PHASE_STRIP = YES;
|
634
|
+
ENABLE_BITCODE = NO;
|
632
635
|
EXTENSIONS_LDFLAGS = "-filelist $(TARGET_TEMP_DIR)/rhodeslibs.txt";
|
633
636
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
634
637
|
GCC_PREFIX_HEADER = rhorunner_Prefix.pch;
|
data/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tauplatform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TAU Technologies
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: templater
|