[Delta] Iris questions (was: Re: trying to make a code like justins code (jabber example) but i have errors)
K. Nimer
stormway at gmail.com
Tue Mar 25 07:04:58 PDT 2008
goodmorning Justin
everything you write in your last email makes sense but my compiler doesnt
all the functions and methods you called are included when you put "->"
but look at these errors
----------------------------------------------------------------------------------------------------------------------
1>.\main.cpp(124) : error C2039: 'S5BServer' : is not a member of 'XMPP'
1>.\main.cpp(124) : error C2143: syntax error : missing ';' before '*'
1>.\main.cpp(124) : error C4430: missing type specifier - int assumed. Note:
C++ does not support default-int
1>.\main.cpp(124) : error C4430: missing type specifier - int assumed. Note:
C++ does not support default-int
1>.\main.cpp(36) : error C2065: 's5bServer' : undeclared identifier
1>.\main.cpp(36) : error C2039: 'S5BServer' : is not a member of 'XMPP'
1>.\main.cpp(36) : error C2061: syntax error : identifier 'S5BServer'
how could it be that S5BServer is not a member ? because i am able to see
it in the xmpp namespace
and when i do XMPP:: alist comes out and i see it in there
On 3/24/08, K. Nimer <stormway at gmail.com> wrote:
>
> thanks man really thanks
> i will try it out and get back to you :)
>
> your explanation is pretty amazing
>
>
>
> On Mon, Mar 24, 2008 at 6:01 PM, Justin Karneges <justin-psi2 at affinix.com>
> wrote:
>
> > On Monday 24 March 2008 5:12 pm, K. Nimer wrote:
> > > i am totally confused and blown off , why did it work now ?
> > >
> > > thanks man but what is this ,
> > >
> > > i am soo lost , qt is powerful
> > >
> > > u know when you say your an expert in c++ but a kid in QT , well i am
> > sorry
> > > thats definitly me :S i am really lost
> > >
> > > is it me , or its because i ddint know what a delayslot is i am not
> > sure
> >
> > I wouldn't expect you to know about the Client delayedCloseFinished()
> > signal,
> > but what you should know is how the Qt event loop works. I'm guessing
> > Iris
> > is your first time using Qt. You are brave. :) Maybe it would be best
> > to
> > write some simple GUI app first. Did you do the Qt tutorials?
> >
> > > is it also easy to send files that simple?
> >
> > Sort of. The setup is not straightforward.
> >
> > First, if you want to support P2P connections, then you need to set up
> > an
> > S5BServer:
> >
> > // create a server object listening on port 8010
> > S5BServer *s5bServer = new s5bServer;
> > if(!s5bServer->start(8010))
> > {
> > error...
> > }
> >
> > // tell client to use it
> > client->s5bManager()->setServer(s5bServer);
> >
> > If you skip this step, then you can only use proxy transfers.
> >
> > Next, enable the file transfer feature:
> >
> > client->setFileTransferEnabled(true);
> >
> > Now you may use the filetransfer.h API. From here it should be easy to
> > understand, but it does take some work to use since Iris does not
> > actually
> > read and write files. For example, it is up to you to feed it with file
> > data
> > to send.
> >
> > To send a file:
> >
> > // session variables
> > FileTransfer *ft;
> > int total;
> > QByteArray fileData;
> >
> > // create file transfer object for sending
> > ft = client->fileTransferManager()->createTransfer();
> >
> > // listen to some signals
> > connect(ft, SIGNAL(connected()), SLOT(ft_connected()));
> > connect(ft, SIGNAL(bytesWritten(int)), SLOT(ft_bytesWritten(int)));
> >
> > // initialize and send the file
> > total = 0;
> > fileData = "Hello World\n";
> > ft->setProxy("proxy.jabber.org"); // optional, use a proxy
> > ft->sendFile(jid, "hello.txt", fileData.size(), "a cool file for you");
> >
> > slots:
> >
> > // p2p stream established, now we may send file data
> > void ft_connected()
> > {
> > ft->writeFileData(fileData);
> > }
> >
> > // some number of bytes have been sent
> > void ft_bytesWritten(int bytes)
> > {
> > total += bytes;
> >
> > // all data sent?
> > if(total == fileData.size())
> > {
> > // done
> > ft->deleteLater();
> > }
> > }
> >
> > You should probably listen for other signals too, like accepted() (this
> > means
> > the other person has accepted the file, but the p2p stream is not yet
> > established) and error() (means the user rejected, or there was some
> > network
> > problem during transfer).
> >
> > -Justin
> > _______________________________________________
> > Delta mailing list
> > Delta at lists.affinix.com
> > http://lists.affinix.com/listinfo.cgi/delta-affinix.com
> >
>
>
>
> --
> Regards;
> Khalid Nimer
>
> Education:
> Concordia University
> Bachelor of Computer Science (ECP)
> Option: Software Systems
--
Regards;
Khalid Nimer
Education:
Concordia University
Bachelor of Computer Science (ECP)
Option: Software Systems
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.affinix.com/pipermail/delta-affinix.com/attachments/20080325/d9a86c70/attachment.htm
More information about the Delta
mailing list