/*
 * Copyright (c) 2024-2025 Huawei Device Co., Ltd.
 * 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.
 */
package idlize.internal.interop;

interface Interop {
    pointer GetGroupedLog(i32 index);
    void StartGroupedLog(i32 index);
    void StopGroupedLog(i32 index);
    void AppendGroupedLog(i32 index, String message);
    void PrintGroupedLog(i32 index);
    pointer GetStringFinalizer();
    void InvokeFinalizer(pointer ptr1, pointer ptr2);
    pointer GetPtrVectorElement(pointer ptr1, i32 arg);
    i32 StringLength(pointer ptr1);
    void StringData(pointer ptr1, sequence<u8> arr, i32 i);
    pointer StringMake(String str1);
    i32 GetPtrVectorSize(pointer ptr1);
    i32 ManagedStringWrite(String str1, sequence<u8> arr, i32 arg);
    void NativeLog(String str1);
    String Utf8ToString(sequence<u8> data, i32 offset, i32 length);
    String StdStringToString(pointer cstring);
    sequence<i8> RawReturnData(i32 length, i32 filler);
    number IncrementNumber(number input);
    buffer MaterializeBuffer(pointer data, i32 length, i32 resourceId, pointer hold, pointer release);
    pointer GetNativeBufferPointer(buffer data);
    void CallCallback(i32 callbackKind, sequence<u8> args, i32 argsSize);
    void CallCallbackSync(i32 callbackKind, sequence<u8> args, i32 argsSize);
    void CallCallbackResourceHolder(pointer holder, i32 resourceId);
    void CallCallbackResourceReleaser(pointer releaser, i32 resourceId);
    i32 CallForeignVM(pointer foreignContext, i32 kind, sequence<u8> data, i32 length);
};