]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/findlib/bfile.h
Apply Preben 'Peppe' Guldberg <peppe@wielders.org>
[bacula/bacula] / bacula / src / findlib / bfile.h
index 390df8e2b84e47e434dfdb9f153b5992762d21c1..4d4c25b55525562b9819eb228a42f5f26d1ab7f6 100644 (file)
@@ -30,7 +30,7 @@
 
 /*  =======================================================
  *
- *   W I N D O W S 
+ *   W I N D O W S
  *
  *  =======================================================
  */
@@ -57,7 +57,11 @@ struct BFILE {
    POOLMEM *errmsg;                   /* error message buffer */
    DWORD rw_bytes;                    /* Bytes read or written */
    DWORD lerror;                      /* Last error code */
-};      
+   int berrno;                        /* errno */
+   char *prog;                        /* reader/writer program if any */
+   BPIPE *bpipe;                      /* pipe for reader */
+   JCR *jcr;                          /* jcr for editing job codes */
+};
 
 HANDLE bget_handle(BFILE *bfd);
 
@@ -65,7 +69,7 @@ HANDLE bget_handle(BFILE *bfd);
 
 /*  =======================================================
  *
- *   U N I X 
+ *   U N I X
  *
  *  =======================================================
  */
@@ -74,7 +78,10 @@ HANDLE bget_handle(BFILE *bfd);
 struct BFILE {
    int fid;                           /* file id on Unix */
    int berrno;
-};      
+   char *prog;                        /* reader/writer program if any */
+   BPIPE *bpipe;                      /* pipe for reader */
+   JCR *jcr;                          /* jcr for editing job codes */
+};
 
 #endif
 
@@ -82,12 +89,16 @@ void    binit(BFILE *bfd);
 int     is_bopen(BFILE *bfd);
 int     set_win32_backup(BFILE *bfd);
 int     set_portable_backup(BFILE *bfd);
+void    set_prog(BFILE *bfd, char *prog, JCR *jcr);
 int     have_win32_api();
 int     is_portable_backup(BFILE *bfd);
 int     is_stream_supported(int stream);
 int     is_win32_stream(int stream);
-char   *berror(BFILE *bfd);
+char   *xberror(BFILE *bfd);          /* DO NOT USE  -- use berrno class */
 int     bopen(BFILE *bfd, const char *fname, int flags, mode_t mode);
+#ifdef HAVE_DARWIN_OS
+int     bopen_rsrc(BFILE *bfd, const char *fname, int flags, mode_t mode);
+#endif
 int     bclose(BFILE *bfd);
 ssize_t bread(BFILE *bfd, void *buf, size_t count);
 ssize_t bwrite(BFILE *bfd, void *buf, size_t count);