StorageDefs.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 /
00003 /   File:       StorageDefs.h
00004 /
00005 /   Description:    Storage Kit miscellany.
00006 /
00007 /   Copyright 1993-98, Be Incorporated, All Rights Reserved.
00008 /
00009 *******************************************************************************/
00010 
00011 #ifndef _STORAGE_DEFS_H
00012 #define _STORAGE_DEFS_H
00013 
00014 #ifndef _BE_BUILD_H
00015 #include <BeBuild.h>
00016 #endif
00017 #include <fcntl.h>
00018 #include <sys/param.h>
00019 #include <limits.h>
00020 
00021 /*----LIMITS--------------------------------*/
00022 #define B_FILE_NAME_LENGTH      NAME_MAX
00023 #define B_PATH_NAME_LENGTH      MAXPATHLEN
00024 #define B_ATTR_NAME_LENGTH      (B_FILE_NAME_LENGTH-1)
00025 #define B_MIME_TYPE_LENGTH      (B_ATTR_NAME_LENGTH - 15)
00026 #define B_MAX_SYMLINKS          SYMLINK_MAX
00027 
00028 
00029 /*----FILE OPEN MODES--------------------------------*/
00030 
00031 #define B_READ_ONLY     O_RDONLY  /* read only */
00032 #define B_WRITE_ONLY    O_WRONLY /* write only */
00033 #define B_READ_WRITE    O_RDWR   /* read and write */
00034 
00035 #define B_FAIL_IF_EXISTS    O_EXCL      /* exclusive create */
00036 #define B_CREATE_FILE       O_CREAT     /* create the file */
00037 #define B_ERASE_FILE        O_TRUNC     /* erase the file's data */
00038 #define B_OPEN_AT_END       O_APPEND    /* point to the end of the data */
00039 
00040 
00041 /*----NODE FLAVORS--------------------------------*/
00042 
00043 enum node_flavor {
00044   B_FILE_NODE=0x01,
00045   B_SYMLINK_NODE=0x02,
00046   B_DIRECTORY_NODE=0x04,
00047   B_ANY_NODE= 0x07
00048 };
00049 
00050 
00051 #endif

Copyright 2005 by yellowTAB GmbH, Be Inc., Palm Source Inc. and their respective legal successors
All rights reserved.