Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / native_client / src / trusted / service_runtime / sys_filename.h
1 /*
2  * Copyright (c) 2013 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 #ifndef NATIVE_CLIENT_SERVICE_RUNTIME_NACL_SYS_FILENAME_H_
8 #define NATIVE_CLIENT_SERVICE_RUNTIME_NACL_SYS_FILENAME_H_ 1
9
10 #include "native_client/src/include/nacl_base.h"
11 #include "native_client/src/include/portability.h"
12 #include "native_client/src/trusted/service_runtime/include/sys/stat.h"
13
14 EXTERN_C_BEGIN
15
16 struct NaClApp;
17 struct NaClAppThread;
18
19 int32_t NaClSysOpen(struct NaClAppThread  *natp,
20                     uint32_t              pathname,
21                     int                   flags,
22                     int                   mode);
23
24 int32_t NaClSysStat(struct NaClAppThread *natp,
25                     uint32_t             path,
26                     uint32_t             nasp);
27
28 int32_t NaClSysMkdir(struct NaClAppThread *natp,
29                      uint32_t             path,
30                      int                  mode);
31
32 int32_t NaClSysRmdir(struct NaClAppThread *natp,
33                      uint32_t             path);
34
35 int32_t NaClSysChdir(struct NaClAppThread *natp,
36                      uint32_t             path);
37
38 int32_t NaClSysGetcwd(struct NaClAppThread *natp,
39                       uint32_t             buffer,
40                       int                  len);
41
42 int32_t NaClSysUnlink(struct NaClAppThread *natp,
43                       uint32_t             path);
44
45 int32_t NaClSysTruncate(struct NaClAppThread *natp,
46                         uint32_t             path,
47                         uint32_t             length_addr);
48
49 int32_t NaClSysLstat(struct NaClAppThread *natp,
50                      uint32_t             path,
51                      uint32_t             nasp);
52
53 int32_t NaClSysLink(struct NaClAppThread *natp,
54                     uint32_t              oldpath,
55                     uint32_t              newpath);
56
57 int32_t NaClSysRename(struct NaClAppThread *natp,
58                       uint32_t              oldpath,
59                       uint32_t              newpath);
60
61 int32_t NaClSysSymlink(struct NaClAppThread *natp,
62                        uint32_t             oldpath,
63                        uint32_t             newpath);
64
65 int32_t NaClSysChmod(struct NaClAppThread *natp,
66                      uint32_t             path,
67                      nacl_abi_mode_t      mode);
68
69 int32_t NaClSysAccess(struct NaClAppThread *natp,
70                       uint32_t             path,
71                       int                  amode);
72
73 int32_t NaClSysReadlink(struct NaClAppThread *natp,
74                         uint32_t             path,
75                         uint32_t             buf,
76                         size_t               count);
77
78 int32_t NaClSysUtimes(struct NaClAppThread *natp,
79                       uint32_t             path,
80                       uint32_t             times);
81
82 EXTERN_C_END
83
84 #endif