Send the compression signature string to the local database file in addition to the web repository if the user has enabled it.
| 6494 | // Send the compression signature string to the local database file |
| 6495 | // in addition to the web repository if the user has enabled it. |
| 6496 | void CjfifDecode::SendSubmit(CString strExifMake, CString strExifModel, CString strQual, |
| 6497 | CString strDqt0, CString strDqt1, CString strDqt2, CString strDqt3, |
| 6498 | CString strCss, |
| 6499 | CString strSig, CString strSigRot, CString strSigThumb, |
| 6500 | CString strSigThumbRot, float fQFact0, float fQFact1, unsigned nImgW, unsigned nImgH, |
| 6501 | CString strExifSoftware, CString strComment, teMaker eMaker, |
| 6502 | teSource eUserSource, CString strUserSoftware, CString strExtra, |
| 6503 | CString strUserNotes, unsigned nExifLandscape, |
| 6504 | unsigned nThumbX,unsigned nThumbY) |
| 6505 | { |
| 6506 | // NOTE: This assumes that we've already run PrepareSignature() |
| 6507 | // which usually happens when we process a file. |
| 6508 | ASSERT(strSig != _T("")); |
| 6509 | ASSERT(strSigRot != _T("")); |
| 6510 | |
| 6511 | CUrlString curls; |
| 6512 | |
| 6513 | // Version "03": (v1.8.0+) |
| 6514 | // - Adds JPEGsnoop version (js_ver) to enable signature source correction |
| 6515 | CString DB_SUBMIT_WWW_VER = _T("03"); |
| 6516 | |
| 6517 | #ifndef BATCH_DO |
| 6518 | if (m_bSigExactInDB) { |
| 6519 | if (m_pAppConfig->bInteractive) |
| 6520 | AfxMessageBox(_T("Compression signature already in database")); |
| 6521 | } else { |
| 6522 | |
| 6523 | // Now append it to the local database and resave |
| 6524 | theApp.m_pDbSigs->DatabaseExtraAdd(strExifMake,strExifModel, |
| 6525 | strQual,strSig,strSigRot,strCss,eUserSource,strUserSoftware); |
| 6526 | |
| 6527 | if (m_pAppConfig->bInteractive) |
| 6528 | AfxMessageBox(_T("Added Compression signature to database")); |
| 6529 | } |
| 6530 | #endif |
| 6531 | |
| 6532 | |
| 6533 | // Is automatic internet update enabled? |
| 6534 | if (!theApp.m_pAppConfig->bDbSubmitNet) { |
| 6535 | return; |
| 6536 | } |
| 6537 | |
| 6538 | CString strTmp; |
| 6539 | |
| 6540 | CString strFormat; |
| 6541 | CString strFormDataPre; |
| 6542 | CString strFormData; |
| 6543 | unsigned nFormDataLen; |
| 6544 | |
| 6545 | unsigned nChecksum=32; |
| 6546 | CString strSubmitHost; |
| 6547 | CString strSubmitPage; |
| 6548 | strSubmitHost = IA_HOST; |
| 6549 | strSubmitPage = IA_DB_SUBMIT_PAGE; |
| 6550 | for (unsigned i=0;i<_tcslen(IA_HOST);i++) { |
| 6551 | nChecksum += strSubmitHost.GetAt(i); |
| 6552 | nChecksum += 3*strSubmitPage.GetAt(i); |
| 6553 | } |
nothing calls this directly
no test coverage detected