示例#1
0
   bool 
   FetchAccount::XMLStore(XNode *pRuleNode, int iOptions)
   {
      XNode *pNode = pRuleNode->AppendChild(_T("FetchAccount"));

      pNode->AppendAttr(_T("Name"), name_);
      pNode->AppendAttr(_T("ServerAddress"), server_address_);
      pNode->AppendAttr(_T("ServerType"), StringParser::IntToString(server_type_));
      pNode->AppendAttr(_T("Port"), StringParser::IntToString(port_));
      pNode->AppendAttr(_T("Username"), username_);
      pNode->AppendAttr(_T("Password"), Crypt::Instance()->EnCrypt(password_, Crypt::ETBlowFish));
      pNode->AppendAttr(_T("Minutes"), StringParser::IntToString(minutes_));
      pNode->AppendAttr(_T("DaysToKeep"), StringParser::IntToString(days_to_keep_));
      pNode->AppendAttr(_T("Active"), is_active_ ? _T("1") : _T("0"));
      pNode->AppendAttr(_T("ProcessMIMERecipients"), process_mimerecipients_ ? _T("1") : _T("0"));
      pNode->AppendAttr(_T("ProcessMIMEDate"), process_mimedate_ ? _T("1") : _T("0"));
      pNode->AppendAttr(_T("UseAntiSpam"), use_anti_spam_ ? _T("1") : _T("0"));
      pNode->AppendAttr(_T("UseAntiVirus"), use_anti_virus_ ? _T("1") : _T("0"));
      pNode->AppendAttr(_T("EnableRouteRecipients"), enable_route_recipients_ ? _T("1") : _T("0"));
      pNode->AppendAttr(_T("ConnectionSecurity"), StringParser::IntToString(connection_security_));

      if (!GetUIDs()->XMLStore(pNode, iOptions))
         return false;

      return true;
   }
示例#2
0
   bool 
   FetchAccount::XMLStore(XNode *pRuleNode, int iOptions)
   {
      XNode *pNode = pRuleNode->AppendChild(_T("FetchAccount"));

      pNode->AppendAttr(_T("Name"), m_sName);
      pNode->AppendAttr(_T("ServerAddress"), m_sServerAddress);
      pNode->AppendAttr(_T("ServerType"), StringParser::IntToString(m_iServerType));
      pNode->AppendAttr(_T("Port"), StringParser::IntToString(m_iPort));
      pNode->AppendAttr(_T("Username"), m_sUsername);
      pNode->AppendAttr(_T("Password"), Crypt::Instance()->EnCrypt(m_sPassword, Crypt::ETBlowFish));
      pNode->AppendAttr(_T("Minutes"), StringParser::IntToString(m_iMinutes));
      pNode->AppendAttr(_T("DaysToKeep"), StringParser::IntToString(m_iDaysToKeep));
      pNode->AppendAttr(_T("Active"), m_bIsActive ? _T("1") : _T("0"));
      pNode->AppendAttr(_T("ProcessMIMERecipients"), m_bProcessMIMERecipients ? _T("1") : _T("0"));
      pNode->AppendAttr(_T("ProcessMIMEDate"), m_bProcessMIMEDate ? _T("1") : _T("0"));
      pNode->AppendAttr(_T("UseSSL"), m_bUseSSL ? _T("1") : _T("0"));
      pNode->AppendAttr(_T("UseAntiSpam"), _useAntiSpam ? _T("1") : _T("0"));
      pNode->AppendAttr(_T("UseAntiVirus"), _useAntiVirus ? _T("1") : _T("0"));
      pNode->AppendAttr(_T("EnableRouteRecipients"), _enableRouteRecipients ? _T("1") : _T("0"));

      if (!GetUIDs()->XMLStore(pNode, iOptions))
         return false;

      return true;
   }
示例#3
0
   bool 
   FetchAccount::XMLLoadSubItems(XNode *pNode, int iRestoreOptions)
   {
      if (!GetUIDs()->XMLLoad(pNode, iRestoreOptions))
         return false;

      return true;
   }
示例#4
0
文件: Mdnd.cpp 项目: mark711/mahogany
MMessagesDataObject::MMessagesDataObject(MsgCmdProc *msgProc,
                                         MailFolder *folder,
                                         const UIdArray& messages)
                   : wxCustomDataObject(MMESSAGE_FORMAT)
{
   // we store the MsgCmdProc pointer first followed by the number of
   // messages - and then all messages after it
   size_t len = sizeof(MMessagesDataObject::Data) +
                  messages.GetCount()*sizeof(UIdType);
   void *buf = new char[len];
   Data *data = (Data *)buf;
   data->msgProc = msgProc;
   data->number = messages.GetCount();
   data->folder = folder;
   
   UIdType *p = GetUIDs(data);
   for ( size_t n = 0; n < data->number; n++ )
   {
      p[n] = messages[n];
   }

   TakeData(len, data);
}
示例#5
0
/**
 * Called when discovery completes on all ports.
 */
void Universe::DiscoveryComplete(RDMDiscoveryCallback *on_complete) {
  ola::rdm::UIDSet uids;
  GetUIDs(&uids);
  if (on_complete)
    on_complete->Run(uids);
}