@ GNU AS assembler header file for ShareFS
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:49:36 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.

#ifndef ShareFS_Hdr
#  define ShareFS_Hdr

#  ifndef Get_Types
#    define Get_Types
#    include "oslib/Types.Hdr"
#  endif

#  ifndef Get_OS
#    define Get_OS
#    include "oslib/OS.Hdr"
#  endif

#  ifndef Get_Freeway
#    define Get_Freeway
#    include "oslib/Freeway.Hdr"
#  endif

#  ifndef Get_Wimp
#    define Get_Wimp
#    include "oslib/Wimp.Hdr"
#  endif

@Symbols for constants
#  define ShareFS_AttrDisc 0x1
#  define ShareFS_AttrDiscP 0x2
#  define ShareFS_AttrDiscRO 0x4
#  define ShareFS_AttrHidden 0x8
#  define ShareFS_AttrSubdirAuth 0x10
#  define ShareFS_AttrCDROM 0x20
#  define ShareFS_AttrCDROMAuth 0x40
#  define ShareFS_FileTypeDiscP 0xbd9
#  define ShareFS_FileTypeDisc 0xbda
#  define ShareFS_FileTypeSubdir 0xfaf
#  define ShareFS_FileTypeCDROM 0xfad
#  define ShareFS_FileTypeDiscR 0xfb4
#  define ShareFS_FileTypeNoDisc 0xfb5
#  define ShareFS_ShareDisc 0x0
#  define ShareFS_ShareDiscP 0x1
#  define ShareFS_ShareDiscRO 0x2
#  define ShareFS_ShareHidden 0x4
#  define ShareFS_ShareSubdirAuth 0x8
#  define ShareFS_ShareCDROM 0x10
#  define ShareFS_ShareCDROMAuth 0x20
#  define ShareFS_NoMore 0xffffffff
#  define ShareFS_EnumerateProtected 0x1
#  define ShareFS_EnumerateReadOnly 0x2
#  define ShareFS_EnumerateHidden 0x4
#  define ShareFS_EnumerateSubdir 0x8
#  define ShareFS_EnumerateCDROM 0x10
#  define ShareFS_EnumerateAuthenticated 0x80000000
#  define ShareFS_IdentifyShareShareName 0x1
#  define Message_FileShareDir 0x408
#  define ShareFSMessageFileShareDirFlags_Protected 0x1
#  define ShareFSMessageFileShareDirFlags_ReadOnly 0x2
#  define ShareFSMessageFileShareDirFlags_Hidden 0x4
#  define ShareFSMessageFileShareDirFlags_Authenticated 0x8
#  define ShareFSMessageFileShareDirFlags_CDROM 0x10
#  define ShareFSMessageFileShareDirFlags_WindowPosGiven 0x40000000

@Symbols for structure offsets and sizes
        .struct 0
        .skip   Bits
ShareFS_Attr                   : 

        .struct 0
        .skip   Bits
ShareFS_ShareFlags             : 

        .struct 0
        .skip   Bits
ShareFS_StopFlags              : 

        .struct 0
        .skip   Bits
ShareFS_EnumerateFlags         : 

        .struct 0
        .skip   Bits
ShareFS_IdentifyShareFlags     : 

        .struct 0
        .skip   Bits
ShareFSMessageFileShareDir_Flags: 

        .struct 0
ShareFS_MessageFileShareDir_flags: .skip   ShareFSMessageFileShareDir_Flags
ShareFS_MessageFileShareDir_xpos: .skip   Int
ShareFS_MessageFileShareDir_ypos: .skip   Int
ShareFS_MessageFileShareDir_dir_name: .skip   224*Char
ShareFS_MessageFileShareDir    : 

        .struct 0
        .skip   Bits
ShareFS_StartingFlags          : 

        .struct 0
        .skip   Bits
ShareFS_TerminatingFlags       : 


@Symbols for SWI's and SWI reason codes
.set XShareFS_CreateShare,0x67ac0
.set ShareFS_CreateShare,0x47ac0
   @Entry
   @  R0 = flags (ShareFS_ShareFlags)
   @  R1 -> obj_name (String)
   @  R2 -> dir_path (String)
   @  R3 = authentication (Int)

.set XShareFS_StopShare,0x67ac1
.set ShareFS_StopShare,0x47ac1
   @Entry
   @  R0 = flags (ShareFS_StopFlags)
   @  R1 -> obj_name (String)

.set XShareFS_EnumerateShares,0x67ac2
.set ShareFS_EnumerateShares,0x47ac2
   @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)

.set XShareFS_IdentifyShare,0x67ac3
.set ShareFS_IdentifyShare,0x47ac3
   @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)

#  define Service_ShareFSStarting 0x97
   @Entry
   @  R1 = &97
   @  R2 = flags (ShareFS_StartingFlags)

#  define Service_ShareFSTerminating 0x98
   @Entry
   @  R1 = &98
   @  R2 = flags (ShareFS_TerminatingFlags)

#  define Service_Sharing 0x801c8
   @Entry
   @  R0 -> fsname (String)
   @  R1 = &801C8
   @  R2 = state (Int)
   @  R3 -> dir_name (String)
   @  R4 -> obj_name (String)
   @  R5 = priv_data (Int)

#endif
