| 1 | /* |
| 2 | ** CWFolderInformation.h |
| 3 | ** |
| 4 | ** Copyright (c) 2002-2004 Ludovic Marcotte |
| 5 | ** Copyright (C) 2017-2018 Riccardo Mottola |
| 6 | ** |
| 7 | ** Author: Ludovic Marcotte <[email protected]> |
| 8 | ** Riccardo Mottola <[email protected]> |
| 9 | ** |
| 10 | ** This library is free software; you can redistribute it and/or |
| 11 | ** modify it under the terms of the GNU Lesser General Public |
| 12 | ** License as published by the Free Software Foundation; either |
| 13 | ** version 2.1 of the License, or (at your option) any later version. |
| 14 | ** |
| 15 | ** This library is distributed in the hope that it will be useful, |
| 16 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 | ** Lesser General Public License for more details. |
| 19 | ** |
| 20 | ** You should have received a copy of the GNU General Public License |
| 21 | ** along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 22 | */ |
| 23 | |
| 24 | #ifndef _Pantomime_H_CWFolderInformation |
| 25 | #define _Pantomime_H_CWFolderInformation |
| 26 | |
| 27 | #import <Foundation/NSObject.h> |
| 28 | #import <Pantomime/CWConstants.h> |
| 29 | |
| 30 | /*! |
| 31 | @class CWFolderInformation |
| 32 | @discussion This class provides a container to cache folder information like |
| 33 | the number of messages and unread messages the folder holds, and |
| 34 | its total size. Normally you won't use this class directly but |
| 35 | CWFolder's subclasses return instances of this class, when |
| 36 | calling -folderStatus on a CWFolder instance. |
| 37 | */ |
| 38 | @interface CWFolderInformation : NSObject |
| 39 | { |
| 40 | @private |
| 41 | NSUInteger _nb_of_messages; |
| 42 | NSUInteger _nb_of_unread_messages; |
| 43 | NSUInteger _size; |
| 44 | } |
| 45 | |
| 46 | /*! |
| 47 | @method nbOfMessages |
| 48 | @discussion This method is used to get the total number of messages value |
| 49 | from this container object. |
| 50 | @result The total number of messages. |
| 51 | */ |
| 52 | - (NSUInteger) nbOfMessages; |
| 53 | |
| 54 | /*! |
| 55 | @method setNbOfMessages: |
| 56 | @discussion This method is used to set the total number of messages |
| 57 | of this container object. |
| 58 | @param theValue The number of messages. |
| 59 | */ |
| 60 | - (void) setNbOfMessages: (NSUInteger) theValue; |
| 61 | |
| 62 | /*! |
| 63 | @method nbOfUnreadMessages |
| 64 | @discussion This method is used to get the total number of unread messages value |
| 65 | from this container object. |
| 66 | @result The total number of unread messages. |
| 67 | */ |
| 68 | - (NSUInteger) nbOfUnreadMessages; |
| 69 | |
| 70 | /*! |
| 71 | @method setNbOfUnreadMessages: |
| 72 | @discussion This method is used to set the total number of unread messages |
| 73 | of this container object. |
| 74 | @param theValue The number of unread messages. |
| 75 | */ |
| 76 | - (void) setNbOfUnreadMessages: (NSUInteger) theValue; |
| 77 | |
| 78 | /*! |
| 79 | @method size |
| 80 | @discussion This method is used to get the total size of this container object. |
| 81 | @result The total size. |
| 82 | */ |
| 83 | - (NSUInteger) size; |
| 84 | |
| 85 | /*! |
| 86 | @method setSize: |
| 87 | @discussion This method is used to set the total size of this container object. |
| 88 | @param theSize The total size. |
| 89 | */ |
| 90 | - (void) setSize: (NSUInteger) theSize; |
| 91 | |
| 92 | @end |
| 93 | |
| 94 | #endif // _Pantomime_H_CWFolderInformation |