VTFLib
A C and C++ API that, with a few simple functions, can open and save .vtf and .vmt files.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Proc.h
1 /*
2  * VTFLib
3  * Copyright (C) 2005-2010 Neil Jedrzejewski & Ryan Gregg
4 
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later
9  * version.
10  */
11 
12 #ifndef VTFLIB_PROC_H
13 #define VTFLIB_PROC_H
14 
15 #include "stdafx.h"
16 #include "Error.h"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 typedef enum tagVLProc
23 {
24  PROC_READ_CLOSE = 0,
25  PROC_READ_OPEN,
26  PROC_READ_READ,
27  PROC_READ_SEEK,
28  PROC_READ_TELL,
29  PROC_READ_SIZE,
30  PROC_WRITE_CLOSE,
31  PROC_WRITE_OPEN,
32  PROC_WRITE_WRITE,
33  PROC_WRITE_SEEK,
34  PROC_WRITE_SIZE,
35  PROC_WRITE_TELL,
36  PROC_COUNT
37 } VLProc;
38 
39 typedef vlVoid (*PReadCloseProc)(vlVoid *);
40 typedef vlBool (*PReadOpenProc) (vlVoid *);
41 typedef vlSize (*PReadReadProc) (vlVoid *, vlSize, vlVoid *);
42 typedef vlSSize (*PReadSeekProc) (vlOffset, VLSeekMode, vlVoid *);
43 typedef vlSSize (*PReadSizeProc) (vlVoid *);
44 typedef vlSSize (*PReadTellProc) (vlVoid *);
45 
46 typedef vlVoid (*PWriteCloseProc)(vlVoid *);
47 typedef vlBool (*PWriteOpenProc) (vlVoid *);
48 typedef vlSize (*PWriteWriteProc) (vlVoid *, vlSize, vlVoid *);
49 typedef vlSSize (*PWriteSeekProc) (vlOffset, VLSeekMode, vlVoid *);
50 typedef vlSSize (*PWriteSizeProc) (vlVoid *);
51 typedef vlSSize (*PWriteTellProc) (vlVoid *);
52 
53 #ifdef __cplusplus
54 }
55 #endif
56 
57 namespace VTFLib
58 {
59  extern PReadCloseProc pReadCloseProc;
60  extern PReadOpenProc pReadOpenProc;
61  extern PReadReadProc pReadReadProc;
62  extern PReadSeekProc pReadSeekProc;
63  extern PReadSizeProc pReadSizeProc;
64  extern PReadTellProc pReadTellProc;
65 
66  extern PWriteCloseProc pWriteCloseProc;
67  extern PWriteOpenProc pWriteOpenProc;
68  extern PWriteWriteProc pWriteWriteProc;
69  extern PWriteSeekProc pWriteSeekProc;
70  extern PWriteSizeProc pWriteSizeProc;
71  extern PWriteTellProc pWriteTellProc;
72 }
73 
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
77 
78 VTFLIB_API vlVoid vlSetProc(VLProc Proc, vlVoid *pProc);
79 VTFLIB_API vlVoid *vlGetProc(VLProc Proc);
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif
Error handling class header.
Application framework header plus VTFLib custom data types.
void vlVoid
Void value.
Definition: stdafx.h:61
unsigned char vlBool
Boolean value 0/1.
Definition: stdafx.h:50