Mike McCormack | fc93261 | 2002-03-12 19:24:04 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2002 Mike McCormack |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 2.1 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with this library; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | */ |
| 18 | |
| 19 | #ifndef __INC_SMB__ |
| 20 | #define __INC_SMB__ |
| 21 | |
Alexandre Julliard | d9780a8 | 2003-07-03 18:12:38 +0000 | [diff] [blame] | 22 | static inline int SMB_isSepW (WCHAR c) {return (c == '\\' || c == '/');} |
| 23 | static inline int SMB_isUNCW (LPCWSTR filename) {return (filename && SMB_isSepW (filename[0]) && SMB_isSepW (filename[1]));} |
Mike McCormack | 963985b | 2002-07-19 03:17:19 +0000 | [diff] [blame] | 24 | |
Alexandre Julliard | f3f435f | 2003-12-01 23:01:12 +0000 | [diff] [blame] | 25 | NTSTATUS WINAPI SMB_ReadFile(HANDLE hFile, int fd, LPVOID buffer, DWORD bytesToRead, |
Eric Pouech | 9bd4f6b | 2003-06-26 02:08:17 +0000 | [diff] [blame] | 26 | PIO_STATUS_BLOCK io_status); |
Dmitry Timoshkov | d75aed2 | 2002-08-27 01:13:58 +0000 | [diff] [blame] | 27 | extern HANDLE WINAPI SMB_CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing, |
Mike McCormack | fc93261 | 2002-03-12 19:24:04 +0000 | [diff] [blame] | 28 | LPSECURITY_ATTRIBUTES sa, DWORD creation, |
| 29 | DWORD attributes, HANDLE template ); |
| 30 | |
Mike McCormack | 963985b | 2002-07-19 03:17:19 +0000 | [diff] [blame] | 31 | typedef struct tagSMB_DIR |
| 32 | { |
| 33 | int current; |
| 34 | int num_entries; |
| 35 | unsigned char **entries; |
| 36 | unsigned char *buffer; |
| 37 | } SMB_DIR; |
Mike McCormack | fc93261 | 2002-03-12 19:24:04 +0000 | [diff] [blame] | 38 | |
Dmitry Timoshkov | d75aed2 | 2002-08-27 01:13:58 +0000 | [diff] [blame] | 39 | extern SMB_DIR* WINAPI SMB_FindFirst(LPCWSTR filename); |
| 40 | extern BOOL WINAPI SMB_FindNext(SMB_DIR *dir, WIN32_FIND_DATAW *data ); |
Mike McCormack | 963985b | 2002-07-19 03:17:19 +0000 | [diff] [blame] | 41 | extern BOOL WINAPI SMB_CloseDir(SMB_DIR *dir); |
| 42 | |
| 43 | #endif /* __INC_SMB__ */ |