Changeset 96 for Mulberry/branches
- Timestamp:
- 07/09/07 21:40:14 (2 years ago)
- Location:
- Mulberry/branches/v4.1d1/Sources_Common
- Files:
-
- 17 modified
-
Application/Address_Book/CAddressBookViewCommon.cp (modified) (2 diffs)
-
Application/Address_Book_Manager/CAdbkManagerTableCommon.cp (modified) (13 diffs)
-
Application/Preferences/CIdentity.cp (modified) (1 diff)
-
Calendar_Store/Clients/CCalDAVCalendarClient.cpp (modified) (1 diff)
-
Calendar_Store/Clients/CWebDAVCalendarClient.cpp (modified) (1 diff)
-
HTTP/HTTPClient/CHTTPAuthorizationDigest.cpp (modified) (1 diff)
-
HTTP/WebDAVClient/CWebDAVACL.cpp (modified) (1 diff)
-
Mail/Address/CAdbkAddress.cp (modified) (1 diff)
-
Mail/Address/CAddressList.h (modified) (1 diff)
-
Mail/AddressBook/CAddressBook.cp (modified) (3 diffs)
-
Mail/AddressBook/CAddressBookManager.cp (modified) (11 diffs)
-
Mail/Extensions/CAdbkACL.cp (modified) (1 diff)
-
Mail/INET_Clients/IMSP/CIMSPClient.cp (modified) (1 diff)
-
Mail/Protocols/CAdbkProtocol.cp (modified) (17 diffs)
-
Mail/Protocols/CAdbkProtocol.h (modified) (2 diffs)
-
Resources/Alerts.xml (modified) (1 diff)
-
Resources/ErrorDialog.xml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Mulberry/branches/v4.1d1/Sources_Common/Application/Address_Book/CAddressBookViewCommon.cp
r86 r96 131 131 bool CAddressBookView::TestClose() 132 132 { 133 // Can always close remote134 return true;133 // Can always close remote 134 return true; 135 135 } 136 136 … … 301 301 { 302 302 GetAddressBook()->Open(); 303 304 // Start listening to new address book's protocol303 304 // Start listening to new address book's protocol 305 305 GetAddressBook()->GetProtocol()->Add_Listener(this); 306 306 } -
Mulberry/branches/v4.1d1/Sources_Common/Application/Address_Book_Manager/CAdbkManagerTableCommon.cp
r86 r96 215 215 (fullview.GetSingleClickModifiers() == mods)) 216 216 DoFullView(); 217 }218 217 } 218 219 219 // Handle double click 220 220 void CAdbkManagerTable::DoDoubleClick(unsigned long row, const CKeyModifiers& mods) … … 236 236 { 237 237 PreviewAddressBook(); 238 }239 238 } 239 240 240 void CAdbkManagerTable::DoPreview(CAddressBook* adbk) 241 241 { … … 510 510 create.use_search = true; 511 511 512 CAdbkProtocol* proto = NULL;512 CAdbkProtocol* proto = NULL; 513 513 CAddressBook* node = NULL; 514 514 CAddressBook* result = NULL; … … 516 516 517 517 // Determine initial creation type 518 if (IsSelectionValid())519 {518 if (IsSelectionValid()) 519 { 520 520 TableIndexT row = GetFirstSelectedRow(); 521 521 TableIndexT woRow = mCollapsableTree->GetWideOpenIndex(row); … … 550 550 create.use_wd = false; 551 551 } 552 }552 } 553 553 554 554 try … … 578 578 CAddressBook* adbk = NULL; 579 579 580 // Create address book580 // Create address book 581 581 adbk = mManager->NewAddressBook(proto, new_name, create.directory); 582 582 … … 596 596 597 597 result = adbk; 598 }599 }600 catch (...)601 {602 CLOG_LOGCATCH(...);603 }604 }598 } 599 } 600 catch (...) 601 { 602 CLOG_LOGCATCH(...); 603 } 604 } 605 605 606 606 // Open address book 607 607 void CAdbkManagerTable::OnOpenAddressBook(void) 608 608 { 609 // Display each selected address book610 DoToSelection((DoToSelectionPP) &CAdbkManagerTable::OpenAddressBook);609 // Display each selected address book 610 DoToSelection((DoToSelectionPP) &CAdbkManagerTable::OpenAddressBook); 611 611 } 612 612 … … 621 621 return false; 622 622 623 // Open it623 // Open it 624 624 return CAddressBookWindow::OpenWindow(adbk); 625 625 } … … 698 698 for(CAddressBookList::reverse_iterator riter = selected.rbegin(); riter != selected.rend(); riter++) 699 699 mManager->DeleteAddressBook(*riter); 700 }701 }700 } 701 } 702 702 } 703 703 catch (...) … … 705 705 CLOG_LOGCATCH(...); 706 706 } 707 }707 } 708 708 709 709 // Search address books … … 1029 1029 uint32_t woRow = adbk->GetRow(); 1030 1030 TableIndexT exp_row = GetExposedIndex(woRow); 1031 if (exp_row)1031 if (exp_row) 1032 1032 RefreshRow(exp_row); 1033 1033 } … … 1139 1139 CPreferences::sPrefs->mExpandedAdbks.Value().insert(adbk->IsProtocol() ? adbk->GetName() : adbk->GetAccountName()); 1140 1140 } 1141 else1141 else 1142 1142 { 1143 1143 CPreferences::sPrefs->mExpandedAdbks.Value().erase(adbk->IsProtocol() ? adbk->GetName() : adbk->GetAccountName()); … … 1162 1162 if (exp_row) 1163 1163 RefreshRow(exp_row); 1164 }1165 }1164 } 1165 } 1166 1166 1167 1167 void CAdbkManagerTable::ExpandAction(TableIndexT worow, bool deep) -
Mulberry/branches/v4.1d1/Sources_Common/Application/Preferences/CIdentity.cp
r86 r96 911 911 912 912 return NULL; 913 }914 913 } 914 915 915 CIdentity* CIdentityList::GetIdentity(const CCalendarAddress& caladdr) const 916 916 { -
Mulberry/branches/v4.1d1/Sources_Common/Calendar_Store/Clients/CCalDAVCalendarClient.cpp
r86 r96 359 359 if (no_report) 360 360 { 361 for(cdstrvect::const_iterator iter = hrefs.begin(); iter != hrefs.end(); iter++)362 {363 // Read in the component364 ReadCalendarComponent(*iter, cal);365 }361 for(cdstrvect::const_iterator iter = hrefs.begin(); iter != hrefs.end(); iter++) 362 { 363 // Read in the component 364 ReadCalendarComponent(*iter, cal); 365 } 366 366 } 367 367 else 368 368 { 369 // Don't bother with this if empty (actually spec requires at least one href)370 if (hrefs.empty())371 return;372 373 // Run the calendar-multiget report374 cdstring rurl = GetRURL(&node);375 376 // Create WebDAV REPORT377 bool old_style = false;369 // Don't bother with this if empty (actually spec requires at least one href) 370 if (hrefs.empty()) 371 return; 372 373 // Run the calendar-multiget report 374 cdstring rurl = GetRURL(&node); 375 376 // Create WebDAV REPORT 377 bool old_style = false; 378 378 #ifdef OLD_STYLE_CALENDAR_DATA 379 old_style = (GetCalendarProtocol()->GetAccount()->GetName().find("oldstyle") != cdstring::npos);379 old_style = (GetCalendarProtocol()->GetAccount()->GetName().find("oldstyle") != cdstring::npos); 380 380 #endif 381 auto_ptr<http::caldav::CCalDAVMultigetReport> request(new http::caldav::CCalDAVMultigetReport(this, rurl, hrefs, old_style));382 http::CHTTPOutputDataString dout;383 request->SetOutput(&dout);384 385 // Process it386 RunSession(request.get());387 388 // Check response status389 switch(request->GetStatusCode())390 {391 case http::webdav::eStatus_MultiStatus:392 // Do default action393 break;394 default:395 // Handle error and exit here396 HandleHTTPError(request.get());397 return;398 }399 400 http::caldav::CCalDAVReportParser parser(cal);401 parser.ParseData(dout.GetData());381 auto_ptr<http::caldav::CCalDAVMultigetReport> request(new http::caldav::CCalDAVMultigetReport(this, rurl, hrefs, old_style)); 382 http::CHTTPOutputDataString dout; 383 request->SetOutput(&dout); 384 385 // Process it 386 RunSession(request.get()); 387 388 // Check response status 389 switch(request->GetStatusCode()) 390 { 391 case http::webdav::eStatus_MultiStatus: 392 // Do default action 393 break; 394 default: 395 // Handle error and exit here 396 HandleHTTPError(request.get()); 397 return; 398 } 399 400 http::caldav::CCalDAVReportParser parser(cal); 401 parser.ParseData(dout.GetData()); 402 402 } 403 403 } -
Mulberry/branches/v4.1d1/Sources_Common/Calendar_Store/Clients/CWebDAVCalendarClient.cpp
r86 r96 1552 1552 // as we might have a digest re-auth. 1553 1553 if (!first_time) 1554 DisplayHTTPError(request);1554 DisplayHTTPError(request); 1555 1555 } 1556 1556 -
Mulberry/branches/v4.1d1/Sources_Common/HTTP/HTTPClient/CHTTPAuthorizationDigest.cpp
r79 r96 51 51 else 52 52 { 53 os << cHeaderAuthorization << cHeaderDelimiter << "Digest "53 os << cHeaderAuthorization << cHeaderDelimiter << "Digest " 54 54 << "username=\"" << mUser << "\"," << net_endl 55 55 << " realm=\"" << mRealm << "\"," << net_endl -
Mulberry/branches/v4.1d1/Sources_Common/HTTP/WebDAVClient/CWebDAVACL.cpp
r86 r96 112 112 { 113 113 for(CCalendarACLList::const_iterator iter = mCalACLs->begin(); iter != mCalACLs->end(); iter++) 114 {115 // Cannot do if change not allowed116 if (!(*iter).CanChange())117 continue;118 119 // <DAV:ace> element120 (*iter).GenerateACE(&xmldoc, acl, static_cast<const CWebDAVSession*>(GetSession())->HasDAVVersion(CWebDAVSession::eCyrusoftInheritable));114 { 115 // Cannot do if change not allowed 116 if (!(*iter).CanChange()) 117 continue; 118 119 // <DAV:ace> element 120 (*iter).GenerateACE(&xmldoc, acl, static_cast<const CWebDAVSession*>(GetSession())->HasDAVVersion(CWebDAVSession::eCyrusoftInheritable)); 121 121 } 122 122 } -
Mulberry/branches/v4.1d1/Sources_Common/Mail/Address/CAdbkAddress.cp
r86 r96 274 274 result += GetMailAddress(); 275 275 result += ">"; 276 }277 276 } 277 278 278 list.push_back(result); 279 279 } -
Mulberry/branches/v4.1d1/Sources_Common/Mail/Address/CAddressList.h
r86 r96 70 70 bool full) const; 71 71 void AddCalendarAddressToList(cdstrvect& list, // Add calendar addresses to list 72 bool full) const;72 bool full) const; 73 73 void WriteToStream(ostream& stream) const; // Write to stream 74 74 -
Mulberry/branches/v4.1d1/Sources_Common/Mail/AddressBook/CAddressBook.cp
r86 r96 530 530 531 531 // Mark as open 532 SetFlags(eOpen);532 SetFlags(eOpen); 533 533 } 534 534 catch (...) … … 795 795 } 796 796 797 // Add unique items797 // Add unique items 798 798 if (unique.size()) 799 799 AddAddress(&unique); 800 }800 } 801 801 802 802 void CAddressBook::UpdateAddress(CAddress* addr, bool sorted) … … 1476 1476 else 1477 1477 { 1478 cdstring matchit(name);1479 CAdbkAddress::ExpandMatch(match, matchit);1480 1481 // Iterate over all single addresses1482 for(CAddressList::const_iterator iter = mAddresses.begin(); iter != mAddresses.end(); iter++)1483 {1484 bool result = false;1485 1486 CAdbkAddress* addr = dynamic_cast<CAdbkAddress*>(*iter);1487 if (!addr)1488 continue;1489 1490 // Do comparison of specific field1491 result = addr->Search(matchit, field);1492 1493 // Check for matching item1494 if (result)1495 // Add copy to list1496 addr_list.push_back(new CAdbkAddress(*addr));1478 cdstring matchit(name); 1479 CAdbkAddress::ExpandMatch(match, matchit); 1480 1481 // Iterate over all single addresses 1482 for(CAddressList::const_iterator iter = mAddresses.begin(); iter != mAddresses.end(); iter++) 1483 { 1484 bool result = false; 1485 1486 CAdbkAddress* addr = dynamic_cast<CAdbkAddress*>(*iter); 1487 if (!addr) 1488 continue; 1489 1490 // Do comparison of specific field 1491 result = addr->Search(matchit, field); 1492 1493 // Check for matching item 1494 if (result) 1495 // Add copy to list 1496 addr_list.push_back(new CAdbkAddress(*addr)); 1497 1497 } 1498 1498 } -
Mulberry/branches/v4.1d1/Sources_Common/Mail/AddressBook/CAddressBookManager.cp
r86 r96 403 403 break; 404 404 } 405 } 405 } 406 406 } 407 407 … … 558 558 // Add to protos list 559 559 mProtos.push_back(proto); 560 }560 } 561 561 562 562 // Adjust indices to remove local/web … … 571 571 if (new_index < (long) mProtos.size() - 1 - proto_offset) 572 572 accts.insert(accts.begin() + new_index, acct); 573 else573 else 574 574 accts.push_back(acct); 575 575 CPreferences::sPrefs->mAddressAccounts.SetDirty(); … … 587 587 if (result != NULL) 588 588 return result; 589 }590 589 } 590 591 591 return NULL; 592 }592 } 593 593 594 594 // Managing the store … … 596 596 { 597 597 if ((proto == NULL) || name.empty()) 598 return NULL;598 return NULL; 599 599 600 600 // Create account name … … 623 623 if (!directory) 624 624 { 625 }625 } 626 626 627 627 // Now insert into parent … … 682 682 // Now read the calendar data 683 683 node->GetProtocol()->ReadFullCalendar(*node, *cal); 684 }685 684 } 685 686 686 // Change the name in the calendar 687 687 cal->EditName(node->GetShortName()); … … 704 704 { 705 705 node->SetCalendar(NULL); 706 }707 706 } 707 708 708 CLOG_LOGRETHROW; 709 709 throw; … … 711 711 #endif 712 712 } 713 713 714 714 // Now adjust node position 715 715 … … 725 725 parent_node->AddChild(node, true); 726 726 Broadcast_Message(eBroadcast_InsertNode, node); 727 }727 } 728 728 729 729 // Make sure protocol list is in sync after rename … … 778 778 if (found == mAdbkSearch.end()) 779 779 mAdbkSearch.push_back(adbk); 780 }781 }780 } 781 } 782 782 else 783 783 { -
Mulberry/branches/v4.1d1/Sources_Common/Mail/Extensions/CAdbkACL.cp
r86 r96 32 32 if (this != ©) 33 33 { 34 CACL::operator=(copy);34 CACL::operator=(copy); 35 35 mType = copy.mType; 36 36 mCanChange = copy.mCanChange; -
Mulberry/branches/v4.1d1/Sources_Common/Mail/INET_Clients/IMSP/CIMSPClient.cp
r86 r96 1425 1425 } 1426 1426 1427 // Add adress book to list1427 // Add adress book to list 1428 1428 CAddressBook* adbk = new CAddressBook(GetAdbkOwner(), GetAdbkOwner()->GetStoreRoot(), !noselect, !noinferiors, adbk_name); 1429 1429 GetAdbkOwner()->GetStoreRoot()->AddChildHierarchy(adbk); -
Mulberry/branches/v4.1d1/Sources_Common/Mail/Protocols/CAdbkProtocol.cp
r86 r96 447 447 return; 448 448 449 try450 {449 try 450 { 451 451 // Logoff if required 452 452 if (IsLoggedOn()) … … 463 463 // Clean any free connections in cache 464 464 CleanConnections(); 465 }