Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

pst2dii.cpp File Reference

#include <iostream>
#include <string>
#include <vector>
#include "define.h"
#include "lzfu.h"

Include dependency graph for pst2dii.cpp:

Include dependency graph

Go to the source code of this file.

Data Structures

struct  file_ll

Defines

#define C_TIME_SIZE   500

Functions

void open_png ()
void close_png ()
void version ()
void usage ()
char * removeCR (char *c)
char * skip_header_prologue (char *headers)
void check_filename (string &fname)
string write_separate_attachment (string fname, pst_item_attach *current_attach, int attach_num, pst_file *pst)
void print_pdf_short (const char *line, int len, int color)
void new_line ()
void print_pdf_single (const char *line, int color)
void print_pdf_only (char *line, int color)
void print_pdf (char *line)
void open_pdf (char *line)
void close_pdf ()
void write_simple (const char *tag, const char *value)
void write_simple (const char *tag, string value)
void write_simple (const char *tag, const char *value, const char *value2)
string extract_header (char *headers, const char *field)
void write_normal_email (file_ll &f, pst_item *item, pst_file *pst)
void create_enter_dir (file_ll &f, file_ll *parent, pst_item *item)
void close_enter_dir (file_ll &f)
void process (pst_item *outeritem, file_ll *parent, pst_desc_tree *d_ptr)
int main (int argc, char *const *argv)

Variables

const char * convert = "/usr/bin/convert"
const char * prog_name = NULL
const char * bates_prefix = ""
int bates_index = 0
const char * output_directory = "."
const char * output_file = "load.dii"
char * font_file = NULL
int bates_color = 0xff0000
int email_sequence = 0
char pdf_name [PATH_MAX]
FILE * dii_file = NULL
pst_file pstfile
bool pdf_open = false
char * pst_folder
int page_sequence
string conversion
vector< string > png_names
bool png_open = false
int line_height
int char_width
int col_number
int col_max
int line_number
int line_max
int x_position
int y_position
int black
int red
gdImagePtr image
const int DPI = 300
const double sz = 10.0
const int margin = DPI/2
const int LINE_SIZE = 2000
const int PAGE_WIDTH = DPI*17/2
const int PAGE_HEIGHT = DPI*11


Define Documentation

#define C_TIME_SIZE   500
 

Definition at line 74 of file pst2dii.cpp.

Referenced by write_normal_email().


Function Documentation

void check_filename string &  fname  )  [static]
 

Definition at line 149 of file pst2dii.cpp.

References DEBUG_ENT, and DEBUG_RET.

void close_enter_dir file_ll f  )  [static]
 

Definition at line 594 of file pst2dii.cpp.

void close_pdf  )  [static]
 

Definition at line 379 of file pst2dii.cpp.

References close_png(), conversion, dii_file, pdf_name, and png_names.

Referenced by write_normal_email().

Here is the call graph for this function:

void close_png  )  [static]
 

Definition at line 346 of file pst2dii.cpp.

References conversion, image, page_sequence, png_names, and png_open.

Referenced by close_pdf(), and print_pdf_short().

void create_enter_dir file_ll f,
file_ll parent,
pst_item item
[static]
 

Definition at line 584 of file pst2dii.cpp.

References pst_item::file_as, pst_item::folder, pst_item_folder::item_count, file_ll::name, pst_convert_utf8(), file_ll::stored_count, pst_string::str, pst_item::type, and file_ll::type.

Here is the call graph for this function:

string extract_header char *  headers,
const char *  field
[static]
 

Definition at line 416 of file pst2dii.cpp.

Referenced by write_normal_email().

int main int  argc,
char *const *  argv
 

Definition at line 634 of file pst2dii.cpp.

References bates_color, bates_index, bates_prefix, pst_desc_tree::child, pst_file::d_head, DEBUG_ENT, DEBUG_INIT, DEBUG_RET, DIE, dii_file, font_file, getopt(), pst_item::message_store, optarg, output_directory, output_file, process(), prog_name, pst_close(), pst_freeItem(), pst_getTopOfFolders(), pst_load_extended_attributes(), pst_load_index(), pst_open(), pst_parse_item(), pstfile, RET_DERROR, usage(), and version().

Here is the call graph for this function:

void new_line  )  [static]
 

Definition at line 254 of file pst2dii.cpp.

References col_number, line_number, x_position, and y_position.

Referenced by print_pdf_only(), and print_pdf_single().

void open_pdf char *  line  )  [static]
 

