iCalendar创建:RFC 5546解释 [英] iCalendar creation: RFC 5546 explanation

查看:325
本文介绍了iCalendar创建:RFC 5546解释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我面临与创建ICS文件相关的几个问题,该文件必须与多个客户端兼容,尤其是 iOS Gmail Outlook Android Windows Phone 。谷歌搜索,我发现了2009年提出的标准,又名 RFC5546 。我仔细阅读了这篇文章,发现了一个非常有趣的观点,可以解决我的问题。第 VEVENT日历组件的方法部分解释了方法REQUEST和PUBLISH之间的区别。但是,有几点对我来说并不是很清楚:

I am facing several issues related to the creation of an ICS file which has to be compatible with several clients, especially iOS, Gmail, Outlook, Android and Windows Phone. Googling around, I found out the proposed standard from 2009, aka RFC5546. I read through this document and found a point which is very interesting and could potentially solve my issue. Section Methods for VEVENT Calendar Components explains the distinctions between methods REQUEST and PUBLISH. But, there are a couple of points which are not really clear to me:


  1. PUBLISH应该做什么?它应该添加新日历吗?它应该创建一个新日历(如在Outlook或iOS中)还是应该在现有用户日历中添加事件(如在Gmail或Lightning中)? 编辑:将日历记录为附加到电子邮件的文件。

  2. PUBLISH可以包含多个事件吗?从文档和逻辑上,是的,但Gmail然后只添加列表的第一个事件。 Lightning只添加一个事件,然后发出804a0004错误。

  3. REQUEST如何工作?该文件规定: VEVENT | 1+ |所有组件必须具有相同的UID。这意味着日历可能具有多于1个VEVENT但它们必须具有相同的UID。然后,我如何区分这些事件?事实上,我尝试的客户端无法区分使用相同UID生成的事件,但它们只添加了SEQUENCE最高的事件。从逻辑上讲,我不希望每个邀请发送多个事件,但RFC允许我这样做(在我想要的案例研究中),那么如何?

  4. With请求,忘记语句 VEVENT | 1+ |所有组件必须具有相同的UID。,因此为ICS文件中的每个事件提供唯一的UID,Gmail和iOS添加文件中包含的所有事件,而Lightning和Outlook仅添加第一个。有没有办法追求这条道路,或者因为不应该允许我找到另一种方式?

  5. 基本上,你如何建议继续使用单个ICS文件添加更多事件我提到的平台的用户日历?

  1. What should PUBLISH do? Should it add a new calendar? Should it create a new calendar (like in Outlook or iOS) or should add the event in the existing user calendar (like in Gmail or Lightning)? note the calendar as a file attached to an e-mail.
  2. Can PUBLISH contain more than one event? From the document and logically, yes, but Gmail then adds only the first event of the list. Lightning adds only one event and then gives a 804a0004 error.
  3. How should REQUEST work? The document states: VEVENT | 1+ | All components MUST have the same UID. which means a calendar may have more than 1 VEVENT but they must have the same UID. Then, how can I client distinguish between those events? And in fact no client I tried is able to distinguish the events generated with the same UID, but they add only the one with highest SEQUENCE. Logically, I don't want to send more than one event per invitation, but the RFC allows me to do that (and in my case study I want to), so how?
  4. With REQUEST, forgetting the statement VEVENT | 1+ | All components MUST have the same UID., so providing a unique UID to each event in the ICS file, Gmail and iOS add all the events contained in the file, while Lightning and Outlook add only the first one. Is there a way to pursue this path or since it should not be allowed I should find another way?
  5. Basically, how do you suggest to proceed to add more events with a single ICS file to the users' calendar for the platforms I mentioned?

PUBLISH的样本ICS:

Sample ICS for PUBLISH:

BEGIN:VCALENDAR
PRODID:-//prodid//product//IT
VERSION:2.0
METHOD:PUBLISH
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:uid1
DTSTAMP:20130515T121437Z
DTSTART:20130619T205000
DTEND:20130619T215000
DESCRIPTION:Desc 1
SUMMARY:Sum 1
LOCATION:location
ORGANIZER:mailto:organizer@somedomain
SEQUENCE:1
STATUS:CONFIRMED
END:VEVENT
BEGIN:VEVENT
UID:uid2
DTSTAMP:20130515T121437Z
DTSTART:20130719T205000
DTEND:20130719T215000
DESCRIPTION:Desc 2
SUMMARY:Sum 2
LOCATION:location
ORGANIZER:mailto:organizer@somedomain
SEQUENCE:1
STATUS:CONFIRMED
END:VEVENT
END:VCALENDAR

REQUEST的样本:

Sample for REQUEST:

BEGIN:VCALENDAR
PRODID:-//prodid//product//IT
VERSION:2.0
METHOD:REQUEST
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:uid1
DTSTAMP:20130515T121437Z
DTSTART:20130619T205000
DTEND:20130619T215000
DESCRIPTION:Desc 1
SUMMARY:Sum 1
LOCATION:location
ORGANIZER:mailto:organizer@somedomain
ATTENDEE;RSVP=TRUE;CN=attendee cn:mailto:attendee@email
SEQUENCE:1
STATUS:CONFIRMED
END:VEVENT
BEGIN:VEVENT
UID:uid2
DTSTAMP:20130515T121437Z
DTSTART:20130719T205000
DTEND:20130719T215000
DESCRIPTION:Desc 2
SUMMARY:Sum 2
LOCATION:location
ORGANIZER:mailto:organizer@somedomain
ATTENDEE;RSVP=TRUE;CN=attendee cn:mailto:attendee@email
SEQUENCE:1
STATUS:CONFIRMED
END:VEVENT
END:VCALENDAR


推荐答案

关于1)它我不清楚如何将事件传达给客户:是通过iMIP(电子邮件)还是通过HTTP URL?在任何情况下,你的问题都没有正确的答案:iTIP是关于iCalendar数据的传输。

About 1) it is not clear how you communicate the events to the client: is it via iMIP (email) or through an HTTP URL ? In any case, there is no right answer to your question: iTIP is about transport of iCalendar data.

关于2)是的,你可以在PUBLISH流中有多个事件

About 2) yes, you can have multiple events in a PUBLISH stream

关于3):

iCalendar对定期会议有一个例外概念。这些异常由具有相同UID的VEVENT和表示将被视为异常的特定实例的RECURRENCE-ID表示。

iCalendar has a notion of exception for recurring meetings. Those exceptions are represented by a VEVENT with the same UID and a RECURRENCE-ID indicating the particular instance that shall be considered an exception.

因此,REQUEST只能用于传输单个事件(仅一个UID),但此事件本身可能表示为一组VEVENT:一个用于主服务器(例如每周五10:00开会)和一个用于每个例外(例如除了周五12) / 12它将在09:00发生。

As a consequence, a REQUEST can only be used to transmit a single event (only one UID) but this event itself might be expressed as a set of VEVENT: one for the master (e.g. meeting every friday at 10:00) and one for each exception (e.g. except on Friday 12/12 where it will take place at 09:00).

例如参见 http://tools.ietf.org/html/rfc5546#section-4.4.8

这篇关于iCalendar创建:RFC 5546解释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