platform/shared/common/RhodesApp.cpp in rhodes-3.1.1 vs platform/shared/common/RhodesApp.cpp in rhodes-3.2.0.beta.1

- old
+ new

@@ -553,10 +553,28 @@ m_bDeactivationMode = false; } } +void CRhodesApp::callBarcodeCallback(String strCallbackUrl, const String& strBarcode, bool isError) +{ + strCallbackUrl = canonicalizeRhoUrl(strCallbackUrl); + String strBody; + strBody = "barcode=" + strBarcode; + + if (isError) + { + strBody += "&status=ok"; + } + else + { + strBody += "&status=fail"; + } + + getNetRequest().pushData( strCallbackUrl, strBody, null ); +} + void CRhodesApp::callCameraCallback(String strCallbackUrl, const String& strImagePath, const String& strError, boolean bCancel ) { strCallbackUrl = canonicalizeRhoUrl(strCallbackUrl); String strBody; @@ -628,11 +646,11 @@ getNetRequest().pushData( strCallbackUrl, strBody, null ); } static void callback_syncdb(void *arg, String const &/*query*/ ) { - rho_sync_doSyncAllSources(1); + rho_sync_doSyncAllSources(1,""); rho_http_sendresponse(arg, ""); } static void callback_redirect_to(void *arg, String const &strQuery ) { @@ -1214,10 +1232,10 @@ { navigateBack(); return; }else if ( strcasecmp(url.c_str(), "sync")==0 ) { - rho_sync_doSyncAllSources(1); + rho_sync_doSyncAllSources(1,""); return; } url = canonicalizeRhoUrl(url); if (callback)