1 /* 2 * Copyright 2010 Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Jonas Sundström, jonas@kirilla.com 7 */ 8 9 10 #include "MessageStatus.h" 11 12 13 MessageStatus::MessageStatus() 14 : 15 fStatus(MAIL_WRITING) 16 { 17 18 } 19 20 21 MessageStatus::~MessageStatus() 22 { 23 24 } 25 26 27 void 28 MessageStatus::SetStatus(messageStatus status) 29 { 30 fStatus = status; 31 } 32 33 34 messageStatus 35 MessageStatus::Status() 36 { 37 return fStatus; 38 } 39 40 41 bool 42 MessageStatus::Reading() 43 { 44 return fStatus == MAIL_READING; 45 } 46 47 48 bool 49 MessageStatus::Writing() 50 { 51 return fStatus == MAIL_WRITING; 52 } 53 54 55 bool 56 MessageStatus::WritingDraft() 57 { 58 return fStatus == MAIL_WRITING_DRAFT; 59 } 60 61 62 bool 63 MessageStatus::Replying() 64 { 65 return fStatus == MAIL_REPLYING; 66 } 67 68 69 bool 70 MessageStatus::Forwarding() 71 { 72 return fStatus == MAIL_FORWARDING; 73 } 74 75 76 bool 77 MessageStatus::Outgoing() 78 { 79 return (fStatus == MAIL_WRITING 80 || fStatus == MAIL_WRITING_DRAFT 81 || fStatus == MAIL_REPLYING 82 || fStatus == MAIL_FORWARDING); 83 } 84 85 86 bool 87 MessageStatus::MailIsOnDisk() 88 { 89 return (fStatus == MAIL_READING 90 || fStatus == MAIL_WRITING_DRAFT 91 || fStatus == MAIL_REPLYING 92 || fStatus == MAIL_FORWARDING); 93 } 94 95