fixing callbacks
diff --git a/src/Accelerometer.cpp b/src/Accelerometer.cpp
index 448fb8a..257ce8e 100755
--- a/src/Accelerometer.cpp
+++ b/src/Accelerometer.cpp
@@ -60,7 +60,7 @@
 	} else {

 		AppLogException("Acceleration sensor is not available");

 		String res;

-		res.Format(256, L"PhoneGap.callbacks['%S'].fail({message:'Acceleration sensor is not available',code:'001'});");

+		res.Format(256, L"Cordova.callbacks['%S'].fail({message:'Acceleration sensor is not available',code:'001'});");

 		pWeb->EvaluateJavascriptN(res);

 		return false;

 	}

@@ -90,7 +90,7 @@
 void

 Accelerometer::GetLastAcceleration() {

 	String res;

-	res.Format(256, L"PhoneGap.callbacks['%S'].success({x:%f,y:%f,z:%f,timestamp:%d});", callbackId.GetPointer(), x, y, z, timestamp);

+	res.Format(256, L"Cordova.callbacks['%S'].success({x:%f,y:%f,z:%f,timestamp:%d});", callbackId.GetPointer(), x, y, z, timestamp);

 	pWeb->EvaluateJavascriptN(res);

 

 	res.Clear();

@@ -109,7 +109,7 @@
 	AppLogDebug("x: %f, y: %f, z: %f timestamp: %d", x, y, z, timestamp);

 

 	String res;

-	res.Format(256, L"PhoneGap.callbacks['%S'].success({x:%f,y:%f,z:%f,timestamp:%d});", callbackId.GetPointer(), x, y, z, timestamp);

+	res.Format(256, L"Cordova.callbacks['%S'].success({x:%f,y:%f,z:%f,timestamp:%d});", callbackId.GetPointer(), x, y, z, timestamp);

 	pWeb->EvaluateJavascriptN(res);

 

 	res.Clear();

diff --git a/src/Compass.cpp b/src/Compass.cpp
index 773c7ef..ec35e93 100755
--- a/src/Compass.cpp
+++ b/src/Compass.cpp
@@ -64,7 +64,7 @@
 	} else {

 		AppLogException("Compass sensor is not available");

 		String res;

-		res.Format(256, L"PhoneGap.callbacks['%S'].fail({message:'Magnetic sensor is not available',code:'001'});", callbackId.GetPointer());

+		res.Format(256, L"Cordova.callbacks['%S'].fail({message:'Magnetic sensor is not available',code:'001'});", callbackId.GetPointer());

 		pWeb->EvaluateJavascriptN(res);

 		return false;

 	}

@@ -94,7 +94,7 @@
 void

 Compass::GetLastHeading() {

 	String res;

-	res.Format(256, L"PhoneGap.callbacks['%S'].success({x:%f,y:%f,z:%f,timestamp:%d});", callbackId.GetPointer(), x, y, z, timestamp);

+	res.Format(256, L"Cordova.callbacks['%S'].success({x:%f,y:%f,z:%f,timestamp:%d});", callbackId.GetPointer(), x, y, z, timestamp);

 	pWeb->EvaluateJavascriptN(res);

 }

 

@@ -109,6 +109,6 @@
 	AppLogDebug("x: %f, y: %f, z: %f timestamp: %d", x, y, z, timestamp);

 

 	String res;

-	res.Format(256, L"PhoneGap.callbacks['%S'].success({x:%f,y:%f,z:%f,timestamp:%d});", callbackId.GetPointer(), x, y, z, timestamp);

+	res.Format(256, L"Cordova.callbacks['%S'].success({x:%f,y:%f,z:%f,timestamp:%d});", callbackId.GetPointer(), x, y, z, timestamp);

 	pWeb->EvaluateJavascriptN(res);

 }

