blob: bfc93ae1abcb989db2c7fb8db50a0f7fc87483e4 [file] [log] [blame]
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifdef __WIDL__
#pragma winrt ns_prefix
#endif
import "inspectable.idl";
import "windowscontracts.idl";
import "windows.foundation.collections.idl";
namespace Windows {
namespace Foundation {
interface IAsyncInfo;
interface IAsyncAction;
interface IAsyncOperation;
interface AsyncActionCompletedHandler; // delegate
interface TypedEventHandler; // delegate
struct DateTime;
struct EventRegistrationToken;
namespace Collections {
interface IPropertySet;
}
}
}
namespace Windows {
namespace Foundation {
typedef enum AsyncStatus {
Started,
Completed,
Canceled,
Error
} AsyncStatus;
typedef struct DateTime {
UINT64 UniversalTime;
} DateTime;
typedef struct EventRegistrationToken {
UINT64 Value;
} EventRegistrationToken;
[uuid(00000036-0000-0000-C000-000000000046)]
interface IAsyncInfo : IInspectable
{
[propget] HRESULT Id(unsigned int *id);
[propget] HRESULT Status(AsyncStatus *status);
[propget] HRESULT ErrorCode(HRESULT *errorCode);
HRESULT Cancel();
HRESULT Close();
}
[uuid(5A648006-843A-4DA9-865B-9D26E5DFAD7B)]
interface IASyncAction : IAsyncInfo {
[propput] HRESULT Completed(AsyncActionCompletedHandler* handler);
[propget] HRESULT Completed(AsyncActionCompletedHandler** handler);
HRESULT GetResults();
}
[uuid(A4ED5C81-76C9-40BD-8BE6-B1D90FB20AE7)]
interface AsyncActionCompletedHandler : IUnknown {
//FIXME: should support cyclic dependency
HRESULT Invoke(IAsyncAction *asyncAction, AsyncStatus status);
}
//FIXME: WHERE IS IT?
//generic <typename TResult>
[uuid("9fc2b0bb-e446-44e2-aa61-9cab8f636af2")]
interface IAsyncOperation : IAsyncInfo {
[propput] HRESULT Completed(AsyncActionCompletedHandler* handler);
[propget] HRESULT Completed(AsyncActionCompletedHandler** handler);
//FIXME: implement generics
/*TResult*/ IInspectable* GetResults();
}
namespace Collections {
//interface IVectorView;
/*[uuid(8A43ED9F-F4E6-4421-ACF9-1DAB2986820C)]
interface IPropertySet : IInspectable {
//
}*/
}
}
}