~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201207201942

« back to all changes in this revision

Viewing changes to lib/include/wiper.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-10-18 12:28:19 UTC
  • mfrom: (1.1.7 upstream) (2.4.9 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091018122819-00vqew6m0ztpqcqp
Tags: 2009.10.15-201664-1
MergingĀ upstreamĀ versionĀ 2009.10.15-201664.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#ifndef _WIPER_H_
27
27
# define _WIPER_H_
28
28
 
29
 
 
30
29
#if defined(_WIN32) && defined(_MSC_VER)
31
30
#include <windows.h>
32
31
#endif
33
32
 
34
 
 
35
33
#include "vm_basic_types.h"
 
34
#include "dbllnklst.h"
36
35
 
37
36
 
38
37
typedef enum {
 
38
   PARTITION_UNSUPPORTED = 0,
39
39
   PARTITION_EXT2,
40
40
   PARTITION_EXT3,
41
41
   PARTITION_REISERFS,
52
52
typedef struct WiperPartition {
53
53
   unsigned char mountPoint[NATIVE_MAX_PATH];
54
54
 
55
 
   /* 
56
 
    * Empty if type is set, otherwise describes why the partition can not be
57
 
    * wiped
 
55
   /* Type of the partition */
 
56
   WiperPartition_Type type;
 
57
 
 
58
   /*
 
59
    * NULL if type is not PARTITION_UNSUPPORTED, otherwise describes
 
60
    * why the partition can not be wiped.
58
61
    */
59
 
   char *comment;
60
 
 
61
 
   /* Type of the partition we know how to wipe */
62
 
   WiperPartition_Type type;
 
62
   const char *comment;
63
63
 
64
64
#if defined(_WIN32)
65
65
   /* Private flags used by the Win32 implementation */
66
66
   DWORD flags;
67
67
#endif
68
68
 
69
 
#if defined(N_PLAT_NLM)
70
 
   unsigned long volumeNumber;
71
 
#endif
 
69
   DblLnkLst_Links link;
72
70
} WiperPartition;
73
71
 
74
72
typedef struct WiperPartition_List {
75
 
   WiperPartition *partitions;
76
 
   unsigned int size;
 
73
   DblLnkLst_Links link;
77
74
} WiperPartition_List;
78
75
 
79
76
typedef struct WiperInitData {
83
80
} WiperInitData;
84
81
 
85
82
Bool Wiper_Init(WiperInitData *clientData);
86
 
WiperPartition_List *WiperPartition_Open(void);
 
83
Bool WiperPartition_Open(WiperPartition_List *pl);
87
84
void WiperPartition_Close(WiperPartition_List *pl);
88
85
 
89
 
WiperPartition *SingleWiperPartition_Open(const char *mntpt);
90
 
void SingleWiperPartition_Close(WiperPartition *pl);
 
86
WiperPartition *WiperSinglePartition_Allocate(void);
 
87
WiperPartition *WiperSinglePartition_Open(const char *mntpt);
 
88
void WiperSinglePartition_Close(WiperPartition *);
91
89
 
92
 
unsigned char *WiperSinglePartition_GetSpace(const WiperPartition *p,  
93
 
                              uint64 *free,       
94
 
                              uint64 *total);      
 
90
unsigned char *WiperSinglePartition_GetSpace(const WiperPartition *p,
 
91
                              uint64 *free,
 
92
                              uint64 *total);
95
93
 
96
94
/* External definition of the wiper state */
97
95
struct Wiper_State;