Changeset 11616


Ignore:
Timestamp:
Dec 31, 2010, 7:44:51 PM (11 years ago)
Author:
charles
Message:

(trunk qt) #3836 "libevent2 support" -- add a mechanism to make it easier to build the Qt client with custom installs of libevent2

Location:
trunk/qt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/qtr.pro

    r11437 r11616  
    1616PKGCONFIG = fontconfig libcurl openssl dbus-1
    1717
     18# if you have libevent2 installed in a custom path, specify it here
     19EVENT_TOP = /usr
     20INCLUDEPATH = $${EVENT_TOP}/include $${INCLUDEPATH}
     21
    1822TRANSMISSION_TOP = ..
    1923INCLUDEPATH += $${TRANSMISSION_TOP}
     
    2226LIBS += $${TRANSMISSION_TOP}/third-party/miniupnp/libminiupnp.a
    2327LIBS += $${TRANSMISSION_TOP}/third-party/libnatpmp/libnatpmp.a
    24 unix: LIBS += -levent -lz
     28unix: LIBS += -L$${EVENT_TOP}/lib -levent -lz
    2529win32:DEFINES += QT_DBUS
    2630win32:LIBS += -levent -lws2_32 -lintl
  • trunk/qt/session.cc

    r11514 r11616  
    3030
    3131#include <curl/curl.h>
     32
     33#include <event2/buffer.h>
    3234
    3335#include <libtransmission/transmission.h>
     
    663665
    664666void
    665 Session :: localSessionCallback( tr_session * session, const char * json, size_t len, void * self )
     667Session :: localSessionCallback( tr_session * session, struct evbuffer * json, void * self )
    666668{
    667669    Q_UNUSED( session );
    668670
    669     ((Session*)self)->parseResponse( json, len );
     671    ((Session*)self)->parseResponse( (const char*) evbuffer_pullup( json, -1 ), evbuffer_get_length( json ) );
    670672}
    671673
  • trunk/qt/session.h

    r11209 r11616  
    3030extern "C"
    3131{
     32    struct evbuffer;
    3233    struct tr_benc;
    3334}
     
    7576        void updateInfo( struct tr_benc * args );
    7677        void parseResponse( const char * json, size_t len );
    77         static void localSessionCallback( tr_session *, const char *, size_t, void * );
     78        static void localSessionCallback( tr_session *, struct evbuffer *, void * );
    7879
    7980    public:
Note: See TracChangeset for help on using the changeset viewer.