/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "Licence").
 * You may not use this file except in compliance with the Licence.
 *
 * You can obtain a copy of the licence at RISC OS path @.^.LICENCE
 * or  http://www.riscosdev.com/lanman98/LICENCE.CDDL
 * See the Licence for the specific language governing permissions
 * and limitations under the Licence.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the Licence file. If applicable, add the
 * following below this CDDL HEADER, with the fields enclosed by
 * brackets "[]" replaced with your own identifying information:
 * Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */
 
/*
 *   Copyright 1996 Warm Silence Software Ltd.  All rights reserved.
 *   Use is subject to license terms.
 */

/*   PHBG 27/12/97: Initial version
 */

#ifndef _SMB_BASE_
#define _SMB_BASE_

typedef struct
{
    unsigned int total, free, units;
} smb_disc_info_t;

typedef struct smb_server_s *smb_server_t;
typedef struct smb_obj_s *smb_obj_t;
typedef struct smb_handle_s *smb_handle_t;

struct smb_handle_s
{
    smb_server_t svr;
    int fid;                /* SMB1: two bytes, kept in an int */
    int max_rw_size;
    unsigned char fileid[16];  /* SMB2: sixteen bytes, kept as itself */
    int printing;           /* a print job rather than a file */
    /*
        A print job cannot be trimmed after the event, so its last block
        is held back until the length is known.  See SMBWrite.
    */
    unsigned char *hold;
    int hold_pos;
    int hold_len;
    int hold_max;
};

#define MN103 (2)
#define LM1   (4)
#define LM2   (5)
#define LM21  (8)
#define NT    (9)

#endif
