~ubuntu-branches/ubuntu/vivid/notecase/vivid

« back to all changes in this revision

Viewing changes to src/lib/FormatIOEncHtml.h

  • Committer: Bazaar Package Importer
  • Author(s): Vijay(Vijay)
  • Date: 2007-06-14 00:13:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070614001348-z9e2vbgtenb9nhoo
Tags: 1.5.6-0ubuntu1
* New Upstream release 
*  The libgnomevfs2-dev is also added to Build-Depends 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
////////////////////////////////////////////////////////////////////////////
 
2
// NoteCase notes manager project <http://notecase.sf.net>
 
3
//
 
4
// This code is licensed under BSD license.See "license.txt" for more details.
 
5
//
 
6
// File: Implements Blowfish encrypted NoteCase HTML format I/O
 
7
////////////////////////////////////////////////////////////////////////////
 
8
 
 
9
#ifndef FormatIOEncHTML_H__
 
10
#define FormatIOEncHTML_H__
 
11
 
 
12
#if _MSC_VER > 1000
 
13
#pragma once
 
14
#endif // _MSC_VER > 1000
 
15
 
 
16
#include "FormatIOHtml.h"
 
17
#include "types.h"      //INT64
 
18
 
 
19
//
 
20
// encrypted HTML format support
 
21
//
 
22
 
 
23
class FormatIO_EncHTML : public FormatIO_HTML
 
24
{
 
25
public:
 
26
        FormatIO_EncHTML();
 
27
        virtual ~FormatIO_EncHTML();
 
28
        
 
29
        virtual int Load(const char *szFile, NoteDocument &doc);
 
30
        virtual int Save(const char *szFile, NoteDocument &doc);
 
31
        virtual int GetFormat(){ return FORMAT_NOTECASE_HTML_ENC; };
 
32
        
 
33
        void SetPassword(const char *szPass);
 
34
        int  Save(const char *szFile, NoteDocument &doc, bool bAppendMode);
 
35
        void SetLoadEmbedded(INT64 nStart, INT64 nEnd){ m_nStartOffset = nStart; m_nEndOffset = nEnd; }
 
36
        
 
37
protected:
 
38
        int m_nEncFormatVersion;
 
39
        std::string m_strPass;
 
40
        INT64 m_nOrigSize;      //unencrypted file size
 
41
 
 
42
        //load embedded doc
 
43
        INT64 m_nStartOffset;
 
44
        INT64 m_nEndOffset;
 
45
};
 
46
 
 
47
#endif // FORMATENCHTML_H__