ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference

 


IOHIDOutputTransactionInterface

Declared In:

Overview

CFPlugin object subclass which privides interface for output transactions to HID devices. Created by a IOHIDDeviceInterface object.



Functions

addElement

Adds an element to the transaction.

clear

Clears the transaction.

commit

Commits the transaction.

create

Creates the current transaction.

createAsyncEventSource

Creates an async event source.

createAsyncPort

Creates an async port.

dispose

Disposes of the current transaction.

getAsyncEventSource

Obtains the current event source.

getAsyncPort

Obtains the current async port.

getElementDefault

Obtains the default value of an element in a transaction.

getElementValue

Obtains the value of an element in a transaction.

hasElement

Checks whether an element has been added to the transaction.

removeElement

Removes an element from the transaction.

setElementDefault

Sets the default value of an element in a transaction.

setElementValue

Sets the value of an element in a transaction.


addElement


Adds an element to the transaction.

IOReturn ( *addElement) (
    void *self,
    IOHIDElementCookie elementCookie);  
Parameters
elementCookie

The element of interest.

Return Value

Returns an IOReturn code.

Discussion

If the element has already been added to transaction, an error will be returned.


clear


Clears the transaction.

IOReturn ( *clear)(
    void *self);  
Return Value

Returns an IOReturn code.

Discussion

Transaction element values will cleared. Default values will be preserved.


commit


Commits the transaction.

IOReturn ( *commit)(
    void *self, 
    uint32_t timeoutMS, 
    IOHIDCallbackFunction callback, 
    void *callbackTarget, 
    void *callbackRefcon);  
Parameters
timeoutMS

UNSUPPORTED

callback

UNSUPPORTED

callbackTarget

UNSUPPORTED

callbackRefcon

UNSUPPORTED

Return Value

Returns an IOReturn code.

Discussion

Transaction element values, if set, will be sent to the device. Otherwise, the default element value will be used. If neither are set, that element will be omitted from the commit. After a transaction is committed, transaction element values will be cleared. Default values will be preserved.


create


Creates the current transaction.

IOReturn ( *create)(
    void *self);  
Return Value

Returns an IOReturn code.

Discussion

This method will free any memory that has been allocated for this transaction.


createAsyncEventSource


Creates an async event source.

IOReturn ( *createAsyncEventSource)(
    void *self, 
    CFRunLoopSourceRef *source);  
Parameters
source

The newly created event source

Return Value

Returns an IOReturn code.

Discussion

This will be used with setEventCallout.


createAsyncPort


Creates an async port.

IOReturn ( *createAsyncPort)(
    void *self,
    mach_port_t *port);  
Parameters
port

The newly created async port.

Return Value

Returns an IOReturn code.

Discussion

This will be used with createAsyncEventSource.


dispose


Disposes of the current transaction.

IOReturn ( *dispose)(
    void *self);  
Return Value

Returns an IOReturn code.

Discussion

The transaction will have to be recreated, in order to perform any operations on the transaction.


getAsyncEventSource


Obtains the current event source.

CFRunLoopSourceRef ( *getAsyncEventSource)(
    void *self);  
Return Value

Returns a CFRunLoopSourceRef.


getAsyncPort


Obtains the current async port.

mach_port_t ( *getAsyncPort)(
    void *self);  
Return Value

Returns a mach_port_t.


getElementDefault


Obtains the default value of an element in a transaction.

IOReturn ( *getElementDefault)(
    void *self, 
    IOHIDElementCookie elementCookie, 
    IOHIDEventStruct *outValueEvent);  
Parameters
elementCookie

The element of interest.

outValueEvent

The event that will be filled. If a long value is present, it is up to the caller to deallocate it.

Return Value

Returns an IOReturn code.

Discussion

An error will be returned if the element has not been added to the transaction.


getElementValue


Obtains the value of an element in a transaction.

IOReturn ( *getElementValue)(
    void *self, 
    IOHIDElementCookie elementCookie, 
    IOHIDEventStruct *outValueEvent);  
Parameters
elementCookie

The element of interest.

outValueEvent

The event that will be filled. If a long value is present, it is up to the caller to deallocate it.

Return Value

Returns an IOReturn code.

Discussion

An error will be returned if the element has not been added to the transaction.


hasElement


Checks whether an element has been added to the transaction.

Boolean ( *hasElement) (
    void *self,
    IOHIDElementCookie elementCookie);  
Parameters
elementCookie

The element of interest.

Return Value

Returns a Boolean value.

Discussion

Will return true if present, otherwise will return false.


removeElement


Removes an element from the transaction.

IOReturn ( *removeElement) (
    void *self,
    IOHIDElementCookie elementCookie);  
Parameters
elementCookie

The element of interest.

Return Value

Returns an IOReturn code.

Discussion

If the element has not been added to transaction, an error will be returned.


setElementDefault


Sets the default value of an element in a transaction.

IOReturn ( *setElementDefault)(
    void *self, 
    IOHIDElementCookie elementCookie, 
    IOHIDEventStruct *valueEvent);  
Parameters
elementCookie

The element of interest.

valueEvent

The event that will be filled. If a long value is present, it will be copied.

Return Value

Returns an IOReturn code.

Discussion

An error will be returned if the element has not been added to the transaction.


setElementValue


Sets the value of an element in a transaction.

IOReturn ( *setElementValue)(
    void *self, 
    IOHIDElementCookie elementCookie, 
    IOHIDEventStruct *valueEvent);  
Parameters
elementCookie

The element of interest.

valueEvent

The event that will be filled. If a long value is present, it will be copied.

Return Value

Returns an IOReturn code.

Discussion

An error will be returned if the element has not been added to the transaction.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2009-02-23