#ifndef _NSRABSTMSDEV_
#define _NSRABSTMSDEV_

// $Source: /projects/HMS/nsr/udfCore/devs/nsrAMSdv.h,v $
// $Revision: 1.22 $    $Author: hmgr $
// $State: Exp $        $Locker:  $
// $Date: 96/02/02 10:13:53 $

//      Unpublished Confidential Information of Hewlett-Packard
//      Company. Do not disclose.  Copyright (c) Hewlett-Packard
//      Company 1995. All rights reserved
// 
// The contents of this software are proprietary and confidential to
// the Hewlett- Packard Company, and are limited in distribution to
// those with a direct need to know.  Individuals having access to
// this software are responsible for maintaining the confidentiality
// of the content and for keeping the software secure when not in use.
// Transfer to any party is strictly forbidden other than as expressly
// permitted in writing by Hewlett-Packard Company.  Unauthorized
// transfer to or possession by any unauthorized party may be a
// criminal offense.
//
//                  RESTRICTED RIGHTS LEGEND
//
//      Use,  duplication,  or disclosure by the U. S. Government is
//      subject to restrictions as set forth in subparagraph (c) (1)
//      (ii) in the Rights in Technical Data and Computer Software
//      clause in DFARS 252.227-7013 or any other successor clause.
//
//                      HEWLETT-PACKARD COMPANY
//                      3000 Hanover St.
//                      Palo Alto, CA  94304 U.S.A.
//
//      Rights for non-DOD U.S. Government Departments and Agencies
//      are as set forth in FAR 52.227-19 (c) (1,2) or any other
//      successor clause.

// This contains the header information for the AC Device object,
// which is to be declared inside the NSR class.

typedef UINT16                  sid_t;

//#define SID_T_INVALID         ((sid_t) (-1))          // This is global
#define SID_T_INVALID           (0xFFFF)                // This is global
#define VERIFY_MODE_ON          1
#define VERIFY_MODE_OFF         0

class MSDevice
{

public:

    virtual          ~MSDevice(void) {} ;
    virtual UINT32   numSectors(sid_t sid) = 0;
    virtual UINT32   sectorSize(sid_t sid) = 0;
    virtual INT32    read(sid_t sid,UINT32 start,UINT32 nbytes,BYTE *barr) = 0;
    virtual INT32    write(sid_t sid,UINT32 start,UINT32 nbytes,BYTE *barr) = 0;
    virtual Error    error(void) = 0;
    virtual void     flush(void) = 0;
    virtual void     errorClear(void) = 0;
    virtual INT32    writeWOE(sid_t sid,UINT32 start,UINT32 nbytes,
                              BYTE *barr) { return -1; }
    virtual INT32    erase(sid_t sid,UINT32 start,UINT32 nsectors) { return -1;}
    virtual INT32    verifyMode(sid_t sid,INT32 newmode) { return -1; }
    virtual INT32    verifyMode(sid_t sid) { return -1; }
    virtual SSDevice *allocDrive(sid_t sid) { return NULL; }
    virtual INT32    freeDrive(SSDevice *drivep) { return -1; }
    virtual MediaType mediaType(sid_t sid) { return NSR::media_Rewritable; }
    virtual Boolean  verifyBlank(sid_t sid,UINT32 start,UINT32 nsectors,
                                 UINT32 *where) = 0;
};

#endif // _NSRABSTMSDEV_