diff --git a/src/Contacts.cpp b/src/Contacts.cpp
index 7b16d94..baa7a97 100755
--- a/src/Contacts.cpp
+++ b/src/Contacts.cpp
@@ -409,11 +409,11 @@
 

 	if(IsFailed(r)) {

 		AppLogException("Could not add contact");

-		eval.Format(128, L"PhoneGap.callbacks['%S'].fail({message:'%s',code:%d})", callbackId.GetPointer(), r, GetErrorMessage(r));

+		eval.Format(128, L"Cordova.callbacks['%S'].fail({message:'%s',code:%d})", callbackId.GetPointer(), r, GetErrorMessage(r));

 		pWeb->EvaluateJavascriptN(eval);

 	} else {

 		AppLogDebug("Contact Successfully Added");

-		eval.Format(128, L"PhoneGap.callbacks['%S'].success({message:'Contact added successfully'})", callbackId.GetPointer());

+		eval.Format(128, L"Cordova.callbacks['%S'].success({message:'Contact added successfully'})", callbackId.GetPointer());

 		AppLogDebug("%S", eval.GetPointer());

 		pWeb->EvaluateJavascriptN(eval);

 	}

@@ -544,10 +544,10 @@
 

 	delete value;

 	if(length > 0) {

-		eval.Format(128, L"PhoneGap.callbacks['%S'].success(navigator.service.contacts.results)", callbackId.GetPointer());

+		eval.Format(128, L"Cordova.callbacks['%S'].success(navigator.service.contacts.results)", callbackId.GetPointer());

 		pWeb->EvaluateJavascriptN(eval);

 	} else {

-		eval.Format(128, L"PhoneGap.callbacks['%S'].fail({message:'no contacts found',code:00})", callbackId.GetPointer());

+		eval.Format(128, L"Cordova.callbacks['%S'].fail({message:'no contacts found',code:00})", callbackId.GetPointer());

 		pWeb->EvaluateJavascriptN(eval);

 	}

 }

@@ -571,12 +571,12 @@
 		r = addressbook.RemoveContact(id);

 		if(IsFailed(r)) {

 			AppLogDebug("Contact Could not be removed %s %d", GetErrorMessage(r), r);

-			eval.Format(256, L"PhoneGap.callbacks['%S'].fail({message:'%s', code:ContactError.NOT_FOUND_ERROR})",

+			eval.Format(256, L"Cordova.callbacks['%S'].fail({message:'%s', code:ContactError.NOT_FOUND_ERROR})",

 															 callbackId.GetPointer(), GetErrorMessage(r));

 			pWeb->EvaluateJavascriptN(eval);

 		} else {

 			AppLogDebug("Contact %S removed", idStr.GetPointer());

-			eval.Format(256, L"PhoneGap.callbacks['%S'].success({message:'Contact with ID %d removed', code:01})", callbackId.GetPointer(), id);

+			eval.Format(256, L"Cordova.callbacks['%S'].success({message:'Contact with ID %d removed', code:01})", callbackId.GetPointer(), id);

 			pWeb->EvaluateJavascriptN(eval);

 		}

 	}

