2011-03-01 17:38 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtnetwork/hbqt_init.cpp
* contrib/hbqt/qtnetwork/hbqtnetwork.hbx
* contrib/hbqt/qtnetwork/qth/filelist.hbm
! Adjusted: to take use of new classes intead of NULL pointers.
+ contrib/hbqt/qtnetwork/qth/QNetworkProxy.qth
+ contrib/hbqt/qtnetwork/qth/QUrlInfo.qth
+ Added: two pending classes.
This commit is contained in:
@@ -71,10 +71,8 @@ HB_EXTERN_BEGIN
|
||||
extern void * hbqt_gcAllocate_QObject( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QHttpResponseHeader( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QNetworkRequest( void * pObj, bool bNew );
|
||||
#if 0 // Classes not initiated yet!
|
||||
extern void * hbqt_gcAllocate_QNetworkProxy( void * pObj, bool bNew );
|
||||
extern void * hbqt_gcAllocate_QUrlInfo( void * pObj, bool bNew );
|
||||
#endif
|
||||
HB_EXTERN_END
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -95,7 +93,7 @@ static void hbqt_SlotsExecQNetworkProxyPointer( PHB_ITEM * codeBlock, void ** ar
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 1 ] ) ), false ), ( const char * ) pList.at( 0 ).data() ) );
|
||||
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QNetworkProxy( new QNetworkProxy( ( *reinterpret_cast< QNetworkProxy( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QNetworkProxy" ) );
|
||||
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QObject( ( *reinterpret_cast< void*( * ) >( arguments[ 2 ] ) ), false ), ( const char * ) pList.at( 1 ).data() ) );
|
||||
hb_vmSend( 2 );
|
||||
}
|
||||
@@ -116,11 +114,7 @@ static void hbqt_SlotsExecQUrlInfo( PHB_ITEM * codeBlock, void ** arguments, QSt
|
||||
|
||||
hb_vmPushEvalSym();
|
||||
hb_vmPush( codeBlock );
|
||||
#if 0
|
||||
hb_vmPush( hbqt_create_objectGC( hbqt_gcAllocate_QUrlInfo( new QUrlInfo( ( *reinterpret_cast< QUrlInfo( * ) >( arguments[ 1 ] ) ) ), true ), "hb_QUrlInfo" ) );
|
||||
#else
|
||||
hb_vmPushNil();
|
||||
#endif
|
||||
hb_vmSend( 1 );
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,9 @@ DYNAMIC HB_QHTTP
|
||||
DYNAMIC HB_QHTTPHEADER
|
||||
DYNAMIC HB_QHTTPREQUESTHEADER
|
||||
DYNAMIC HB_QHTTPRESPONSEHEADER
|
||||
DYNAMIC HB_QNETWORKPROXY
|
||||
DYNAMIC HB_QNETWORKREQUEST
|
||||
DYNAMIC HB_QURLINFO
|
||||
DYNAMIC QFTP
|
||||
DYNAMIC QFTPFROMPOINTER
|
||||
DYNAMIC QHTTP
|
||||
@@ -43,8 +45,12 @@ DYNAMIC QHTTPREQUESTHEADER
|
||||
DYNAMIC QHTTPREQUESTHEADERFROMPOINTER
|
||||
DYNAMIC QHTTPRESPONSEHEADER
|
||||
DYNAMIC QHTTPRESPONSEHEADERFROMPOINTER
|
||||
DYNAMIC QNETWORKPROXY
|
||||
DYNAMIC QNETWORKPROXYFROMPOINTER
|
||||
DYNAMIC QNETWORKREQUEST
|
||||
DYNAMIC QNETWORKREQUESTFROMPOINTER
|
||||
DYNAMIC QURLINFO
|
||||
DYNAMIC QURLINFOFROMPOINTER
|
||||
DYNAMIC __HBQTNETWORK
|
||||
|
||||
#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__HBQTNETWORK__REQUEST )
|
||||
|
||||
79
harbour/contrib/hbqt/qtnetwork/qth/QNetworkProxy.qth
Normal file
79
harbour/contrib/hbqt/qtnetwork/qth/QNetworkProxy.qth
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Qt wrapper generator control file
|
||||
*
|
||||
* Copyright 2009-2011 Pritpal Bedi <bedipritpal@hotmail.com>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* See COPYING for licensing terms.
|
||||
*/
|
||||
|
||||
; Header File to Generate Sources
|
||||
;
|
||||
|
||||
<CLASS>
|
||||
QObject = no
|
||||
Inherit =
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<CODE>
|
||||
#include <QtNetwork/QNetworkProxy>
|
||||
|
||||
|
||||
/*
|
||||
* QNetworkProxy ()
|
||||
* QNetworkProxy ( ProxyType type, const QString & hostName = QString(), quint16 port = 0, const QString & user = QString(), const QString & password = QString() )
|
||||
* QNetworkProxy ( const QNetworkProxy & other )
|
||||
* ~QNetworkProxy ()
|
||||
*/
|
||||
HB_FUNC( QT_QNETWORKPROXY )
|
||||
{
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
__HB_RETPTRGC__( new QNetworkProxy( *hbqt_par_QNetworkProxy( 1 ) ) );
|
||||
}
|
||||
else if( hb_pcount() >= 1 && HB_ISNUM( 1 ) )
|
||||
{
|
||||
__HB_RETPTRGC__( new QNetworkProxy( ( QNetworkProxy::ProxyType ) hb_parni( 1 ), ( HB_ISCHAR( 2 ) ? hbqt_par_QString( 2 ) : QString() ), ( quint16 ) ( HB_ISNUM( 3 ) ? hb_parni( 3 ) : 0 ), ( HB_ISCHAR( 4 ) ? hbqt_par_QString( 4 ) : QString() ), ( HB_ISCHAR( 5 ) ? hbqt_par_QString( 5 ) : QString() ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
__HB_RETPTRGC__( new QNetworkProxy() );
|
||||
}
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
flags Capabilities
|
||||
enum Capability { TunnelingCapability, ListeningCapability, UdpTunnelingCapability, CachingCapability, HostNameLookupCapability }
|
||||
enum ProxyType { NoProxy, DefaultProxy, Socks5Proxy, HttpProxy, HttpCachingProxy, FtpCachingProxy }
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
Capabilities capabilities () const
|
||||
QString hostName () const
|
||||
bool isCachingProxy () const
|
||||
bool isTransparentProxy () const
|
||||
QString password () const
|
||||
quint16 port () const
|
||||
void setCapabilities ( Capabilities capabilities )
|
||||
void setHostName ( const QString & hostName )
|
||||
void setPassword ( const QString & password )
|
||||
void setPort ( quint16 port )
|
||||
void setType ( QNetworkProxy::ProxyType type )
|
||||
void setUser ( const QString & user )
|
||||
QNetworkProxy::ProxyType type () const
|
||||
QString user () const
|
||||
QNetworkProxy applicationProxy ()
|
||||
void setApplicationProxy ( const QNetworkProxy & networkProxy )
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
</SIGNALS>
|
||||
89
harbour/contrib/hbqt/qtnetwork/qth/QUrlInfo.qth
Normal file
89
harbour/contrib/hbqt/qtnetwork/qth/QUrlInfo.qth
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Qt wrapper generator control file
|
||||
*
|
||||
* Copyright 2009-2011 Pritpal Bedi <bedipritpal@hotmail.com>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* See COPYING for licensing terms.
|
||||
*/
|
||||
|
||||
; Header File to Generate Sources
|
||||
;
|
||||
|
||||
<CLASS>
|
||||
QObject = no
|
||||
Inherit =
|
||||
New =
|
||||
</CLASS>
|
||||
|
||||
<CODE>
|
||||
#include <QtNetwork/QUrlInfo>
|
||||
|
||||
|
||||
/*
|
||||
* QUrlInfo ()
|
||||
* QUrlInfo ( const QUrlInfo & ui )
|
||||
* QUrlInfo ( const QString & name, int permissions, const QString & owner, const QString & group, qint64 size, const QDateTime & lastModified, const QDateTime & lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable )
|
||||
* QUrlInfo ( const QUrl & url, int permissions, const QString & owner, const QString & group, qint64 size, const QDateTime & lastModified, const QDateTime & lastRead, bool isDir, bool isFile, bool isSymLink, bool isWritable, bool isReadable, bool isExecutable )
|
||||
* virtual ~QUrlInfo ()
|
||||
*
|
||||
*/
|
||||
HB_FUNC( QT_QURLINFO )
|
||||
{
|
||||
if( hb_pcount() == 1 && HB_ISPOINTER( 1 ) )
|
||||
{
|
||||
__HB_RETPTRGC__( new QUrlInfo( *hbqt_par_QUrlInfo( 1 ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
__HB_RETPTRGC__( new QUrlInfo() );
|
||||
}
|
||||
}
|
||||
</CODE>
|
||||
|
||||
<ENUMS>
|
||||
enum PermissionSpec { ReadOwner, WriteOwner, ExeOwner, ReadGroup, ..., ExeOther }
|
||||
</ENUMS>
|
||||
|
||||
<PROTOS>
|
||||
QString group () const
|
||||
bool isDir () const
|
||||
bool isExecutable () const
|
||||
bool isFile () const
|
||||
bool isReadable () const
|
||||
bool isSymLink () const
|
||||
bool isValid () const
|
||||
bool isWritable () const
|
||||
QDateTime lastModified () const
|
||||
QDateTime lastRead () const
|
||||
QString name () const
|
||||
QString owner () const
|
||||
int permissions () const
|
||||
virtual void setDir ( bool b )
|
||||
virtual void setFile ( bool b )
|
||||
virtual void setGroup ( const QString & s )
|
||||
virtual void setLastModified ( const QDateTime & dt )
|
||||
void setLastRead ( const QDateTime & dt )
|
||||
virtual void setName ( const QString & name )
|
||||
virtual void setOwner ( const QString & s )
|
||||
virtual void setPermissions ( int p )
|
||||
virtual void setReadable ( bool b )
|
||||
virtual void setSize ( qint64 size )
|
||||
virtual void setSymLink ( bool b )
|
||||
virtual void setWritable ( bool b )
|
||||
qint64 size () const
|
||||
|
||||
bool equal ( const QUrlInfo & i1, const QUrlInfo & i2, int sortBy )
|
||||
bool greaterThan ( const QUrlInfo & i1, const QUrlInfo & i2, int sortBy )
|
||||
bool lessThan ( const QUrlInfo & i1, const QUrlInfo & i2, int sortBy )
|
||||
</PROTOS>
|
||||
|
||||
<SLOTS>
|
||||
</SLOTS>
|
||||
|
||||
<SIGNALS>
|
||||
</SIGNALS>
|
||||
@@ -12,3 +12,5 @@ QHttpHeader.qth
|
||||
QHttpRequestHeader.qth
|
||||
QHttpResponseHeader.qth
|
||||
QNetworkRequest.qth
|
||||
QNetworkProxy.qth
|
||||
QUrlInfo.qth
|
||||
|
||||
Reference in New Issue
Block a user