示例#1
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     // send Z-Push version and user agent to ZCP >7.2.0
     if ($this->checkMapiExtVersion('7.2.0')) {
         $this->session = mapi_logon_zarafa(USERNAME, PASSWORD, SERVER, CERTIFICATE, CERTIFICATE_PASSWORD, 0, self::VERSION, self::NAME . " " . self::VERSION);
     } else {
         $this->session = mapi_logon_zarafa(USERNAME, PASSWORD, SERVER, CERTIFICATE, CERTIFICATE_PASSWORD, 0);
     }
     if (mapi_last_hresult()) {
         $this->Terminate(sprintf("Kopano: login failed with error code: 0x%08X", mapi_last_hresult()));
     }
     $this->mainUser = USERNAME;
     $this->targetStore = HIDDEN_FOLDERSTORE;
     $this->defaultstore = $this->openMessageStore($this->mainUser);
     $this->store = $this->openMessageStore(HIDDEN_FOLDERSTORE);
     $this->folderCache = array();
     $this->storeCache = array();
     $this->mapiprops = array("chunktype" => "PT_STRING8:PSETID_Appointment:0x6822", "chunkCRC" => "PT_STRING8:PSETID_Appointment:0x8208", "createtime" => "PT_SYSTIME:PSETID_Appointment:0x820d", "updatetime" => "PT_SYSTIME:PSETID_Appointment:0x820e", "reminderset" => "PT_BOOLEAN:PSETID_Common:0x8503", "isrecurring" => "PT_BOOLEAN:PSETID_Appointment:0x8223", "busystatus" => "PT_LONG:PSETID_Appointment:0x8205");
     $this->mapiprops = getPropIdsFromStrings($this->store, $this->mapiprops);
 }