Back to index

d-push  2.0
syncmeetingrequestrecurrence.php
Go to the documentation of this file.
00001 <?php
00002 /***********************************************
00003 * File      :   syncmeetingrequestrecurrence.php
00004 * Project   :   Z-Push
00005 * Descr     :   WBXML meeting request recurrence entities
00006 *               that can be parsed directly (as a stream)
00007 *               from WBXML.
00008 *               It is automatically decoded
00009 *               according to $mapping,
00010 *               and the Sync WBXML mappings.
00011 *
00012 * Created   :   05.09.2011
00013 *
00014 * Copyright 2007 - 2011 Zarafa Deutschland GmbH
00015 *
00016 * This program is free software: you can redistribute it and/or modify
00017 * it under the terms of the GNU Affero General Public License, version 3,
00018 * as published by the Free Software Foundation with the following additional
00019 * term according to sec. 7:
00020 *
00021 * According to sec. 7 of the GNU Affero General Public License, version 3,
00022 * the terms of the AGPL are supplemented with the following terms:
00023 *
00024 * "Zarafa" is a registered trademark of Zarafa B.V.
00025 * "Z-Push" is a registered trademark of Zarafa Deutschland GmbH
00026 * The licensing of the Program under the AGPL does not imply a trademark license.
00027 * Therefore any rights, title and interest in our trademarks remain entirely with us.
00028 *
00029 * However, if you propagate an unmodified version of the Program you are
00030 * allowed to use the term "Z-Push" to indicate that you distribute the Program.
00031 * Furthermore you may use our trademarks where it is necessary to indicate
00032 * the intended purpose of a product or service provided you use it in accordance
00033 * with honest practices in industrial or commercial matters.
00034 * If you want to propagate modified versions of the Program under the name "Z-Push",
00035 * you may only do so if you have a written permission by Zarafa Deutschland GmbH
00036 * (to acquire a permission please contact Zarafa at trademark@zarafa.com).
00037 *
00038 * This program is distributed in the hope that it will be useful,
00039 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00040 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00041 * GNU Affero General Public License for more details.
00042 *
00043 * You should have received a copy of the GNU Affero General Public License
00044 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00045 *
00046 * Consult LICENSE file for details
00047 ************************************************/
00048 
00049 
00050 class SyncMeetingRequestRecurrence extends SyncObject {
00051     public $type;
00052     public $until;
00053     public $occurrences;
00054     public $interval;
00055     public $dayofweek;
00056     public $dayofmonth;
00057     public $weekofmonth;
00058     public $monthofyear;
00059 
00060     function SyncMeetingRequestRecurrence() {
00061         $mapping = array (
00062                     // Recurrence type
00063                     // 0 = Recurs daily
00064                     // 1 = Recurs weekly
00065                     // 2 = Recurs monthly
00066                     // 3 = Recurs monthly on the nth day
00067                     // 5 = Recurs yearly
00068                     // 6 = Recurs yearly on the nth day
00069                     SYNC_POOMMAIL_TYPE                                  => array (  self::STREAMER_VAR      => "type",
00070                                                                                     self::STREAMER_CHECKS   => array(   self::STREAMER_CHECK_REQUIRED   => self::STREAMER_CHECK_SETZERO,
00071                                                                                                                         self::STREAMER_CHECK_ONEVALUEOF => array(0,1,2,3,5,6) )),
00072 
00073                     SYNC_POOMMAIL_UNTIL                                 => array (  self::STREAMER_VAR      => "until",
00074                                                                                     self::STREAMER_TYPE     => self::STREAMER_TYPE_DATE),
00075 
00076                     SYNC_POOMMAIL_OCCURRENCES                           => array (  self::STREAMER_VAR      => "occurrences",
00077                                                                                     self::STREAMER_CHECKS   => array(   self::STREAMER_CHECK_CMPHIGHER  => 0,
00078                                                                                                                         self::STREAMER_CHECK_CMPLOWER   => 1000 )),
00079 
00080                     SYNC_POOMMAIL_INTERVAL                              => array (  self::STREAMER_VAR      => "interval",
00081                                                                                     self::STREAMER_CHECKS   => array(   self::STREAMER_CHECK_CMPHIGHER  => 0,
00082                                                                                                                         self::STREAMER_CHECK_CMPLOWER   => 1000 )),
00083 
00084                     // DayOfWeek values
00085                     //   1 = Sunday
00086                     //   2 = Monday
00087                     //   4 = Tuesday
00088                     //   8 = Wednesday
00089                     //  16 = Thursday
00090                     //  32 = Friday
00091                     //  62 = Weekdays  // TODO check: value set by WA with daily weekday recurrence
00092                     //  64 = Saturday
00093                     // 127 = The last day of the month. Value valid only in monthly or yearly recurrences.
00094                     SYNC_POOMMAIL_DAYOFWEEK                             => array (  self::STREAMER_VAR      => "dayofweek",
00095                                                                                     self::STREAMER_CHECKS   => array(   self::STREAMER_CHECK_ONEVALUEOF => array(1,2,4,8,16,32,62,64,127) )),
00096 
00097                     // DayOfMonth values
00098                     // 1-31 representing the day
00099                     SYNC_POOMMAIL_DAYOFMONTH                            => array (  self::STREAMER_VAR      => "dayofmonth",
00100                                                                                     self::STREAMER_CHECKS   => array(   self::STREAMER_CHECK_CMPHIGHER  => 0,
00101                                                                                                                         self::STREAMER_CHECK_CMPLOWER   => 32 )),
00102 
00103                     // WeekOfMonth
00104                     // 1-4 = Y st/nd/rd/th week of month
00105                     // 5 = last week of month
00106                     SYNC_POOMMAIL_WEEKOFMONTH                           => array (  self::STREAMER_VAR      => "weekofmonth",
00107                                                                                     self::STREAMER_CHECKS   => array(   self::STREAMER_CHECK_ONEVALUEOF => array(1,2,3,4,5) )),
00108 
00109                     // MonthOfYear
00110                     // 1-12 representing the month
00111                     SYNC_POOMMAIL_MONTHOFYEAR                           => array (  self::STREAMER_VAR      => "monthofyear",
00112                                                                                     self::STREAMER_CHECKS   => array(   self::STREAMER_CHECK_ONEVALUEOF => array(1,2,3,4,5,6,7,8,9,10,11,12) )),
00113                 );
00114 
00115         parent::SyncObject($mapping);
00116     }
00117 }
00118 
00119 ?>