Commit 1cc8cbbb authored by Mark Stenglein's avatar Mark Stenglein
Browse files

Start adding DelegatorsParam

- Going to need to work on getting the ability to add with a string
  or a string[]. Might just make it only work with Array and go back
  to clean up the API later.
parent c5d0413e
......@@ -261,6 +261,32 @@ the same as they would the UNKNOWN value.
- `ATTENDEE;CUTYPE=GROUP:mailto:ietf-calsch@example.org`
### 3.2.4. Delegators
- Purpose: To specify the calendar users that have delegated their
participation to the calendar user specified by the property.
- Format Definition: This property parameter is defined by the following
notation:
> ```
> delfromparam = "DELEGATED-FROM" "=" DQUOTE cal-address
> DQUOTE *("," DQUOTE cal-address DQUOTE)
> ```
- Description: This parameter can be specified on properties with a
CAL-ADDRESS value type. This parameter specifies those calendar
users that have delegated their participation in a group-scheduled
event or to-do to the calendar user specified by the property.
The individual calendar address parameter values MUST each be
specified in a quoted-string.
- Example:
> ```
> ATTENDEE;DELEGATED-FROM="mailto:jsmith@example.com":mailto:
> jdoe@example.com
> ```
### 3.2.5. Delegatees
### 3.2.6. Directory Entry Reference
### 3.2.7. Inline Encoding
......
/*
* lib-ical
* Copyright (C) 2017 Mark Stenglein
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import Parameter from "./Parameter";
export default class DelegatorsParam extends Parameter {
private _delegators: string[];
constructor(delegators: string | string[]) {
super("DELEGATED-FROM", []);
if (Array.isArray(delegators)) {
delegators = (delegators instanceof Array) ? delegators : [delegators];
this._delegators = this._delegators.concat(<string[]>delegators)
}
}
get delegators(): string | string[] {
return this._delegators;
}
set delegators(newDelegators: string | string[]) {
this._delegators = newDelegators;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment