1// StatCacheServer.h 2 3#ifndef STAT_CACHE_SERVER_H 4#define STAT_CACHE_SERVER_H 5 6#include <StorageDefs.h> 7 8// common definitions used by server and client 9 10#define STAT_CACHE_SERVER_PORT_NAME "stat_cache_server_port" 11 12enum { 13 STAT_CACHE_COMMAND_STAT = 0, 14 STAT_CACHE_COMMAND_READDIR = 1, 15}; 16 17typedef struct stat_cache_request { 18 port_id replyPort; 19 int32 command; 20 char path[B_PATH_NAME_LENGTH]; 21} stat_cache_request; 22 23typedef struct stat_cache_stat_reply { 24 status_t error; 25 struct stat st; 26} stat_cache_stat_reply; 27 28typedef struct stat_cache_readdir_reply { 29 status_t error; 30 int32 entryCount; 31 void *clientData; // used by the client only 32 uint8 buffer[1]; 33} stat_cache_readdir_reply; 34 35#endif // STAT_CACHE_SERVER_H 36