mirror of
https://github.com/microsoft/WSL.git
synced 2025-12-11 04:35:57 -06:00
clang
This commit is contained in:
parent
07d0ac0416
commit
261714c184
@ -14,131 +14,97 @@ Abstract:
|
|||||||
|
|
||||||
#include "wsla.h"
|
#include "wsla.h"
|
||||||
|
|
||||||
HRESULT WslaCanRun(
|
HRESULT WslaCanRun(_Out_ BOOL* canRun)
|
||||||
_Out_ BOOL* canRun)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaGetVersion(
|
HRESULT WslaGetVersion(_Out_ WSLA_VERSION* version)
|
||||||
_Out_ WSLA_VERSION* version)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaInstallWithDependencies(
|
HRESULT WslaInstallWithDependencies(_In_opt_ __callback WslaInstallCallback progressCallback, _In_opt_ PVOID context)
|
||||||
_In_opt_ __callback WslaInstallCallback progressCallback,
|
|
||||||
_In_opt_ PVOID context)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaCreateSession(
|
HRESULT WslaCreateSession(_In_ const WSLA_CREATE_SESSION_OPTIONS* settings, _Out_ WslaSession* sesssion)
|
||||||
_In_ const WSLA_CREATE_SESSION_OPTIONS* settings,
|
|
||||||
_Out_ WslaSession* sesssion)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaReleaseSession(
|
HRESULT WslaReleaseSession(_In_ WslaSession session)
|
||||||
_In_ WslaSession session)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaPullContainerImage(
|
HRESULT WslaPullContainerImage(_In_ WslaSession session, _In_ const WLSA_PULL_CONTAINER_IMAGE_OPTIONS* options)
|
||||||
_In_ WslaSession session,
|
|
||||||
_In_ const WLSA_PULL_CONTAINER_IMAGE_OPTIONS* options)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaImportContainerImage(
|
HRESULT WslaImportContainerImage(_In_ WslaSession session, _In_ const WLSA_PULL_CONTAINER_IMAGE_OPTIONS* options)
|
||||||
_In_ WslaSession session,
|
|
||||||
_In_ const WLSA_PULL_CONTAINER_IMAGE_OPTIONS* options)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaListContainerImages(
|
HRESULT WslaListContainerImages(_In_ WslaSession sesssion, _Inout_ WSLA_CONTAINER_IMAGE_INFO* images, _Inout_ UINT32* count)
|
||||||
_In_ WslaSession sesssion,
|
|
||||||
_Inout_ WSLA_CONTAINER_IMAGE_INFO* images,
|
|
||||||
_Inout_ UINT32* count)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaDeleteContainerImage(
|
HRESULT WslaDeleteContainerImage(_In_ WslaSession session, _In_ PCSTR imageName)
|
||||||
_In_ WslaSession session,
|
|
||||||
_In_ PCSTR imageName)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaCreateNewContainer(
|
HRESULT WslaCreateNewContainer(_In_ WslaSession session, _In_ const WSLA_CONTAINER_OPTIONS* options, _Out_ WslaRuntimeContainer* container, _Out_ WSLA_CONTAINER_PROCESS* initProcess)
|
||||||
_In_ WslaSession session,
|
|
||||||
_In_ const WSLA_CONTAINER_OPTIONS* options,
|
|
||||||
_Out_ WslaRuntimeContainer* container,
|
|
||||||
_Out_ WSLA_CONTAINER_PROCESS* initProcess)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaStartContainer(
|
HRESULT WslaStartContainer(_In_ WslaRuntimeContainer container)
|
||||||
_In_ WslaRuntimeContainer container)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaStopContainer(
|
HRESULT WslaStopContainer(_In_ WslaRuntimeContainer container)
|
||||||
_In_ WslaRuntimeContainer container)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaDeleteContainer(
|
HRESULT WslaDeleteContainer(_In_ WslaRuntimeContainer container)
|
||||||
_In_ WslaRuntimeContainer container)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaRestartContainer(
|
HRESULT WslaRestartContainer(_In_ WslaRuntimeContainer container)
|
||||||
_In_ WslaRuntimeContainer container)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaGetContainerState(
|
HRESULT WslaGetContainerState(_In_ WslaRuntimeContainer container, _Out_ WSLA_CONTAINER_STATE* state)
|
||||||
_In_ WslaRuntimeContainer container,
|
|
||||||
_Out_ WSLA_CONTAINER_STATE* state)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaCreateContainerProcess(
|
HRESULT WslaCreateContainerProcess(_In_ WslaRuntimeContainer container, _In_ const WSLA_CONTAINER_PROCESS_OPTIONS* options, _Out_ WSLA_CONTAINER_PROCESS* process)
|
||||||
_In_ WslaRuntimeContainer container,
|
|
||||||
_In_ const WSLA_CONTAINER_PROCESS_OPTIONS* options,
|
|
||||||
_Out_ WSLA_CONTAINER_PROCESS* process)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaGetContainerProcessResult(
|
HRESULT WslaGetContainerProcessResult(_In_ const WSLA_CONTAINER_PROCESS* process, _Out_ WSLA_CONTAINER_PROCESS_RESULT* result)
|
||||||
_In_ const WSLA_CONTAINER_PROCESS* process,
|
|
||||||
_Out_ WSLA_CONTAINER_PROCESS_RESULT* result)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaSignalContainerProcess(
|
HRESULT WslaSignalContainerProcess(_In_ WSLA_CONTAINER_PROCESS* process, _In_ INT32 signal)
|
||||||
_In_ WSLA_CONTAINER_PROCESS* process,
|
|
||||||
_In_ INT32 signal)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WslaCreateVhd(
|
HRESULT WslaCreateVhd(_In_ const WSLA_CREATE_VHD_OPTIONS* options)
|
||||||
_In_ const WSLA_CREATE_VHD_OPTIONS* options)
|
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
@ -19,8 +19,7 @@ EXTERN_C_START
|
|||||||
|
|
||||||
// Wsla Install
|
// Wsla Install
|
||||||
|
|
||||||
STDAPI WslaCanRun(
|
STDAPI WslaCanRun(_Out_ BOOL* canRun);
|
||||||
_Out_ BOOL* canRun);
|
|
||||||
|
|
||||||
typedef struct WSLA_VERSION
|
typedef struct WSLA_VERSION
|
||||||
{
|
{
|
||||||
@ -29,8 +28,7 @@ typedef struct WSLA_VERSION
|
|||||||
UINT32 revision;
|
UINT32 revision;
|
||||||
} WSLA_VERSION;
|
} WSLA_VERSION;
|
||||||
|
|
||||||
STDAPI WslaGetVersion(
|
STDAPI WslaGetVersion(_Out_ WSLA_VERSION* version);
|
||||||
_Out_ WSLA_VERSION* version);
|
|
||||||
|
|
||||||
typedef enum WSLA_INSTALL_COMPONENT
|
typedef enum WSLA_INSTALL_COMPONENT
|
||||||
{
|
{
|
||||||
@ -40,15 +38,9 @@ typedef enum WSLA_INSTALL_COMPONENT
|
|||||||
WSLA_INSTALL_COMPONENT_WSL_PACKAGE = 4,
|
WSLA_INSTALL_COMPONENT_WSL_PACKAGE = 4,
|
||||||
} WSLA_INSTALL_COMPONENT;
|
} WSLA_INSTALL_COMPONENT;
|
||||||
|
|
||||||
typedef __callback VOID(CALLBACK WslaInstallCallback)(
|
typedef __callback VOID(CALLBACK WslaInstallCallback)(_In_ WSLA_INSTALL_COMPONENT component, _In_ UINT32 progress, _In_ UINT32 total, _In_opt_ PVOID context);
|
||||||
_In_ WSLA_INSTALL_COMPONENT component,
|
|
||||||
_In_ UINT32 progress,
|
|
||||||
_In_ UINT32 total,
|
|
||||||
_In_opt_ PVOID context);
|
|
||||||
|
|
||||||
STDAPI WslaInstallWithDependencies(
|
STDAPI WslaInstallWithDependencies(_In_opt_ __callback WslaInstallCallback progressCallback, _In_opt_ PVOID context);
|
||||||
_In_opt_ __callback WslaInstallCallback progressCallback,
|
|
||||||
_In_opt_ PVOID context);
|
|
||||||
|
|
||||||
// Session
|
// Session
|
||||||
|
|
||||||
@ -59,9 +51,7 @@ typedef enum WSLA_SESSION_TERMINATION_REASON
|
|||||||
WSLA_SESSION_TERMINATION_REASON_CRASHED = 2,
|
WSLA_SESSION_TERMINATION_REASON_CRASHED = 2,
|
||||||
} WSLA_SESSION_TERMINATION_REASON;
|
} WSLA_SESSION_TERMINATION_REASON;
|
||||||
|
|
||||||
typedef __callback VOID (CALLBACK WslaSessionTerminationCallback)(
|
typedef __callback VOID(CALLBACK WslaSessionTerminationCallback)(_In_ WSLA_SESSION_TERMINATION_REASON reason, _In_opt_ PVOID context);
|
||||||
_In_ WSLA_SESSION_TERMINATION_REASON reason,
|
|
||||||
_In_opt_ PVOID context);
|
|
||||||
|
|
||||||
typedef struct WSLA_CREATE_SESSION_OPTIONS
|
typedef struct WSLA_CREATE_SESSION_OPTIONS
|
||||||
{
|
{
|
||||||
@ -73,19 +63,13 @@ typedef struct WSLA_CREATE_SESSION_OPTIONS
|
|||||||
|
|
||||||
DECLARE_HANDLE(WslaSession);
|
DECLARE_HANDLE(WslaSession);
|
||||||
|
|
||||||
STDAPI WslaCreateSession(
|
STDAPI WslaCreateSession(_In_ const WSLA_CREATE_SESSION_OPTIONS* settings, _Out_ WslaSession* session);
|
||||||
_In_ const WSLA_CREATE_SESSION_OPTIONS* settings,
|
|
||||||
_Out_ WslaSession* session);
|
|
||||||
|
|
||||||
STDAPI WslaReleaseSession(
|
STDAPI WslaReleaseSession(_In_ WslaSession session);
|
||||||
_In_ WslaSession session);
|
|
||||||
|
|
||||||
// Container image
|
// Container image
|
||||||
|
|
||||||
typedef __callback VOID(CALLBACK WslaContainerImageProgressCallback)(
|
typedef __callback VOID(CALLBACK WslaContainerImageProgressCallback)(_In_ UINT32 progress, _In_ UINT32 total, _In_opt_ PVOID context);
|
||||||
_In_ UINT32 progress,
|
|
||||||
_In_ UINT32 total,
|
|
||||||
_In_opt_ PVOID context);
|
|
||||||
|
|
||||||
typedef struct WLSA_PULL_CONTAINER_IMAGE_OPTIONS
|
typedef struct WLSA_PULL_CONTAINER_IMAGE_OPTIONS
|
||||||
{
|
{
|
||||||
@ -98,9 +82,7 @@ typedef struct WLSA_PULL_CONTAINER_IMAGE_OPTIONS
|
|||||||
PCSTR password;
|
PCSTR password;
|
||||||
} WLSA_PULL_CONTAINER_IMAGE_OPTIONS;
|
} WLSA_PULL_CONTAINER_IMAGE_OPTIONS;
|
||||||
|
|
||||||
STDAPI WslaPullContainerImage(
|
STDAPI WslaPullContainerImage(_In_ WslaSession session, _In_ const WLSA_PULL_CONTAINER_IMAGE_OPTIONS* options);
|
||||||
_In_ WslaSession session,
|
|
||||||
_In_ const WLSA_PULL_CONTAINER_IMAGE_OPTIONS* options);
|
|
||||||
|
|
||||||
typedef struct WLSA_IMPORT_CONTAINER_IMAGE_OPTIONS
|
typedef struct WLSA_IMPORT_CONTAINER_IMAGE_OPTIONS
|
||||||
{
|
{
|
||||||
@ -109,9 +91,7 @@ typedef struct WLSA_IMPORT_CONTAINER_IMAGE_OPTIONS
|
|||||||
PVOID progressCallbackContext;
|
PVOID progressCallbackContext;
|
||||||
} WLSA_IMPORT_CONTAINER_IMAGE_OPTIONS;
|
} WLSA_IMPORT_CONTAINER_IMAGE_OPTIONS;
|
||||||
|
|
||||||
STDAPI WslaImportContainerImage(
|
STDAPI WslaImportContainerImage(_In_ WslaSession session, _In_ const WLSA_PULL_CONTAINER_IMAGE_OPTIONS* options);
|
||||||
_In_ WslaSession session,
|
|
||||||
_In_ const WLSA_PULL_CONTAINER_IMAGE_OPTIONS* options);
|
|
||||||
|
|
||||||
typedef struct WSLA_CONTAINER_IMAGE_INFO
|
typedef struct WSLA_CONTAINER_IMAGE_INFO
|
||||||
{
|
{
|
||||||
@ -120,14 +100,9 @@ typedef struct WSLA_CONTAINER_IMAGE_INFO
|
|||||||
UINT8 sha256[32];
|
UINT8 sha256[32];
|
||||||
} WSLA_CONTAINER_IMAGE_INFO;
|
} WSLA_CONTAINER_IMAGE_INFO;
|
||||||
|
|
||||||
STDAPI WslaListContainerImages(
|
STDAPI WslaListContainerImages(_In_ WslaSession sesssion, _Inout_ WSLA_CONTAINER_IMAGE_INFO* images, _Inout_ UINT32* count);
|
||||||
_In_ WslaSession sesssion,
|
|
||||||
_Inout_ WSLA_CONTAINER_IMAGE_INFO* images,
|
|
||||||
_Inout_ UINT32* count);
|
|
||||||
|
|
||||||
STDAPI WslaDeleteContainerImage(
|
STDAPI WslaDeleteContainerImage(_In_ WslaSession session, _In_ PCSTR imageName);
|
||||||
_In_ WslaSession session,
|
|
||||||
_In_ PCSTR imageName);
|
|
||||||
|
|
||||||
// Container
|
// Container
|
||||||
|
|
||||||
@ -185,22 +160,15 @@ typedef struct WSLA_CONTAINER_PROCESS
|
|||||||
DECLARE_HANDLE(WslaRuntimeContainer);
|
DECLARE_HANDLE(WslaRuntimeContainer);
|
||||||
|
|
||||||
STDAPI WslaCreateNewContainer(
|
STDAPI WslaCreateNewContainer(
|
||||||
_In_ WslaSession session,
|
_In_ WslaSession session, _In_ const WSLA_CONTAINER_OPTIONS* options, _Out_ WslaRuntimeContainer* container, _Out_ WSLA_CONTAINER_PROCESS* initProcess);
|
||||||
_In_ const WSLA_CONTAINER_OPTIONS* options,
|
|
||||||
_Out_ WslaRuntimeContainer* container,
|
|
||||||
_Out_ WSLA_CONTAINER_PROCESS* initProcess);
|
|
||||||
|
|
||||||
STDAPI WslaStartContainer(
|
STDAPI WslaStartContainer(_In_ WslaRuntimeContainer container);
|
||||||
_In_ WslaRuntimeContainer container);
|
|
||||||
|
|
||||||
STDAPI WslaStopContainer(
|
STDAPI WslaStopContainer(_In_ WslaRuntimeContainer container);
|
||||||
_In_ WslaRuntimeContainer container);
|
|
||||||
|
|
||||||
STDAPI WslaDeleteContainer(
|
STDAPI WslaDeleteContainer(_In_ WslaRuntimeContainer container);
|
||||||
_In_ WslaRuntimeContainer container);
|
|
||||||
|
|
||||||
STDAPI WslaRestartContainer(
|
STDAPI WslaRestartContainer(_In_ WslaRuntimeContainer container);
|
||||||
_In_ WslaRuntimeContainer container);
|
|
||||||
|
|
||||||
typedef enum WSLA_CONTAINER_STATE
|
typedef enum WSLA_CONTAINER_STATE
|
||||||
{
|
{
|
||||||
@ -211,16 +179,11 @@ typedef enum WSLA_CONTAINER_STATE
|
|||||||
WSLA_CONTAINER_STATE_FAILED = 4,
|
WSLA_CONTAINER_STATE_FAILED = 4,
|
||||||
} WSLA_CONTAINER_STATE;
|
} WSLA_CONTAINER_STATE;
|
||||||
|
|
||||||
STDAPI WslaGetContainerState(
|
STDAPI WslaGetContainerState(_In_ WslaRuntimeContainer container, _Out_ WSLA_CONTAINER_STATE* state);
|
||||||
_In_ WslaRuntimeContainer container,
|
|
||||||
_Out_ WSLA_CONTAINER_STATE* state);
|
|
||||||
|
|
||||||
// Container Process
|
// Container Process
|
||||||
|
|
||||||
STDAPI WslaCreateContainerProcess(
|
STDAPI WslaCreateContainerProcess(_In_ WslaRuntimeContainer container, _In_ const WSLA_CONTAINER_PROCESS_OPTIONS* options, _Out_ WSLA_CONTAINER_PROCESS* process);
|
||||||
_In_ WslaRuntimeContainer container,
|
|
||||||
_In_ const WSLA_CONTAINER_PROCESS_OPTIONS* options,
|
|
||||||
_Out_ WSLA_CONTAINER_PROCESS* process);
|
|
||||||
|
|
||||||
typedef enum WSLA_CONTAINER_PROCESS_STATE
|
typedef enum WSLA_CONTAINER_PROCESS_STATE
|
||||||
{
|
{
|
||||||
@ -236,13 +199,9 @@ typedef struct WSLA_CONTAINER_PROCESS_RESULT
|
|||||||
INT32 exitCode;
|
INT32 exitCode;
|
||||||
} WSLA_CONTAINER_PROCESS_RESULT;
|
} WSLA_CONTAINER_PROCESS_RESULT;
|
||||||
|
|
||||||
STDAPI WslaGetContainerProcessResult(
|
STDAPI WslaGetContainerProcessResult(_In_ const WSLA_CONTAINER_PROCESS* process, _Out_ WSLA_CONTAINER_PROCESS_RESULT* result);
|
||||||
_In_ const WSLA_CONTAINER_PROCESS* process,
|
|
||||||
_Out_ WSLA_CONTAINER_PROCESS_RESULT* result);
|
|
||||||
|
|
||||||
STDAPI WslaSignalContainerProcess(
|
STDAPI WslaSignalContainerProcess(_In_ WSLA_CONTAINER_PROCESS* process, _In_ INT32 signal);
|
||||||
_In_ WSLA_CONTAINER_PROCESS* process,
|
|
||||||
_In_ INT32 signal);
|
|
||||||
|
|
||||||
// Storage
|
// Storage
|
||||||
|
|
||||||
@ -259,7 +218,6 @@ typedef struct WSLA_CREATE_VHD_OPTIONS
|
|||||||
UINT64 maxSize; // Maximum size in bytes.
|
UINT64 maxSize; // Maximum size in bytes.
|
||||||
} WSLA_CREATE_VHD_OPTIONS;
|
} WSLA_CREATE_VHD_OPTIONS;
|
||||||
|
|
||||||
STDAPI WslaCreateVhd(
|
STDAPI WslaCreateVhd(_In_ const WSLA_CREATE_VHD_OPTIONS* options);
|
||||||
_In_ const WSLA_CREATE_VHD_OPTIONS* options);
|
|
||||||
|
|
||||||
EXTERN_C_END
|
EXTERN_C_END
|
||||||
Loading…
x
Reference in New Issue
Block a user