Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / native_client_sdk / src / libraries / nacl_io / nacl_io.cc
blob141c4d7a5d6cf1a31b3fe05d2cbb6bf3557c189a
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "nacl_io/nacl_io.h"
7 #include <stdlib.h>
8 #include "nacl_io/kernel_intercept.h"
9 #include "nacl_io/kernel_proxy.h"
11 int nacl_io_init() {
12 return ki_init(NULL);
15 int nacl_io_uninit() {
16 return ki_uninit();
19 int nacl_io_init_ppapi(PP_Instance instance, PPB_GetInterface get_interface) {
20 return ki_init_ppapi(NULL, instance, get_interface);
23 int nacl_io_register_fs_type(const char* fs_type, fuse_operations* fuse_ops) {
24 return ki_get_proxy()->RegisterFsType(fs_type, fuse_ops);
27 int nacl_io_unregister_fs_type(const char* fs_type) {
28 return ki_get_proxy()->UnregisterFsType(fs_type);
31 void nacl_io_set_exit_callback(nacl_io_exit_callback_t exit_callback,
32 void* user_data) {
33 ki_get_proxy()->SetExitCallback(exit_callback, user_data);
36 void nacl_io_set_mount_callback(nacl_io_mount_callback_t callback,
37 void* user_data) {
38 ki_get_proxy()->SetMountCallback(callback, user_data);