| | 1554 | void CCalendarProtocol::GetScheduleInboxOutbox(cdstring& inboxURI, cdstring& outboxURI) |
| | 1555 | { |
| | 1556 | // Do nothing if not available |
| | 1557 | if (!GetHasScheduling()) |
| | 1558 | return; |
| | 1559 | |
| | 1560 | // Must block |
| | 1561 | cdmutex::lock_cdmutex _lock(_mutex); |
| | 1562 | |
| | 1563 | // Verify its still active because mutex wait could have resulted in closure |
| | 1564 | if (!IsLoggedOn()) |
| | 1565 | return; |
| | 1566 | |
| | 1567 | // Send command to server |
| | 1568 | // Calendar will take care of recovery |
| | 1569 | mClient->_GetScheduleInboxOutbox(mStoreRoot, inboxURI, outboxURI); |
| | 1570 | } |
| | 1571 | |
| | 1572 | void CCalendarProtocol::Schedule(const cdstring& outboxURI, |
| | 1573 | const cdstring& originator, |
| | 1574 | const cdstrvect& recipients, |
| | 1575 | const iCal::CICalendar& cal, |
| | 1576 | iCal::CITIPScheduleResultsList& results) |
| | 1577 | { |
| | 1578 | // Do nothing if not available |
| | 1579 | if (!GetHasScheduling()) |
| | 1580 | return; |
| | 1581 | |
| | 1582 | // Must block |
| | 1583 | cdmutex::lock_cdmutex _lock(_mutex); |
| | 1584 | |
| | 1585 | // Verify its still active because mutex wait could have resulted in closure |
| | 1586 | if (!IsLoggedOn()) |
| | 1587 | return; |
| | 1588 | |
| | 1589 | // Send command to server |
| | 1590 | // Calendar will take care of recovery |
| | 1591 | mClient->_Schedule(outboxURI, originator, recipients, cal, results); |
| | 1592 | } |
| | 1593 | |
| | 1594 | void CCalendarProtocol::GetFreeBusyCalendars(cdstrvect& calendars) |
| | 1595 | { |
| | 1596 | // Do nothing if not available |
| | 1597 | if (!GetHasScheduling()) |
| | 1598 | return; |
| | 1599 | |
| | 1600 | // Must block |
| | 1601 | cdmutex::lock_cdmutex _lock(_mutex); |
| | 1602 | |
| | 1603 | // Verify its still active because mutex wait could have resulted in closure |
| | 1604 | if (!IsLoggedOn()) |
| | 1605 | return; |
| | 1606 | |
| | 1607 | // Send command to server |
| | 1608 | mClient->_GetFreeBusyCalendars(calendars); |
| | 1609 | } |
| | 1610 | |
| | 1611 | void CCalendarProtocol::SetFreeBusyCalendars(const cdstrvect& calendars) |
| | 1612 | { |
| | 1613 | // Do nothing if not available |
| | 1614 | if (!GetHasScheduling()) |
| | 1615 | return; |
| | 1616 | |
| | 1617 | // Must block |
| | 1618 | cdmutex::lock_cdmutex _lock(_mutex); |
| | 1619 | |
| | 1620 | // Verify its still active because mutex wait could have resulted in closure |
| | 1621 | if (!IsLoggedOn()) |
| | 1622 | return; |
| | 1623 | |
| | 1624 | // Send command to server |
| | 1625 | mClient->_SetFreeBusyCalendars(calendars); |
| | 1626 | } |
| | 1627 | |