This file is indexed.

/usr/include/mimetic/rfc822/datetime.h is in libmimetic-dev 0.9.8-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/***************************************************************************
    copyright            : (C) 2002-2008 by Stefano Barbato
    email                : stefano@codesink.org

    $Id: datetime.h,v 1.13 2008-10-07 11:06:26 tat Exp $
 ***************************************************************************/
#ifndef _MIMETIC_RFC822_DATETIME_H
#define _MIMETIC_RFC822_DATETIME_H
#include <string>
#include <iostream>
#include <mimetic/strutils.h>
#include <mimetic/rfc822/fieldvalue.h>

namespace mimetic
{


/// RFC822 DateTime field representation
struct DateTime: public FieldValue
{
    struct DayOfWeek {
        enum DayName { mnShort = 0, mnLong = 1 };
        DayOfWeek(int iDayOfWeek);
        DayOfWeek(const std::string&);
        bool operator==(const std::string&);
        bool operator==(int iDayOfWeek);
        std::string name(bool longName = false) const;
        short ordinal() const;
    private:
        static const char *ms_label[][2];
        short m_iDayOfWeek;
    };
    struct Month {
        enum MonthName { mnShort = 0, mnLong = 1 };
        Month(int iMonth);
        Month(const std::string& );
        bool operator==(const std::string& ) const;
        bool operator==(int iMonth) const;
        std::string name(bool longName = false) const;
        short ordinal() const;
    private:
        static const char *ms_label[][2];
        short m_iMonth;
    };
    struct Zone {
        Zone(int iZone);
        Zone(const std::string& );
        bool operator==(const std::string&);
        bool operator==(int iZone);
        std::string name() const;
        short ordinal() const;
    private:
        static int ms_offset[];
        static const char *ms_label[];
        short m_iZone, m_iZoneIdx;
        std::string m_sZone;
    };

    // DateTime
    enum {
        Jan = 1, Feb, Mar, Apr, May, Jun, Jul,
        Aug, Sep, Oct, Nov, Dec
    };
    enum {
        Mon = 1, Tue, Wed, Thu, Fri, Sat, Sun
    };

    enum {
        GMT    = +000,
        UT     = +000,
        BST     = +100,
        CET    = +100,
        MET    = +100,
        EET    = +200,
        IST    = +200,
        METDST= +200,
        EDT    = -400,
        CDT    = -500,
        EST    = -500,
        CST    = -600,
        MDT    = -600,
        MST    = -700,
        PDT    = -700,
        HKT    = +800,
        PST    = -800,
        JST    = +900
    };
    DateTime();
    DateTime(const char*);
    DateTime(const std::string&);
    DayOfWeek dayOfWeek() const;
    short day() const;
    Month month() const;
    short year() const;
    short hour() const;
    short minute() const;
    short second() const;
    Zone zone() const;
    std::string str() const;
    friend std::ostream& operator<<(std::ostream&, const DateTime&);
protected:
    FieldValue* clone() const;
private:
    void set(const std::string&);
    mutable int m_iDayOfWeek;
    int m_iDay, m_iMonth, m_iYear;
    int m_iHour, m_iMinute, m_iSecond;
    std::string m_zone;
};


}

#endif