1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 
6 #ifndef CALDURATION_H_
7 #define CALDURATION_H_
8 
9 #include "calIDuration.h"
10 
11 extern "C" {
12 #include "ical.h"
13 }
14 
15 class calDuration final : public calIDurationLibical {
16  public:
17   calDuration();
18   calDuration(const calDuration& cdt);
19   explicit calDuration(const struct icaldurationtype* const aDurationPtr);
20 
21   // nsISupports interface
22   NS_DECL_ISUPPORTS
23 
24   // calIDateTime interface
25   NS_DECL_CALIDURATION
26   NS_DECL_CALIDURATIONLIBICAL
27 
28  protected:
~calDuration()29   ~calDuration() {}
30   bool mImmutable;
31 
32   struct icaldurationtype mDuration;
33 
34   void FromIcalDuration(const struct icaldurationtype* const icald);
35 };
36 
37 #endif /* CALDURATION_H_ */
38