<div dir="ltr">Hi,<div><br></div><div>I've been using your C++ AMQP library and its not bad, are you planning to add any enhancements to support rabbitmq-c v0.5 ?? in particular the socket interface has been deprecated in favour of the <a class="el" href="http://alanxz.github.io/rabbitmq-c/docs/0.5.0/amqp__tcp__socket_8h.html#a3276c8bfa7b263aa3c755517b4b97ac8" style="color: rgb(70, 101, 162); font-weight: bold; font-family: Roboto, sans-serif; font-size: 14px; line-height: 22px;">amqp_tcp_socket_new</a><span style="color: rgb(0, 0, 0); font-family: Roboto, sans-serif; font-size: 14px; line-height: 22px; background-color: rgb(249, 250, 252);"> (</span><a class="el" href="http://alanxz.github.io/rabbitmq-c/docs/0.5.0/amqp_8h.html#a59cfdff3bfbf28aba201be5636365fa4" style="color: rgb(70, 101, 162); font-weight: bold; font-family: Roboto, sans-serif; font-size: 14px; line-height: 22px;">amqp_connection_state_t</a><span style="color: rgb(0, 0, 0); font-family: Roboto, sans-serif; font-size: 14px; line-height: 22px; background-color: rgb(249, 250, 252);"> state)</span></div><div><font color="#000000" face="Roboto, sans-serif"><span style="font-size: 14px; line-height: 22px;"><br></span></font></div><div><font color="#000000" face="Roboto, sans-serif"><span style="font-size: 14px; line-height: 22px;">I was also wondering if you would object to me submitting a few more example programs so more people might look at implementing the library.</span></font></div><div><font color="#000000" face="Roboto, sans-serif"><span style="font-size: 14px; line-height: 22px;"><br></span></font></div><div><font color="#000000" face="Roboto, sans-serif"><span style="font-size: 14px; line-height: 22px;">Thanks</span></font></div><div><font color="#000000" face="Roboto, sans-serif"><span style="font-size: 14px; line-height: 22px;"><br></span></font></div><div><font color="#000000" face="Roboto, sans-serif"><span style="font-size: 14px; line-height: 22px;">Sid</span></font></div><div><font color="#000000" face="Roboto, sans-serif"><span style="font-size: 14px; line-height: 22px;"><br></span></font><br>On Monday, March 1, 2010 9:55:57 PM UTC+10, Alexandre Kalendarev wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi colleagues!<p>I developed the C++ interface, see below</p><p>If You have any ideas - wellcome! </p><p>the Draft of C++ API</p><p>Connection class</p><p>class AMQPConnection {<br>        AMQPConnection();<br>        AMQPConnection( string connectionString );<br>        AMQPConnection( string connectionString , int channelNumber);<br>        <br>        void Open( string connectionString );<br>        void Open( string connectionString , int channelNumber);<br>        <br>        void Close();<br>        <br>        setChannel(int channelNumber);<br>}</p><p>const AMQPCnnDebug = "localhost:5672"</p><p>the example:<br>        AMQPConnection * cnn = new AMQPConnection(  "guest:guest@localhost:5673/<wbr>somevhost" );</p><p>        default connection string is "localhost:5672"<br>        the debug connection string   AMQPCnnDebug  is "guest:guest@localhost:5673" </p><p><br>Exchange class</p><p>class AMQPExchange {<br>        AMQPExchange( AMQPConnection * cnn );<br>        <br>        void Declare(string name);<br>        void Declare(string name, int parms);<br>        void Declare(string name, int parms, map properties ); // *)?</p><p>        void Delete(string name)<br>}</p><p>the parms is set of constants as AMQPDurable, AMQPAutodelete etc<br>the type of exchange is AMQPDirect default or AMQPFanout, or AMQPTopic </p><p><br>Example:<br>        AMQPExchange * ex = new  AMQPExchange(new AMQPConnection());<br>        ex->Declare("my_<wbr>exchange");</p><p>Queue class</p><p>class AMQPQueue {<br>        AMQPQueue(<wbr>AMQPConnection * cnn);</p><p>        void Declare(string name);<br>        void Declare(string name, int parms);<br>        void Declare(string name, int parms, map properties ); // *)?</p><p>        void Delete(string name)</p><p>        void Purge (string name)</p><p>}<br>the parms is set of constants as AMQPDurable, AMQPAutodelete etc</p><p><br>example:<br>        AMQPEQueue * qu = new AMQPEQueue(new AMQPConnection());<br>        qu->Declare("qu_<wbr>mylife");</p><p>Basic class:</p><p>class AMQPBasic {<br>        AMQPBasic(<wbr>AMQPConnection * cnn);</p><p>        void setProperty(string name, string value  );<br>        void setProperty(string name, int value  );</p><p>        void Bind (string exchangeName, string queueName );<br>        void Bind (string exchangeName, string queueName , string key);</p><p>        void Publish( string exchangeName, string message);<br>        void Publish( string exchangeName, uchar* message);<br>        void Publish( string exchangeName, string message, string key);<br>        void Publish( string exchangeName, uchar* message, string key);</p><p>        void Cancel( string queueName)</p><p>        AMQPMessage *  Get( string queueName)</p><p><br>        void Ask( string queueName ) ????</p><p>        void Reject( string queueName ) ????</p><p>        void Consume( string queueName , IAMQPCallback * callbackName );</p><p>}</p><p>class AMQPMessage  ????<br> int timestamp<br> int expiration<br> string contentType<br> string deliveryTag<br> uchar* message or string <br> int number // internal number message<br> string exchange <br> string key<br>....</p><p> IAMQPCallback is abstract class, the callbackName is derived from IAMQPCallback.<br>after received each the message call the method run of derived AMQPCallback base class.</p><p><br>*) properties is map of addional property, it will to resolve in future.</p><p>Examples:</p><p>        // publish message        <br>        AMQPConnection * cnn = new AMQPConnection();<br>        AMQPExchange * ex = new  AMQPExchange(cnn);<br>        ex->Declare("my_<wbr>exchange", AMQPTopic);<br>        basic = new AMQPBasic(cnn);<br>        basic->Bind("my_<wbr>exchange", "qu_mylive", "news" );<br>        basic->Publish("my_<wbr>exchange", "12345" , "news");</p><p><br>        // consume message<br>        class printMessage : IAMQPCallback {<br>                void run (uchar* message) {<br>                        std::<wbr>cout << message << std::endl;<br>                }<br>        }<br>        <br>        AMQPConnection * cnn = new AMQPConnection();<br>        basic = new AMQPBasic(cnn);<br>        printMessage * pm = new printMessage();<br>        basic->Consume("qu_<wbr>mylive", pm); </p><p></p><p><br>unrealise classes(it will to resolve in future):  AMQPFile, AMQPStreams etc ...</p><p>exceptions:</p><p>AMQPnoConnectException<br>AMQPnonAutorizeException<br>AMQPnotFoundException <br>AMQPnotAllowedException <br>...<br>AMQPerrorException (AMQPcommandInvalidException  )</p><p></p><p></p><p><br>______________________________<wbr>_________________<br>rabbitmq-discuss mailing list<br><a href="javascript:" target="_blank" gdf-obfuscated-mailto="pr68vNJjxisJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">rabbitmq...@lists.<wbr>rabbitmq.com</a><br><a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Flists.rabbitmq.com%2Fcgi-bin%2Fmailman%2Flistinfo%2Frabbitmq-discuss\46sa\75D\46sntz\0751\46usg\75AFQjCNGKyK__UurroquhnSiF0-kaXms4LA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Flists.rabbitmq.com%2Fcgi-bin%2Fmailman%2Flistinfo%2Frabbitmq-discuss\46sa\75D\46sntz\0751\46usg\75AFQjCNGKyK__UurroquhnSiF0-kaXms4LA';return true;">http://lists.rabbitmq.com/cgi-<wbr>bin/mailman/listinfo/rabbitmq-<wbr>discuss</a><br></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p></blockquote></div></div>