mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-18 16:33:31 +00:00
First commit of MeshAgent for MeshCentral
This commit is contained in:
55
microscript/ILibDuktape_WritableStream.h
Normal file
55
microscript/ILibDuktape_WritableStream.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
Copyright 2006 - 2017 Intel Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ___ILIBDUKTAPE_WRITABLESTREAM___
|
||||
#define ___ILIBDUKTAPE_WRITABLESTREAM___
|
||||
|
||||
#include "duktape.h"
|
||||
#include "microstack/ILibParsers.h"
|
||||
|
||||
struct ILibDuktape_WritableStream;
|
||||
typedef ILibTransport_DoneState(*ILibDuktape_WritableStream_WriteHandler)(struct ILibDuktape_WritableStream *stream, char *buffer, int bufferLen, void *user);
|
||||
typedef void(*ILibDuktape_WritableStream_EndHandler)(struct ILibDuktape_WritableStream *stream, void *user);
|
||||
typedef void(*ILibDuktape_WriteableStream_WriteFlushNative)(struct ILibDuktape_WritableStream *stream, void *user);
|
||||
typedef void(*ILibDuktape_WritableStream_PipeHandler)(struct ILibDuktape_WritableStream *stream, void *readableSource, void *user);
|
||||
|
||||
typedef struct ILibDuktape_WritableStream
|
||||
{
|
||||
duk_context *ctx;
|
||||
void *obj;
|
||||
void *OnDrain;
|
||||
void *OnWriteFlush;
|
||||
void *OnPipe;
|
||||
ILibDuktape_WriteableStream_WriteFlushNative OnWriteFlushEx;
|
||||
void *OnWriteFlushEx_User;
|
||||
|
||||
void *OnError;
|
||||
void *OnFinish;
|
||||
char WaitForEnd;
|
||||
|
||||
ILibDuktape_WritableStream_WriteHandler WriteSink;
|
||||
ILibDuktape_WritableStream_EndHandler EndSink;
|
||||
ILibDuktape_WritableStream_PipeHandler PipeSink;
|
||||
void *WriteSink_User;
|
||||
} ILibDuktape_WritableStream;
|
||||
|
||||
#define ILibDuktape_WritableStream_WSPTRS "\xFF_WritableStream_PTRS"
|
||||
|
||||
ILibDuktape_WritableStream* ILibDuktape_WritableStream_Init(duk_context *ctx, ILibDuktape_WritableStream_WriteHandler WriteHandler, ILibDuktape_WritableStream_EndHandler EndHandler, void *user);
|
||||
void ILibDuktape_WritableStream_Ready(ILibDuktape_WritableStream *stream);
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user