Home | History | Annotate | Download | only in android
      1 // Copyright 2013 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.
      4 
      5 #ifndef BASE_ANDROID_FIFO_UTILS_H_
      6 #define BASE_ANDROID_FIFO_UTILS_H_
      7 
      8 #include <stdio.h>
      9 
     10 #include "base/base_export.h"
     11 
     12 namespace base {
     13 
     14 class FilePath;
     15 
     16 namespace android {
     17 
     18 // Creates a fifo at the given |path| with POSIX permissions set to |mode|,
     19 // returning true if it was successfully created and permissions were set.
     20 BASE_EXPORT bool CreateFIFO(const FilePath& path, int mode);
     21 
     22 // Redirects the |stream| to the file provided by |path| with |mode|
     23 // permissions, returning true if successful.
     24 BASE_EXPORT bool RedirectStream(FILE* stream,
     25                                 const FilePath& path,
     26                                 const char* mode);
     27 
     28 }  // namespace android
     29 }  // namespace base
     30 
     31 #endif  // BASE_ANDROID_FIFO_UTILS_H_
     32