コード例 #1
0
//----------------------------------------------------------------------------------------------------
// IOHIDUserDevice::newLocationIDNumber
//----------------------------------------------------------------------------------------------------
OSNumber *IOHIDUserDevice::newLocationIDNumber() const
{
    OSNumber * number = OSDynamicCast(OSNumber, _properties->getObject(kIOHIDLocationIDKey));
    
    if ( !number ) 
        return NULL;
    
    number->retain();
    
    return number;
}
コード例 #2
0
//----------------------------------------------------------------------------------------------------
// IOHIDUserDevice::newCountryCodeNumber
//----------------------------------------------------------------------------------------------------
OSNumber *IOHIDUserDevice::newCountryCodeNumber() const
{
    OSNumber * number = OSDynamicCast(OSNumber, _properties->getObject(kIOHIDCountryCodeKey));
    
    if ( !number ) 
        return NULL;
    
    number->retain();
    
    return number;
}
コード例 #3
0
//----------------------------------------------------------------------------------------------------
// IOHIDUserDevice::newVendorIDSourceNumber
//----------------------------------------------------------------------------------------------------
OSNumber *IOHIDUserDevice::newVendorIDSourceNumber() const
{
    OSNumber * number = OSDynamicCast(OSNumber, _properties->getObject(kIOHIDVendorIDSourceKey));
    
    if ( !number ) 
        return NULL;
        
    number->retain();
        
    return number;
}
コード例 #4
0
//----------------------------------------------------------------------------------------------------
// IOHIDUserDevice::newReportIntervalNumber
//----------------------------------------------------------------------------------------------------
OSNumber *IOHIDUserDevice::newReportIntervalNumber() const
{
    OSNumber * number = OSDynamicCast(OSNumber, _properties->getObject(kIOHIDReportIntervalKey));
    
    if ( !number ) {
        number = IOHIDDevice::newReportIntervalNumber();
    }
    else {
        number->retain();
    }
        
    return number;
}