diff --git a/meshcore/MacOS/mac_logging_utils.c b/meshcore/MacOS/mac_logging_utils.c index 02c3bc1d..63884d99 100644 --- a/meshcore/MacOS/mac_logging_utils.c +++ b/meshcore/MacOS/mac_logging_utils.c @@ -16,7 +16,7 @@ installation, upgrade, and TCC permission issues. * 1. Real-time visibility in console/terminal (stderr) * 2. Persistent record for post-mortem debugging (log file) */ -void mesh_log_message(const char* format, ...) { +void MeshAgent_LogMessage(const char* format, ...) { va_list args1, args2; va_start(args1, format); va_copy(args2, args1); diff --git a/meshcore/MacOS/mac_plist_utils.c b/meshcore/MacOS/mac_plist_utils.c index 091f65ae..a17e755d 100644 --- a/meshcore/MacOS/mac_plist_utils.c +++ b/meshcore/MacOS/mac_plist_utils.c @@ -90,7 +90,7 @@ static char* cfstring_to_cstring(CFStringRef cfString) { /** * Extract the Label value from a plist file */ -char* mesh_plist_get_label(const char* plistPath) { +char* MeshAgent_plist_get_label(const char* plistPath) { CFDictionaryRef dict = load_plist_from_file(plistPath); if (!dict) { return NULL; @@ -106,7 +106,7 @@ char* mesh_plist_get_label(const char* plistPath) { /** * Extract the first ProgramArguments path from a plist file */ -char* mesh_plist_get_program_path(const char* plistPath) { +char* MeshAgent_plist_get_program_path(const char* plistPath) { CFDictionaryRef dict = load_plist_from_file(plistPath); if (!dict) { return NULL; @@ -130,7 +130,7 @@ char* mesh_plist_get_program_path(const char* plistPath) { /** * Check if ProgramArguments contains a specific argument */ -int mesh_plist_has_argument(const char* plistPath, const char* argument) { +int MeshAgent_plist_has_argument(const char* plistPath, const char* argument) { CFDictionaryRef dict = load_plist_from_file(plistPath); if (!dict) { return 0; @@ -164,7 +164,7 @@ int mesh_plist_has_argument(const char* plistPath, const char* argument) { /** * Parse a LaunchDaemon plist file and extract meshagent information */ -int mesh_parse_launchdaemon_plist(const char* plistPath, MeshPlistInfo* info) { +int MeshAgent_parse_launchdaemon_plist(const char* plistPath, MeshPlistInfo* info) { if (!plistPath || !info) { return 0; } diff --git a/meshcore/MacOS/mac_tcc_detection.h b/meshcore/MacOS/mac_tcc_detection.h index 05b5589e..6d463fc4 100644 --- a/meshcore/MacOS/mac_tcc_detection.h +++ b/meshcore/MacOS/mac_tcc_detection.h @@ -11,12 +11,12 @@ extern "C" { * Represents the current status of a TCC permission for the application. */ typedef enum { - TCC_PERMISSION_DENIED = 0, // Permission explicitly denied - TCC_PERMISSION_GRANTED_USER = 1, // Permission granted by user via System Settings - TCC_PERMISSION_GRANTED_MDM = 2, // Permission granted by MDM via MDMOverrides.plist - TCC_PERMISSION_NOT_DETERMINED = 3, // Permission not yet requested or determined - TCC_PERMISSION_ERROR = -1 // Error checking permission status -} TCC_PermissionStatus; + MeshAgent_TCC_PERMISSION_DENIED = 0, // Permission explicitly denied + MeshAgent_TCC_PERMISSION_GRANTED_USER = 1, // Permission granted by user via System Settings + MeshAgent_TCC_PERMISSION_GRANTED_MDM = 2, // Permission granted by MDM via MDMOverrides.plist + MeshAgent_TCC_PERMISSION_NOT_DETERMINED = 3, // Permission not yet requested or determined + MeshAgent_TCC_PERMISSION_ERROR = -1 // Error checking permission status +} MeshAgent_TCC_PermissionStatus; /** * All TCC Permissions Status @@ -24,10 +24,10 @@ typedef enum { * Contains the status of all three required TCC permissions. */ typedef struct { - TCC_PermissionStatus fda; // Full Disk Access - TCC_PermissionStatus accessibility; // Accessibility - TCC_PermissionStatus screen_recording; // Screen & System Audio Recording -} TCC_AllPermissions; + MeshAgent_TCC_PermissionStatus fda; // Full Disk Access + MeshAgent_TCC_PermissionStatus accessibility; // Accessibility + MeshAgent_TCC_PermissionStatus screen_recording; // Screen & System Audio Recording +} MeshAgent_TCC_AllPermissions; /** * Check Full Disk Access permission @@ -35,36 +35,36 @@ typedef struct { * Attempts to open TCC.db to verify Full Disk Access for the calling process. * If TCC.db can be opened, the calling process has FDA. * - * @return TCC_PERMISSION_GRANTED_USER if FDA is granted, TCC_PERMISSION_DENIED otherwise + * @return MeshAgent_TCC_PERMISSION_GRANTED_USER if FDA is granted, MeshAgent_TCC_PERMISSION_DENIED otherwise */ -TCC_PermissionStatus check_fda_permission(void); +MeshAgent_TCC_PermissionStatus MeshAgent_check_fda_permission(void); /** * Check Accessibility permission * * Uses AXIsProcessTrusted() to check if the calling process has Accessibility permission. * - * @return TCC_PERMISSION_GRANTED_USER if granted, TCC_PERMISSION_DENIED otherwise + * @return MeshAgent_TCC_PERMISSION_GRANTED_USER if granted, MeshAgent_TCC_PERMISSION_DENIED otherwise */ -TCC_PermissionStatus check_accessibility_permission(void); +MeshAgent_TCC_PermissionStatus MeshAgent_check_accessibility_permission(void); /** * Check Screen Recording permission * * Uses CGPreflightScreenCaptureAccess() to check if the calling process has Screen Recording permission. * - * @return TCC_PERMISSION_GRANTED_USER if granted, TCC_PERMISSION_DENIED otherwise + * @return MeshAgent_TCC_PERMISSION_GRANTED_USER if granted, MeshAgent_TCC_PERMISSION_DENIED otherwise */ -TCC_PermissionStatus check_screen_recording_permission(void); +MeshAgent_TCC_PermissionStatus MeshAgent_check_screen_recording_permission(void); /** * Check all TCC permissions * * Convenience function to check all three required TCC permissions at once for the calling process. * - * @return TCC_AllPermissions struct containing status of all permissions + * @return MeshAgent_TCC_AllPermissions struct containing status of all permissions */ -TCC_AllPermissions check_all_permissions(void); +MeshAgent_TCC_AllPermissions MeshAgent_check_all_permissions(void); #ifdef __cplusplus } diff --git a/modules/default_route.js b/modules/default_route.js index 1ef96771..4041889e 100644 --- a/modules/default_route.js +++ b/modules/default_route.js @@ -18,7 +18,7 @@ function windows_defaultRoute() { var ret = null; var GM = require('_GenericMarshal'); - IP = GM.CreateNativeProxy('Iphlpapi.dll'); + var IP = GM.CreateNativeProxy('Iphlpapi.dll'); IP.CreateMethod('GetIpForwardTable'); var size = GM.CreateVariable(4);