// Load.h : main header file for the LOAD DLL
//
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h"// main symbols
// turn off warning about debug info truncation
#pragma warning(disable:4786)
#include <epgldrx.h>
#include <cmdproc.h>
#include "RatingSy.h"
#include "Rating.h"
#include "BrProp.h"
#include "Genre.h"
#include "SubGenre.h"
#include "StreamTy.h"
#include "ChannelT.h"
#include "ChProp.h"
#include "ChanStr.h"
#include "EpisodeT.h"
#include "EpProp.h"
#include "TimeSlot.h"
#include "Station.h"
#include "Network.h"
#include "Theme.h"
typedef unsigned char UBYTE;
#ifdef _DEBUG
#define THROWASSERT(f, errorcode)ASSERT(f)
#endif
#ifdef NDEBUG
#define THROWASSERT(f, errorcode) \
do \
{ \
if (!(f)) \
throw (errorcode); \
} while (0);
#endif
/////////////////////////////////////////////////////////////////////////////
// CLoadApp
// See Load.cpp for the implementation of this class
//
class CLoadApp : public CWinApp
{
public:
CLoadApp();
ExitCodeList EPG_DBLoad(int &argc, _TCHAR **argv, CdbDBEngine &db, PFNFORCEQUIT pfnForceQuit);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLoadApp)
//}}AFX_VIRTUAL
//{{AFX_MSG(CLoadApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
protected:
LONGm_lTuningSpace;
COleVariant m_covTuningSpace, m_covNow;
COleDateTimeSpan m_odtsTimeZoneAdjust;
COleDateTimem_codtGuideStartTime, m_codtGuideEndTime;
WORDm_wGuideLength;
CdbDBEngine *m_pDAODB;
PFNFORCEQUIT m_pfnForceQuit;
ExitCodeList InitMembers(void);
ExitCodeList ProcessInput(BOOLEAN fPartialUpdate, CdbDBEngine &db);
VOIDHandle(BOOL fPartialUpdate);
void Commit(CdbDBEngine &db, LONG lStartMessage = 0, LONG lEndMessage = 0);
void BlockCommit(CdbDBEngine &db, LONG lStartMessage = 0, LONG lEndMessage = 0);
void OpenTables(VOID);
void ClearOldEntries(CdbDBEngine &db);
void ClearDanglingRefs(CdbDBEngine &db);
void ExecuteActionQuery(CdbDatabase &db, int iStringID, COleVariant *p0 = NULL, COleVariant *p1 = NULL, COleVariant *p2 = NULL, COleVariant *p3 = NULL);
void CloseTables();
// aux
CRatingSystemRecordset *rs;
CRatingRecordset *r;
CBroadcastPropertyRecordset *bp;
CGenreRecordset *g;
CSubGenreRecordset *sg;
CStreamTypeRecordset *sr;
CThemeRecordset *t;
// main
CNetworkRecordset *n;
CStationRecordset *s;
CChannelTRecordset *c;
CChannelPropertyRecordset *cp;
CChannelStreamRecordset *csr;
CEpisodeTRecordset *e;
CEpisodePropertyRecordset *ep;
CTimeSlotRecordset *ts;
class CLoadCommandLineProc : public CCommandLineProc
{
public:
BOOLEAN m_fPartial;
CString m_csRead;
CLoadCommandLineProc(void);
protected:
void Read(CString &csArg);
void Partial(CString &csArg);
void Help(CString &csArg);
friend CCommandLineProc::CArgProcTable;
BOOLEAN GetPositionalArgs(int &argc, _TCHAR **argv);
} m_clpCmds;
};
/////////////////////////////////////////////////////////////////////////////