activity.c
changeset 31 e404cd1c7077
parent 29 23fa36d480fb
child 35 a77a8e7ab8ae
equal deleted inserted replaced
30:a66ed0454ca8 31:e404cd1c7077
    30 #include <mcabber/hooks.h>
    30 #include <mcabber/hooks.h>
    31 #include <mcabber/commands.h>
    31 #include <mcabber/commands.h>
    32 #include <mcabber/compl.h>
    32 #include <mcabber/compl.h>
    33 #include <mcabber/modules.h>
    33 #include <mcabber/modules.h>
    34 
    34 
    35 #include "activity.h"
    35 #include "pep_activity.h"
    36 
    36 
    37 #include "config.h"
    37 #include "config.h"
    38 
    38 
    39 //
    39 //
    40 //  module description
    40 //  module description
    41 //
    41 //
    42 
    42 
    43 void activity_init   (void);
    43 void activity_init   (void);
    44 void activity_uninit (void);
    44 void activity_uninit (void);
    45 
    45 
    46 #define DESCRIPTION ( "PEP activity support\nProvides command /activity" )
    46 #define DESCRIPTION ( ACTIVITY_DESCRIPTION )
       
    47 
    47 static const gchar *deps[] = { "pep_activity", NULL };
    48 static const gchar *deps[] = { "pep_activity", NULL };
    48 
    49 
    49 static module_info_t info_activity_dev = {
    50 static module_info_t info_activity_dev = {
    50 	.branch       = "dev",
    51 	.branch       = "dev",
    51 	.api          = 20,
    52 	.api          = 20,
   100 {
   101 {
   101 	if (!*arg) { // request
   102 	if (!*arg) { // request
   102 
   103 
   103 		GError *error = NULL;
   104 		GError *error = NULL;
   104 
   105 
   105 		activity_request ( CURRENT_JID, &error );
   106 		pep_activity_request ( CURRENT_JID, &error );
   106 		if ( error ) {
   107 		if ( error ) {
   107 			scr_log_print ( LPRINT_NORMAL, "Error sending request: %s.", error -> message );
   108 			scr_log_print ( LPRINT_NORMAL, "Error sending request: %s.", error -> message );
   108 			g_error_free ( error );
   109 			g_error_free ( error );
   109 		} else
   110 		} else
   110 			scr_log_print ( LPRINT_NORMAL, "Request sent." );
   111 			scr_log_print ( LPRINT_NORMAL, "Request sent." );