guardia-messenger/node_modules/expo-modules-core/common/cpp/SharedObject.h
DESKTOP-TKLFCPRython f29f525c77 refactor: 101.79.17.164 → zioinfo.co.kr 전체 도메인 변환 + Manager UI 배포
- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스)
- Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포
- 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 10:09:17 +09:00

60 lines
1.4 KiB
C++

// Copyright 2024-present 650 Industries. All rights reserved.
#pragma once
#ifdef __cplusplus
#include <jsi/jsi.h>
#include "JSIUtils.h"
#include "ObjectDeallocator.h"
#include "EventEmitter.h"
namespace jsi = facebook::jsi;
namespace expo::SharedObject {
/**
Type of the shared object IDs.
*/
typedef long ObjectId;
/**
Defines an object releaser block of the shared object.
*/
typedef std::function<void(const ObjectId)> ObjectReleaser;
/**
Installs a base JavaScript class for all shared object with a shared release block.
*/
void installBaseClass(jsi::Runtime &runtime, const ObjectReleaser releaser);
/**
Returns the base JavaScript class for all shared objects, i.e. `global.expo.SharedObject`.
*/
jsi::Function getBaseClass(jsi::Runtime &runtime);
/**
Creates a concrete shared object class with the given name and constructor.
*/
jsi::Function createClass(jsi::Runtime &runtime, const char *className, common::ClassConstructor constructor);
/**
Class representing a native state of the shared object.
*/
class JSI_EXPORT NativeState : public EventEmitter::NativeState {
public:
const ObjectId objectId = 0;
const ObjectReleaser releaser;
/**
The default constructor that initializes a native state for the shared object with given ID.
*/
NativeState(const ObjectId objectId, const ObjectReleaser releaser);
virtual ~NativeState();
}; // class NativeState
} // namespace expo::SharedObject
#endif // __cplusplus