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

void KNateon::slotALRM ( const QStringList &  slCommand  )  [private, slot]

알람 패킷을 받았을때...

ALRM [trid] [SVC_GB] [from] [text] [urlgb] [url] [svc_defined]

ex> ALRM 0 CYLD 00 00 2 00 ring0320@msn.com 00 Y 12737092 Y Y B [service defined 필드] [연동한 싸이월드 ID], N/A, N/A, [Cyworld CMN], [싸이월드에 새글 등록시 알려주기 옵션 Y|N], [그밖의 알림 알려주기 Y|N], [모두에게 공개, 비공개, 친구에게만 공개 옵션 O|B|C] O : 모두에게 공개 B : 친구에게 공개 C : 비공개

B: 친구에게만 공개, O: 모두에게 공개, C: 모두에게 비공개

주사용계정 정보 변경 알림

내 주사용계정 CMN 을 변경한다. (2007-09-14 14:35:17) <-- ALRM 0 C2ID 12737092 C2 2 00 12737092:12737092:1 (2007-09-14 15:57:57) <-- ALRM 0 C2ID 12737092 C2 2 00 12737092:a0552737:2

메일 수신 알림

(2007-10-24 18:02:50) <-- ALRM 0 MAIL 00 00 2 00 홍20길동 00 "홍%20길동"20<honggildong@sender.com> "X@nate.com"20<X@nate.com> 테스트메일 00 00 00

0: Online, 1: incoming chat, 2: incoming memo, 3: incoming mail

(2007-08-27 16:56:59) <-- ALRM 0 C2HP a0552737 홈220방명록에20새글이20등록20되었습니다. 1 http253A252F252Fcyhome.cyworld.com252F253Fhome_id253Da05527372526url253D25252Fmyhompy25252Findex.php25253Fhome_id25253Da0552737252526requireType25253D2

QString sTemp; sTemp = "http%253A%252F%252Fcyhome.cyworld.com%252F%253Fhome_id%253Da0552737%2526url%253D%25252Fmyhompy%25252Findex.php%25253Fhome_id%25253Da0552737%252526requireType%25253D2";

kdDebug() << "1> " << sTemp << endl; QUrl::decode(sTemp); kdDebug() << "2> " << sTemp << endl; QUrl::decode(sTemp); kdDebug() << "3> " << sTemp << endl; QUrl::decode(sTemp); kdDebug() << "4> " << sTemp << endl;

knateon: 1> http25253A25252F25252Fcyhome.cyworld.com25252F25253Fhome_id25253Da0552737252526url25253D2525252Fmyhompy2525252Findex.php2525253Fhome_id2525253Da055273725252526requireType2525253D2 knateon: 2> http253A252F252Fcyhome.cyworld.com252F253Fhome_id253Da05527372526url253D25252Fmyhompy25252Findex.php25253Fhome_id25253Da0552737252526requireType25253D2 knateon: 3> http://cyhome.cyworld.com/?home_id=a0552737&url=%252Fmyhompy%252Findex.php%253Fhome_id%253Da0552737%2526requireType%253D2 knateon: 4> http://cyhome.cyworld.com/?home_id=a0552737&url=/myhompy/index.php?home_id=a0552737&requireType=2

미니 홈피 댓글 알림

싸이 쪽지 알림

이벤트 방명록 알림

방명록 새글 알림

일촌 관련 알림

사진첩 댓글 알림

클럽 댓글 알림

클럽 일정 알림

클럽 가입 승인 알림

Home2 클럽 댓글 알림

Home2 클럽 일정 알림

Home2 클럽 가입 승인 알림

Home2 방명록 댓글 알림

Home2 싸이 쪽지 알림

Home2 이벤트 방명록 알림

Home2 새 방명록

Home2 일촌신청 알림

Home2 사진첩 댓글 알림

Home2 선물 도착 알림

Home2 새 덧글

싸이월드 메일 알림

Definition at line 4778 of file knateon.cpp.

References nmconfig::alarmetc, nmconfig::alarmminihompynew, nmconfig::cycmn, nmconfig::cyid, CurrentAccount::getHompyType(), CurrentAccount::getMyMajorCMN(), CurrentAccount::getMyTicket(), nmconfig::minihompypublic, CurrentAccount::setMyCyworldCMN(), CurrentAccount::setMyCyworldID(), CurrentAccount::setMyHompyNew(), KNateonMainview::slotHompyNew(), slotHompyRUrl(), slotShowNewMail(), sPicsPath, and nmconfig::usecyworld.

