MythTV  master
Functions | Variables
mediamonitor-darwin.cpp File Reference

MythMediaMonitor for Darwin/Mac OS X. More...

#include <QDir>
#include <QMetaType>
#include "libmythbase/mythcdrom.h"
#include "libmythbase/mythhdd.h"
#include "libmythbase/mythlogging.h"
#include "mediamonitor-darwin.h"
#include "mythmediamonitor.h"
#include <IOKit/IOKitLib.h>
#include <IOKit/storage/IOMedia.h>
#include <IOKit/storage/IOCDMedia.h>
#include <IOKit/storage/IODVDMedia.h>
#include <IOKit/storage/IOBlockStorageDevice.h>
#include <IOKit/storage/IOStorageDeviceCharacteristics.h>
#include <IOKit/storage/IOStorageProtocolCharacteristics.h>
#include <DiskArbitration/DiskArbitration.h>
Include dependency graph for mediamonitor-darwin.cpp:

Go to the source code of this file.

Functions

void diskAppearedCallback (DADiskRef disk, void *context)
 
void diskDisappearedCallback (DADiskRef disk, void *context)
 
void diskChangedCallback (DADiskRef disk, CFArrayRef keys, void *context)
 
MythMediaType MediaTypeForBSDName (const char *bsdName)
 Given a BSD device node name, guess its media type. More...
 
MythMediaType FindMediaType (io_service_t service)
 Guess the media that a volume/partition is on. More...
 
static char * getVolName (CFDictionaryRef diskDetails)
 Given a description of a disk, copy and return the volume name. More...
 
static QString getModel (CFDictionaryRef diskDetails)
 
static QString getModel (io_object_t drive)
 

Variables

static mach_port_t sMasterPort
 

Detailed Description

MythMediaMonitor for Darwin/Mac OS X.

Version
$Id$
Author
Andrew Kimpton, Nigel Pearson

Definition in file mediamonitor-darwin.cpp.

Function Documentation

◆ diskAppearedCallback()

void diskAppearedCallback ( DADiskRef  disk,
void *  context 
)

Definition at line 261 of file mediamonitor-darwin.cpp.

Referenced by MonitorThreadDarwin::run().

◆ diskDisappearedCallback()

void diskDisappearedCallback ( DADiskRef  disk,
void *  context 
)

Definition at line 341 of file mediamonitor-darwin.cpp.

Referenced by MonitorThreadDarwin::run().

◆ diskChangedCallback()

void diskChangedCallback ( DADiskRef  disk,
CFArrayRef  keys,
void *  context 
)

Definition at line 349 of file mediamonitor-darwin.cpp.

Referenced by MonitorThreadDarwin::run().

◆ MediaTypeForBSDName()

MythMediaType MediaTypeForBSDName ( const char *  bsdName)

Given a BSD device node name, guess its media type.

Definition at line 117 of file mediamonitor-darwin.cpp.

Referenced by diskAppearedCallback().

◆ FindMediaType()

MythMediaType FindMediaType ( io_service_t  service)

Guess the media that a volume/partition is on.

Definition at line 42 of file mediamonitor-darwin.cpp.

Referenced by MediaTypeForBSDName().

◆ getVolName()

static char* getVolName ( CFDictionaryRef  diskDetails)
static

Given a description of a disk, copy and return the volume name.

Definition at line 182 of file mediamonitor-darwin.cpp.

Referenced by diskAppearedCallback(), and diskChangedCallback().

◆ getModel() [1/2]

static QString getModel ( CFDictionaryRef  diskDetails)
static

◆ getModel() [2/2]

static QString getModel ( io_object_t  drive)
static

Definition at line 587 of file mediamonitor-darwin.cpp.

Variable Documentation

◆ sMasterPort

mach_port_t sMasterPort
static