Charles Davis : ntdll: Implement DVD_StartSession() on Mac OS.

Alexandre Julliard julliard at winehq.org
Mon Oct 19 09:56:12 CDT 2009


Module: wine
Branch: master
Commit: 05acaeb0f1e220149936abf0336d556e90acd00f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=05acaeb0f1e220149936abf0336d556e90acd00f

Author: Charles Davis <cdavis at mymail.mines.edu>
Date:   Fri Oct 16 13:56:51 2009 -0600

ntdll: Implement DVD_StartSession() on Mac OS.

---

 dlls/ntdll/cdrom.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c
index 94faf13..43676d0 100644
--- a/dlls/ntdll/cdrom.c
+++ b/dlls/ntdll/cdrom.c
@@ -81,6 +81,7 @@
 # include <IOKit/IOKitLib.h>
 # include <IOKit/storage/IOMedia.h>
 # include <IOKit/storage/IOCDMediaBSDClient.h>
+# include <IOKit/storage/IODVDMediaBSDClient.h>
 # include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h>
 # define SENSEBUFLEN kSenseDefaultSize
 #endif
@@ -1939,6 +1940,20 @@ static NTSTATUS DVD_StartSession(int fd, const DVD_SESSION_ID *sid_in, PDVD_SESS
     return ret;
 #elif defined(__FreeBSD__) || defined(__NetBSD__)
     return STATUS_NOT_SUPPORTED;
+#elif defined(__APPLE__)
+    NTSTATUS ret = STATUS_NOT_SUPPORTED;
+    dk_dvd_report_key_t dvdrk;
+    DVDAuthenticationGrantIDInfo agid_info;
+
+    dvdrk.format = kDVDKeyFormatAGID_CSS;
+    dvdrk.keyClass = kDVDKeyClassCSS_CPPM_CPRM;
+    if(sid_in) dvdrk.grantID = *(uint8_t*)sid_in; /* ? */
+    dvdrk.bufferLength = sizeof(DVDAuthenticationGrantIDInfo);
+    dvdrk.buffer = &agid_info;
+
+    ret = CDROM_GetStatusCode(ioctl(fd, DKIOCDVDREPORTKEY, &dvdrk));
+    *sid_out = agid_info.grantID;
+    return ret;
 #else
     return STATUS_NOT_SUPPORTED;
 #endif




More information about the wine-cvs mailing list