Referenced by initializeNateonDPConnection().

{
      /*!
       * ex>
       * ALRM 0 CYLD %00 %00 2 %00 ring0320@msn.com %00 Y 12737092 Y Y B
       * [service defined 필드]
       [연동한 싸이월드 ID], N/A, N/A, [Cyworld CMN], [싸이월드에 새글 등록시 알려주기 옵션 Y|N], [그밖의 알림 알려주기 Y|N], [모두에게 공개, 비공개, 친구에게만 공개 옵션 O|B|C]
       O : 모두에게 공개
       B : 친구에게 공개
       C : 비공개
      */
      if ( slCommand[2] == "CYLD" )
      {
            stConfig.cyid = slCommand[7];
            stConfig.cycmn = slCommand[10];
            stConfig.alarmminihompynew = ( slCommand[11] == "Y" );
            stConfig.alarmetc = ( slCommand[12] == "Y" );
            // stConfig.minihompypublic = slCommand[13].data()[0];
            /*! B: 친구에게만 공개, O: 모두에게 공개, C: 모두에게 비공개 */
            switch( slCommand[13].data()[0] )
            {
            case 'O' :
                  stConfig.minihompypublic = 0;
                  break;
            case 'B' :
                  stConfig.minihompypublic = 1;
                  break;
            case 'C' :
                  stConfig.minihompypublic = 2;
                  break;
            }
            
            m_pCurrentAccount->setMyCyworldID( stConfig.cyid );
            m_pCurrentAccount->setMyCyworldCMN( stConfig.cycmn );
            if ( stConfig.cycmn == "%00" )
            {
                  emit cySyncCanceled();
            }
            return;
      }
      else if ( slCommand[2] == "C2ID" ) /*! 주사용계정 정보 변경 알림 */
      {
            /*!
             * 내 주사용계정 CMN 을 변경한다.
             * (2007-09-14 14:35:17) <-- ALRM 0 C2ID 12737092 C2 2 %00 12737092:12737092:1
             * (2007-09-14 15:57:57) <-- ALRM 0 C2ID 12737092 C2 2 %00 12737092:a0552737:2
             */
            return;
      }
      else if ( slCommand[2] == "MAIL" ) /*! 메일 수신 알림 */
      {
            /*!
             * (2007-10-24 18:02:50) <-- ALRM 0 MAIL %00 %00 2 %00  홍%20길동 %00 "홍%20길동"%20<honggildong@sender.com>  "X@nate.com"%20<X@nate.com> 테스트메일 %00 %00 %00
             */
            if ( !pMailPopup )
            {
                  pMailPopup = new PopupWindow();
                  connect( pMailPopup, SIGNAL( clickText( int, QString ) ), SLOT( slotShowNewMail(int, QString ) ) );
                  connect( pMailPopup, SIGNAL( hidePopup() ), SLOT( slotHidePopup() ) );
            }

            QPoint point = systemTrayWidget_->mapToGlobal( systemTrayWidget_->pos() );

            int screen = kapp->desktop()->screenNumber();
            QRect screenSize = kapp->desktop()->availableGeometry(screen);

            int nX = point.x();
            int nY = screenSize.height() + screenSize.top();

            pMailPopup->setAnchor( QPoint(nX, nY) );
            pMailPopup->setLogo( sPicsPath + "popup_notice_mail.bmp" , 16777215);

            QString sMsg( slCommand[7] );
            sMsg.replace("%20", " ");
            sMsg += UTF8(" 님으로 부터 메일이 도착했습니다.");

            pMailPopup->setText( sMsg );

            /*! 0: Online, 1: incoming chat, 2: incoming memo, 3: incoming mail */
            pMailPopup->setType(3);
            pMailPopup->show();
            nPopupY++;

            return;
      }
      else
      {
            /*!
         * (2007-08-27 16:56:59) <-- ALRM 0 C2HP a0552737 홈2%20방명록에%20새글이%20등록%20되었습니다. 1 http%253A%252F%252Fcyhome.cyworld.com%252F%253Fhome_id%253Da0552737%2526url%253D%25252Fmyhompy%25252Findex.php%25253Fhome_id%25253Da0552737%252526requireType%25253D2
            
         QString sTemp;
         sTemp =  "http%253A%252F%252Fcyhome.cyworld.com%252F%253Fhome_id%253Da0552737%2526url%253D%25252Fmyhompy%25252Findex.php%25253Fhome_id%25253Da0552737%252526requireType%25253D2";
            
         kdDebug() << "1> " << sTemp << endl;
         QUrl::decode(sTemp);
         kdDebug() << "2> " << sTemp << endl;
         QUrl::decode(sTemp);
         kdDebug() << "3> " << sTemp << endl;
         QUrl::decode(sTemp);
         kdDebug() << "4> " << sTemp << endl;
         *
         * knateon: 1> http%25253A%25252F%25252Fcyhome.cyworld.com%25252F%25253Fhome_id%25253Da0552737%252526url%25253D%2525252Fmyhompy%2525252Findex.php%2525253Fhome_id%2525253Da0552737%25252526requireType%2525253D2
         * knateon: 2> http%253A%252F%252Fcyhome.cyworld.com%252F%253Fhome_id%253Da0552737%2526url%253D%25252Fmyhompy%25252Findex.php%25253Fhome_id%25253Da0552737%252526requireType%25253D2
         * knateon: 3> http://cyhome.cyworld.com/?home_id=a0552737&url=%252Fmyhompy%252Findex.php%253Fhome_id%253Da0552737%2526requireType%253D2
         * knateon: 4> http://cyhome.cyworld.com/?home_id=a0552737&url=/myhompy/index.php?home_id=a0552737&requireType=2
            
         */

            if ( slCommand.count() < 6 )
                  return;

            QString sRUrl( slCommand[6] );
            QUrl::decode( sRUrl );
            QUrl::decode( sRUrl );
            // QUrl::decode( sRUrl );
            
            bool bIsUpdate = FALSE;
            bool bIsPopup = FALSE;
            QString sBCode = QString::null;
            QString sHFlag = QString::null;
            if ( ( m_pCurrentAccount->getHompyType() == CurrentAccount::Cyworld ) && stConfig.usecyworld )
            {
                  if ( slCommand[2] == "CYRP" ) /*! 미니 홈피 댓글 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( TRUE );
                        bIsPopup = TRUE;
                        sBCode = "B003";
                        sHFlag = "1";
                  }
                  else if ( slCommand[2] == "CYME" ) /*! 싸이 쪽지 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( TRUE );
                        bIsPopup = TRUE;
                        sBCode = "B004";
                        sHFlag = "1";
                  }
                  else if ( slCommand[2] == "CYRG" ) /*! 이벤트 방명록 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( FALSE );
                        bIsPopup = TRUE;
                        sBCode = "B012";
                        sHFlag = "1";
                  }
                  else if ( slCommand[2] == "CYHP" ) /*! 방명록 새글 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( TRUE );
                        bIsPopup = TRUE;
                        sBCode = "B013";
                        sHFlag = "1";
                  }
                  else if ( slCommand[2] == "CYFR" ) /*! 일촌 관련 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( TRUE );
                        bIsPopup = TRUE;
                        sBCode = "B014";
                        sHFlag = "1";
                  }
                  else if ( slCommand[2] == "CYPC" ) /*! 사진첩 댓글 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( TRUE );
                        bIsPopup = TRUE;
                        sBCode = "B015";
                        sHFlag = "1";
                  }
                  else if ( slCommand[2] == "CLRP" ) /*! 클럽 댓글 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( FALSE );
                        bIsPopup = TRUE;
                        sBCode = "G032";
                        sHFlag = "1";
                  }
                  else if ( slCommand[2] == "CLSC" ) /*! 클럽 일정 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( FALSE );
                        bIsPopup = TRUE;
                        sBCode = "G032";
                        sHFlag = "1";
                  }
                  else if ( slCommand[2] == "CLAP" ) /*! 클럽 가입 승인 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( FALSE );
                        bIsPopup = TRUE;
                        sBCode = "G032";
                        sHFlag = "1";
                  }
                  else
                  {
#ifdef NETDEBUG
                        kdDebug() << "Unknown Command : " << slCommand[2] << endl;
#endif
                        return;
                  }
            }
            else if ( ( m_pCurrentAccount->getHompyType() == CurrentAccount::Home2 ) &&
                  ( m_pCurrentAccount->getMyMajorCMN() == slCommand[3] ) )
            {
                  if ( slCommand[2] == "2CRP" ) /*! Home2 클럽 댓글 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( FALSE );
                        bIsPopup = TRUE;
                        sBCode = "D013";
                        sHFlag = "2";
                  }
                  else if ( slCommand[2] == "2CSC" ) /*! Home2 클럽 일정 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( FALSE );
                        bIsPopup = TRUE;
                        sBCode = "D013";
                        sHFlag = "2";
                  }
                  else if ( slCommand[2] == "2CAP" ) /*! Home2 클럽 가입 승인 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( FALSE );
                        bIsPopup = TRUE;
                        sBCode = "D013";
                        sHFlag = "2";
                  }
                  else if ( slCommand[2] == "C2RP" ) /*! Home2 방명록 댓글 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( FALSE );
                        bIsPopup = TRUE;
                        sBCode = "D014";
                        sHFlag = "2";
                  }
                  else if ( slCommand[2] == "C2ME" ) /*! Home2 싸이 쪽지 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( TRUE );
                        bIsPopup = TRUE;
                        sBCode = "D015";
                        sHFlag = "2";
                  }
                  else if ( slCommand[2] == "C2RG" ) /*! Home2 이벤트 방명록 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( FALSE );
                        bIsPopup = TRUE;
                        sBCode = "D016";
                        sHFlag = "2";
                  }
                  else if ( slCommand[2] == "C2HP" ) /*! Home2 새 방명록 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( TRUE );
                        bIsPopup = TRUE;
                        sBCode = "D017";
                        sHFlag = "2";
                  }
                  else if ( slCommand[2] == "C2FR" ) /*! Home2 일촌신청 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( TRUE );
                        bIsPopup = TRUE;
                        sBCode = "D018";
                        sHFlag = "2";
                  }
                  else if ( slCommand[2] == "C2PC" ) /*! Home2 사진첩 댓글 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( TRUE );
                        bIsPopup = TRUE;
                        sBCode = "D019";
                        sHFlag = "2";
                  }
                  else if ( slCommand[2] == "C2GF" ) /*! Home2 선물 도착 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( FALSE );
                        bIsPopup = TRUE;
                        sBCode = "D020";
                        sHFlag = "2";
                  }
                  else if ( slCommand[2] == "C2GR" ) /*! Home2 새 덧글 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( FALSE );
                        bIsPopup = TRUE;
                        sBCode = "D021";
                        sHFlag = "2";
                  }
                  else if ( slCommand[2] == "C2ML" ) /*! 싸이월드 메일 알림 */
                  {
                        bIsUpdate = TRUE;
                        m_pCurrentAccount->setMyHompyNew( FALSE );
                        bIsPopup = TRUE;
                        sBCode = "D022";
                        sHFlag = "2";
                  }
                  else
                  {
#ifdef NETDEBUG
                        kdDebug() << "Unknown Command : " << slCommand[2] << endl;
#endif
                        return;
                  }
            }

            if ( bIsUpdate )
            {
                  if ( m_pMainView )
                        m_pMainView->slotHompyNew();
            }
            
            if ( bIsPopup )
            {
                  QString sURL;
                  sURL = "http://br.nate.com/index.php";
                  sURL += "?code=";
                  sURL += sBCode;
                  sURL += "&r_url=";
                  sURL += sRUrl;
                  sURL += "&h_flag=";
                  sURL += sHFlag;
                  sURL += "&t=";
                  sURL += m_pCurrentAccount->getMyTicket();
                  
                  if ( !pToastWindow )
                  {
                        pToastWindow = new ToastWindow();
                        connect( pToastWindow, SIGNAL( textClicked( const QString & ) ), SLOT( slotHompyRUrl( const QString & ) ) );
                  }
                  
                  QPoint point = systemTrayWidget_->mapToGlobal( systemTrayWidget_->pos() );
                  int nX = point.x() ;
                  
                  int screen = kapp->desktop()->screenNumber();
                  QRect screenSize = kapp->desktop()->availableGeometry(screen);
#ifdef NETDEBUG
                  kdDebug() << "Available Width : " << QString::number( screenSize.width() ) << ", Height : " << QString::number( screenSize.height() ) << endl;
#endif
                  
                  int nY = screenSize.bottom()/* - pToastWindow->height() */;
                  
                  pToastWindow->setAnchor( QPoint(nX, nY) );
                  
                  pToastWindow->setRUrl( sURL );
                  QString sBody( slCommand[4] );
                  sBody.replace("%20", " ");
                  sBody.replace("%0D", "\r");
                  sBody.replace("%0A", "\n");
                  pToastWindow->setText( sBody );
                  pToastWindow->show();
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index