00001 /********************************************************************************************************* 00002 * Copyright (c) 1999-2008 ACCESS CO., LTD. All rights reserved. 00003 *Copyright © 2006-2007, ACCESS Systems Americas, Inc. a member of the ACCESS Co., Ltd group of companies. 00004 *ACCESS, ACCESS Linux Platform, ACCESS Powered, ACCESS Desktop, Palm Desktop, Palm OS, Garnet, Graffiti, 00005 *Hiker, HotSync, iMessenger, HandMail, MultiMail Deluxe, Netfront and certain other trade names, trademarks 00006 *and logos are trademarks which may be registered in the United States, France, Germany, Japan, the 00007 *United Kingdom, and other countries and are either owned by ACCESS Systems Americas, Inc. or its affiliates, 00008 *or are licensed on an exclusive basis by ACCESS Systems Americas, Inc. (“ACCESS”) from Palm Trademark Holding 00009 *Company, LLC. These marks may not be used in connection with any product or service that does not belong 00010 *to ACCESS (except as expressly permitted by a license with ACCESS), in any manner that is likely to cause 00011 *confusion among customers, or in any manner that disparages or discredits ACCESS or its affiliates or licensor. 00012 ********************************************************************************************************/ 00013 00014 // Conflict Manager client declarations 00015 00016 #ifndef CONFLICT_MGR_H 00017 #define CONFLICT_MGR_H 00018 00019 #include <alp/types.h> 00020 #include <alp/sysclass.h> 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif 00025 00032 #define SUPPORT_TRY_ACTIVATE 0 // alp_conflict_token_try_activate is no longer supported 00033 00034 // 00035 // ALP_STATUS constants 00036 // 00037 00038 // Errors 00039 00040 #define ALP_CLASS_CONFLICT_ERROR_STATUS (ALP_CLASS_CONFLICT_MANAGER|0x00000000) 00041 00042 enum 00043 { 00044 ALP_STATUS_CONFLICT_TOKEN_UNKNOWN = 00045 ALP_CLASS_CONFLICT_ERROR_STATUS, 00046 ALP_STATUS_CONFLICT_TOKEN_UNAVAILABLE, 00047 ALP_STATUS_CONFLICT_TOKEN_BLOCKED, 00048 ALP_STATUS_CONFLICT_IPC_ERROR, 00049 ALP_STATUS_CONFLICT_TOKEN_INVALID, 00050 ALP_STATUS_CONFLICT_UNREADABLE_RULES_FILE, 00051 ALP_STATUS_CONFLICT_INVALID_RULES_FILE, 00052 ALP_STATUS_CONFLICT_INVALID_PARAMETER, 00053 }; 00054 00055 // Callback status returns 00056 00057 #define ALP_CLASS_CONFLICT_CALLBACK_STATUS (ALP_CLASS_CONFLICT_MANAGER|0x00010000) 00058 00059 enum 00060 { 00061 ALP_STATUS_CONFLICT_CALLBACK_CHANGE_PENDING = 00062 ALP_CLASS_CONFLICT_CALLBACK_STATUS, 00063 ALP_STATUS_CONFLICT_CALLBACK_ERROR, 00064 }; 00065 00066 // 00067 // Types and constants 00068 // 00069 00070 #define ALP_CLASS_CONFLICT_STATES (ALP_CLASS_CONFLICT_MANAGER|0x00020000) 00071 00073 typedef enum 00074 { 00076 ALP_CONFLICT_INACTIVE = 00077 ALP_CLASS_CONFLICT_STATES, 00078 00080 ALP_CONFLICT_CANCEL, 00081 00083 ALP_CONFLICT_SUSPEND, 00084 00089 ALP_CONFLICT_PENDING, 00090 00092 ALP_CONFLICT_ALLOW, 00093 } AlpConflictState; 00094 00096 typedef void* AlpConflictToken; 00097 00120 typedef alp_status_t (*AlpConflictCallback) 00121 (AlpConflictToken token, AlpConflictState newState, const char* otherTokenName, void* cbData); 00122 00123 // 00124 // Functions 00125 // 00126 00143 alp_status_t alp_conflict_token_activate( 00144 const char* tokenName, 00145 AlpConflictCallback stateChangeCB, void* cbData, 00146 AlpConflictToken* outToken); 00147 00148 #if SUPPORT_TRY_ACTIVATE 00149 00178 alp_status_t alp_conflict_token_try_activate( 00179 const char* tokenNames[], 00180 AlpConflictCallback stateChangeCB, void* cbData, 00181 int* outActivatedToken, 00182 AlpConflictToken* outToken); 00183 #endif 00184 00193 alp_status_t alp_conflict_token_release(AlpConflictToken token); 00194 00204 alp_status_t alp_conflict_configure(const char* configFilename); 00205 00206 #ifdef __cplusplus 00207 } // extern "C" 00208 #endif 00209 00210 #endif
Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.