bincimap

Log | Files | Refs | LICENSE

status.h (2346B)


      1 /* -*- Mode: c++; -*- */
      2 /*  --------------------------------------------------------------------
      3  *  Filename:
      4  *    src/mailbox/status.h
      5  *  
      6  *  Description:
      7  *    Declaration of the Status class.
      8  *
      9  *  Authors:
     10  *    Andreas Aardal Hanssen <andreas-binc curly bincimap spot org>
     11  *
     12  *  Bugs:
     13  *
     14  *  ChangeLog:
     15  *
     16  *  --------------------------------------------------------------------
     17  *  Copyright 2002-2005 Andreas Aardal Hanssen
     18  *
     19  *  This program is free software; you can redistribute it and/or modify
     20  *  it under the terms of the GNU General Public License as published by
     21  *  the Free Software Foundation; either version 2 of the License, or
     22  *  (at your option) any later version.
     23  *
     24  *  This program is distributed in the hope that it will be useful,
     25  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     26  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     27  *  GNU General Public License for more details.
     28  *
     29  *  You should have received a copy of the GNU General Public License
     30  *  along with this program; if not, write to the Free Software
     31  *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
     32  *  --------------------------------------------------------------------
     33  */
     34 #ifdef HAVE_CONFIG_H
     35 #include <config.h>
     36 #endif
     37 
     38 #ifndef status_h_included
     39 #define status_h_included
     40 
     41 namespace Binc {
     42 
     43   //------------------------------------------------------------------------
     44   class Status {
     45 
     46     //--
     47     int recent;
     48     int messages;
     49     int unseen;
     50     int uidvalidity;
     51     int uidnext;
     52 
     53     //--
     54     int statusid;
     55 
     56   public:
     57 
     58     //--
     59     inline void setMessages(int i)  { messages = i; }
     60     inline void setRecent(int i) { recent = i; }
     61     inline void setStatusID(int i) { statusid = i; }
     62     inline void setUnseen(int i) { unseen = i; }
     63     inline void setUidValidity(int i) { uidvalidity = i; }
     64     inline void setUidNext(int i) { uidnext = i; }
     65     
     66     //--
     67     inline int getMessages(void) const { return messages; }
     68     inline int getRecent(void) const { return recent; }
     69     inline int getStatusID(void) const { return statusid; }
     70     inline int getUnseen(void) const { return unseen; }
     71     inline int getUidValidity(void) const { return uidvalidity; }
     72     inline int getUidNext(void) const { return uidnext; }
     73 
     74 
     75     //--
     76     Status(void);
     77     ~Status(void);
     78   };
     79 }
     80 
     81 #endif