You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.6 KiB
65 lines
1.6 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: LgMaskScheduleEngine.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of LgMaskScheduleEngine.h
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __LG__MASK__SCHEDULE__ENGINE__H__INCLUDED__
|
|
#define __LG__MASK__SCHEDULE__ENGINE__H__INCLUDED__
|
|
|
|
#include "LgMaskScheduleTypes.h"
|
|
|
|
typedef void (*PMASK_SWITCH_CALLBACK)( LPVOID pParam, CLgMaskScheduleLgsSwitch& arrSwitch );
|
|
|
|
class CLgMaskScheduleEngine
|
|
{
|
|
public:
|
|
CLgMaskScheduleEngine();
|
|
virtual ~CLgMaskScheduleEngine();
|
|
|
|
public:
|
|
BOOL Create( PMASK_SWITCH_CALLBACK pMaskScheduleCallback, LPVOID lParam );
|
|
void Destroy();
|
|
|
|
BOOL Load( LPCTSTR pFileName );
|
|
BOOL Save( LPCTSTR pFileName );
|
|
|
|
void OnTimer( SYSTEMTIME *pST );
|
|
|
|
public:
|
|
BOOL Add( PMASK_SCHEDULE pHzSchedule );
|
|
BOOL Delete( INT nIndex );
|
|
void DeleteAll();
|
|
|
|
public:
|
|
void MaskSwitch( CLgMaskScheduleLgsSwitch &arrSwitch );
|
|
|
|
public:
|
|
void UpdateSchedule( INT nIndex );
|
|
|
|
public:
|
|
CLgScheduleArray& GetScheduleArray() { return m_HzScheduleArray; }
|
|
|
|
private:
|
|
CLgScheduleArray m_HzScheduleArray;
|
|
|
|
private:
|
|
INT m_nDayOfWeek;
|
|
|
|
private:
|
|
PMASK_SWITCH_CALLBACK m_pMaskScheduleCallback;
|
|
LPVOID m_pMaskScheduleCallbackParam;
|
|
|
|
private:
|
|
LARGE_INTEGER m_liNextTimeInSec;
|
|
DWORD m_dwNextTimeInSecUpdate;
|
|
};
|
|
|
|
#endif
|