-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
TiCalendarCalendar.h
52 lines (43 loc) · 1.64 KB
/
TiCalendarCalendar.h
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
/**
* Titanium SDK
* Copyright TiDev, Inc. 04/07/2022-Present. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#ifdef USE_TI_CALENDAR
@import JavaScriptCore;
@import TitaniumKit.ObjcProxy;
@import EventKit;
@class CalendarModule;
@class TiCalendarEvent;
@protocol TiCalendarCalendarExports <JSExport>
// properties (and accessors)
READONLY_PROPERTY(bool, hidden, Hidden);
READONLY_PROPERTY(NSString *, id, Id);
READONLY_PROPERTY(NSString *, name, Name);
// READONLY_PROPERTY(BOOL, selected, Selected); // not implemented on iOS
READONLY_PROPERTY(NSString *, sourceIdentifier, SourceIdentifier);
READONLY_PROPERTY(NSString *, sourceTitle, SourceTitle);
READONLY_PROPERTY(EKSourceType, sourceType, SourceType);
// methods
- (TiCalendarEvent *)createEvent:(NSDictionary *)properties;
- (TiCalendarEvent *)getEventById:(NSString *)eventId;
JSExportAs(getEventsBetweenDates,
-(NSArray *)getEventsBetweenDates
: (NSDate *)date1 endDate
: (NSDate *)date2);
@end
@interface TiCalendarCalendar : ObjcProxy <TiCalendarCalendarExports> {
@private
EKCalendar *calendar;
NSString *calendarId;
CalendarModule *module;
}
@property (readonly, nonatomic) EKCalendar *calendar;
/**
@deprecated Only here for backwards compatibility with SDK < 8.1.0. Use `initWithCalendar:module:` instead.
*/
- (id)_initWithPageContext:(id<TiEvaluator>)context calendar:(EKCalendar *)calendar_ module:(CalendarModule *)module_ __attribute__((deprecated));
- (id)initWithCalendar:(EKCalendar *)calendar_ module:(CalendarModule *)module_;
@end
#endif