You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2012/03/28 20:50:49 UTC

[3/3] more renaming

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/d3ab5427/src/Contacts.cpp
----------------------------------------------------------------------
diff --git a/src/Contacts.cpp b/src/Contacts.cpp
index 8ef29e7..7b16d94 100755
--- a/src/Contacts.cpp
+++ b/src/Contacts.cpp
@@ -26,7 +26,7 @@ Contacts::Run(const String& command) {
 		}
 		strTok.GetNextToken(callbackId);
 		// Saving a new contact
-		if(method == L"com.phonegap.Contacts.save" && !callbackId.IsEmpty()) {
+		if(method == L"com.cordova.Contacts.save" && !callbackId.IsEmpty()) {
 			String contactId;
 			strTok.GetNextToken(contactId);
 			int cid = -1;
@@ -38,12 +38,12 @@ Contacts::Run(const String& command) {
 			AppLogDebug("Method %S callbackId %S contactId %d", method.GetPointer(), callbackId.GetPointer(), cid);
 			Create(cid);
 		// Finding an exisiting contact by Name/Phone Number/Email
-		} else if(method == L"com.phonegap.Contacts.find" && !callbackId.IsEmpty()) {
+		} else if(method == L"com.cordova.Contacts.find" && !callbackId.IsEmpty()) {
 			String filter;
 			strTok.GetNextToken(filter);
 			AppLogDebug("Method %S callbackId %S filter %S", method.GetPointer(), callbackId.GetPointer(), filter.GetPointer());
 			Find(filter);
-		} else if(method == L"com.phonegap.Contacts.remove" && !callbackId.IsEmpty()) {
+		} else if(method == L"com.cordova.Contacts.remove" && !callbackId.IsEmpty()) {
 			String id;
 			strTok.GetNextToken(id);
 			AppLogDebug("Method %S callbackId %S ID to remove %S", method.GetPointer(), callbackId.GetPointer(), id.GetPointer());

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/d3ab5427/src/DebugConsole.cpp
----------------------------------------------------------------------
diff --git a/src/DebugConsole.cpp b/src/DebugConsole.cpp
index e068670..91139c9 100755
--- a/src/DebugConsole.cpp
+++ b/src/DebugConsole.cpp
@@ -42,7 +42,7 @@ DebugConsole::Run(const String& command) {
 		CleanUp(statement);
 		strTok.GetNextToken(logLevel);
 		//AppLogDebug("method %S statement %S loglevel %S", method.GetPointer(), statement.GetPointer(), logLevel.GetPointer());
-		if(method == L"com.phonegap.DebugConsole.log") {
+		if(method == L"com.cordova.DebugConsole.log") {
 			Log(statement, logLevel);
 		}
 	}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/d3ab5427/src/Device.cpp
----------------------------------------------------------------------
diff --git a/src/Device.cpp b/src/Device.cpp
index a4f8da0..a7c8a5a 100755
--- a/src/Device.cpp
+++ b/src/Device.cpp
@@ -52,7 +52,7 @@ Device::SetDeviceInfo() {
 
     if(r == E_SUCCESS) {
     	String res;
-    	res.Format(1024, L"window.device={platform:'bada',version:'%S',name:'n/a',phonegap:'1.6.0',uuid:'%S'}", platformVersion.GetPointer(), imei.GetPointer());
+    	res.Format(1024, L"window.device={platform:'bada',version:'%S',name:'n/a',cordova:'1.6.0',uuid:'%S'}", platformVersion.GetPointer(), imei.GetPointer());
     	//AppLogDebug("%S", res.GetPointer());
     	pWeb->EvaluateJavascriptN(res);
     }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/d3ab5427/src/GeoLocation.cpp
----------------------------------------------------------------------
diff --git a/src/GeoLocation.cpp b/src/GeoLocation.cpp
index d02de27..54cadbe 100755
--- a/src/GeoLocation.cpp
+++ b/src/GeoLocation.cpp
@@ -35,15 +35,15 @@ GeoLocation::Run(const String& command) {
 		}
 		AppLogDebug("Method %S, Callback: %S", method.GetPointer(), callbackId.GetPointer());
 		// used to determine callback ID
-		if(method == L"com.phonegap.Geolocation.watchPosition" && !callbackId.IsEmpty() && !IsWatching()) {
+		if(method == L"com.cordova.Geolocation.watchPosition" && !callbackId.IsEmpty() && !IsWatching()) {
 			AppLogDebug("watching position...");
 			StartWatching();
 		}
-		if(method == L"com.phonegap.Geolocation.stop" && IsWatching()) {
+		if(method == L"com.cordova.Geolocation.stop" && IsWatching()) {
 			AppLogDebug("stop watching position...");
 			StopWatching();
 		}
-		if(method == L"com.phonegap.Geolocation.getCurrentPosition" && !callbackId.IsEmpty() && !IsWatching()) {
+		if(method == L"com.cordova.Geolocation.getCurrentPosition" && !callbackId.IsEmpty() && !IsWatching()) {
 			AppLogDebug("getting current position...");
 			GetLastKnownLocation();
 		}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/d3ab5427/src/Kamera.cpp
----------------------------------------------------------------------
diff --git a/src/Kamera.cpp b/src/Kamera.cpp
index 5bf71a2..8aaaf30 100755
--- a/src/Kamera.cpp
+++ b/src/Kamera.cpp
@@ -25,7 +25,7 @@ Kamera::Run(const String& command) {
 			return;
 		}
 		strTok.GetNextToken(callbackId);
-		if(method == "com.phonegap.Camera.getPicture" && !callbackId.IsEmpty()) {
+		if(method == "com.cordova.Camera.getPicture" && !callbackId.IsEmpty()) {
 			GetPicture();
 		}
 	}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/d3ab5427/src/Network.cpp
----------------------------------------------------------------------
diff --git a/src/Network.cpp b/src/Network.cpp
index 1b321ab..e69d5bd 100755
--- a/src/Network.cpp
+++ b/src/Network.cpp
@@ -35,7 +35,7 @@ Network::Run(const String& command) {
 		Uri uri;
 		uri.SetUri(hostAddr);
 		AppLogDebug("Method %S, callbackId %S, hostAddr %S URI %S", method.GetPointer(), callbackId.GetPointer(), hostAddr.GetPointer(), uri.ToString().GetPointer());
-		if(method == L"com.phonegap.Network.isReachable") {
+		if(method == L"com.cordova.Network.isReachable") {
 			IsReachable(uri.ToString());
 		}
 		AppLogDebug("Network command %S completed", command.GetPointer());

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/d3ab5427/src/Notification.cpp
----------------------------------------------------------------------
diff --git a/src/Notification.cpp b/src/Notification.cpp
index bb5f958..e943516 100755
--- a/src/Notification.cpp
+++ b/src/Notification.cpp
@@ -24,13 +24,13 @@ Notification::Run(const String& command) {
 			AppLogException("Not enough params");
 			return;
 		}
-		if((method == L"com.phonegap.Notification.alert" || method == L"com.phonegap.Notification.confirm")) {
+		if((method == L"com.cordova.Notification.alert" || method == L"com.cordova.Notification.confirm")) {
 			strTok.GetNextToken(callbackId);
 			AppLogDebug("%S %S", method.GetPointer(), callbackId.GetPointer());
 			if(!callbackId.IsEmpty()) {
 				Dialog();
 			}
-		} else if(method == L"com.phonegap.Notification.vibrate") {
+		} else if(method == L"com.cordova.Notification.vibrate") {
 			long duration;
 			String durationStr;
 
@@ -43,7 +43,7 @@ Notification::Run(const String& command) {
 				return;
 			}
 			Vibrate(duration);
-		} else if(method == L"com.phonegap.Notification.beep") {
+		} else if(method == L"com.cordova.Notification.beep") {
 			int count;
 			String countStr;
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-bada/blob/d3ab5427/src/WebForm.cpp
----------------------------------------------------------------------
diff --git a/src/WebForm.cpp b/src/WebForm.cpp
index 52494c0..9885a8c 100755
--- a/src/WebForm.cpp
+++ b/src/WebForm.cpp
@@ -132,28 +132,28 @@ WebForm::OnLoadingCompleted() {
 
 	// Analyzing PhoneGap command
 	if(__cordovaCommand) {
-		if(__cordovaCommand->StartsWith(L"gap://com.phonegap.Geolocation", 0)) {
+		if(__cordovaCommand->StartsWith(L"gap://com.cordova.Geolocation", 0)) {
 			geolocation->Run(*__cordovaCommand);
 		}
-		else if(__cordovaCommand->StartsWith(L"gap://com.phonegap.Accelerometer", 0)) {
+		else if(__cordovaCommand->StartsWith(L"gap://com.cordova.Accelerometer", 0)) {
 			accel->Run(*__cordovaCommand);
 		}
-		else if(__cordovaCommand->StartsWith(L"gap://com.phonegap.Network", 0)) {
+		else if(__cordovaCommand->StartsWith(L"gap://com.cordova.Network", 0)) {
 			network->Run(*__cordovaCommand);
 		}
-		else if(__cordovaCommand->StartsWith(L"gap://com.phonegap.DebugConsole", 0)) {
+		else if(__cordovaCommand->StartsWith(L"gap://com.cordova.DebugConsole", 0)) {
 			console->Run(*__cordovaCommand);
 		}
-		else if(__cordovaCommand->StartsWith(L"gap://com.phonegap.Compass", 0)) {
+		else if(__cordovaCommand->StartsWith(L"gap://com.cordova.Compass", 0)) {
 			compass->Run(*__cordovaCommand);
 		}
-		else if(__cordovaCommand->StartsWith(L"gap://com.phonegap.Contacts", 0)) {
+		else if(__cordovaCommand->StartsWith(L"gap://com.cordova.Contacts", 0)) {
 			contacts->Run(*__cordovaCommand);
 		}
-		else if(__cordovaCommand->StartsWith(L"gap://com.phonegap.Notification", 0)) {
+		else if(__cordovaCommand->StartsWith(L"gap://com.cordova.Notification", 0)) {
 			notification->Run(*__cordovaCommand);
 		}
-		else if(__cordovaCommand->StartsWith(L"gap://com.phonegap.Camera", 0)) {
+		else if(__cordovaCommand->StartsWith(L"gap://com.cordova.Camera", 0)) {
 			camera->Run(*__cordovaCommand);
 		}
 		// Tell the JS code that we got this command, and we're ready for another