versadac  1
versadac - Scalable Recorder Firmware
am_archivecontrol.h
1 /*****************************************************************************
2 FILE : am_archivecontrol.h
3 VERSION : $Id: am_archivecontrol.h 4938 2006-10-10 14:20:18Z martinto $
4 AUTHOR : Steve Pickford
5 SYSTEM : GNU C++ for Power PC
6 DESCRIPTION : Archive control class declarations
7 *****************************************************************************/
8 
9 #ifndef __AM_ARCHIVECONTROL_H
10 #define __AM_ARCHIVECONTROL_H
11 
12 #if !defined(__AM_CSV_H)
13 #include "am_csvstream.h"
14 #endif
15 
16 enum
17 {
18  RESOURCE_START_UPDATE,
19  RESOURCE_RUNNING_UPDATE,
20  MEDIA_STATUS_ONLY_UPDATE
21 };
22 
23 /* Typedefs */
24 
25 typedef struct
26 {
27  bool archivingSuspended;
28  bool ftpPrimaryFailed;
29  bool ftpSecondaryFailed;
30  bool mediaFailed;
31  uint8 outputFormat;
32  bool *pArchivingEnabled;
33  uint8 *pDemandStrategy;
34  double *pTimeLastWrite;
35  uint8 *pUnattendedStrategy;
36  bool suspendArchiving;
38 
40 {
41  public:
42 
43  friend class AM_Archiver;
44 
45  // Methods
46  AM_ArchiveControl(char *z_szLockName, uint16 z_numberOfGroups);
48 
49  void getLock(void);
50  bool getLockIfFree(void);
51  void releaseLock(void);
52  void updateFromArchiver(AM_Archiver *z_pArchiver, uint8 z_type);
53  void updateFromFnBlock(fb_archiver *z_pFnBlock, uint8 z_type);
54 
55  private:
56 
57  // Attributes
58  uint32 m_lock;
59  double m_mediaFree;
60  bool m_mediaFull;
61  bool m_mediaPCFull;
62  uint16 m_mediaPCFullLimit;
63  uint8 m_mediaFullStrategy;
64  uint8 m_autoStrategy;
65  AM_CsvOptions m_csvOptions;
66 
67  bool m_mediaMissing;
68  double m_mediaSize;
69  uint16 m_numberOfGroups;
70  AM_RouteControl m_route[AM_NUMBER_OF_ROUTES];
71  double m_timeMediaFull;
72  sint32 m_timeZoneRawOffset;
73 
74  string_100 m_szUnattendedMediaRoot;
75  string_100 m_szDemandedMediaRoot;
76 
77  // FTP server strings
78  char **m_pszFtpPath; // Array of remote paths, each up to 40 chars long
79  string_40 m_szFtpPrimaryPassword; // Primary password up to 40 chars
80  string_100 m_szFtpPrimaryServer; // Primary host up to 104 chars
81  string_40 m_szFtpPrimaryUser; // Primary user up to 40 chars
82  string_40 m_szFtpSecondaryPassword; // Secondary password up to 40 chars
83  string_100 m_szFtpSecondaryServer; // Secondary host up to 104 chars
84  string_40 m_szFtpSecondaryUser; // Secondary user up to 40 chars
85 
86  string_100 m_szUsbPath; // USB path
87 
88 };
89 
90 #endif // __AM_ARCHIVECONTROL_H
91 
Definition: am_archiver.h:90
Definition: fb_archiver.h:43
Definition: am_archivecontrol.h:39
Definition: am_archivecontrol.h:25
Definition: am_csvstream.h:39