Understood, yes the meta object system could be facilitated for that. I have something similar implemented for my in-app protocol handler.
On Thu, Dec 12, 2013 at 11:40 PM, Jason H <[email protected]> wrote: > Close, more about using QObjects and QPROPERTYs to create a object > hierarchy which map to slots. > > root = RestObject(NULL); > > class O1 : public RestObject { > Q_PROPERTY (QString p1 READ p1) > } > > o1 = O1("o1", root); > > GET /o1/p1 (calls O1::p1()) > > Add QMetaObject magic for mapping query paramters to slot parameters > > GET /o1/p1?q1=6 (calls O1::p1(6)) > GET /o1/p1?q1=6&q2=7 (calls O1::p1(6,7)) > > add a PUT/POST for storage: > POST /O1/p2 > 7 > > calls O1::setP2(7) > > etc. Basically REST services are object hierarchies, and we do that with > QObjects (RestObjects) > > > ------------------------------ > *From:* Philipp Kursawe <[email protected]> > *To:* Jason H <[email protected]> > *Cc:* "[email protected]" <[email protected]> > *Sent:* Thursday, December 12, 2013 2:46 PM > *Subject:* Re: [Interest] What's next for Qt 5.3? > > Uhmm, what do you mean by providing REST Services? > Are you talking about a HTTP framework like Rails or Sinatra? Imho such > functionality has no place in the default distribution of Qt. You can > easily develop that as an addon library. In fact, to develop a basic REST > HTTP Server in plain C++ with routes and handlers takes only a couple of > hundred lines. With Qt it should be even less. > https://github.com/pke/atlhttpd/blob/master/HttpServerImpl.h > > And can be used like this: > https://github.com/pke/atlhttpd/blob/master/atlhttpd.cpp > > Is that what you have in mind? > > > On Thu, Dec 12, 2013 at 7:59 PM, Jason H <[email protected]> wrote: > > > So now we have mobile off to the races... > > Is anything going to happen with making Qt a better network toolkit? By > that I mean SOAP and rest services - and providing those, not just > consuming them. Maybe a HTML5 canvas as part of QPA? WebGL for QML? > > > > > _______________________________________________ > Interest mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/interest > > > > >
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
