Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
n_user.h File Reference

USERS handling for tiny game apps. More...

#include "nilorea/n_common.h"
#include "nilorea/n_log.h"
#include "nilorea/n_str.h"
#include "nilorea/n_network.h"
#include "nilorea/n_3d.h"
Include dependency graph for n_user.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  N_USER
 USER management cell. More...
struct  N_USERLIST
 USER list. More...

Macros

#define USERLIST_ALL   0
 flag to target all users in the list
#define USERLIST_ALL_EXCEPT   1
 flag to target all users in the list except one
#define USERLIST_ONE   2
 flag to target one user in the list

Functions

int userlist_add_msg_to (N_USERLIST *ulist, N_STR *msg, int id)
 add a message to a specific user by id
int userlist_add_msg_to_all (N_USERLIST *ulist, N_STR *msg)
 add a message to all users in the list
int userlist_add_msg_to_all_except (N_USERLIST *ulist, N_STR *msg, int id)
 add a message to all users except the one with the given id
int userlist_add_msg_to_ex (N_USERLIST *ulist, N_STR *msg, int mode, int id)
 add a message to users selected by mode and id
int userlist_add_user (N_USERLIST *ulist, NETWORK *netw)
 add a user associated with a NETWORK connection to the list
int userlist_del_user (N_USERLIST *ulist, int id)
 remove a user from the list by id
int userlist_destroy (N_USERLIST **ulist)
 destroy a N_USERLIST and free all resources
N_USERLIST * userlist_new (int max)
 allocate a new N_USERLIST with the given maximum number of users
int userlist_send_waiting_msgs (N_USERLIST *ulist)
 send all waiting messages for all users in the list
int userlist_set_position_behavior (N_USERLIST *ulist, int id, int nb_rec_pos, int only_last_pos)
 set position recording behavior for a user
int userlist_user_add_waiting_msg (N_USERLIST *ulist, int id, N_STR *netmsg)
 add a waiting message to a specific user's queue
int userlist_user_send_waiting_msgs (N_USERLIST *ulist, int id)
 send all waiting messages for a specific user

Detailed Description

USERS handling for tiny game apps.

Windows headers order include.

Author
Castagnier Mickael
Version
1.0
Date
20/02/2006

Definition in file n_user.h.