Re: [Development] Qt 5.3 header diff: QtNetwork

2014-04-23 Thread Peter Hartmann
On 04/22/2014 11:57 PM, Sune Vuorela wrote:
 On 2014-04-22, Thiago Macieira thiago.macie...@intel.com wrote:
 --- a/src/network/ssl/qsslconfiguration.h
 +++ b/src/network/ssl/qsslconfiguration.h
 @@ -131,6 +132,21 @@ public:
 +static const char NextProtocolSpdy3_0[];
 +static const char NextProtocolHttp1_1[];

 These static const char[] kind of triggers my 'something looks wrong and
 not like Qt is supposed to look like'-feeling. I haven't investigated
 what they are for or how they are set and used. It just looks wrong to
 me.

The static const char[]s are what we came up with to support both 
predefined values as well as user-defined values for negotiating the 
Next Protocol in the SSL handshake, see 
https://codereview.qt-project.org/#change,64081,patchset=5 and the 
following patch sets for the discussion...

Peter


 /Sune

 ___
 Development mailing list
 Development@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/development


___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] Qt 5.3 header diff: QtNetwork

2014-04-22 Thread Thiago Macieira
http://macieira.org/~thiago/qt-5.3/QtNetwork.diff
diff --git a/src/network/access/qnetworkreply.h b/src/network/access/qnetworkreply.h
index a7db2d1..f11a5e8 100644
--- a/src/network/access/qnetworkreply.h
+++ b/src/network/access/qnetworkreply.h
@@ -93,12 +93,20 @@ public:
 ContentNotFoundError,
 AuthenticationRequiredError,
 ContentReSendError,
+ContentConflictError,
+ContentGoneError,
 UnknownContentError = 299,
 
 // protocol errors
 ProtocolUnknownError = 301,
 ProtocolInvalidOperationError,
-ProtocolFailure = 399
+ProtocolFailure = 399,
+
+// Server side errors (401-499)
+InternalServerError = 401,
+OperationNotImplementedError,
+ServiceUnavailableError,
+UnknownServerError = 499
 };
 
 ~QNetworkReply();
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index 1512c6d..27b02a8 100644
--- a/src/network/access/qnetworkrequest.h
+++ b/src/network/access/qnetworkrequest.h
@@ -86,6 +86,8 @@ public:
 DownloadBufferAttribute, // internal
 SynchronousRequestAttribute, // internal
 BackgroundRequestAttribute,
+SpdyAllowedAttribute,
+SpdyWasUsedAttribute,
 
 User = 1000,
 UserMax = 32767
diff --git a/src/network/kernel/qdnslookup.h b/src/network/kernel/qdnslookup.h
index 1df21d8..ffbef61 100644
--- a/src/network/kernel/qdnslookup.h
+++ b/src/network/kernel/qdnslookup.h
@@ -180,6 +180,7 @@ class Q_NETWORK_EXPORT QDnsLookup : public QObject
 Q_PROPERTY(QString errorString READ errorString NOTIFY finished)
 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
 Q_PROPERTY(Type type READ type WRITE setType NOTIFY typeChanged)
+Q_PROPERTY(QHostAddress nameserver READ nameserver WRITE setNameserver NOTIFY nameserverChanged)
 
 public:
 enum Error
@@ -209,6 +210,7 @@ public:
 
 explicit QDnsLookup(QObject *parent = 0);
 QDnsLookup(Type type, const QString name, QObject *parent = 0);
+QDnsLookup(Type type, const QString name, const QHostAddress nameserver, QObject *parent = 0);
 ~QDnsLookup();
 
 Error error() const;
@@ -221,6 +223,9 @@ public:
 Type type() const;
 void setType(QDnsLookup::Type);
 
+QHostAddress nameserver() const;
+void setNameserver(const QHostAddress nameserver);
+
 QListQDnsDomainNameRecord canonicalNameRecords() const;
 QListQDnsHostAddressRecord hostAddressRecords() const;
 QListQDnsMailExchangeRecord mailExchangeRecords() const;
@@ -238,6 +243,7 @@ Q_SIGNALS:
 void finished();
 void nameChanged(const QString name);
 void typeChanged(Type type);
+void nameserverChanged(const QHostAddress nameserver);
 
 private:
 Q_DECLARE_PRIVATE(QDnsLookup)
diff --git a/src/network/socket/qabstractsocket.h b/src/network/socket/qabstractsocket.h
index 46114ab..8b019cf 100644
--- a/src/network/socket/qabstractsocket.h
+++ b/src/network/socket/qabstractsocket.h
@@ -115,7 +115,9 @@ public:
 KeepAliveOption, // SO_KEEPALIVE
 MulticastTtlOption, // IP_MULTICAST_TTL
 MulticastLoopbackOption, // IP_MULTICAST_LOOPBACK
-TypeOfServiceOption //IP_TOS
+TypeOfServiceOption, //IP_TOS
+SendBufferSizeSocketOption,//SO_SNDBUF
+ReceiveBufferSizeSocketOption  //SO_RCVBUF
 };
 enum BindFlag {
 DefaultForPlatform = 0x0,
diff --git a/src/network/ssl/qsslcipher.h b/src/network/ssl/qsslcipher.h
index e351d79..f6ca033 100644
--- a/src/network/ssl/qsslcipher.h
+++ b/src/network/ssl/qsslcipher.h
@@ -57,6 +57,7 @@ class Q_NETWORK_EXPORT QSslCipher
 {
 public:
 QSslCipher();
+explicit QSslCipher(const QString name);
 QSslCipher(const QString name, QSsl::SslProtocol protocol);
 QSslCipher(const QSslCipher other);
 ~QSslCipher();
diff --git a/src/network/ssl/qsslconfiguration.h b/src/network/ssl/qsslconfiguration.h
index a48eceb..587187c 100644
--- a/src/network/ssl/qsslconfiguration.h
+++ b/src/network/ssl/qsslconfiguration.h
@@ -131,6 +132,21 @@ public:
 static QSslConfiguration defaultConfiguration();
 static void setDefaultConfiguration(const QSslConfiguration configuration);
 
+enum NextProtocolNegotiationStatus {
+NextProtocolNegotiationNone,
+NextProtocolNegotiationNegotiated,
+NextProtocolNegotiationUnsupported
+};
+
+void setAllowedNextProtocols(QListQByteArray protocols);
+QListQByteArray allowedNextProtocols() const;
+
+QByteArray nextNegotiatedProtocol() const;
+NextProtocolNegotiationStatus nextProtocolNegotiationStatus() const;
+
+static const char NextProtocolSpdy3_0[];
+static const char NextProtocolHttp1_1[];
+
 private:
 friend class QSslSocket;
 friend class QSslConfigurationPrivate;
___
Development mailing list
Development@qt-project.org

Re: [Development] Qt 5.3 header diff: QtNetwork

2014-04-22 Thread Sune Vuorela
On 2014-04-22, Thiago Macieira thiago.macie...@intel.com wrote:
 --- a/src/network/ssl/qsslconfiguration.h
 +++ b/src/network/ssl/qsslconfiguration.h
 @@ -131,6 +132,21 @@ public:
 +static const char NextProtocolSpdy3_0[];
 +static const char NextProtocolHttp1_1[];

These static const char[] kind of triggers my 'something looks wrong and
not like Qt is supposed to look like'-feeling. I haven't investigated
what they are for or how they are set and used. It just looks wrong to
me.

/Sune

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development