@@ -78,7 +78,7 @@ typedef struct {
7878 *
7979 * @return Handle to the SDK state (never NULL after first call)
8080 */
81- rac_sdk_state_handle_t rac_state_get_instance (void );
81+ RAC_API rac_sdk_state_handle_t rac_state_get_instance (void );
8282
8383// =============================================================================
8484// Initialization & Lifecycle
@@ -95,29 +95,29 @@ rac_sdk_state_handle_t rac_state_get_instance(void);
9595 * @param device_id The persistent device ID (copied internally)
9696 * @return RAC_SUCCESS on success
9797 */
98- rac_result_t rac_state_initialize (rac_environment_t env , const char * api_key , const char * base_url ,
99- const char * device_id );
98+ RAC_API rac_result_t rac_state_initialize (rac_environment_t env , const char * api_key ,
99+ const char * base_url , const char * device_id );
100100
101101/**
102102 * @brief Check if SDK state is initialized
103103 * @return true if initialized
104104 */
105- bool rac_state_is_initialized (void );
105+ RAC_API bool rac_state_is_initialized (void );
106106
107107/**
108108 * @brief Reset all state (for testing or re-initialization)
109109 *
110110 * Clears all state including auth tokens, handles, etc.
111111 * Does NOT free the singleton - just resets to initial state.
112112 */
113- void rac_state_reset (void );
113+ RAC_API void rac_state_reset (void );
114114
115115/**
116116 * @brief Shutdown and free all resources
117117 *
118118 * Called during SDK shutdown. Frees all memory and destroys handles.
119119 */
120- void rac_state_shutdown (void );
120+ RAC_API void rac_state_shutdown (void );
121121
122122// =============================================================================
123123// Environment Queries
@@ -127,25 +127,25 @@ void rac_state_shutdown(void);
127127 * @brief Get current environment
128128 * @return The SDK environment
129129 */
130- rac_environment_t rac_state_get_environment (void );
130+ RAC_API rac_environment_t rac_state_get_environment (void );
131131
132132/**
133133 * @brief Get base URL
134134 * @return The base URL string (do not free)
135135 */
136- const char * rac_state_get_base_url (void );
136+ RAC_API const char * rac_state_get_base_url (void );
137137
138138/**
139139 * @brief Get API key
140140 * @return The API key string (do not free)
141141 */
142- const char * rac_state_get_api_key (void );
142+ RAC_API const char * rac_state_get_api_key (void );
143143
144144/**
145145 * @brief Get device ID
146146 * @return The device ID string (do not free)
147147 */
148- const char * rac_state_get_device_id (void );
148+ RAC_API const char * rac_state_get_device_id (void );
149149
150150// =============================================================================
151151// Auth State Management
@@ -160,25 +160,25 @@ const char* rac_state_get_device_id(void);
160160 * @param auth The auth data to set
161161 * @return RAC_SUCCESS on success
162162 */
163- rac_result_t rac_state_set_auth (const rac_auth_data_t * auth );
163+ RAC_API rac_result_t rac_state_set_auth (const rac_auth_data_t * auth );
164164
165165/**
166166 * @brief Get current access token
167167 * @return Access token string or NULL if not authenticated (do not free)
168168 */
169- const char * rac_state_get_access_token (void );
169+ RAC_API const char * rac_state_get_access_token (void );
170170
171171/**
172172 * @brief Get current refresh token
173173 * @return Refresh token string or NULL (do not free)
174174 */
175- const char * rac_state_get_refresh_token (void );
175+ RAC_API const char * rac_state_get_refresh_token (void );
176176
177177/**
178178 * @brief Check if currently authenticated
179179 * @return true if authenticated with valid (non-expired) token
180180 */
181- bool rac_state_is_authenticated (void );
181+ RAC_API bool rac_state_is_authenticated (void );
182182
183183/**
184184 * @brief Check if token needs refresh
@@ -187,32 +187,32 @@ bool rac_state_is_authenticated(void);
187187 *
188188 * @return true if refresh is needed
189189 */
190- bool rac_state_token_needs_refresh (void );
190+ RAC_API bool rac_state_token_needs_refresh (void );
191191
192192/**
193193 * @brief Get token expiry timestamp
194194 * @return Unix timestamp (seconds) when token expires, or 0 if not set
195195 */
196- int64_t rac_state_get_token_expires_at (void );
196+ RAC_API int64_t rac_state_get_token_expires_at (void );
197197
198198/**
199199 * @brief Get user ID
200200 * @return User ID string or NULL (do not free)
201201 */
202- const char * rac_state_get_user_id (void );
202+ RAC_API const char * rac_state_get_user_id (void );
203203
204204/**
205205 * @brief Get organization ID
206206 * @return Organization ID string or NULL (do not free)
207207 */
208- const char * rac_state_get_organization_id (void );
208+ RAC_API const char * rac_state_get_organization_id (void );
209209
210210/**
211211 * @brief Clear authentication state
212212 *
213213 * Called on logout or auth failure. Clears tokens but not device/env config.
214214 */
215- void rac_state_clear_auth (void );
215+ RAC_API void rac_state_clear_auth (void );
216216
217217// =============================================================================
218218// Device State Management
@@ -222,13 +222,13 @@ void rac_state_clear_auth(void);
222222 * @brief Set device registration status
223223 * @param registered Whether device is registered with backend
224224 */
225- void rac_state_set_device_registered (bool registered );
225+ RAC_API void rac_state_set_device_registered (bool registered );
226226
227227/**
228228 * @brief Check if device is registered
229229 * @return true if device has been registered
230230 */
231- bool rac_state_is_device_registered (void );
231+ RAC_API bool rac_state_is_device_registered (void );
232232
233233// =============================================================================
234234// State Change Callbacks (for platform observers)
@@ -249,7 +249,7 @@ typedef void (*rac_auth_changed_callback_t)(bool is_authenticated, void* user_da
249249 * @param callback The callback function (NULL to unregister)
250250 * @param user_data Context passed to callback
251251 */
252- void rac_state_on_auth_changed (rac_auth_changed_callback_t callback , void * user_data );
252+ RAC_API void rac_state_on_auth_changed (rac_auth_changed_callback_t callback , void * user_data );
253253
254254// =============================================================================
255255// Persistence Bridge (Platform implements secure storage)
@@ -282,8 +282,8 @@ typedef const char* (*rac_load_callback_t)(const char* key, void* user_data);
282282 * @param load Callback to load a value
283283 * @param user_data Context passed to callbacks
284284 */
285- void rac_state_set_persistence_callbacks (rac_persist_callback_t persist , rac_load_callback_t load ,
286- void * user_data );
285+ RAC_API void rac_state_set_persistence_callbacks (rac_persist_callback_t persist ,
286+ rac_load_callback_t load , void * user_data );
287287
288288#ifdef __cplusplus
289289}
0 commit comments