harmony 鸿蒙ipc_cskeleton.h

  • 2025-06-12
  • 浏览 (6)

ipc_cskeleton.h

Overview

Provides C interfaces for managing the token IDs, credentials, process IDs (PIDs), user IDs (UIDs), and thread pool in the IPC framework.

Library: libipc_capi.so

System capability: SystemCapability.Communication.IPC.Core

Since: 12

Related module: OHIPCSkeleton

Summary

Functions

Name Description
void OH_IPCSkeleton_JoinWorkThread (void) Joints this thread to the IPC worker thread pool.
void OH_IPCSkeleton_StopWorkThread (void) Stops this thread.
uint64_t OH_IPCSkeleton_GetCallingTokenId (void) Obtains the caller token ID. This API must be called in the IPC context. Otherwise, the token ID is returned.
uint64_t OH_IPCSkeleton_GetFirstTokenId (void) Obtain the token ID of the first invoker.
uint64_t OH_IPCSkeleton_GetSelfTokenId (void) Obtain the local token ID.
uint64_t OH_IPCSkeleton_GetCallingPid (void) Obtains the caller PID. This API must be called in the IPC context. Otherwise, the current PID is returned.
uint64_t OH_IPCSkeleton_GetCallingUid (void) Obtains the caller UID. This API must be called in the IPC context. Otherwise, the current UID is returned.
int OH_IPCSkeleton_IsLocalCalling (void) Checks whether a local calling is being made.
int OH_IPCSkeleton_SetMaxWorkThreadNum (const int maxThreadNum) Sets the maximum number of worker threads.
int OH_IPCSkeleton_ResetCallingIdentity (char **identity, int32_t *len, OH_IPC_MemAllocator allocator) Resets the caller identity credential (including the token ID, UID, and PID) to that of this process and returns the caller credential information. The credential information is used in OH_IPCSkeleton_SetCallingIdentity.
int OH_IPCSkeleton_SetCallingIdentity (const char *identity) Sets the caller credential information to the IPC context.
int OH_IPCSkeleton_IsHandlingTransaction (void) Checks whether an IPC request is being handled.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙IPC Kit

harmony 鸿蒙IPC Kit

harmony 鸿蒙OH_IPC_MessageOption

harmony 鸿蒙OH_IPC_ErrorCode

harmony 鸿蒙OHIPCParcel

harmony 鸿蒙OHIPCRemoteObject

harmony 鸿蒙OHIPCSkeleton

harmony 鸿蒙RPC Error Codes

harmony 鸿蒙ipc_cparcel.h

harmony 鸿蒙ipc_cremote_object.h

0  赞