1 /*---------------------------------------------------------------------------- 2 -- 3 -- Module: xtmAccessBase 4 -- 5 -- Project: XDiary 6 -- System: xtm - X Desktop Calendar 7 -- Subsystem: <> 8 -- Function block: <> 9 -- 10 -- Description: 11 -- Interface file for module xtmAccessBase. 12 -- 13 -- Filename: xtmAccBase.h 14 -- 15 -- Authors: Roger Larsson, Ulrika Bornetun 16 -- Creation date: 1991-10-15 17 -- 18 -- 19 -- (C) Copyright Ulrika Bornetun, Roger Larsson (1995) 20 -- All rights reserved 21 -- 22 -- Permission to use, copy, modify, and distribute this software and its 23 -- documentation for any purpose and without fee is hereby granted, 24 -- provided that the above copyright notice appear in all copies. Ulrika 25 -- Bornetun and Roger Larsson make no representations about the usability 26 -- of this software for any purpose. It is provided "as is" without express 27 -- or implied warranty. 28 ----------------------------------------------------------------------------*/ 29 30 /* SCCS module identifier. */ 31 /* SCCSID = @(#) Module: xtmAccBase.h, Version: 1.1, Date: 95/02/18 15:51:49 */ 32 33 34 /* Include this file only once. */ 35 #ifndef define_xtmAccessBase_h 36 # define define_xtmAccessBase_h 37 38 39 /*---------------------------------------------------------------------------- 40 -- Include files 41 ----------------------------------------------------------------------------*/ 42 43 #include "Standard.h" 44 #include "LstLinked.h" 45 46 47 /*---------------------------------------------------------------------------- 48 -- Macro definitions 49 ----------------------------------------------------------------------------*/ 50 51 /* Access flags. */ 52 #define XTM_AB_FLAG_READ (1<<0) 53 #define XTM_AB_FLAG_WRITE (1<<1) 54 #define XTM_AB_FLAG_PRIV (1<<2) 55 #define XTM_AB_FLAG_MSG (1<<3) 56 57 /* AFS id's can be up to this length. */ 58 #define XTM_AB_MAX_AFS_ID_LENGTH 500 59 60 61 /*---------------------------------------------------------------------------- 62 -- Type declarations 63 ----------------------------------------------------------------------------*/ 64 65 /* Status variable. */ 66 typedef enum { 67 XTM_AB_OK, XTM_AB_ERROR 68 } XTM_AB_STATUS; 69 70 /* Access information. */ 71 typedef struct { 72 int uid; 73 int gid; 74 UINT32 flags; 75 } XTM_AB_ACCESS_INFO; 76 77 78 /* Afs acl information. */ 79 typedef struct { 80 char id[ XTM_AB_MAX_AFS_ID_LENGTH + 1 ]; 81 UINT32 flags; 82 } XTM_AB_AFS_ACL_INFO; 83 84 85 /*---------------------------------------------------------------------------- 86 -- Global definitions 87 ----------------------------------------------------------------------------*/ 88 89 90 /*---------------------------------------------------------------------------- 91 -- Function prototypes 92 ----------------------------------------------------------------------------*/ 93 94 95 96 /*---------------------------------------------------------------------------- 97 -- Functions 98 ----------------------------------------------------------------------------*/ 99 100 XTM_AB_STATUS 101 xtmAbGetAccessInfo( char *directory, 102 LST_DESC_TYPE *access_info ); 103 104 XTM_AB_STATUS 105 xtmAbGetAfsAccessInfo( char *directory, 106 LST_DESC_TYPE *access_info ); 107 108 XTM_AB_STATUS 109 xtmAbGetUserOperations( char *directory, 110 int user_id, 111 int group_id, 112 UINT32 *operations ); 113 114 XTM_AB_STATUS 115 xtmAbSaveAccessInfo( char *directory, 116 LST_DESC_TYPE access_info ); 117 118 XTM_AB_STATUS 119 xtmAbSaveAfsAccessInfo( char *directory, 120 LST_DESC_TYPE access_info ); 121 122 #endif 123