1 #ifndef OSCAM_CLIENT_H_
2 #define OSCAM_CLIENT_H_
4 /* Gets the client associated to the calling thread. */
5 static inline struct s_client
*cur_client(void)
7 return (struct s_client
*)pthread_getspecific(getclient
);
9 int32_t get_threadnum(struct s_client
*client
);
10 struct s_auth
*get_account_by_name(char *name
);
11 int8_t is_valid_client(struct s_client
*client
);
12 const char *remote_txt(void);
13 const char *client_get_proto(struct s_client
*cl
);
14 const char *username(struct s_client
*client
);
15 void init_first_client(void);
16 struct s_client
*create_client(IN_ADDR_T ip
);
17 int32_t cs_auth_client(struct s_client
*client
, struct s_auth
*account
, const char *e_txt
);
18 void cs_disconnect_client(struct s_client
*client
);
19 void cs_reinit_clients(struct s_auth
*new_accounts
);
20 void kill_all_clients(void);
21 void client_check_status(struct s_client
*cl
);
22 void free_client(struct s_client
*cl
);