geoloc.c
changeset 31 e404cd1c7077
parent 29 23fa36d480fb
child 35 a77a8e7ab8ae
equal deleted inserted replaced
30:a66ed0454ca8 31:e404cd1c7077
    30 #include <mcabber/hbuf.h>        // HBUF_PREFIX_*
    30 #include <mcabber/hbuf.h>        // HBUF_PREFIX_*
    31 #include <mcabber/roster.h>
    31 #include <mcabber/roster.h>
    32 #include <mcabber/hooks.h>
    32 #include <mcabber/hooks.h>
    33 #include <mcabber/modules.h>
    33 #include <mcabber/modules.h>
    34 
    34 
    35 #include "geoloc.h"
    35 #include "pep_geoloc.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 geoloc_init   (void);
    43 void geoloc_init   (void);
    44 void geoloc_uninit (void);
    44 void geoloc_uninit (void);
    45 
    45 
    46 #define DESCRIPTION ( \
    46 #define DESCRIPTION ( GEOLOC_DESCRIPTION )
    47 	"PEP geoloc event handling\n" \
       
    48 	"Provides command /geoloc" )
       
    49 
    47 
    50 static const gchar *deps[] = { "pep_geoloc", NULL };
    48 static const gchar *deps[] = { "pep_geoloc", NULL };
    51 
    49 
    52 static module_info_t info_geoloc_dev = {
    50 static module_info_t info_geoloc_dev = {
    53 	.branch      = "dev",
    51 	.branch      = "dev",
   117 
   115 
   118 	if (!*arg) { // request
   116 	if (!*arg) { // request
   119 
   117 
   120 		GError *error = NULL;
   118 		GError *error = NULL;
   121 
   119 
   122 		geoloc_request ( CURRENT_JID, &error );
   120 		pep_geoloc_request ( CURRENT_JID, &error );
   123 		if ( error ) {
   121 		if ( error ) {
   124 			scr_log_print ( LPRINT_NORMAL, "Error sending request: %s.", error -> message );
   122 			scr_log_print ( LPRINT_NORMAL, "Error sending request: %s.", error -> message );
   125 			g_error_free ( error );
   123 			g_error_free ( error );
   126 		} else
   124 		} else
   127 			scr_log_print ( LPRINT_NORMAL, "Request sent." );
   125 			scr_log_print ( LPRINT_NORMAL, "Request sent." );