00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef CONSTANTS_H
00015 #define CONSTANTS_H
00016
00020 namespace Constants
00021 {
00025
00026 #define CMDLINE_CONFIG "configure"
00027 #define CMDLINE_CONFIG_SHORT "c"
00028
00029 #define CMDLINE_REFRESH "refresh"
00030 #define CMDLINE_REFRESH_SHORT "r"
00031
00035
00036 #define DEFAULT_CONFIRM_CLOSE false
00037 #define DEFAULT_CONFIRM_DELETE true
00038 #define DEFAULT_START_MINIMIZED false
00039 #define DEFAULT_CLOSE_TO_TRAY true
00040 #define DEFAULT_MINIMIZE_TO_TRAY true
00041 #define DEFAULT_SHOW_CONNECTION_ERRORS true
00042 #define DEFAULT_KEEP_NEW false
00043
00044 #define DEFAULT_INITIAL_TIME 0
00045 #define DEFAULT_INTERVAL_TIME 0
00046 #define MINIMUM_TIMEOUT_TIME 5
00047 #define DEFAULT_TIMEOUT_TIME 30
00048
00049
00050 #define DEFAULT_ACTION_NEW_MAIL_ALERTWINDOW true
00051 #define DEFAULT_ACTION_NEW_MAIL_MAINWINDOW false
00052 #define DEFAULT_ACTION_NEW_MAIL_BEEP false
00053 #define DEFAULT_ACTION_NEW_MAIL_SOUND false
00054 #define DEFAULT_ACTION_NEW_MAIL_COMMAND false
00055 #define DEFAULT_ACTION_NO_NEW_MAIL_MINIMIZE false
00056 #define DEFAULT_ACTION_NO_NEW_MAIL_TERMINATE false
00057
00058
00059 #define DEFAULT_DISPLAY_ACCOUNT_ACTIVE true
00060 #define DEFAULT_DISPLAY_ACCOUNT_ACCOUNT true
00061 #define DEFAULT_DISPLAY_ACCOUNT_SERVER true
00062 #define DEFAULT_DISPLAY_ACCOUNT_USER true
00063 #define DEFAULT_DISPLAY_ACCOUNT_MESSAGES true
00064 #define DEFAULT_DISPLAY_ACCOUNT_SIZE true
00065 #define DEFAULT_DISPLAY_MESSAGE_NUMBER true
00066 #define DEFAULT_DISPLAY_MESSAGE_ACCOUNT true
00067 #define DEFAULT_DISPLAY_MESSAGE_FROM true
00068 #define DEFAULT_DISPLAY_MESSAGE_TO true
00069 #define DEFAULT_DISPLAY_MESSAGE_SUBJECT true
00070 #define DEFAULT_DISPLAY_MESSAGE_DATE true
00071 #define DEFAULT_DISPLAY_MESSAGE_SIZE true
00072 #define DEFAULT_DISPLAY_MESSAGE_CONTENT true
00073 #define DEFAULT_DISPLAY_MESSAGE_STATE true
00074
00075
00076 #define DEFAULT_VIEW_USE_HTML false
00077
00078
00079 #define DEFAULT_WIDTH_ACCOUNT_ACTIVE 50
00080 #define DEFAULT_WIDTH_ACCOUNT_ACCOUNT 100
00081 #define DEFAULT_WIDTH_ACCOUNT_SERVER 100
00082 #define DEFAULT_WIDTH_ACCOUNT_USER 100
00083 #define DEFAULT_WIDTH_ACCOUNT_MESSAGES 80
00084 #define DEFAULT_WIDTH_ACCOUNT_SIZE 80
00085 #define DEFAULT_WIDTH_MESSAGE_NUMBER 50
00086 #define DEFAULT_WIDTH_MESSAGE_ACCOUNT 100
00087 #define DEFAULT_WIDTH_MESSAGE_FROM 200
00088 #define DEFAULT_WIDTH_MESSAGE_TO 200
00089 #define DEFAULT_WIDTH_MESSAGE_SUBJECT 350
00090 #define DEFAULT_WIDTH_MESSAGE_DATE 100
00091 #define DEFAULT_WIDTH_MESSAGE_SIZE 80
00092 #define DEFAULT_WIDTH_MESSAGE_CONTENT 80
00093 #define DEFAULT_WIDTH_MESSAGE_STATE 50
00094
00095
00096 #define DEFAULT_ACCOUNT_NAME ""
00097 #define DEFAULT_ACCOUNT_SERVER ""
00098 #define DEFAULT_ACCOUNT_PROTOCOL "POP3"
00099 #define DEFAULT_ACCOUNT_PORT_POP3 110
00100 #define DEFAULT_ACCOUNT_PORT_POP3SSL 995
00101 #define DEFAULT_ACCOUNT_USER ""
00102 #define DEFAULT_ACCOUNT_PASSWORD ""
00103 #define DEFAULT_ACCOUNT_PASSWORD_STORAGE 1
00104
00105 #define DEFAULT_ACCOUNT_ACTIVE true
00106 #define DEFAULT_ACCOUNT_SECTRANSFER 1
00107
00108
00109
00110 #define DEFAULT_FILTER_ACTIVE false
00111 #define DEFAULT_FILTER_OTHERS_ACTION 1
00112
00113 #define DEFAULT_FILTER_BLACKLIST_ACTION 1
00114
00115 #define DEFAULT_FILTER_NAME "New Filter"
00116 #define DEFAULT_FILTER_CRITERIA_LINKAGE 1
00117
00118 #define DEFAULT_FILTER_CRITERIA_SOURCE 1
00119
00120 #define DEFAULT_FILTER_CRITERIA_COND_TEXT 1
00121
00122 #define DEFAULT_FILTER_CRITERIA_COND_NUM 3
00123
00124 #define DEFAULT_FILTER_CRITERIA_SIZE 20000
00125 #define DEFAULT_FILTER_CRITERIA_CASE_SENSITIVE false
00126 #define DEFAULT_FILTER_ACTION 1
00127
00128 #define DEFAULT_FILTER_ACTION_MOVE_MAILBOX ""
00129
00130
00131 #define DEFAULT_SPAMCHECK_ACTION 3
00132
00133 #define DEFAULT_SPAMCHECK_ACTION_MOVE_MAILBOX ""
00134
00135
00136
00137 #define DEFAULT_LOG_LOG_DELETED_MAILS true
00138 #define DEFAULT_LOG_LOG_MOVED_MAILS true
00139
00140 #define DEFAULT_LOG_REMOVE_DELETED_MAILS "days"
00141 #define DEFAULT_LOG_REMOVE_MOVED_MAILS "exit"
00142
00143 #define DEFAULT_LOG_HOLDDAYS_DELETED_MAILS 7
00144 #define DEFAULT_LOG_HOLDDAYS_MOVED_MAILS 7
00145
00149 #define MAIL_FILE "kshowmail.xml"
00150 #define MAIL_FILE_DOCTYPE "KShowmail"
00151 #define ROOT_ELEMENT "accounts"
00152 #define ACCOUNT_ELEMENT "account"
00153 #define ATTRIBUTE_ACCOUNT_NAME "account"
00154 #define ATTRIBUTE_MAIL_UID "uidl"
00155 #define ATTRIBUTE_MAIL_SIZE "size"
00156 #define ATTRIBUTE_MAIL_NUMBER "number"
00157 #define ITEM_MAIL_HEADER "header"
00158 #define ITEM_MESSAGE "message"
00159
00163 #define LOG_FILE "kshowmaillog.xml"
00164 #define LOG_DOCTYPE "KShowmailLog"
00165 #define LOG_ROOT_ELEMENT "DeletedMails"
00166 #define LOG_ENTRY_ELEMENT "LogEntry"
00167 #define LOG_ENTRY_ATTRIBUTE_DATETIME "DateTime"
00168 #define LOG_ENTRY_ATTRIBUTE_SENDER "Sender"
00169 #define LOG_ENTRY_ATTRIBUTE_ACCOUNT "Account"
00170 #define LOG_ENTRY_ATTRIBUTE_SUBJECT "Subject"
00171
00175
00176 #define WIDTH_VIEW_MAILBODY 500
00177 #define HEIGHT_VIEW_MAILBODY 400
00178
00179
00180 #define WIDTH_VIEW_MAILHEADER 500
00181 #define HEIGHT_VIEW_MAILHEADER 400
00182
00183
00184 #define WIDTH_FILTER_TEXT_VALUE_LINE 300
00185
00189 #define CONFIG_GROUP_GENERAL "General"
00190 #define CONFIG_ENTRY_CONFIRM_CLOSE "confirmClose"
00191 #define CONFIG_ENTRY_CONFIRM_DELETE "confirmDelete"
00192 #define CONFIG_ENTRY_START_MINIMIZED "startMinimized"
00193 #define CONFIG_ENTRY_CLOSE_TO_TRAY "closeToTray"
00194 #define CONFIG_ENTRY_MINIMIZE_TO_TRAY "minimizeToTray"
00195 #define CONFIG_ENTRY_SHOW_CONNECTION_ERRORS "showConnectionErrors"
00196 #define CONFIG_ENTRY_KEEP_NEW "keepMailsNew"
00197 #define CONFIG_ENTRY_INITIAL_TIME "InitialTime"
00198 #define CONFIG_ENTRY_INTERVAL_TIME "IntervalTime"
00199 #define CONFIG_ENTRY_TIMEOUT_TIME "TimeoutTime"
00200
00201 #define CONFIG_GROUP_ACTIONS "Actions"
00202 #define CONFIG_ENTRY_NEW_MAIL_ALERTWINDOW "showAlertMessageIfNewMail"
00203 #define CONFIG_ENTRY_NEW_MAIL_MAINWINDOW "showMainWindowIfNewMail"
00204 #define CONFIG_ENTRY_NEW_MAIL_BEEP "beepIfNewMail"
00205 #define CONFIG_ENTRY_NEW_MAIL_SOUND "playSoundIfNewMail"
00206 #define CONFIG_ENTRY_NEW_MAIL_SOUNDPATH "PathToSoundFile"
00207 #define CONFIG_ENTRY_NEW_MAIL_COMMAND "executeCommandIfNewMail"
00208 #define CONFIG_ENTRY_NEW_MAIL_COMMANDPATH "Command"
00209 #define CONFIG_ENTRY_NO_NEW_MAIL_TERMINATE "exitIfNoNewMails"
00210 #define CONFIG_ENTRY_NO_NEW_MAIL_MINIMIZE "minimizeMainWindowIfNoNewMails"
00211
00212 #define CONFIG_GROUP_VIEW "View"
00213 #define CONFIG_ENTRY_VIEW_USE_HTML "useHTML"
00214
00215 #define CONFIG_GROUP_ACCOUNT_LIST "LayoutAccountList"
00216 #define CONFIG_ENTRY_DISPLAY_ACCOUNT_ACTIVE "showAccountListActiveColumn"
00217 #define CONFIG_ENTRY_DISPLAY_ACCOUNT_ACCOUNT "showAccountListAccountColumn"
00218 #define CONFIG_ENTRY_DISPLAY_ACCOUNT_SERVER "showAccountListServerColumn"
00219 #define CONFIG_ENTRY_DISPLAY_ACCOUNT_USER "showAccountListUserColumn"
00220 #define CONFIG_ENTRY_DISPLAY_ACCOUNT_MESSAGES "showAccountListMessagesColumn"
00221 #define CONFIG_ENTRY_DISPLAY_ACCOUNT_SIZE "showAccountListSizeColumn"
00222 #define CONFIG_ENTRY_OLD_WIDTH_ACCOUNT_ACTIVE "oldWidthAccountListActiveColumn"
00223 #define CONFIG_ENTRY_OLD_WIDTH_ACCOUNT_ACCOUNT "oldWidthAccountListAccountColumn"
00224 #define CONFIG_ENTRY_OLD_WIDTH_ACCOUNT_SERVER "oldWidthAccountListServerColumn"
00225 #define CONFIG_ENTRY_OLD_WIDTH_ACCOUNT_USER "oldWidthAccountListUserColumn"
00226 #define CONFIG_ENTRY_OLD_WIDTH_ACCOUNT_MESSAGES "oldWidthAccountListMessagesColumn"
00227 #define CONFIG_ENTRY_OLD_WIDTH_ACCOUNT_SIZE "oldWidthAccountListSizeColumn"
00228
00229
00230 #define CONFIG_GROUP_MESSAGE_LIST "LayoutMessageList"
00231 #define CONFIG_ENTRY_DISPLAY_MESSAGE_NUMBER "showMessageListNumberColumn"
00232 #define CONFIG_ENTRY_DISPLAY_MESSAGE_ACCOUNT "showMessageListAccountColumn"
00233 #define CONFIG_ENTRY_DISPLAY_MESSAGE_FROM "showMessageListFromColumn"
00234 #define CONFIG_ENTRY_DISPLAY_MESSAGE_TO "showMessageListToColumn"
00235 #define CONFIG_ENTRY_DISPLAY_MESSAGE_SUBJECT "showMessageListSubjectColumn"
00236 #define CONFIG_ENTRY_DISPLAY_MESSAGE_DATE "showMessageListDateColumn"
00237 #define CONFIG_ENTRY_DISPLAY_MESSAGE_SIZE "showMessageListSizeColumn"
00238 #define CONFIG_ENTRY_DISPLAY_MESSAGE_CONTENT "showMessageListContentColumn"
00239 #define CONFIG_ENTRY_DISPLAY_MESSAGE_STATE "showMessageListStateColumn"
00240 #define CONFIG_ENTRY_OLD_WIDTH_MESSAGE_NUMBER "oldWidthMessageListNumberColumn"
00241 #define CONFIG_ENTRY_OLD_WIDTH_MESSAGE_ACCOUNT "oldWidthMessageListAccountColumn"
00242 #define CONFIG_ENTRY_OLD_WIDTH_MESSAGE_FROM "oldWidthMessageListFromColumn"
00243 #define CONFIG_ENTRY_OLD_WIDTH_MESSAGE_TO "oldWidthMessageListToColumn"
00244 #define CONFIG_ENTRY_OLD_WIDTH_MESSAGE_SUBJECT "oldWidthMessageListSubjectColumn"
00245 #define CONFIG_ENTRY_OLD_WIDTH_MESSAGE_DATE "oldWidthMessageListDateColumn"
00246 #define CONFIG_ENTRY_OLD_WIDTH_MESSAGE_SIZE "oldWidthMessageListSizeColumn"
00247 #define CONFIG_ENTRY_OLD_WIDTH_MESSAGE_CONTENT "oldWidthMessageListContentColumn"
00248 #define CONFIG_ENTRY_OLD_WIDTH_MESSAGE_STATE "oldWidthMessageListStateColumn"
00249
00250 #define CONFIG_VALUE_ACCOUNT_PASSWORD_DONT_SAVE 1
00251 #define CONFIG_VALUE_ACCOUNT_PASSWORD_SAVE_FILE 2
00252 #define CONFIG_VALUE_ACCOUNT_PASSWORD_SAVE_KWALLET 3
00253 #define CONFIG_VALUE_ACCOUNT_SECTRANSFER_NONE 1
00254 #define CONFIG_VALUE_ACCOUNT_SECTRANSFER_SSL 2
00255 #define CONFIG_VALUE_ACCOUNT_SECTRANSFER_TLS 3
00256
00257 #define CONFIG_GROUP_ACCOUNTS "Accounts"
00258 #define CONFIG_ENTRY_ACCOUNTS_LIST "NamesList"
00259
00260 #define CONFIG_ENTRY_ACCOUNT_NAME "Name"
00261 #define CONFIG_ENTRY_ACCOUNT_SERVER "Server"
00262 #define CONFIG_ENTRY_ACCOUNT_PROTOCOL "Protocol"
00263 #define CONFIG_ENTRY_ACCOUNT_PORT "Port"
00264 #define CONFIG_ENTRY_ACCOUNT_USER "User"
00265 #define CONFIG_ENTRY_ACCOUNT_PASSWORD "Password"
00266 #define CONFIG_ENTRY_ACCOUNT_PASSWORD_STORAGE "PasswordStorage"
00267 #define CONFIG_ENTRY_ACCOUNT_ACTIVE "Active"
00268 #define CONFIG_ENTRY_ACCOUNT_SECTRANSFER "SecureTransfer"
00269
00270
00271
00272 #define CONFIG_GROUP_FILTER "Filter"
00273
00274 #define CONFIG_ENTRY_FILTER_ACTIVE "Active"
00275
00276 #define CONFIG_VALUE_FILTER_OTHERS_ACTION_PASS 1
00277 #define CONFIG_VALUE_FILTER_OTHERS_ACTION_DELETE 2
00278 #define CONFIG_VALUE_FILTER_OTHERS_ACTION_MARK 3
00279 #define CONFIG_VALUE_FILTER_OTHERS_ACTION_MOVE 4
00280 #define CONFIG_VALUE_FILTER_OTHERS_ACTION_SPAMCHECK 5
00281 #define CONFIG_VALUE_FILTER_OTHERS_ACTION_IGNORE 6
00282
00283 #define CONFIG_ENTRY_FILTER_OTHERS_ACTION "ActionForOthers"
00284 #define CONFIG_ENTRY_FILTER_OTHERS_MAILBOX "MailboxForOthers"
00285
00286 #define CONFIG_VALUE_FILTER_BLACKLIST_ACTION_DELETE 1
00287 #define CONFIG_VALUE_FILTER_BLACKLIST_ACTION_MARK 2
00288
00289 #define CONFIG_ENTRY_FILTER_BLACKLIST_ACTION "ActionBlacklist"
00290 #define CONFIG_ENTRY_FILTER_BLACKLIST "Blacklist"
00291 #define CONFIG_ENTRY_FILTER_WHITELIST "Whitelist"
00292 #define CONFIG_ENTRY_FILTER_NUMBER_OF_FILTERS "NumberFilters"
00293
00294
00295 #define CONFIG_ENTRY_FILTER_NAME "Name"
00296 #define CONFIG_ENTRY_FILTER_CRITERIA_LINKAGE "CriteriaLinkage"
00297 #define CONFIG_ENTRY_FILTER_CRITERIA_NUMBER "CriteriaNumber"
00298 #define CONFIG_ENTRY_FILTER_CRITERIA_SOURCE "CriteriaSource"
00299 #define CONFIG_ENTRY_FILTER_CRITERIA_CONDITION "CriteriaCondition"
00300 #define CONFIG_ENTRY_FILTER_CRITERIA_VALUE "CriteriaValue"
00301 #define CONFIG_ENTRY_FILTER_CRITERIA_CASESENSITIVE "CriteriaCaseSensitive"
00302 #define CONFIG_ENTRY_FILTER_ACTION "Action"
00303 #define CONFIG_ENTRY_FILTER_MOVE_MAILBOX "Mailbox"
00304
00305 #define CONFIG_VALUE_FILTER_CRITERIA_LINKAGE_MATCH_ALL 1
00306 #define CONFIG_VALUE_FILTER_CRITERIA_LINKAGE_MATCH_ANY 2
00307
00308 #define CONFIG_VALUE_FILTER_CRITERIA_SOURCE_FROM 1
00309 #define CONFIG_VALUE_FILTER_CRITERIA_SOURCE_TO 2
00310 #define CONFIG_VALUE_FILTER_CRITERIA_SOURCE_SIZE 3
00311 #define CONFIG_VALUE_FILTER_CRITERIA_SOURCE_SUBJECT 4
00312 #define CONFIG_VALUE_FILTER_CRITERIA_SOURCE_HEADER 5
00313 #define CONFIG_VALUE_FILTER_CRITERIA_SOURCE_ACCOUNT 6
00314
00315 #define CONFIG_VALUE_FILTER_CRITERIA_COND_TEXT_CONTAINS 1
00316 #define CONFIG_VALUE_FILTER_CRITERIA_COND_TEXT_NOT_CONTAINS 2
00317 #define CONFIG_VALUE_FILTER_CRITERIA_COND_TEXT_EQUALS 3
00318 #define CONFIG_VALUE_FILTER_CRITERIA_COND_TEXT_NOT_EQUALS 4
00319 #define CONFIG_VALUE_FILTER_CRITERIA_COND_TEXT_REGEXPR 5
00320 #define CONFIG_VALUE_FILTER_CRITERIA_COND_TEXT_NOT_REGEXPR 6
00321
00322 #define CONFIG_VALUE_FILTER_CRITERIA_COND_NUM_EQUAL 1
00323 #define CONFIG_VALUE_FILTER_CRITERIA_COND_NUM_NOT_EQUAL 2
00324 #define CONFIG_VALUE_FILTER_CRITERIA_COND_NUM_GREATER 3
00325 #define CONFIG_VALUE_FILTER_CRITERIA_COND_NUM_GREATER_EQUAL 4
00326 #define CONFIG_VALUE_FILTER_CRITERIA_COND_NUM_LESS 5
00327 #define CONFIG_VALUE_FILTER_CRITERIA_COND_NUM_LESS_EQUAL 6
00328
00329 #define CONFIG_VALUE_FILTER_ACTION_PASS 1
00330 #define CONFIG_VALUE_FILTER_ACTION_DELETE 2
00331 #define CONFIG_VALUE_FILTER_ACTION_MARK 3
00332 #define CONFIG_VALUE_FILTER_ACTION_MOVE 4
00333 #define CONFIG_VALUE_FILTER_ACTION_SPAMCHECK 5
00334 #define CONFIG_VALUE_FILTER_ACTION_IGNORE 6
00335
00336
00337 #define CONFIG_GROUP_SPAMCHECK "Spamcheck"
00338
00339 #define CONFIG_ENTRY_SPAMCHECK_ACTION "Action"
00340 #define CONFIG_ENTRY_SPAMCHECK_MOVE_MAILBOX "Mailbox"
00341
00342 #define CONFIG_VALUE_SPAMCHECK_ACTION_DELETE 2
00343 #define CONFIG_VALUE_SPAMCHECK_ACTION_MARK 3
00344 #define CONFIG_VALUE_SPAMCHECK_ACTION_MOVE 4
00345
00346
00347 #define CONFIG_GROUP_LOG "Log"
00348 #define CONFIG_ENTRY_LOG_LOG_DELETED_MAILS "LogDeletedMails"
00349 #define CONFIG_ENTRY_LOG_LOG_MOVED_MAILS "LogMovedMails"
00350 #define CONFIG_ENTRY_LOG_REMOVE_DELETED_MAILS "RemoveEventOfDeletedMails"
00351 #define CONFIG_ENTRY_LOG_REMOVE_MOVED_MAILS "RemoveEvendOfMovedMails"
00352 #define CONFIG_ENTRY_LOG_HOLDDAYS_DELETED_MAILS "HoldDaysOfDeletedMails"
00353 #define CONFIG_ENTRY_LOG_HOLDDAYS_MOVED_MAILS "HoldDaysOfMovedMails"
00354
00355 #define CONFIG_VALUE_LOG_REMOVE_MAILS_AT_EXIT "exit"
00356 #define CONFIG_VALUE_LOG_REMOVE_MAILS_AFTER_DAYS "days"
00357
00358
00359 #define NAME_SPAMASSASSIN_DAEMON "spamd"
00360 }
00361 #endif