/* This is -*-c-*- */

/* $Id: fs.xg,v 1.13 2000/04/30 10:14:25 assar Exp $ */

/*
 * Interface to FS
 */

package RXAFS_

%#include <config.h>
%#include <roken.h>
%#include <fs_errors.h>

error-function conv_to_arla_errno

#include "common.h"

/*
 * Interface
 */

FetchData (IN AFSFid *a_fidToFetchP,
	   IN long a_offset,
	   IN long a_lenInBytes,
	   OUT AFSFetchStatus *a_fidStatP,
	   OUT AFSCallBack *a_callBackP,
	   OUT AFSVolSync *a_volSyncP) split = 130;

FetchACL (IN AFSFid *a_dirFidP,
	  OUT AFSOpaque *a_ACLP,
	  OUT AFSFetchStatus *a_dirNewStatP,
	  OUT AFSVolSync *a_volSyncP) = 131;

FetchStatus (IN AFSFid *a_fidToStatP,
	     OUT AFSFetchStatus *a_currStatP,
	     OUT AFSCallBack *a_callBackP,
	     OUT AFSVolSync *a_volSyncP) = 132;

StoreData (IN AFSFid *a_fidToStoreP,
	   IN AFSStoreStatus *a_fidStatusP,
	   IN long a_offset,
	   IN long a_lenInBytes,
	   IN long a_fileLenInBytes,
	   OUT AFSFetchStatus *a_fidStatP,
	   OUT AFSVolSync *a_volSyncP) split = 133;

/*
 * Correct documentation wouldn't make this fun enough. Gaah.
 */
StoreACL (IN AFSFid *a_dirFidP,
	  IN AFSOpaque *a_ACLToStoreP,
	  OUT AFSFetchStatus *a_dirNewStatP,
	  OUT AFSVolSync *a_volSyncP) = 134;

StoreStatus (IN AFSFid *a_fidP,
	     IN AFSStoreStatus *a_currStatusP,
	     OUT AFSFetchStatus *a_srStatusP,
	     OUT AFSVolSync *a_volSyncP) = 135;

RemoveFile (IN AFSFid *a_dirFidP,
	    IN string a_name<AFSNAMEMAX>,
	    OUT AFSFetchStatus *a_srvStatusP,
	    OUT AFSVolSync *a_volSyncP) = 136;

CreateFile (IN AFSFid *DirFid,
	    IN string Name<AFSNAMEMAX>,
	    IN AFSStoreStatus *InStatus,
	    OUT AFSFid *OutFid,
	    OUT AFSFetchStatus *OutFidStatus,
	    OUT AFSFetchStatus *OutDirStatus,
	    OUT AFSCallBack *CallBack,
	    OUT AFSVolSync *a_volSyncP) = 137;

Rename (IN AFSFid *a_origDirFidP,
	IN string a_origNameP<AFSNAMEMAX>,
	IN AFSFid *a_newDirFidP,
	IN string a_newNameP<AFSNAMEMAX>,
	OUT AFSFetchStatus *a_origDirStatusP,
	OUT AFSFetchStatus *a_newDirStatusP,
	OUT AFSVolSync *a_volSyncP) = 138;

Symlink (IN AFSFid *a_dirFidP,
	 IN string a_nameP<AFSNAMEMAX>,
	 IN string a_linkContentsP<AFSNAMEMAX>,
	 IN AFSStoreStatus *a_origDirStatP,
	 OUT AFSFid *a_newFidP,
	 OUT AFSFetchStatus *a_newFidStatP,
	 OUT AFSFetchStatus *a_newDirStatP,
	 OUT AFSVolSync *a_volSyncP) = 139;

Link (IN AFSFid *a_dirFidP,
      IN string a_nameP<AFSNAMEMAX>,
      IN AFSFid *a_existingFidP,
      OUT AFSFetchStatus *a_newFidStatP,
      OUT AFSFetchStatus *a_newDirStatP,
      OUT AFSVolSync *a_volSyncP) = 140;

MakeDir (IN AFSFid *a_parentDirFidP,
	 IN string a_newDirNameP<AFSNAMEMAX>,
	 IN AFSStoreStatus *a_currStatP,
	 OUT AFSFid *a_newDirFidP,
	 OUT AFSFetchStatus *a_dirFidStatP,
	 OUT AFSFetchStatus *a_parentDirStatP,
	 OUT AFSCallBack *a_newDirCallBackP,
	 OUT AFSVolSync *a_volSyncP) = 141;

RemoveDir (IN AFSFid *a_parentDirStatP,
	   IN string a_dirNameP<AFSNAMEMAX>,
	   OUT AFSFetchStatus *a_newParentDirStatP,
	   OUT AFSVolSync *a_volSyncP) = 142;

GiveUpCallBacks (IN AFSCBFids *a_fidArrayP,
		 IN AFSCBs *a_callBackArrayP) = 147;

/*
 * fetch the status of volume `a_volIDP' into `a_volFetchStatP'.
 * a_volNameP is not filled in.
 */

GetVolumeStatus (IN long a_volIDP,
		 OUT AFSFetchVolumeStatus *a_volFetchStatP,
		 OUT string a_volNameP<AFSNAMEMAX>,
		 OUT string a_offLineMsgP<AFSOPAQUEMAX>,
		 OUT string a_motdP<AFSOPAQUEMAX>) = 149;

SetVolumeStatus (IN long a_volIDP,
		 IN AFSStoreVolumeStatus *a_volStoreStatP,
		 IN string a_volNameP<AFSNAMEMAX>,
		 IN string a_offLineMsgP<AFSOPAQUEMAX>,
		 IN string a_motdP<AFSOPAQUEMAX>) = 150;

GetRootVolume (OUT string a_rootVolNameP<AFSNAMEMAX>) = 151;

GetTime (OUT unsigned long *a_secondsP,
	 OUT unsigned long *a_uSecondsP) = 153;

NGetVolumeInfo	(IN  string VolumeName<AFSNAMEMAX>,
		 OUT AFSVolumeInfo *stuff) = 154;

BulkStatus	(IN  AFSCBFids *FidsArray,
		 OUT AFSBulkStats *StatArray,
		 OUT AFSCBs *CBArray,
		 OUT AFSVolSync *Sync) = 155;

SetLock		(IN  AFSFid *Fid, 
		 IN  ViceLockType Type, 
		 OUT AFSVolSync *Sync) = 156;

ExtendLock	(IN  AFSFid *Fid, 
		 OUT AFSVolSync *Sync) = 157;

ReleaseLock	(IN  AFSFid *Fid, 
		 OUT AFSVolSync *Sync) = 158;
