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

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

#include <QDir>
#include <QMetaType>
#include "mythmediamonitor.h"
#include "mediamonitor-darwin.h"
#include "mythcdrom.h"
#include "mythhdd.h"
#include "mythlogging.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 const QString getModel (CFDictionaryRef diskDetails)
 
static const 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 256 of file mediamonitor-darwin.cpp.

Referenced by MonitorThreadDarwin::run().

◆ diskDisappearedCallback()

void diskDisappearedCallback ( DADiskRef  disk,
void *  context 
)

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

Referenced by MonitorThreadDarwin::run().

◆ diskChangedCallback()

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

Definition at line 344 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 112 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 177 of file mediamonitor-darwin.cpp.

Referenced by diskAppearedCallback(), and diskChangedCallback().

◆ getModel() [1/2]

static const QString getModel ( CFDictionaryRef  diskDetails)
static

◆ getModel() [2/2]

static const QString getModel ( io_object_t  drive)
static

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

Variable Documentation

◆ sMasterPort

mach_port_t sMasterPort
static