/*ProfiPacket - packet radio terminal program
  Copyright (C) 1999  Alexander Feigl

  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.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

  Author:

  Alexander Feigl
  Burachstraße 51

  D-88250 Weingarten

  Mail : Alexander.Feigl@gmx.de
*/


#ifndef PROFIPACKET_USERS

#define PROFIPACKET_USERS


#ifndef IN_CONTRIB
#include "SID.h"
#else
#include "SID.h"
#endif

struct User *QSO_OpenUser(const unsigned char *call);
struct User *QSO_OpenUser_SSID(const unsigned char *call);
struct User *QSO_OpenUser_Try(const unsigned char *call);
struct User *QSO_OpenStandardUser(void);
int QSO_RemoveUser(struct User *user);
void QSO_CloseUser(struct User *user);
void QSO_ChangeUser(struct User *user);

#ifndef IN_CONTRIB

#ifdef AmigaOS

#include <exec/lists.h>
#include <dos/dos.h>

#else /*AmigaOS*/

#include "amigaemu.h"

#endif /*AmigaOS*/

extern struct List UserBaseList;
extern struct User *UserBaseStandard;
#endif

struct User

   {
    struct User *nextuser;
    struct User *prevuser;
    unsigned short pad1;
    unsigned char *username;
    unsigned short pad2;

    unsigned long OpenCnt;
    unsigned long DataBasePos;
    unsigned long SaveBackNeeded;


    unsigned char     Call[10];
    unsigned char     DigiPath[80];
    unsigned char     Name[32];
    unsigned char     QTH[32];
    unsigned char     Locator[8];
    unsigned short    Type;

    unsigned char     RPType;
    unsigned char     LPType;
    unsigned char     RPassword[82];
    unsigned char     LPassword[82];

    unsigned long     LastNews[3];

    unsigned short    LinkUse;
    unsigned short    MinFrack;
    unsigned short    MaxFrack;
    unsigned short    CurFrack;
    unsigned short    MinTries;
    unsigned short    MaxTries;
    unsigned short    CurTries;
    unsigned short    MinMaxFrame;
    unsigned short    MaxMaxFrame;
    unsigned short    CurMaxFrame;
    unsigned short    MinPaclen;
    unsigned short    MaxPaclen;
    unsigned short    CurPaclen;

    unsigned short    Language;
    unsigned long     CipherKey[4];
    unsigned char     PrivateDir[80];
    struct StationID  StationID;
    unsigned char     XPKType[4];
    unsigned long     XPKEfficiency;
    unsigned long     LastBoxcheck;
    struct DateStamp  LastLogin;
    unsigned long     Datacollector;
   };

struct version3header
        {
         char fileid[8];
         unsigned long fileversion;
         unsigned long usersize;
         unsigned long userspace;
         unsigned long usedusers;
         unsigned char ownerfirstname[32];
         unsigned char ownerqth[32];
         unsigned char ownerlocator[8];
         unsigned long password[4];
         unsigned long identifier;
        };


struct version3header *UserBaseHead;


#endif



