Logo Search packages:      
Sourcecode: nateon version File versions  Download package

void KNateon::slotSaveMemo ( QStringList &  slMemo  )  [private, slot]

titleFrameLayout 받은 메모 저장

map["from_full_id"] = pBuddy->getUID(); knateon: KEY : [seq], VALUE : [392073805] knateon: KEY : [uuid], VALUE : [110E385A-2A40-4AA1-83B5-E764EBFC102E] knateon: KEY : [from_id], VALUE : [ring0320] knateon: KEY : [from_cmn], VALUE : [10014827278] knateon: KEY : [to_ids], VALUE : [ring0320@lycos.co.kr] knateon: KEY : [confirm], VALUE : [N] knateon: KEY : [recv_date], VALUE : [20070619144533] knateon: KEY : [subject], VALUE : [#20버디리스트20정렬.] knateon: KEY : [content_type], VALUE : [TEXT] knateon: KEY : [content], VALUE : [안녕하세요.200A반갑습니다.0A/안녕/20반가워~0Aㅎㅎㅎ20<20>200Ahttp://www.yahoo.co.kr0Aring0320.com0A또20뭐가20있지?]

nateon: OfflineMemo : [ seq=686362214& uuid=C8643562-ECD2-4403-8C26-1FEF7DD0C0B6& from_id=ring0320.com& from_cmn=10014827278& to_ids=ring0320.co.kr& confirm=N&recv_date=20080306164531& subject=안녕하세요.20& content_type=TEXT& content=안녕하세요.200A반갑습니다.0A/안녕/20반가워~0Aㅎㅎㅎ20<20>200Ahttp://www.yahoo.co.kr0Aring0320.com0A또20뭐가20있지? ] kdDebug() << "OfflineMemo : [" << (*it) << "]" << endl;

From CMN에서 ID 얻기

본문의 % 글자 없애기.

Definition at line 3290 of file knateon.cpp.

References BuddyList::getBuddyByHandle(), CurrentAccount::getBuddyList(), SQLiteDB::getNewMemoCount(), BuddyBase::getUID(), Common::percent2HTML(), pSQLiteDB, SQLiteDB::saveMemoInbox(), and KNateonMainview::slotUpdateMemoCount().

Referenced by slotMemoCount().

{
      typedef QMap<QString, QString> fields;
      fields map;

      for ( QStringList::Iterator it = slMemo.begin(); it != slMemo.end(); ++it )
      {
            /*!
             * nateon: OfflineMemo : [
             * seq=686362214&
             * uuid=C8643562-ECD2-4403-8C26-1FEF7DD0C0B6&
             * from_id=ring0320@nate.com&
             * from_cmn=10014827278&
             * to_ids=ring0320@lycos.co.kr&
             * confirm=N&recv_date=20080306164531&
             * subject=안녕하세요.%20&
             * content_type=TEXT&
             * content=안녕하세요.%20%0A반갑습니다.%0A/안녕/%20반가워~%0Aㅎㅎㅎ%20<%20>%20%0Ahttp://www.yahoo.co.kr%0Aring0320@nate.com%0A또%20뭐가%20있지?
             * ]
             * kdDebug() << "OfflineMemo : [" << (*it) << "]" << endl;
             */
            
            if ( (*it).left(4) == "seq=" )
            {
                  map.clear();
                  QStringList slData = QStringList::split( "&", *it );
                  for ( QStringList::Iterator it01 = slData.begin(); it01 != slData.end(); ++it01 )
                  {
                        QStringList slEntry = QStringList::split( "=", *it01 );
                        map[ slEntry[0] ] = slEntry[1];
#ifdef NETDEBUG
                        kdDebug() << "KEY:[" << slEntry[0] << "], VALUE:[" << slEntry[1] << "]" << endl;
#endif
                  }
                  /*!
                    From CMN에서 ID 얻기
                  */
                  m_pBuddyList = const_cast<BuddyList*>(m_pCurrentAccount->getBuddyList());
                  Buddy *pBuddy = m_pBuddyList->getBuddyByHandle( map["from_cmn"] );

                  if ( pBuddy )
                  {
                        /*!
                          본문의 % 글자 없애기.
                        */
                        if ( !m_pCommon )
                              m_pCommon = new Common();

                        m_pCommon->percent2HTML( map["subject"] );
                        
                        if ( map["content_type"] == "FLSH" ) {
                              QRegExp rx("<FONT\\b[^>]*>(.*)</FONT>");
                              rx.search( map["content"], 0 );
#ifdef NETDEBUG
                              kdDebug() << "0 : " << rx.cap(0) << endl;
                              kdDebug() << "1 : " << rx.cap(1) << endl;
                              kdDebug() << "2 : " << rx.cap(2) << endl;
#endif
                              QString sContent( rx.cap(1) );
                              // m_pCommon->removePercents( sContent );
                              // sContent.replace("%0D", "<br>");
                              m_pCommon->percent2HTML( sContent );
                              map["content"] = sContent;
                        } else {
                              m_pCommon->percent2HTML( map["content"] );
                        }

                        map["from_full_id"] = pBuddy->getUID();
                        pSQLiteDB->saveMemoInbox( map );
                  }
            }
      }
      
      if ( pMemoPopup )
      {
            QString sMsg;
            sMsg = UTF8( "새로운 쪽지가 " );
            sMsg += QString::number( pSQLiteDB->getNewMemoCount() );
            sMsg += UTF8( "개 도착했습니다." );
            pMemoPopup->setText( sMsg );
      }
#ifdef NETDEBUG
      else
      {
            kdDebug() << "XXXXXXXXXXXX <<<<<<<<<<<<<<< FFFFFFFFFFFF " << endl;
      }
#endif
      m_pMainView->slotUpdateMemoCount( pSQLiteDB->getNewMemoCount() );
}


Generated by  Doxygen 1.6.0   Back to index