3 libassuan2 support from
4 http://websvn.kde.org/?view=revision&revision=1078528
6 --- kleopatra/tests/test_uiserver.cpp.orig 2009-07-17 21:45:43.000000000 +0000
7 +++ kleopatra/tests/test_uiserver.cpp
8 @@ -89,17 +89,17 @@ static void usage( const std::string & m
12 -static assuan_error_t data( void * void_ctx, const void * buffer, size_t len ) {
13 +static gpg_error_t data( void * void_ctx, const void * buffer, size_t len ) {
14 (void)void_ctx; (void)buffer; (void)len;
15 return 0; // ### implement me
18 -static assuan_error_t status( void * void_ctx, const char * line ) {
19 +static gpg_error_t status( void * void_ctx, const char * line ) {
20 (void)void_ctx; (void)line;
24 -static assuan_error_t inquire( void * void_ctx, const char * keyword ) {
25 +static gpg_error_t inquire( void * void_ctx, const char * keyword ) {
26 assuan_context_t ctx = (assuan_context_t)void_ctx;
28 const std::map<std::string,std::string>::const_iterator it = inquireData.find( keyword );
29 @@ -121,7 +121,7 @@ int main( int argc, char * argv[] ) {
31 const Kleo::WSAStarter _wsastarter;
33 - assuan_set_assuan_err_source( GPG_ERR_SOURCE_DEFAULT );
34 + assuan_set_gpg_err_source( GPG_ERR_SOURCE_DEFAULT );
37 usage(); // need socket and command, at least
38 @@ -185,7 +185,12 @@ int main( int argc, char * argv[] ) {
40 assuan_context_t ctx = 0;
42 - if ( const gpg_error_t err = assuan_socket_connect_ext( &ctx, socket, -1, ASSUAN_CONNECT_FLAGS ) ) {
43 + if ( const gpg_error_t err = assuan_new( &ctx ) ) {
44 + qDebug( "%s", Exception( err, "assuan_new" ).what() );
48 + if ( const gpg_error_t err = assuan_socket_connect( ctx, socket, -1, ASSUAN_CONNECT_FLAGS ) ) {
49 qDebug( "%s", Exception( err, "assuan_socket_connect_ext" ).what() );
52 @@ -279,7 +284,7 @@ int main( int argc, char * argv[] ) {
56 - assuan_disconnect( ctx );
57 + assuan_release( ctx );