/***************************************************************************
                          onlineusers.h  -  description
                             -------------------
    begin                : Mon Nov 24 2003
    copyright            : (C) 2003 by Wei Zheng
    email                : v_zheng@yahoo.com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef ONLINEUSERS_H
#define ONLINEUSERS_H

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <string.h>
#include "typedef.h"


/**
  *@author Wei Zheng
  */

class onlineusers {
public: 
  /** No descriptions */
  int myrandom();
  /** No descriptions */
  void eliminate_online_queue();
  /** No descriptions */
  void list_online_user();
  /** No descriptions */
  online_userinfo * search_online_user(char * hotmail);
  /** No descriptions */
  void add_online_user(char * hotmail, char * nickname);
  /** No descriptions */
  pid_t del_online_user(char * hotmail);
  /** No descriptions */
  void save_hostinfo_conf(char * hostinfo1, char * hostinfo2);
  onlineusers();
  ~onlineusers();

public:
  online_userinfo * default_head;
  online_userinfo * current_user;
  online_userinfo ** headuserpp;
};

#endif
