Show
Ignore:
Timestamp:
01/13/08 21:39:50 (11 months ago)
Author:
cyrusdaboo
Message:

Support for reading/writing preferences as a flat file on a WebDAV server. This is the final piece to
provide a full replacement for IMSP/ACAP via WebDAV technologies. Ultimately an XCAP-like solution
allowing partial reads/writes would be better but this is a good first step.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Mulberry/branches/v4.1d1/MacOS/Sources/Application/Preferences_Dialog/CPrefsAccount.cp

    r97 r150  
    268268 
    269269        // Add each remote account 
    270         for(CINETAccountList::const_iterator iter = mCopyPrefs->mRemoteAccounts.GetValue().begin(); 
     270        for(COptionsAccountList::const_iterator iter = mCopyPrefs->mRemoteAccounts.GetValue().begin(); 
    271271                        iter != mCopyPrefs->mRemoteAccounts.GetValue().end(); iter++, menu_pos++) 
    272272                ::AppendItemToMenu(menuH, menu_pos, (*iter)->GetName(), false, cicn_RemoteAccount); 
     
    359359                                        break; 
    360360 
     361                                case menu_AccountWebDAVOptions: 
    361362                                case menu_AccountIMSPOptions: 
    362363                                case menu_AccountACAPOptions: 
     
    431432                                        break; 
    432433 
     434                                case menu_AccountWebDAVOptions: 
    433435                                case menu_AccountIMSPOptions: 
    434436                                case menu_AccountACAPOptions: 
    435                                         acct = new CINETAccount; 
     437                                        acct = new COptionsAccount; 
    436438                                        switch(acct_type) 
    437439                                        { 
     440                                        case menu_AccountWebDAVOptions: 
     441                                                acct->SetServerType(CINETAccount::eWebDAVPrefs); 
     442                                                break; 
    438443                                        case menu_AccountIMSPOptions: 
    439444                                                acct->SetServerType(CINETAccount::eIMSP); 
     
    605610                                else if (typeid(*acct) == typeid(CSMTPAccount)) 
    606611                                        acct_list = (CINETAccountList*) &mCopyPrefs->mSMTPAccounts.GetValue(); 
    607                                 else if (typeid(*acct) == typeid(CINETAccount)) 
     612                                else if (typeid(*acct) == typeid(COptionsAccount)) 
    608613                                        acct_list = (CINETAccountList*) &mCopyPrefs->mRemoteAccounts.GetValue(); 
    609614                                else if (typeid(*acct) == typeid(CAddressAccount)) 
     
    640645                                else if (typeid(*acct) == typeid(CSMTPAccount)) 
    641646                                        mCopyPrefs->mSMTPAccounts.SetDirty(); 
    642                                 else if (typeid(*acct) == typeid(CINETAccount)) 
     647                                else if (typeid(*acct) == typeid(COptionsAccount)) 
    643648                                        mCopyPrefs->mRemoteAccounts.SetDirty(); 
    644649                                else if (typeid(*acct) == typeid(CAddressAccount)) 
     
    696701                else if (typeid(*acct) == typeid(CSMTPAccount)) 
    697702                        mCopyPrefs->mSMTPAccounts.SetDirty(); 
    698                 else if (typeid(*acct) == typeid(CINETAccount)) 
     703                else if (typeid(*acct) == typeid(COptionsAccount)) 
    699704                { 
    700705                        // Prevent delete of last remote account if set to remote 
     
    818823                        mIsSMTP = true; 
    819824                } 
    820                 else if (typeid(*account) == typeid(CINETAccount)) 
     825                else if (typeid(*account) == typeid(COptionsAccount)) 
    821826                { 
    822827                        switch(account->GetServerType()) 
    823828                        { 
     829                        case CINETAccount::eWebDAVPrefs: 
     830                                copyStr.FromResource("UI::Preferences::AccountWebDAVOptions"); 
     831                                break; 
    824832                        case CINETAccount::eIMSP: 
    825833                                copyStr.FromResource("UI::Preferences::AccountIMSPOptions"); 
     
    912920        else if (typeid(*current) == typeid(CSMTPAccount)) 
    913921                account = new CSMTPAccount(*(CSMTPAccount*) current); 
    914         else if (typeid(*current) == typeid(CINETAccount)) 
    915                 account = new CINETAccount(*(CINETAccount*) current); 
     922        else if (typeid(*current) == typeid(COptionsAccount)) 
     923                account = new COptionsAccount(*(COptionsAccount*) current); 
    916924        else if (typeid(*current) == typeid(CAddressAccount)) 
    917925                account = new CAddressAccount(*(CAddressAccount*) current); 
     
    940948        else if (typeid(*current) == typeid(CSMTPAccount)) 
    941949                same = (*((CSMTPAccount*) current) == *((CSMTPAccount*) account)); 
    942         else if (typeid(*current) == typeid(CINETAccount)) 
    943                 same = (*((CINETAccount*) current) == *((CINETAccount*) account)); 
     950        else if (typeid(*current) == typeid(COptionsAccount)) 
     951                same = (*((COptionsAccount*) current) == *((COptionsAccount*) account)); 
    944952        else if (typeid(*current) == typeid(CAddressAccount)) 
    945953                same = (*((CAddressAccount*) current) == *((CAddressAccount*) account)); 
     
    956964                else if (typeid(*account) == typeid(CSMTPAccount)) 
    957965                        mCopyPrefs->mSMTPAccounts.SetDirty(); 
    958                 else if (typeid(*account) == typeid(CINETAccount)) 
     966                else if (typeid(*account) == typeid(COptionsAccount)) 
    959967                        mCopyPrefs->mRemoteAccounts.SetDirty(); 
    960968                else if (typeid(*account) == typeid(CAddressAccount)) 
     
    10641072        else if (typeid(*account) == typeid(CSMTPAccount)) 
    10651073                panel = paneid_PrefsSMTPAccount; 
    1066         else if (typeid(*account) == typeid(CINETAccount)) 
     1074        else if (typeid(*account) == typeid(COptionsAccount)) 
    10671075                panel = paneid_PrefsRemoteAccount; 
    10681076        else if (typeid(*account) == typeid(CAddressAccount))