| 
									
										
										
										
											2014-09-13 06:52:42 +02:00
										 |  |  | #ifndef TOX_WEECHAT_IDENTITIES_H
 | 
					
						
							|  |  |  | #define TOX_WEECHAT_IDENTITIES_H
 | 
					
						
							| 
									
										
										
										
											2014-09-02 13:59:07 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-07 03:04:42 +02:00
										 |  |  | #include <stdint.h>
 | 
					
						
							| 
									
										
										
										
											2014-09-02 13:59:07 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-13 06:52:42 +02:00
										 |  |  | enum t_tox_weechat_identity_option | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     TOX_WEECHAT_IDENTITY_OPTION_SAVEFILE = 0, | 
					
						
							|  |  |  |     TOX_WEECHAT_IDENTITY_OPTION_AUTOCONNECT, | 
					
						
							|  |  |  |     TOX_WEECHAT_IDENTITY_OPTION_MAX_FRIEND_REQUESTS, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     TOX_WEECHAT_IDENTITY_NUM_OPTIONS, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-05 16:53:44 +02:00
										 |  |  | struct t_tox_weechat_identity | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     char *name; | 
					
						
							| 
									
										
										
										
											2014-09-13 06:52:42 +02:00
										 |  |  |     struct t_config_option *options[TOX_WEECHAT_IDENTITY_NUM_OPTIONS]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-13 12:22:26 +02:00
										 |  |  |     struct Tox *tox; | 
					
						
							| 
									
										
										
										
											2014-09-05 16:53:44 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     struct t_gui_buffer *buffer; | 
					
						
							| 
									
										
										
										
											2014-09-13 12:22:26 +02:00
										 |  |  |     struct t_hook *tox_do_timer; | 
					
						
							| 
									
										
										
										
											2014-09-05 16:53:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-13 12:22:26 +02:00
										 |  |  |     int tox_online; | 
					
						
							| 
									
										
										
										
											2014-09-05 16:53:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-07 03:04:42 +02:00
										 |  |  |     struct t_tox_weechat_chat *chats; | 
					
						
							|  |  |  |     struct t_tox_weechat_chat *last_chat; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     struct t_tox_weechat_friend_request *friend_requests; | 
					
						
							|  |  |  |     struct t_tox_weechat_friend_request *last_friend_request; | 
					
						
							|  |  |  |     unsigned int friend_request_count; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-05 16:53:44 +02:00
										 |  |  |     struct t_tox_weechat_identity *next_identity; | 
					
						
							|  |  |  |     struct t_tox_weechat_identity *prev_identity; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | extern struct t_tox_weechat_identity *tox_weechat_identities; | 
					
						
							| 
									
										
										
										
											2014-09-07 03:04:42 +02:00
										 |  |  | extern struct t_tox_weechat_identity *tox_weechat_last_identity; | 
					
						
							| 
									
										
										
										
											2014-09-05 16:53:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-13 06:52:42 +02:00
										 |  |  | struct t_tox_weechat_identity * | 
					
						
							|  |  |  | tox_weechat_identity_new(const char *name); | 
					
						
							| 
									
										
										
										
											2014-09-02 13:59:07 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-13 06:52:42 +02:00
										 |  |  | void | 
					
						
							|  |  |  | tox_weechat_identity_connect(struct t_tox_weechat_identity *identity); | 
					
						
							| 
									
										
										
										
											2014-09-07 03:04:42 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-13 12:22:26 +02:00
										 |  |  | void | 
					
						
							|  |  |  | tox_weechat_identity_disconnect(struct t_tox_weechat_identity *identity); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void | 
					
						
							|  |  |  | tox_weechat_identity_autoconnect(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | struct t_tox_weechat_identity * | 
					
						
							|  |  |  | tox_weechat_identity_name_search(const char *name); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-08 03:01:29 +02:00
										 |  |  | struct t_tox_weechat_identity * | 
					
						
							| 
									
										
										
										
											2014-09-13 06:52:42 +02:00
										 |  |  | tox_weechat_identity_for_buffer(struct t_gui_buffer *buffer); | 
					
						
							| 
									
										
										
										
											2014-09-05 16:53:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-13 06:52:42 +02:00
										 |  |  | void | 
					
						
							|  |  |  | tox_weechat_identity_free(struct t_tox_weechat_identity *identity); | 
					
						
							| 
									
										
										
										
											2014-09-02 23:36:24 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-13 06:52:42 +02:00
										 |  |  | void | 
					
						
							|  |  |  | tox_weechat_identity_free_all(); | 
					
						
							| 
									
										
										
										
											2014-09-02 13:59:07 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-13 06:52:42 +02:00
										 |  |  | #endif // TOX_WEECHAT_IDENTITIES_H
 |