; Assembler header file for NetPrint
; Written by DefMod (Dec  9 2012) on Sun Dec  9 15:43:44 2012
; Jonathan Coxhead, jonathan@doves.demon.co.uk, 21 Aug 1995

; OSLib---efficient, type-safe, transparent, extensible,
; register-safe API coverage of RISC OS
; 
; Copyright (c) 1994-2012 Jonathan Coxhead and OSLib maintainers
; 
; Licence:
; 
;    OSLib 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 1, or (at your option)
; any later version - and this with the following clarification and
; special exception:
; 
;    Linking this library statically or dynamically with other modules
; is making a combined work based on this library. Thus, the terms
; and conditions of the GNU General Public License cover the whole
; combination.
; 
;    As a special exception, the copyright holders of this library
; give you permission to link this library with independent modules
; to produce an executable, regardless of the license terms of these
; independent modules, and to copy and distribute the resulting
; executable under terms of your choice, provided that you also meet,
; for each linked independent module, the terms and conditions of the
; license of that module. An independent module is a module which is
; not derived from or based on this library. If you modify this
; library, you may extend this exception to your version of the library,
; but you are not obliged to do so. If you do not wish to do so, delete
; this exception statement from your version.
; 
;    OSLib 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 programme; if not, write to the Free Software
; Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA.

        [       :LNOT: :DEF: NetPrint_Hdr
        GBLS    NetPrint_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

;Symbols for constants
NetPrint_PSNameLimit            *       256
NetPrint_StatusReady            *       &0
NetPrint_StatusBusy             *       &1
NetPrint_StatusJammed           *       &2
NetPrint_StatusOffline          *       &6
NetPrint_StatusOpen             *       &7
Error_NetPrintNameTooLong       *       &10C00
Error_NetPrintSingleStream      *       &10C01
Error_NetPrintAllPrintersBusy   *       &10C02
Error_NetPrintOffLine           *       &10C09
Error_NetPrintNotFound          *       &10C0A
Error_NetPrintInternalError     *       &10C0B

;Symbols for structure offsets and sizes
        ^       0
        #       Byte
NetPrint_Status                 *       @

        ^       0
NetPrint_BriefEntry_station_no  #       Byte
NetPrint_BriefEntry_net_no      #       Byte
NetPrint_BriefEntry_ps_name     #       256*Char
NetPrint_BriefEntry             *       @

        ^       0
NetPrint_NameEntry_ps_name      #       256*Char
NetPrint_NameEntry              *       @

        ^       0
NetPrint_FullEntry_station_no   #       Byte
NetPrint_FullEntry_net_no       #       Byte
NetPrint_FullEntry_status       #       NetPrint_Status
NetPrint_FullEntry_status_station_no #       Byte
NetPrint_FullEntry_status_net_no #       Byte
NetPrint_FullEntry_ps_name      #       256*Char
NetPrint_FullEntry              *       @


;Symbols for SWI's and SWI reason codes
XNetPrint_ReadPSNumber          *       &60200
NetPrint_ReadPSNumber           *       &40200
   ;Exit
   ;  R0 = station_no (Byte)
   ;  R1 = net_no (Byte)

XNetPrint_SetPSNumber           *       &60201
NetPrint_SetPSNumber            *       &40201
   ;Entry
   ;  R0 = station_no (Byte)
   ;  R1 = net_no (Byte)

XNetPrint_ReadPSName            *       &60202
NetPrint_ReadPSName             *       &40202
   ;Entry
   ;  R1 = buffer (pointer to String)
   ;  R2 = size (Int)
   ;Exit
   ;  R0 corrupted
   ;  R1 -> end (Char)
   ;  R2 corrupted

XNetPrint_SetPSName             *       &60203
NetPrint_SetPSName              *       &40203
   ;Entry
   ;  R0 -> ps_name (String)

XNetPrint_ReadPSTimeouts        *       &60204
NetPrint_ReadPSTimeouts         *       &40204
   ;Exit
   ;  R0 = transmit_count (Int)
   ;  R1 = transmit_delay (Int)
   ;  R2 = peek_count (Int)
   ;  R3 = peek_delay (Int)
   ;  R4 = receive_delay (Int)
   ;  R5 = broadcast_delay (Int)

XNetPrint_SetPSTimeouts         *       &60205
NetPrint_SetPSTimeouts          *       &40205
   ;Entry
   ;  R0 = transmit_count (Int)
   ;  R1 = transmit_delay (Int)
   ;  R2 = peek_count (Int)
   ;  R3 = peek_delay (Int)
   ;  R4 = receive_delay (Int)
   ;  R5 = broadcast_delay (Int)

XNetPrint_BindPSName            *       &60206
NetPrint_BindPSName             *       &40206
   ;Entry
   ;  R0 -> ps_name (String)
   ;Exit
   ;  R0 = station_no (Byte)
   ;  R1 = net_no (Byte)

XNetPrint_ListServers           *       &60207
NetPrint_ListServers            *       &40207

NetPrintListServers_Brief       *       &0
   ;Entry
   ;  R0 = &0
   ;  R1 = entries (pointer to NetPrint_BriefEntry)
   ;  R2 = size (Int)
   ;  R3 = timeout (Int)
   ;Exit
   ;  R0 = entry_count (Int)
   ;  R3 = no_more (Bool)

NetPrintListServers_Name        *       &1
   ;Entry
   ;  R0 = &1
   ;  R1 = entries (pointer to NetPrint_NameEntry)
   ;  R2 = size (Int)
   ;  R3 = timeout (Int)
   ;Exit
   ;  R0 = entry_count (Int)
   ;  R3 = no_more (Bool)

NetPrintListServers_Full        *       &2
   ;Entry
   ;  R0 = &2
   ;  R1 = entries (pointer to NetPrint_FullEntry)
   ;  R2 = size (Int)
   ;  R3 = timeout (Int)
   ;Exit
   ;  R0 = entry_count (Int)
   ;  R3 = no_more (Bool)

XNetPrint_ConvertStatusToString *       &60208
NetPrint_ConvertStatusToString  *       &40208
   ;Entry
   ;  R0 -> status_station_net (Bits)
   ;  R1 = buffer (pointer to String)
   ;  R2 = size (Int)
   ;Exit
   ;  R0 corrupted
   ;  R1 -> end (Char)
   ;  R2 corrupted

Service_NetPrintCheckD1         *       &40200
   ;Entry
   ;  R1 = &40200
   ;Exit
   ;  R1 = unclaimed (Bool)

        ]
        END