Definition at line 365 of file pst2dii.cpp.

References conversion, convert, dii_file, email_sequence, open_png(), output_directory, page_sequence, pdf_name, png_names, and pst_folder.

Referenced by write_normal_email().

Here is the call graph for this function:

void open_png  )  [static]
 

Definition at line 308 of file pst2dii.cpp.

References bates_color, bates_index, bates_prefix, black, char_width, col_max, col_number, font_file, image, line_height, line_max, line_number, margin, PAGE_HEIGHT, PAGE_WIDTH, png_open, print_pdf_only(), pst_folder, red, sz, x_position, and y_position.

Referenced by open_pdf(), and print_pdf_short().

Here is the call graph for this function:

void print_pdf char *  line  )  [static]
 

Definition at line 301 of file pst2dii.cpp.

References black, dii_file, print_pdf_only(), and pst_fwrite().

Referenced by write_normal_email().

Here is the call graph for this function:

void print_pdf_only char *  line,
int  color
[static]
 

Definition at line 286 of file pst2dii.cpp.

References new_line(), and print_pdf_single().

Referenced by open_png(), print_pdf(), and write_normal_email().

Here is the call graph for this function:

void print_pdf_short const char *  line,
int  len,
int  color
[static]
 

Definition at line 218 of file pst2dii.cpp.

References close_png(), col_number, font_file, image, line_number, memcpy(), open_png(), sz, x_position, and y_position.

Referenced by print_pdf_single().

Here is the call graph for this function:

void print_pdf_single const char *  line,
int  color
[static]
 

Definition at line 264 of file pst2dii.cpp.

References col_max, col_number, memset(), new_line(), and print_pdf_short().

Referenced by print_pdf_only().

Here is the call graph for this function:

void process pst_item outeritem,
file_ll parent,
pst_desc_tree d_ptr
[static]
 

char * removeCR char *  c  )  [static]
 

Definition at line 116 of file pst2dii.cpp.

References DEBUG_ENT, and DEBUG_RET.

char * skip_header_prologue char *  headers  )  [static]
 

Definition at line 137 of file pst2dii.cpp.

Referenced by write_normal_email().

void usage  )  [static]
 

void version  )  [static]
 

void write_normal_email file_ll f,
pst_item item,
pst_file pst
[static]
 

Definition at line 440 of file pst2dii.cpp.

References pst_item_email::arrival_date, pst_item::attach, bates_index, pst_item_email::bcc_address, black, pst_item::body, C_TIME_SIZE, pst_item_email::cc_address, close_pdf(), pst_item_attach::data, pst_binary::data, DEBUG_ENT, DEBUG_INFO, DEBUG_RET, dii_file, pst_item::email, pst_item_email::encrypted_body, pst_item_email::encrypted_htmlbody, extract_header(), pst_item_attach::filename1, pst_item_attach::filename2, pst_item::flags, pst_item_email::header, pst_item_email::htmlbody, pst_item_attach::i_id, pst_item_email::messageid, pst_item_attach::mimetype, file_ll::name, pst_item_attach::next, open_pdf(), pst_item_email::outlook_sender, pst_item_email::outlook_sender_name, print_pdf(), print_pdf_only(), pst_convert_utf8_null(), pst_fileTimeToUnixTime(), pst_item_email::recip_address, removeCR(), pst_item_email::sender_address, pst_item_email::sent_date, pst_item_email::sentto_address, skip_header_prologue(), pst_string::str, pst_item::subject, write_separate_attachment(), and write_simple().

Here is the call graph for this function:

string write_separate_attachment string  fname,
pst_item_attach current_attach,
int  attach_num,
pst_file pst
[static]
 

Definition at line 170 of file pst2dii.cpp.

References check_filename(), DEBUG_ENT, DEBUG_INFO, DEBUG_RET, DEBUG_WARN, DIE, pst_item_attach::filename1, pst_item_attach::filename2, output_directory, pst_attach_to_file(), pst_malloc(), pst_string::str, and x.

Here is the call graph for this function:

void write_simple const char *  tag,
const char *  value,
const char *  value2
[static]
 

Definition at line 406 of file pst2dii.cpp.

References dii_file.

Referenced by write_normal_email().

void write_simple const char *  tag,
string  value
[static]
 

Definition at line 399 of file pst2dii.cpp.

References dii_file.

void write_simple const char *  tag,
const char *  value
[static]
 

Definition at line 392 of file pst2dii.cpp.

References dii_file.


Variable Documentation

