diff options
Diffstat (limited to 'protocols/jabber/jabber.h')
| -rw-r--r-- | protocols/jabber/jabber.h | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h index 5996c301..046741a3 100644 --- a/protocols/jabber/jabber.h +++ b/protocols/jabber/jabber.h @@ -46,6 +46,8 @@ typedef enum  	                                   activates all XEP-85 related code. */  	JFLAG_XMLCONSOLE = 64,          /* If the user added an xmlconsole buddy. */  	JFLAG_STARTTLS_DONE = 128,      /* If a plaintext session was converted to TLS. */ +	 +	JFLAG_SASL_FB = 0x10000,        /* Trying Facebook authentication. */  } jabber_flags_t;  typedef enum @@ -91,6 +93,10 @@ struct jabber_data  	char *username;		/* USERNAME@server */  	char *server;		/* username@SERVER -=> server/domain, not hostname */ +	char *me;		/* bare jid */ +	 +	const struct oauth2_service *oauth2_service; +	char *oauth2_access_token;  	/* After changing one of these two (or the priority setting), call  	   presence_send_update() to inform the server about the changes. */ @@ -187,6 +193,7 @@ struct jabber_transfer  };  #define JABBER_XMLCONSOLE_HANDLE "xmlconsole" +#define JABBER_OAUTH_HANDLE "jabber_oauth"  /* Prefixes to use for packet IDs (mainly for IQ packets ATM). Usually the     first one should be used, but when storing a packet in the cache, a @@ -231,6 +238,9 @@ struct jabber_transfer  #define XMLNS_BYTESTREAMS  "http://jabber.org/protocol/bytestreams"              /* XEP-0065 */  #define XMLNS_IBB          "http://jabber.org/protocol/ibb"                      /* XEP-0047 */ +/* jabber.c */ +void jabber_connect( struct im_connection *ic ); +  /* iq.c */  xt_status jabber_pkt_iq( struct xt_node *node, gpointer data );  int jabber_init_iq_auth( struct im_connection *ic ); @@ -299,6 +309,7 @@ void jabber_buddy_remove_all( struct im_connection *ic );  time_t jabber_get_timestamp( struct xt_node *xt );  struct jabber_error *jabber_error_parse( struct xt_node *node, char *xmlns );  void jabber_error_free( struct jabber_error *err ); +gboolean jabber_set_me( struct im_connection *ic, const char *me );  extern const struct jabber_away_state jabber_away_state_list[]; @@ -315,6 +326,13 @@ xt_status sasl_pkt_mechanisms( struct xt_node *node, gpointer data );  xt_status sasl_pkt_challenge( struct xt_node *node, gpointer data );  xt_status sasl_pkt_result( struct xt_node *node, gpointer data );  gboolean sasl_supported( struct im_connection *ic ); +void sasl_oauth2_init( struct im_connection *ic ); +int sasl_oauth2_get_refresh_token( struct im_connection *ic, const char *msg ); +int sasl_oauth2_refresh( struct im_connection *ic, const char *refresh_token ); + +extern const struct oauth2_service oauth2_service_google; +extern const struct oauth2_service oauth2_service_facebook; +extern const struct oauth2_service oauth2_service_mslive;  /* conference.c */  struct groupchat *jabber_chat_join( struct im_connection *ic, const char *room, const char *nick, const char *password ); | 
