Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
Updated source files with newer style copyright notices and renamed o…
Browse files Browse the repository at this point in the history
…ne of the source files that was misspelled.
  • Loading branch information
rsperanza committed Nov 11, 2014
1 parent d030418 commit f57e075
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 80 deletions.
2 changes: 1 addition & 1 deletion BESSafeTcp/.settings/com.rim.tad.tools.qml.core.prefs
@@ -1,2 +1,2 @@
config-pri.hash=38DD7D74F1178ED2E0D2BB7F189451FA
config-pri.hash=17D809CBACB7093946391FEB11215EE2
eclipse.preferences.version=1
37 changes: 18 additions & 19 deletions BESSafeTcp/assets/main.qml
@@ -1,4 +1,19 @@
// Default empty project template
/*
* Copyright (c) 2012-2014 BlackBerry Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import bb.cascades 1.0
import bb.besutil 1.0

Expand Down Expand Up @@ -86,23 +101,7 @@ Page {
besConnect.testBSDTcpSockets();
}
}
/*
// test Curl OpenSSL button.
Button {
id: curlOpensslButton
text: "Test SSL Sockets with CURL HTTP tunnel"
topMargin: 20
rightMargin: 200
preferredWidth: 250
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Center
// Change the button text on click and hide the fruit button.
onClicked: {
besConnect.testCurlProxyOpenSSLSockets();
}
}
*/

// test BSD Tcp button.
Button {
id: curlButton
Expand All @@ -121,7 +120,7 @@ Page {
TextArea {
objectName: "console"
text: qsTr("")
textStyle.base: SystemDefaults.TextStyles.SmallText
textStyle.base: SystemDefaults.TextStyles.NormalText
verticalAlignment: VerticalAlignment.Bottom
horizontalAlignment: HorizontalAlignment.Fill
}
Expand Down
2 changes: 1 addition & 1 deletion BESSafeTcp/bar-descriptor.xml
Expand Up @@ -39,7 +39,7 @@

<!-- Fourth digit segment of the package version. First three segments are taken from the
<versionNumber> element. Must be an integer from 0 to 2^16-1 -->
<buildId>43</buildId>
<buildId>45</buildId>

<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
<!-- <versionLabel></versionLabel> -->
Expand Down
2 changes: 1 addition & 1 deletion BESSafeTcp/config.pri
Expand Up @@ -42,7 +42,7 @@ config_pri_source_group1 {
SOURCES += \
$$quote($$BASEDIR/src/BESConnect.cpp) \
$$quote($$BASEDIR/src/BESSafeTcp.cpp) \
$$quote($$BASEDIR/src/curllConnectThread.cpp) \
$$quote($$BASEDIR/src/curlConnectThread.cpp) \
$$quote($$BASEDIR/src/main.cpp) \
$$quote($$BASEDIR/src/sslSocketThread.cpp) \
$$quote($$BASEDIR/src/tcpSocketThread.cpp)
Expand Down
17 changes: 2 additions & 15 deletions BESSafeTcp/src/BESConnect.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2014 Research In Motion Limited.
* Copyright (c) 2012-2014 BlackBerry Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,12 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* BESSafeTcp.cpp
*
* Created on: Nov 28, 2012
* Author: rsperanza
*/

#include "BESConnect.hpp"
#include "BESSafeTcp.hpp"
Expand Down Expand Up @@ -227,14 +221,7 @@ void BESConnect::testQtSslSockets()

const char *hostName = "ca.yahoo.com"; // The host that you're connecting to
const int port = 443;
/*
QNetworkProxy proxy = m_testSocket.proxy();
if (proxy != QNetworkProxy::NoProxy) {
qDebug() << (QString("default proxy type: ") + proxy.type() + "\n");
qDebug() << (QString("default proxy host: ") + proxy.hostName() + "\n");
qDebug() << (QString("default proxy port: ") + proxy.port() + "\n");
}
*/

safeConnectQTcp(m_testSslSocket, QString(hostName), port);
}

Expand Down
8 changes: 1 addition & 7 deletions BESSafeTcp/src/BESConnect.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2014 Research In Motion Limited.
* Copyright (c) 2012-2014 BlackBerry Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,12 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* BESSafeTcp.h
*
* Created on: Nov 28, 2012
* Author: rsperanza
*/

#ifndef BESCONNECT_H_
#define BESCONNECT_H_
Expand Down
2 changes: 1 addition & 1 deletion BESSafeTcp/src/BESSafeTcp.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2014 Research In Motion Limited.
* Copyright (c) 2012-2014 BlackBerry Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
17 changes: 8 additions & 9 deletions BESSafeTcp/src/BESSafeTcp.hpp
@@ -1,13 +1,5 @@
// Default empty project template
#ifndef BESSafeTcp_HPP_
#define BESSafeTcp_HPP_

#include <QObject>

#include <bb/cascades/TextArea>

/*
* Copyright (c) 2012-2014 Research In Motion Limited.
* Copyright (c) 2012-2014 BlackBerry Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,6 +14,13 @@
* limitations under the License.
*/

#ifndef BESSafeTcp_HPP_
#define BESSafeTcp_HPP_

#include <QObject>

#include <bb/cascades/TextArea>

namespace bb { namespace cascades { class Application; }}

using namespace bb::cascades;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2012 Research In Motion Limited.
* Copyright (c) 2012-2014 BlackBerry Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,22 +24,6 @@
#include <errno.h>
#include <QDebug>

/*
* Copyright (c) 2012-2014 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
{
qDebug() << (QString(QByteArray((char *)ptr, size*nmemb)).append("\n"));
Expand Down
2 changes: 1 addition & 1 deletion BESSafeTcp/src/curlConnectThread.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2014 Research In Motion Limited.
* Copyright (c) 2012-2014 BlackBerry Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion BESSafeTcp/src/main.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2014 Research In Motion Limited.
* Copyright (c) 2012-2014 BlackBerry Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion BESSafeTcp/src/sslSocketThread.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2014 Research In Motion Limited.
* Copyright (c) 2012-2014 BlackBerry Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion BESSafeTcp/src/sslSocketThread.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2014 Research In Motion Limited.
* Copyright (c) 2012-2014 BlackBerry Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
7 changes: 4 additions & 3 deletions BESSafeTcp/src/tcpSocketThread.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2014 Research In Motion Limited.
* Copyright (c) 2012-2014 BlackBerry Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -51,9 +51,10 @@ TCPSocketThread::~TCPSocketThread() {

void TCPSocketThread::run()
{
const char* hostName = "developer.blackberry.com"; // The host that you're connecting to
const char* hostName = "developer.blackberry.com"; // The host that you're connecting to

const int port = 80;
const char *httpRequest = "GET / HTTP/1.1\r\nHost: developer.blackberry.com\r\n\r\n";
const char *httpRequest = "GET / HTTP/1.1\r\nHost: developer.blackberry.com\r\n\r\n";
unsigned int bytesRead = 0, bytesWritten = 0;
int error, responseCount = 0;
static fd_set write_handles;
Expand Down
2 changes: 1 addition & 1 deletion BESSafeTcp/src/tcpSocketThread.hpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2014 Research In Motion Limited.
* Copyright (c) 2012-2014 BlackBerry Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion BESSafeTcp/translations/BESSafeTcp.ts
Expand Up @@ -9,7 +9,7 @@
<translation></translation>
</message>
<message>
<location filename="../assets/main.qml" line="11"/>
<location filename="../assets/main.qml" line="26"/>
<source>Hello BESSafeTcp</source>
<translation type="unfinished"></translation>
</message>
Expand Down

0 comments on commit f57e075

Please sign in to comment.