int bates_color = 0xff0000
 

Definition at line 43 of file pst2dii.cpp.

Referenced by main(), and open_png().

int bates_index = 0
 

Definition at line 39 of file pst2dii.cpp.

Referenced by main(), open_png(), and write_normal_email().

const char* bates_prefix = ""
 

Definition at line 38 of file pst2dii.cpp.

Referenced by main(), and open_png().

int black
 

Definition at line 63 of file pst2dii.cpp.

Referenced by open_png(), print_pdf(), and write_normal_email().

int char_width
 

Definition at line 59 of file pst2dii.cpp.

Referenced by open_png().

int col_max
 

Definition at line 60 of file pst2dii.cpp.

Referenced by open_png(), and print_pdf_single().

int col_number
 

Definition at line 60 of file pst2dii.cpp.

Referenced by new_line(), open_png(), print_pdf_short(), and print_pdf_single().

string conversion
 

Definition at line 53 of file pst2dii.cpp.

Referenced by close_pdf(), close_png(), open_pdf(), and sbcs_conversion().

const char* convert = "/usr/bin/convert"
 

Definition at line 36 of file pst2dii.cpp.

Referenced by open_pdf().

FILE* dii_file = NULL
 

Definition at line 46 of file pst2dii.cpp.

Referenced by close_pdf(), main(), open_pdf(), print_pdf(), write_normal_email(), and write_simple().

const int DPI = 300
 

Definition at line 66 of file pst2dii.cpp.

int email_sequence = 0
 

Definition at line 44 of file pst2dii.cpp.

Referenced by open_pdf().

char* font_file = NULL
 

Definition at line 42 of file pst2dii.cpp.

Referenced by main(), open_png(), and print_pdf_short().

gdImagePtr image
 

Definition at line 64 of file pst2dii.cpp.

Referenced by close_png(), open_png(), and print_pdf_short().

int line_height
 

Definition at line 58 of file pst2dii.cpp.

Referenced by open_png().

int line_max
 

Definition at line 61 of file pst2dii.cpp.

Referenced by open_png().

int line_number
 

Definition at line 61 of file pst2dii.cpp.

Referenced by new_line(), open_png(), and print_pdf_short().

const int LINE_SIZE = 2000
 

Definition at line 69 of file pst2dii.cpp.

Referenced by main().

const int margin = DPI/2
 

Definition at line 68 of file pst2dii.cpp.

Referenced by open_png().

const char* output_directory = "."
 

Definition at line 40 of file pst2dii.cpp.

Referenced by main(), open_pdf(), and write_separate_attachment().

const char* output_file = "load.dii"
 

Definition at line 41 of file pst2dii.cpp.

Referenced by main().

const int PAGE_HEIGHT = DPI*11
 

Definition at line 71 of file pst2dii.cpp.

Referenced by open_png().

int page_sequence
 

Definition at line 52 of file pst2dii.cpp.

Referenced by close_png(), and open_pdf().

const int PAGE_WIDTH = DPI*17/2
 

Definition at line 70 of file pst2dii.cpp.

Referenced by open_png().

char pdf_name[PATH_MAX]
 

Definition at line 45 of file pst2dii.cpp.

Referenced by close_pdf(), and open_pdf().

bool pdf_open = false
 

Definition at line 50 of file pst2dii.cpp.

vector<string> png_names
 

Definition at line 54 of file pst2dii.cpp.

Referenced by close_pdf(), close_png(), and open_pdf().

bool png_open = false
 

Definition at line 57 of file pst2dii.cpp.

Referenced by close_png(), and open_png().

const char* prog_name = NULL
 

Definition at line 37 of file pst2dii.cpp.

Referenced by main(), and usage().

char* pst_folder
 

Definition at line 51 of file pst2dii.cpp.

Referenced by open_pdf(), and open_png().

pst_file pstfile
 

Definition at line 47 of file pst2dii.cpp.

int red
 

Definition at line 63 of file pst2dii.cpp.

Referenced by open_png().

const double sz = 10.0
 

Definition at line 67 of file pst2dii.cpp.

Referenced by open_png(), and print_pdf_short().

int x_position
 

Definition at line 62 of file pst2dii.cpp.

Referenced by new_line(), open_png(), and print_pdf_short().

int y_position
 

Definition at line 62 of file pst2dii.cpp.

Referenced by new_line(), open_png(), and print_pdf_short().


Generated on Mon Sep 13 14:51:58 2010 for 'LibPst' by  doxygen 1.3.9.1