; Assembler header file for ShareFS
; Written by DefMod (Dec  9 2012) on Sun Dec  9 15:43:44 2012
; Jonathan Coxhead, jonathan@doves.demon.co.uk, 22 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: ShareFS_Hdr
        GBLS    ShareFS_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

        [       :LNOT: :DEF: Get_Freeway
        GBLS    Get_Freeway
        ]
        [       :LNOT: :DEF: Freeway_Hdr
Get_Freeway                     SETS    "GET oslib/Freeway.Hdr"
        |
Get_Freeway                     SETS    ""
        ]
        $Get_Freeway

        [       :LNOT: :DEF: Get_Wimp
        GBLS    Get_Wimp
        ]
        [       :LNOT: :DEF: Wimp_Hdr
Get_Wimp                        SETS    "GET oslib/Wimp.Hdr"
        |
Get_Wimp                        SETS    ""
        ]
        $Get_Wimp

;Symbols for constants
ShareFS_AttrDisc                *       &1
ShareFS_AttrDiscP               *       &2
ShareFS_AttrDiscRO              *       &4
ShareFS_AttrHidden              *       &8
ShareFS_AttrSubdirAuth          *       &10
ShareFS_AttrCDROM               *       &20
ShareFS_AttrCDROMAuth           *       &40
ShareFS_FileTypeDiscP           *       &BD9
ShareFS_FileTypeDisc            *       &BDA
ShareFS_FileTypeSubdir          *       &FAF
ShareFS_FileTypeCDROM           *       &FAD
ShareFS_FileTypeDiscR           *       &FB4
ShareFS_FileTypeNoDisc          *       &FB5
ShareFS_ShareDisc               *       &0
ShareFS_ShareDiscP              *       &1
ShareFS_ShareDiscRO             *       &2
ShareFS_ShareHidden             *       &4
ShareFS_ShareSubdirAuth         *       &8
ShareFS_ShareCDROM              *       &10
ShareFS_ShareCDROMAuth          *       &20
ShareFS_NoMore                  *       -1
ShareFS_EnumerateProtected      *       &1
ShareFS_EnumerateReadOnly       *       &2
ShareFS_EnumerateHidden         *       &4
ShareFS_EnumerateSubdir         *       &8
ShareFS_EnumerateCDROM          *       &10
ShareFS_EnumerateAuthenticated  *       &80000000
ShareFS_IdentifyShareShareName  *       &1
Message_FileShareDir            *       &408
ShareFSMessageFileShareDirFlags_Protected *       &1
ShareFSMessageFileShareDirFlags_ReadOnly *       &2
ShareFSMessageFileShareDirFlags_Hidden *       &4
ShareFSMessageFileShareDirFlags_Authenticated *       &8
ShareFSMessageFileShareDirFlags_CDROM *       &10
ShareFSMessageFileShareDirFlags_WindowPosGiven *       &40000000

;Symbols for structure offsets and sizes
        ^       0
        #       Bits
ShareFS_Attr                    *       @

        ^       0
        #       Bits
ShareFS_ShareFlags              *       @

        ^       0
        #       Bits
ShareFS_StopFlags               *       @

        ^       0
        #       Bits
ShareFS_EnumerateFlags          *       @

        ^       0
        #       Bits
ShareFS_IdentifyShareFlags      *       @

        ^       0
        #       Bits
ShareFSMessageFileShareDir_Flags *       @

        ^       0
ShareFS_MessageFileShareDir_flags #       ShareFSMessageFileShareDir_Flags
ShareFS_MessageFileShareDir_xpos #       Int
ShareFS_MessageFileShareDir_ypos #       Int
ShareFS_MessageFileShareDir_dir_name #       224*Char
ShareFS_MessageFileShareDir     *       @

        ^       0
        #       Bits
ShareFS_StartingFlags           *       @

        ^       0
        #       Bits
ShareFS_TerminatingFlags        *       @


;Symbols for SWI's and SWI reason codes
XShareFS_CreateShare            *       &67AC0
ShareFS_CreateShare             *       &47AC0
   ;Entry
   ;  R0 = flags (ShareFS_ShareFlags)
   ;  R1 -> obj_name (String)
   ;  R2 -> dir_path (String)
   ;  R3 = authentication (Int)

XShareFS_StopShare              *       &67AC1
ShareFS_StopShare               *       &47AC1
   ;Entry
   ;  R0 = flags (ShareFS_StopFlags)
   ;  R1 -> obj_name (String)

XShareFS_EnumerateShares        *       &67AC2
ShareFS_EnumerateShares         *       &47AC2
   ;Entry
   ;  R0 = flags (ShareFS_EnumerateFlags)
   ;  R4 = context (Int)
   ;  R5 = authentication (Int)
   ;Exit
   ;  R1 -> obj_name (String)
   ;  R2 -> dir_path (String)
   ;  R3 = attr (ShareFS_Attr)
   ;  R4 = context_out (Int)

XShareFS_IdentifyShare          *       &67AC3
ShareFS_IdentifyShare           *       &47AC3
   ;Entry
   ;  R0 = flags (ShareFS_IdentifyShareFlags)
   ;  R1 -> obj_name_or_dir_path (String)
   ;  R2 = buf (pointer to data)
   ;  R3 = buf_size (Int)
   ;Exit
   ;  R0 = attr (ShareFS_Attr)
   ;  R3 = buf_size_out (Int)

Service_ShareFSStarting         *       &97
   ;Entry
   ;  R1 = &97
   ;  R2 = flags (ShareFS_StartingFlags)

Service_ShareFSTerminating      *       &98
   ;Entry
   ;  R1 = &98
   ;  R2 = flags (ShareFS_TerminatingFlags)

Service_Sharing                 *       &801C8
   ;Entry
   ;  R0 -> fsname (String)
   ;  R1 = &801C8
   ;  R2 = state (Int)
   ;  R3 -> dir_name (String)
   ;  R4 -> obj_name (String)
   ;  R5 = priv_data (Int)

        ]
        END
