00001 /******************************************************************** 00002 00003 Copyright 2006, ACCESS Systems Americas, Inc. All rights reserved. 00004 00005 The contents of this file are subject to the Mozilla Public License Version 00006 1.1 (the "License"); you may not use this file except in compliance with 00007 the License. You may obtain a copy of the License at 00008 http://www.mozilla.org/MPL/ 00009 00010 Software distributed under the License is distributed on an "AS IS" basis, 00011 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 00012 for the specific language governing rights and limitations under the 00013 License. 00014 00015 The Original Code is the entire contents of this file. 00016 00017 The Initial Developer of the Original Code is ACCESS Systems Americas, Inc. 00018 00019 Portions created by ACCESS Systems Americas, Inc. are Copyright © 2006. All 00020 Rights Reserved. 00021 00022 Contributor(s): none. 00023 00024 ********************************************************************/ 00032 #ifndef _H_ALP_APAS 00033 #define _H_ALP_APAS 00034 00035 #include <hiker/types.h> 00036 #include <sys/types.h> 00037 #include <hiker/sysclass.h> 00038 00039 #ifdef __cplusplus 00040 extern "C" { 00041 #endif 00042 00043 /* Macro Definitions */ 00044 00048 #define ALP_STATUS_SPF_APAS_E_NOERR ( ALP_CLASS_SPF | 0x00 ) 00049 00051 #define ALP_STATUS_SPF_APAS_E_NULL_PARAM ( ALP_CLASS_SPF | 0x01 ) 00052 00054 #define ALP_STATUS_SPF_APAS_E_FILE ( ALP_CLASS_SPF | 0x02 ) 00055 00057 #define ALP_STATUS_SPF_APAS_E_MALLOC ( ALP_CLASS_SPF | 0x03 ) 00058 00060 #define ALP_STATUS_SPF_APAS_E_GID_IN_USE ( ALP_CLASS_SPF | 0x04 ) 00061 00063 #define ALP_STATUS_SPF_APAS_E_ID_IN_USE ( ALP_CLASS_SPF | 0x05 ) 00064 00066 #define ALP_STATUS_SPF_APAS_E_UID_IN_USE ( ALP_CLASS_SPF | 0x06 ) 00067 00069 #define ALP_STATUS_SPF_APAS_E_UNIMPLEMENTED ( ALP_CLASS_SPF | 0x07 ) 00070 00072 #define ALP_STATUS_SPF_APAS_E_UNKNOWN_ASSERTION ( ALP_CLASS_SPF | 0x08 ) 00073 00075 #define ALP_STATUS_SPF_APAS_E_UNKNOWN_POLICY ( ALP_CLASS_SPF | 0x09 ) 00076 00078 #define ALP_STATUS_SPF_APAS_E_UNKNOWN_PACKAGE ( ALP_CLASS_SPF | 0x0A ) 00079 00081 #define ALP_STATUS_SPF_APAS_E_UNKNOWN_GID ( ALP_CLASS_SPF | 0x0B ) 00082 00084 #define ALP_STATUS_SPF_APAS_E_UNKNOWN_FULL_QUEUE ( ALP_CLASS_SPF | 0x0C ) 00085 00087 #define ALP_STATUS_SPF_APAS_E_NOT_FOUND ( ALP_CLASS_SPF | 0x0D ) 00088 00090 #define ALP_STATUS_SPF_APAS_E_UNSPECIFIED ( ALP_CLASS_SPF | 0x0E ) 00091 00187 alp_status_t alp_spf_apas_enroll( char *path, unsigned int *out_packageid ); 00188 00279 alp_status_t alp_spf_apas_path_get_packageid( char *path, unsigned int *out_packageid ); 00280 00391 alp_status_t alp_spf_apas_packageid_remove( unsigned int packageid, unsigned int *out_refcount ); 00392 00495 alp_status_t alp_spf_apas_packageid_uid_get( unsigned int packageid, uid_t *out_uid); 00496 00516 alp_status_t alp_spf_apas_packageid_gid_get( unsigned int packageid, gid_t *out_gid ); 00517 00538 alp_status_t alp_spf_apas_packageid_sgids_get( unsigned int packageid, gid_t *out_sgids[], unsigned int *out_sgids_length ); 00539 00540 00559 alp_status_t alp_spf_apas_packageid_refcount_get( unsigned int packageid, unsigned int *out_refcount ); 00560 00577 alp_status_t alp_spf_apas_packageid_refcount_set( unsigned int packageid, unsigned int refcount ); 00578 00593 alp_status_t alp_spf_apas_packageid_refcount_increment( unsigned int packageid ); 00594 00609 alp_status_t alp_spf_apas_packageid_refcount_decrement( unsigned int packageid ); 00610 00623 alp_status_t alp_spf_apas_packageid_default( unsigned int *out_packageid ); 00624 00625 #ifdef __cplusplus 00626 } 00627 #endif 00628 00629 #endif