⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 otaconfigmessage.cpp

📁 funambol windows mobile plugin source code, the source code is taken from the funambol site
💻 CPP
字号:
/*
 * Copyright (C) 2003-2007 Funambol, Inc
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY, TITLE, NONINFRINGEMENT or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 * 02111-1307  USA
 */


#include "OTAConfigMessage.h"
#include "logutils.h"

OTAConfigMessage::OTAConfigMessage() {
    userName = NULL;
    password = NULL;
    syncURL = NULL;
    visibleName = NULL;
    mailAddress = NULL;

     // set the uri of the source. If NULL never set
    mailURI = NULL;
    contactURI= NULL;
    calendarURI= NULL;
    taskURI= NULL;
    noteURI= NULL;
    briefcaseURI = NULL;

    // set the format of the source. If NULL never set
    contactFormat = NULL;
    calendarFormat = NULL;
    taskFormat = NULL;
}

OTAConfigMessage::~OTAConfigMessage() {
    if (userName)
        delete [] userName;
    if (password)
        delete [] password;
     if (syncURL)
        delete [] syncURL;
     if (visibleName)
        delete [] visibleName;
     if (mailAddress)
        delete [] mailAddress;
     if (mailURI)
        delete [] mailURI;
     if (contactURI)
        delete [] contactURI;
     if (calendarURI)
        delete [] calendarURI;
     if (taskURI)
        delete [] taskURI;
     if (noteURI)
        delete [] noteURI;
     if (briefcaseURI)
        delete [] briefcaseURI;
     if (contactFormat)
        delete [] contactFormat;
     if (calendarFormat)
        delete [] calendarFormat;
     if (taskFormat)
        delete [] taskFormat;

}

void OTAConfigMessage::setUsername(const char* user) {
    if (userName)
        delete [] userName;
    userName = NULL;
    userName = stringdup(user);
}

void OTAConfigMessage::setPassword(const char* pass) {
    if (password)
        delete [] password;
    password = NULL;
    password = stringdup(pass);
}

void OTAConfigMessage::setSyncURL(const char* url) {
    if (syncURL)
        delete [] syncURL;
    syncURL = NULL;
    syncURL = stringdup(url);
}

void OTAConfigMessage::setVisibleName(const char* name) {
    if (visibleName)
        delete [] visibleName;
    visibleName = NULL;
    visibleName = stringdup(name);
}

void OTAConfigMessage::setMailAddress(const char* address) {
    if (mailAddress)
        delete [] mailAddress;
    mailAddress = NULL;
    mailAddress = stringdup(address);
}

void OTAConfigMessage::setMailURI(const char* uri) {
    if (mailURI)
        delete [] mailURI;
    mailURI = NULL;
    mailURI = stringdup(uri);
}

void OTAConfigMessage::setContactURI(const char* uri) {
    if (contactURI)
        delete [] contactURI;
    contactURI = NULL;
    contactURI = stringdup(uri);
}

void OTAConfigMessage::setCalendarURI(const char* uri) {
    if (calendarURI)
        delete [] calendarURI;
    calendarURI = NULL;
    calendarURI = stringdup(uri);
}

void OTAConfigMessage::setTaskURI(const char* uri) {
    if (taskURI)
        delete [] taskURI;
    taskURI = NULL;
    taskURI = stringdup(uri);
}

void OTAConfigMessage::setNoteURI(const char* uri) {
    if (noteURI)
        delete [] noteURI;
    noteURI = NULL;
    noteURI = stringdup(uri);
}

void OTAConfigMessage::setBriefcaseURI(const char* uri) {
    if (briefcaseURI)
        delete [] briefcaseURI;
    briefcaseURI = NULL;
    briefcaseURI = stringdup(uri);
}

void OTAConfigMessage::setContactFormat(const char* uri) {
    if (contactFormat)
        delete [] contactFormat;
    contactFormat = NULL;
    contactFormat = stringdup(uri);
}

void OTAConfigMessage::setCalendarFormat(const char* uri) {
    if (calendarFormat)
        delete [] calendarFormat;
    calendarFormat = NULL;
    calendarFormat = stringdup(uri);
}

void OTAConfigMessage::setTaskFormat(const char* uri) {
    if (taskFormat)
        delete [] taskFormat;
    taskFormat = NULL;
    taskFormat = stringdup(uri);
}

void OTAConfigMessage::setNoteLocalURI(const char* uri) {
    if (noteLocalURI)
        delete [] noteLocalURI;
    noteLocalURI = NULL;
    noteLocalURI = stringdup(uri);
}

void OTAConfigMessage::setBriefcaseLocalURI(const char* uri) {
    if (briefcaseLocalURI)
        delete [] briefcaseLocalURI;
    briefcaseLocalURI = NULL;
    briefcaseLocalURI = stringdup(uri);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -