2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
15 #endif /* __cplusplus */
19 * DEFINITIONS ________________________________________________________________
32 #define MAX_CSDB_PATH 2048
36 #define cchCELLDBLINE 512
38 typedef struct CELLDBLINE CELLDBLINE, *PCELLDBLINE;
41 char szLine[ cchCELLDBLINE ];
48 char szFilename[ MAX_CSDB_PATH ];
52 } CELLSERVDB, *PCELLSERVDB;
56 char szCell[ cchCELLDBLINE ];
57 char szLinkedCell[ cchCELLDBLINE ];
59 char szComment[ cchCELLDBLINE ];
60 } CELLDBLINEINFO, *PCELLDBLINEINFO;
64 * PROTOTYPES _________________________________________________________________
68 void CSDB_GetFileName (char *pszFilename);
70 BOOL CSDB_ReadFile (PCELLSERVDB pCellServDB, const char *pszFilename);
71 BOOL CSDB_WriteFile (PCELLSERVDB pCellServDB);
72 void CSDB_FreeFile (PCELLSERVDB pCellServDB);
74 BOOL CSDB_CrackLine (PCELLDBLINEINFO pInfo, const char *pszLine);
75 BOOL CSDB_FormatLine (char *pszLine, const char *pszCell, const char *pszLinkedCell, const char *pszComment, BOOL fIsCell);
77 PCELLDBLINE CSDB_FindCell (PCELLSERVDB pCellServDB, const char *pszCell);
79 BOOL CSDB_RemoveCell (PCELLSERVDB pCellServDB, PCELLDBLINE pCellLine);
80 BOOL CSDB_RemoveCellServers (PCELLSERVDB pCellServDB, PCELLDBLINE pCellLine);
82 PCELLDBLINE CSDB_AddCell (PCELLSERVDB pCellServDB, const char *pszCell, const char *pszLinkedCell, const char *pszComment);
83 PCELLDBLINE CSDB_AddCellServer (PCELLSERVDB pCellServDB, PCELLDBLINE pAddAfter, const char *pszAddress, const char *pszComment);
85 PCELLDBLINE CSDB_AddLine (PCELLSERVDB pCellServDB, PCELLDBLINE pAddAfter, const char *pszLine);
86 PCELLDBLINE CSDB_RemoveLine (PCELLSERVDB pCellServDB, PCELLDBLINE pRemove);
91 #endif /* __cplusplus */