blob: 03e87def20983820ac6da2d81281c432ded169e9 [file] [log] [blame]
Mike McCormackfc932612002-03-12 19:24:04 +00001/*
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 Julliardd9780a82003-07-03 18:12:38 +000022static inline int SMB_isSepW (WCHAR c) {return (c == '\\' || c == '/');}
23static inline int SMB_isUNCW (LPCWSTR filename) {return (filename && SMB_isSepW (filename[0]) && SMB_isSepW (filename[1]));}
Mike McCormack963985b2002-07-19 03:17:19 +000024
Alexandre Julliardf3f435f2003-12-01 23:01:12 +000025NTSTATUS WINAPI SMB_ReadFile(HANDLE hFile, int fd, LPVOID buffer, DWORD bytesToRead,
Eric Pouech9bd4f6b2003-06-26 02:08:17 +000026 PIO_STATUS_BLOCK io_status);
Dmitry Timoshkovd75aed22002-08-27 01:13:58 +000027extern HANDLE WINAPI SMB_CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing,
Mike McCormackfc932612002-03-12 19:24:04 +000028 LPSECURITY_ATTRIBUTES sa, DWORD creation,
29 DWORD attributes, HANDLE template );
30
Mike McCormack963985b2002-07-19 03:17:19 +000031typedef struct tagSMB_DIR
32{
33 int current;
34 int num_entries;
35 unsigned char **entries;
36 unsigned char *buffer;
37} SMB_DIR;
Mike McCormackfc932612002-03-12 19:24:04 +000038
Dmitry Timoshkovd75aed22002-08-27 01:13:58 +000039extern SMB_DIR* WINAPI SMB_FindFirst(LPCWSTR filename);
40extern BOOL WINAPI SMB_FindNext(SMB_DIR *dir, WIN32_FIND_DATAW *data );
Mike McCormack963985b2002-07-19 03:17:19 +000041extern BOOL WINAPI SMB_CloseDir(SMB_DIR *dir);
42
43#endif /* __INC_SMB__ */