Skip to content

Commit

Permalink
[TIMOB-23206] iOS: Expose calendar source constants
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelkPetkov committed Aug 10, 2016
1 parent d8fc6ca commit d9b3c93
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
42 changes: 42 additions & 0 deletions apidoc/Titanium/Calendar/Calendar.yml
Expand Up @@ -607,6 +607,48 @@ properties:
platforms: [iphone, ipad]
since: "6.0.0"

- name: SOURCE_TYPE_LOCAL
summary: A local calendar source.
type: Number
permission: read-only
platforms: [iphone, ipad]
since: "6.1.0"

- name: SOURCE_TYPE_EXCHANGE
summary: A microsoft exchange calendar source.
type: Number
permission: read-only
platforms: [iphone, ipad]
since: "6.1.0"

- name: SOURCE_TYPE_CALDAV
summary: A calDev calendar source.
type: Number
permission: read-only
platforms: [iphone, ipad]
since: "6.1.0"

- name: SOURCE_TYPE_MOBILEME
summary: A mobileMe calendar source.
type: Number
permission: read-only
platforms: [iphone, ipad]
since: "6.1.0"

- name: SOURCE_TYPE_SUBSCRIBED
summary: A subscribed calendar source.
type: Number
permission: read-only
platforms: [iphone, ipad]
since: "6.1.0"

- name: SOURCE_TYPE_BIRTHDAYS
summary: A birthday calendar source.
type: Number
permission: read-only
platforms: [iphone, ipad]
since: "6.1.0"

- name: eventsAuthorization
summary: Returns an authorization constant indicating if the application has access to the events in the EventKit.
description: |
Expand Down
1 change: 1 addition & 0 deletions apidoc/Titanium/Calendar/CalendarProxy.yml
Expand Up @@ -126,6 +126,7 @@ properties:
type: Number
permission: read-only
since: "6.1.0"
constants: Titanium.Calendar.SOURCE_TYPE_*
platforms: [iphone, ipad]

- name: sourceIdentifier
Expand Down
6 changes: 6 additions & 0 deletions iphone/Classes/CalendarModule.h
Expand Up @@ -68,6 +68,12 @@
@property (nonatomic, readonly)NSNumber* ATTENDEE_TYPE_RESOURCE;
@property (nonatomic, readonly)NSNumber* ATTENDEE_TYPE_GROUP;

@property (nonatomic, readonly)NSNumber* SOURCE_TYPE_LOCAL;
@property (nonatomic, readonly)NSNumber* SOURCE_TYPE_EXCHANGE;
@property (nonatomic, readonly)NSNumber* SOURCE_TYPE_CALDAV;
@property (nonatomic, readonly)NSNumber* SOURCE_TYPE_MOBILEME;
@property (nonatomic, readonly)NSNumber* SOURCE_TYPE_SUBSCRIBED;
@property (nonatomic, readonly)NSNumber* SOURCE_TYPE_BIRTHDAYS;

@end

Expand Down
6 changes: 6 additions & 0 deletions iphone/Classes/CalendarModule.m
Expand Up @@ -348,6 +348,12 @@ -(NSNumber*) calendarAuthorization
MAKE_SYSTEM_PROP(ATTENDEE_TYPE_RESOURCE, EKParticipantTypeResource);
MAKE_SYSTEM_PROP(ATTENDEE_TYPE_GROUP, EKParticipantTypeGroup);

MAKE_SYSTEM_PROP(SOURCE_TYPE_LOCAL, EKSourceTypeLocal);
MAKE_SYSTEM_PROP(SOURCE_TYPE_EXCHANGE, EKSourceTypeExchange);
MAKE_SYSTEM_PROP(SOURCE_TYPE_CALDAV, EKSourceTypeCalDAV);
MAKE_SYSTEM_PROP(SOURCE_TYPE_MOBILEME, EKSourceTypeMobileMe);
MAKE_SYSTEM_PROP(SOURCE_TYPE_SUBSCRIBED, EKSourceTypeSubscribed);
MAKE_SYSTEM_PROP(SOURCE_TYPE_BIRTHDAYS, EKSourceTypeBirthdays);
@end

#endif

0 comments on commit d9b3c93

Please sign in to comment.