Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSNetworkOperation_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSNetworkOperation_p.h
00003  -------------------
00004  begin                : 21/03/2011
00005  copyright            : (C) 2003-2011 by InfoSiAL S.L.
00006  email                : mail@infosial.com
00007  ***************************************************************************/
00008 /***************************************************************************
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; version 2 of the License.               *
00012  ***************************************************************************/
00013 /***************************************************************************
00014  Este  programa es software libre. Puede redistribuirlo y/o modificarlo
00015  bajo  los  términos  de  la  Licencia  Pública General de GNU   en  su
00016  versión 2, publicada  por  la  Free  Software Foundation.
00017  ***************************************************************************/
00018 
00019 #ifndef AQSNETWORKOPERATION_P_H_
00020 #define AQSNETWORKOPERATION_P_H_
00021 
00022 #include "AQSObject_p.h"
00023 #include "AQSByteArray_p.h"
00024 #include <qnetworkprotocol.h>
00025 
00026 class AQSNetworkOperation : public AQSObject
00027 {
00028   Q_OBJECT
00029 
00030   AQ_DECLARE_AQS_OBJECT(NetworkOperation, Object);
00031 
00032   //@AQ_BEGIN_DEF_PUB_SLOTS@
00033 public slots:
00034   void setState(uint);
00035   void setProtocolDetail(const QString &);
00036   void setErrorCode(int);
00037   void setArg(int, const QString &);
00038   void setRawArg(int, QByteArray *);
00039   void setRawArg(int, AQSByteArray *);
00040   uint operation() const;
00041   uint state() const;
00042   QString arg(int) const;
00043   QByteArray rawArg(int) const;
00044   QString protocolDetail() const;
00045   int errorCode() const;
00046   void free();
00047 
00048 protected:
00049   static void *construct(const QSArgumentList &args) {
00050     QMap<int, QStringList> candidates;
00051     candidates[4].append(QString::fromLatin1("QNetworkProtocol::Operation,QString,QString,QString"));
00052     candidates[4].append(QString::fromLatin1("QNetworkProtocol::Operation,QByteArray*,QByteArray*,QByteArray*"));
00053     QString sgt(castArgsSignature(args, candidates));
00054     if (sgt == QString::fromLatin1("QNetworkProtocol::Operation,QString,QString,QString"))
00055       return new QNetworkOperation(static_cast<QNetworkProtocol::Operation>(args[0].variant().toUInt()),
00056                                    *(argValue<QString *>(args[1])),
00057                                    *(argValue<QString *>(args[2])),
00058                                    *(argValue<QString *>(args[3])));
00059     if (sgt == QString::fromLatin1("QNetworkProtocol::Operation,QByteArray*,QByteArray*,QByteArray*"))
00060       return new QNetworkOperation(static_cast<QNetworkProtocol::Operation>(args[0].variant().toUInt()),
00061                                    *argValue<QByteArray *>(args[1]),
00062                                    *argValue<QByteArray *>(args[2]),
00063                                    *argValue<QByteArray *>(args[3]));
00064     return 0;
00065   }
00066 
00067 public:
00068   static QMap<int, QStringList> candidateConstructors() {
00069     QMap<int, QStringList> candidates;
00070     candidates[4].append(QString::fromLatin1("QNetworkProtocol::Operation,QString,QString,QString"));
00071     candidates[4].append(QString::fromLatin1("QNetworkProtocol::Operation,QByteArray*,QByteArray*,QByteArray*"));
00072     return candidates;
00073   }
00074   //@AQ_END_DEF_PUB_SLOTS@
00075 };
00076 
00077 //@AQ_BEGIN_IMP_PUB_SLOTS@
00078 inline void AQSNetworkOperation::setState(uint arg0)
00079 {
00080   AQ_CALL_VOID(setState(static_cast<QNetworkProtocol::State>(arg0)));
00081 }
00082 inline void AQSNetworkOperation::setProtocolDetail(const QString &arg0)
00083 {
00084   AQ_CALL_VOID(setProtocolDetail(arg0));
00085 }
00086 inline void AQSNetworkOperation::setErrorCode(int arg0)
00087 {
00088   AQ_CALL_VOID(setErrorCode(arg0));
00089 }
00090 inline void AQSNetworkOperation::setArg(int arg0,  const QString &arg1)
00091 {
00092   AQ_CALL_VOID(setArg(arg0, arg1));
00093 }
00094 inline void AQSNetworkOperation::setRawArg(int arg0,  QByteArray *arg1)
00095 {
00096   AQ_CALL_VOID(setRawArg(arg0, *arg1));
00097 }
00098 inline void AQSNetworkOperation::setRawArg(int arg0, AQSByteArray *arg1)
00099 {
00100   AQ_CALL_VOID(setRawArg(arg0, *arg1));
00101 }
00102 inline uint AQSNetworkOperation::operation() const
00103 {
00104   AQ_CALL_RET_V(operation(), uint);
00105 }
00106 inline uint AQSNetworkOperation::state() const
00107 {
00108   AQ_CALL_RET_V(state(), uint);
00109 }
00110 inline QString AQSNetworkOperation::arg(int arg0) const
00111 {
00112   AQ_CALL_RET_V(arg(arg0), QString);
00113 }
00114 inline QByteArray AQSNetworkOperation::rawArg(int arg0) const
00115 {
00116   AQ_CALL_RET_V(rawArg(arg0), QByteArray);
00117 }
00118 inline QString AQSNetworkOperation::protocolDetail() const
00119 {
00120   AQ_CALL_RET_V(protocolDetail(), QString);
00121 }
00122 inline int AQSNetworkOperation::errorCode() const
00123 {
00124   AQ_CALL_RET_V(errorCode(), int);
00125 }
00126 inline void AQSNetworkOperation::free()
00127 {
00128   AQ_CALL_VOID(free());
00129 }
00130 //@AQ_END_IMP_PUB_SLOTS@
00131 
00132 #endif /* AQSNETWORKOPERATION_P_H_ */
00133 // @AQSOBJECT@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'