libnx  v4.2.0
Data Structures
async.h File Reference

NS/NIM IAsync* IPC wrapper. More...

#include "../types.h"
#include "../sf/service.h"
#include "../applets/error.h"
#include "../kernel/event.h"

Go to the source code of this file.

Data Structures

struct  AsyncValue
 AsyncValue. More...
 
struct  AsyncResult
 AsyncResult. More...
 

Functions

IAsyncValue
void asyncValueClose (AsyncValue *a)
 Close a AsyncValue. More...
 
Result asyncValueWait (AsyncValue *a, u64 timeout)
 Waits for the async operation to finish using the specified timeout. More...
 
Result asyncValueGetSize (AsyncValue *a, u64 *size)
 Gets the value size. More...
 
Result asyncValueGet (AsyncValue *a, void *buffer, size_t size)
 Gets the value. More...
 
Result asyncValueCancel (AsyncValue *a)
 Cancels the async operation. More...
 
Result asyncValueGetErrorContext (AsyncValue *a, ErrorContext *context)
 Gets the ErrorContext. More...
 
IAsyncResult
void asyncResultClose (AsyncResult *a)
 Close a AsyncResult. More...
 
Result asyncResultWait (AsyncResult *a, u64 timeout)
 Waits for the async operation to finish using the specified timeout. More...
 
Result asyncResultGet (AsyncResult *a)
 Gets the Result. More...
 
Result asyncResultCancel (AsyncResult *a)
 Cancels the async operation. More...
 
Result asyncResultGetErrorContext (AsyncResult *a, ErrorContext *context)
 Gets the ErrorContext. More...
 

Detailed Description

NS/NIM IAsync* IPC wrapper.

Author
yellows8

Function Documentation

◆ asyncResultCancel()

Result asyncResultCancel ( AsyncResult a)

Cancels the async operation.

Note
Used automatically by asyncResultClose.
Parameters
aAsyncResult

◆ asyncResultClose()

void asyncResultClose ( AsyncResult a)

Close a AsyncResult.

Note
When the object is initialized, this uses asyncResultCancel then asyncResultWait with timeout=UINT64_MAX.
Parameters
aAsyncResult

◆ asyncResultGet()

Result asyncResultGet ( AsyncResult a)

Gets the Result.

Note
Prior to using the cmd, this uses asyncResultWait with timeout=UINT64_MAX.
Parameters
aAsyncResult

◆ asyncResultGetErrorContext()

Result asyncResultGetErrorContext ( AsyncResult a,
ErrorContext context 
)

Gets the ErrorContext.

Note
Only available on [4.0.0+].
Parameters
aAsyncResult
[out]contextErrorContext

◆ asyncResultWait()

Result asyncResultWait ( AsyncResult a,
u64  timeout 
)

Waits for the async operation to finish using the specified timeout.

Parameters
aAsyncResult
[in]timeoutTimeout in nanoseconds. UINT64_MAX for no timeout.

◆ asyncValueCancel()

Result asyncValueCancel ( AsyncValue a)

Cancels the async operation.

Note
Used automatically by asyncValueClose.
Parameters
aAsyncValue

◆ asyncValueClose()

void asyncValueClose ( AsyncValue a)

Close a AsyncValue.

Note
When the object is initialized, this uses asyncValueCancel then asyncValueWait with timeout=UINT64_MAX.
Parameters
aAsyncValue

◆ asyncValueGet()

Result asyncValueGet ( AsyncValue a,
void *  buffer,
size_t  size 
)

Gets the value.

Note
Prior to using the cmd, this uses asyncResultWait with timeout=UINT64_MAX.
Parameters
aAsyncValue
[out]bufferOutput buffer.
[in]sizeOutput buffer size.

◆ asyncValueGetErrorContext()

Result asyncValueGetErrorContext ( AsyncValue a,
ErrorContext context 
)

Gets the ErrorContext.

Note
Only available on [4.0.0+].
Parameters
aAsyncValue
[out]contextErrorContext

◆ asyncValueGetSize()

Result asyncValueGetSize ( AsyncValue a,
u64 size 
)

Gets the value size.

Parameters
aAsyncValue
[out]sizeOutput size.

◆ asyncValueWait()

Result asyncValueWait ( AsyncValue a,
u64  timeout 
)

Waits for the async operation to finish using the specified timeout.

Parameters
aAsyncValue
[in]timeoutTimeout in nanoseconds. UINT64_MAX for no timeout.