diff --git a/src/Cordova.cpp b/src/Cordova.cpp
index d32a8f3..46e2d8d 100755
--- a/src/Cordova.cpp
+++ b/src/Cordova.cpp
@@ -1,5 +1,5 @@
 /**

- * Name        : PhoneGap

+ * Name        : Cordova

  * Version     : 

  * Vendor      : 

  * Description : 

diff --git a/src/GeoLocation.cpp b/src/GeoLocation.cpp
index 54cadbe..8f94693 100755
--- a/src/GeoLocation.cpp
+++ b/src/GeoLocation.cpp
@@ -86,12 +86,12 @@
 		String coordinates;

 		coordinates.Format(256, L"new Coordinates(%d,%d,%f,%f,%f,%f)", latitude, longitude, altitude, speed, accuracy, heading);

 		String res;

-		res.Format(512, L"PhoneGap.callbacks['%S'].success(new Position(%S,%d))", callbackId.GetPointer(), coordinates.GetPointer(), timestamp);

+		res.Format(512, L"Cordova.callbacks['%S'].success(new Position(%S,%d))", callbackId.GetPointer(), coordinates.GetPointer(), timestamp);

 		pWeb->EvaluateJavascriptN(res);

 	} else {

-		AppLogDebug("PhoneGap.callbacks['%S'].fail(new PositionError(0001,'Could not get location'))", callbackId.GetPointer());

+		AppLogDebug("Cordova.callbacks['%S'].fail(new PositionError(0001,'Could not get location'))", callbackId.GetPointer());

 		String res;

-		res.Format(256, L"PhoneGap.callbacks['%S'].fail(new PositionError(0001,'Could not get location'))", callbackId.GetPointer());

+		res.Format(256, L"Cordova.callbacks['%S'].fail(new PositionError(0001,'Could not get location'))", callbackId.GetPointer());

 		pWeb->EvaluateJavascriptN(res);

 	}

 }

@@ -111,12 +111,12 @@
 		String coordinates;

 		coordinates.Format(256, L"new Coordinates(%d,%d,%f,%f,%f,%f)", latitude, longitude, altitude, speed, accuracy, heading);

 		String res;

-		res.Format(512, L"PhoneGap.callbacks['%S'].success(new Position(%S,%d))", callbackId.GetPointer(), coordinates.GetPointer(), timestamp);

+		res.Format(512, L"Cordova.callbacks['%S'].success(new Position(%S,%d))", callbackId.GetPointer(), coordinates.GetPointer(), timestamp);

 		pWeb->EvaluateJavascriptN(res);

 	} else {

-		AppLogDebug("PhoneGap.callbacks['%S'].fail(new PositionError(0001,'Could not get location'))", callbackId.GetPointer());

+		AppLogDebug("Cordova.callbacks['%S'].fail(new PositionError(0001,'Could not get location'))", callbackId.GetPointer());

 		String res;

-		res.Format(256, L"PhoneGap.callbacks['%S'].fail(new PositionError(0001,'Could not get location'))", callbackId.GetPointer());

+		res.Format(256, L"Cordova.callbacks['%S'].fail(new PositionError(0001,'Could not get location'))", callbackId.GetPointer());

 		pWeb->EvaluateJavascriptN(res);

 	}

 }

diff --git a/src/Kamera.cpp b/src/Kamera.cpp
index 8aaaf30..bba76c5 100755
--- a/src/Kamera.cpp
+++ b/src/Kamera.cpp
@@ -74,7 +74,7 @@
 

 		if(IsFailed(r)) {

 			AppLogException("Could not copy picture");

-			eval.Format(512, L"PhoneGap.callbacks['%S'].fail('Could not copy picture')", callbackId.GetPointer());

+			eval.Format(512, L"Cordova.callbacks['%S'].fail('Could not copy picture')", callbackId.GetPointer());

 			AppLogDebug("%S", eval.GetPointer());

 			pWeb->EvaluateJavascriptN(eval);

 		}

@@ -82,7 +82,7 @@
 //		Uri imageUri;

 //		imageUri.setUri(homeFilename);

 		eval.Clear();

-		eval.Format(512, L"PhoneGap.callbacks['%S'].success('file://%S')", callbackId.GetPointer(), homeFilename.GetPointer());

+		eval.Format(512, L"Cordova.callbacks['%S'].success('file://%S')", callbackId.GetPointer(), homeFilename.GetPointer());

 		AppLogDebug("%S", eval.GetPointer());

 		pWeb->EvaluateJavascriptN(eval);

 	  }

@@ -90,14 +90,14 @@
 	  {

 		AppLog("Camera capture canceled.");

 		String eval;

-		eval.Format(512, L"PhoneGap.callbacks['%S'].fail('Camera capture canceled')", callbackId.GetPointer());

+		eval.Format(512, L"Cordova.callbacks['%S'].fail('Camera capture canceled')", callbackId.GetPointer());

 		pWeb->EvaluateJavascriptN(eval);

 	  }

 	  else if (pCaptureResult->Equals(String(APPCONTROL_RESULT_FAILED)))

 	  {

 		AppLog("Camera capture failed.");

 		String eval;

-		eval.Format(512, L"PhoneGap.callbacks['%S'].fail('Camera capture failed')", callbackId.GetPointer());

+		eval.Format(512, L"Cordova.callbacks['%S'].fail('Camera capture failed')", callbackId.GetPointer());

 		pWeb->EvaluateJavascriptN(eval);

 	  }

 	}

diff --git a/src/Network.cpp b/src/Network.cpp
index e69d5bd..5b0f490 100755
--- a/src/Network.cpp
+++ b/src/Network.cpp
@@ -63,7 +63,7 @@
 Network::OnTransactionAborted (HttpSession &httpSession, HttpTransaction &httpTransaction, result r) {

 	AppLogDebug("Transaction Aborted");

 	String res;

-	res.Format(128, L"PhoneGap.callbacks['%S'].fail({code:%d,message:'%s'});", callbackId.GetPointer(), r, GetErrorMessage(r));

+	res.Format(128, L"Cordova.callbacks['%S'].fail({code:%d,message:'%s'});", callbackId.GetPointer(), r, GetErrorMessage(r));

 	AppLogDebug("%S", res.GetPointer());

 	pWeb->EvaluateJavascriptN(res);

 }

@@ -100,7 +100,7 @@
 	AppLogDebug("%S", res.GetPointer());

 	pWeb->EvaluateJavascriptN(res);

 

-	res.Format(128, L"PhoneGap.callbacks['%S'].success(%d);", callbackId.GetPointer(), status);

+	res.Format(128, L"Cordova.callbacks['%S'].success(%d);", callbackId.GetPointer(), status);

 	AppLogDebug("%S", res.GetPointer());

 	pWeb->EvaluateJavascriptN(res);

 }

diff --git a/src/Notification.cpp b/src/Notification.cpp
index e943516..ff04239 100755
--- a/src/Notification.cpp
+++ b/src/Notification.cpp
@@ -85,43 +85,43 @@
 		messageBox.ShowAndWait(modalResult);

 		switch(modalResult) {

 		case MSGBOX_RESULT_CLOSE:

-			eval.Format(128, L"PhoneGap.callbacks['%S'].success('Close')", callbackId.GetPointer());

+			eval.Format(128, L"Cordova.callbacks['%S'].success('Close')", callbackId.GetPointer());

 			pWeb->EvaluateJavascriptN(eval);

 			break;

 		case MSGBOX_RESULT_OK:

-			eval.Format(128, L"PhoneGap.callbacks['%S'].success('OK')", callbackId.GetPointer());

+			eval.Format(128, L"Cordova.callbacks['%S'].success('OK')", callbackId.GetPointer());

 			pWeb->EvaluateJavascriptN(eval);

 			break;

 		case MSGBOX_RESULT_CANCEL:

-			eval.Format(128, L"PhoneGap.callbacks['%S'].success('Cancel')", callbackId.GetPointer());

+			eval.Format(128, L"Cordova.callbacks['%S'].success('Cancel')", callbackId.GetPointer());

 			pWeb->EvaluateJavascriptN(eval);

 			break;

 		case MSGBOX_RESULT_YES:

-			eval.Format(128, L"PhoneGap.callbacks['%S'].success('Yes')", callbackId.GetPointer());

+			eval.Format(128, L"Cordova.callbacks['%S'].success('Yes')", callbackId.GetPointer());

 			pWeb->EvaluateJavascriptN(eval);

 			break;

 		case MSGBOX_RESULT_NO:

-			eval.Format(128, L"PhoneGap.callbacks['%S'].success('No')", callbackId.GetPointer());

+			eval.Format(128, L"Cordova.callbacks['%S'].success('No')", callbackId.GetPointer());

 			pWeb->EvaluateJavascriptN(eval);

 			break;

 		case MSGBOX_RESULT_ABORT:

-			eval.Format(128, L"PhoneGap.callbacks['%S'].success('Abort')", callbackId.GetPointer());

+			eval.Format(128, L"Cordova.callbacks['%S'].success('Abort')", callbackId.GetPointer());

 			pWeb->EvaluateJavascriptN(eval);

 			break;

 		case MSGBOX_RESULT_TRY:

-			eval.Format(128, L"PhoneGap.callbacks['%S'].success('Try')", callbackId.GetPointer());

+			eval.Format(128, L"Cordova.callbacks['%S'].success('Try')", callbackId.GetPointer());

 			pWeb->EvaluateJavascriptN(eval);

 			break;

 		case MSGBOX_RESULT_RETRY:

-			eval.Format(128, L"PhoneGap.callbacks['%S'].success('Retry')", callbackId.GetPointer());

+			eval.Format(128, L"Cordova.callbacks['%S'].success('Retry')", callbackId.GetPointer());

 			pWeb->EvaluateJavascriptN(eval);

 			break;

 		case MSGBOX_RESULT_IGNORE:

-			eval.Format(128, L"PhoneGap.callbacks['%S'].success('Ignore')", callbackId.GetPointer());

+			eval.Format(128, L"Cordova.callbacks['%S'].success('Ignore')", callbackId.GetPointer());

 			pWeb->EvaluateJavascriptN(eval);

 			break;

 		case MSGBOX_RESULT_CONTINUE:

-			eval.Format(64, L"PhoneGap.callbacks['%S'].success('Continue')", callbackId.GetPointer());

+			eval.Format(64, L"Cordova.callbacks['%S'].success('Continue')", callbackId.GetPointer());

 			pWeb->EvaluateJavascriptN(eval);

 			break;

 		}

diff --git a/src/WebForm.cpp b/src/WebForm.cpp
index 9885a8c..dca2161 100755
--- a/src/WebForm.cpp
+++ b/src/WebForm.cpp
@@ -109,7 +109,7 @@
 //		return true;

 		return false;

 	} else if(url.StartsWith("http://", 0) || url.StartsWith("https://", 0)) {

-		AppLogDebug("Non PhoneGap command. External URL. Launching WebBrowser");

+		AppLogDebug("Non Cordova command. External URL. Launching WebBrowser");

 		LaunchBrowser(url);

 		return false;

 	}

@@ -119,18 +119,18 @@
 

 void

 WebForm::OnLoadingCompleted() {

-	// Setting DeviceInfo to initialize PhoneGap (should be done only once) and firing onNativeReady event

+	// Setting DeviceInfo to initialize Cordova (should be done only once) and firing onNativeReady event

 	String* deviceInfo;

 	deviceInfo = __pWeb->EvaluateJavascriptN(L"window.device.uuid");

 	if(deviceInfo->IsEmpty()) {

 		device->SetDeviceInfo();

-		__pWeb->EvaluateJavascriptN("PhoneGap.onNativeReady.fire();");

+		__pWeb->EvaluateJavascriptN("Cordova.onNativeReady.fire();");

 	} else {

 		//AppLogDebug("DeviceInfo = %S;", deviceInfo->GetPointer());

 	}

 	delete deviceInfo;

 

-	// Analyzing PhoneGap command

+	// Analyzing Cordova command

 	if(__cordovaCommand) {

 		if(__cordovaCommand->StartsWith(L"gap://com.cordova.Geolocation", 0)) {

 			geolocation->Run(*__cordovaCommand);

@@ -157,12 +157,12 @@
 			camera->Run(*__cordovaCommand);

 		}

 		// Tell the JS code that we got this command, and we're ready for another

-		__pWeb->EvaluateJavascriptN(L"PhoneGap.queue.ready = true;");

+		__pWeb->EvaluateJavascriptN(L"Cordova.queue.ready = true;");

 		delete __cordovaCommand;

 		__cordovaCommand = null;

 	}

 	else {

-		AppLogDebug("Non PhoneGap command completed");

+		AppLogDebug("Non Cordova command completed");

 	}

 }