Subversion Repositories autosfx

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 daniel-mar 1
#include "stdafx.h"
2
#pragma hdrstop
3
 
4
#include "common.h"
5
#include "zstrings.h"
6
#include "DZFrame.h"
7
#include "enter.h"
8
#include "dz_errs.h"
9
 
10
#undef _DZ_FILE_
11
#define _DZ_FILE_ DZ_DZ_FRAME_CPP
12
 
13
/* DZFrame.cpp *
14
 
15
 Copyright (C) 2009, 2010  by Russell J. Peters, Roger Aelbrecht
16
 
17
   This file is part of TZipMaster Version 1.9.
18
 
19
    TZipMaster is free software: you can redistribute it and/or modify
20
    it under the terms of the GNU Lesser General Public License as published by
21
    the Free Software Foundation, either version 3 of the License, or
22
    (at your option) any later version.
23
 
24
    TZipMaster is distributed in the hope that it will be useful,
25
    but WITHOUT ANY WARRANTY; without even the implied warranty of
26
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27
    GNU Lesser General Public License for more details.
28
 
29
    You should have received a copy of the GNU Lesser General Public License
30
    along with TZipMaster.  If not, see <http://www.gnu.org/licenses/>.
31
 
32
    contact: problems@delphizip.org (include ZipMaster in the subject).
33
    updates: http://www.delphizip.org
34
    DelphiZip maillist subscribe at http://www.freelists.org/list/delphizip
35
************************************************************************/
36
 
37
DZFrame::DZFrame(OperKeys C, int typ)
38
{
39
    OpTyp = typ;
40
        ME = 0;         // only set when 'attached'
41
    Abort_Flag = 0;
42
    OpKey = (OperKeys)C;
43
}
44
 
45
DZFrame::~DZFrame(void)
46
{
47
//
48
}
49
 
50
bool DZFrame::IsME(const DZFrame *p)
51
{
52
    return ME == p && (OpTyp == ZIPOPER || OpTyp == UNZOPER);
53
}
54
 
55
bool DZFrame::SetME(const DZFrame *Op, int typ)
56
{
57
    if (Op == this && (typ == ZIPOPER || typ == UNZOPER))
58
    {
59
        ME = Op;
60
        OpTyp = typ;
61
        return true;
62
    }
63
 
64
        ME = NULL;
65
    OpTyp = 0;
66
 
67
        return false;
68
}
69
 
70
const TCHAR* DZFrame::TypStr(void) const
71
{
72
    return OpTyp == ZIPOPER ? _T("Zip") : _T("Unzip");
73
}
74
 
75
 
76