You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ti...@apache.org on 2013/04/15 20:51:48 UTC

[01/54] [abbrv] renamed blackberry assets

Updated Branches:
  refs/heads/future d3c01ad73 -> 73047c40a


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json_writer.cpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json_writer.cpp b/test/plugins/cordova.echo/src/blackberry/public/json_writer.cpp
new file mode 100644
index 0000000..cdf4188
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json_writer.cpp
@@ -0,0 +1,829 @@
+#include <json/writer.h>
+#include <utility>
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+
+#if _MSC_VER >= 1400 // VC++ 8.0
+#pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
+#endif
+
+namespace Json {
+
+static bool isControlCharacter(char ch)
+{
+   return ch > 0 && ch <= 0x1F;
+}
+
+static bool containsControlCharacter( const char* str )
+{
+   while ( *str ) 
+   {
+      if ( isControlCharacter( *(str++) ) )
+         return true;
+   }
+   return false;
+}
+static void uintToString( unsigned int value, 
+                          char *&current )
+{
+   *--current = 0;
+   do
+   {
+      *--current = (value % 10) + '0';
+      value /= 10;
+   }
+   while ( value != 0 );
+}
+
+std::string valueToString( Int value )
+{
+   char buffer[32];
+   char *current = buffer + sizeof(buffer);
+   bool isNegative = value < 0;
+   if ( isNegative )
+      value = -value;
+   uintToString( UInt(value), current );
+   if ( isNegative )
+      *--current = '-';
+   assert( current >= buffer );
+   return current;
+}
+
+
+std::string valueToString( UInt value )
+{
+   char buffer[32];
+   char *current = buffer + sizeof(buffer);
+   uintToString( value, current );
+   assert( current >= buffer );
+   return current;
+}
+
+std::string valueToString( double value )
+{
+   char buffer[32];
+#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning. 
+   sprintf_s(buffer, sizeof(buffer), "%#.16g", value); 
+#else	
+   sprintf(buffer, "%#.16g", value); 
+#endif
+   char* ch = buffer + strlen(buffer) - 1;
+   if (*ch != '0') return buffer; // nothing to truncate, so save time
+   while(ch > buffer && *ch == '0'){
+     --ch;
+   }
+   char* last_nonzero = ch;
+   while(ch >= buffer){
+     switch(*ch){
+     case '0':
+     case '1':
+     case '2':
+     case '3':
+     case '4':
+     case '5':
+     case '6':
+     case '7':
+     case '8':
+     case '9':
+       --ch;
+       continue;
+     case '.':
+       // Truncate zeroes to save bytes in output, but keep one.
+       *(last_nonzero+2) = '\0';
+       return buffer;
+     default:
+       return buffer;
+     }
+   }
+   return buffer;
+}
+
+
+std::string valueToString( bool value )
+{
+   return value ? "true" : "false";
+}
+
+std::string valueToQuotedString( const char *value )
+{
+   // Not sure how to handle unicode...
+   if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL && !containsControlCharacter( value ))
+      return std::string("\"") + value + "\"";
+   // We have to walk value and escape any special characters.
+   // Appending to std::string is not efficient, but this should be rare.
+   // (Note: forward slashes are *not* rare, but I am not escaping them.)
+   unsigned maxsize = strlen(value)*2 + 3; // allescaped+quotes+NULL
+   std::string result;
+   result.reserve(maxsize); // to avoid lots of mallocs
+   result += "\"";
+   for (const char* c=value; *c != 0; ++c)
+   {
+      switch(*c)
+      {
+         case '\"':
+            result += "\\\"";
+            break;
+         case '\\':
+            result += "\\\\";
+            break;
+         case '\b':
+            result += "\\b";
+            break;
+         case '\f':
+            result += "\\f";
+            break;
+         case '\n':
+            result += "\\n";
+            break;
+         case '\r':
+            result += "\\r";
+            break;
+         case '\t':
+            result += "\\t";
+            break;
+         //case '/':
+            // Even though \/ is considered a legal escape in JSON, a bare
+            // slash is also legal, so I see no reason to escape it.
+            // (I hope I am not misunderstanding something.
+            // blep notes: actually escaping \/ may be useful in javascript to avoid </ 
+            // sequence.
+            // Should add a flag to allow this compatibility mode and prevent this 
+            // sequence from occurring.
+         default:
+            if ( isControlCharacter( *c ) )
+            {
+               std::ostringstream oss;
+               oss << "\\u" << std::hex << std::uppercase << std::setfill('0') << std::setw(4) << static_cast<int>(*c);
+               result += oss.str();
+            }
+            else
+            {
+               result += *c;
+            }
+            break;
+      }
+   }
+   result += "\"";
+   return result;
+}
+
+// Class Writer
+// //////////////////////////////////////////////////////////////////
+Writer::~Writer()
+{
+}
+
+
+// Class FastWriter
+// //////////////////////////////////////////////////////////////////
+
+FastWriter::FastWriter()
+   : yamlCompatiblityEnabled_( false )
+{
+}
+
+
+void 
+FastWriter::enableYAMLCompatibility()
+{
+   yamlCompatiblityEnabled_ = true;
+}
+
+
+std::string 
+FastWriter::write( const Value &root )
+{
+   document_ = "";
+   writeValue( root );
+   document_ += "\n";
+   return document_;
+}
+
+
+void 
+FastWriter::writeValue( const Value &value )
+{
+   switch ( value.type() )
+   {
+   case nullValue:
+      document_ += "null";
+      break;
+   case intValue:
+      document_ += valueToString( value.asInt() );
+      break;
+   case uintValue:
+      document_ += valueToString( value.asUInt() );
+      break;
+   case realValue:
+      document_ += valueToString( value.asDouble() );
+      break;
+   case stringValue:
+      document_ += valueToQuotedString( value.asCString() );
+      break;
+   case booleanValue:
+      document_ += valueToString( value.asBool() );
+      break;
+   case arrayValue:
+      {
+         document_ += "[";
+         int size = value.size();
+         for ( int index =0; index < size; ++index )
+         {
+            if ( index > 0 )
+               document_ += ",";
+            writeValue( value[index] );
+         }
+         document_ += "]";
+      }
+      break;
+   case objectValue:
+      {
+         Value::Members members( value.getMemberNames() );
+         document_ += "{";
+         for ( Value::Members::iterator it = members.begin(); 
+               it != members.end(); 
+               ++it )
+         {
+            const std::string &name = *it;
+            if ( it != members.begin() )
+               document_ += ",";
+            document_ += valueToQuotedString( name.c_str() );
+            document_ += yamlCompatiblityEnabled_ ? ": " 
+                                                  : ":";
+            writeValue( value[name] );
+         }
+         document_ += "}";
+      }
+      break;
+   }
+}
+
+
+// Class StyledWriter
+// //////////////////////////////////////////////////////////////////
+
+StyledWriter::StyledWriter()
+   : rightMargin_( 74 )
+   , indentSize_( 3 )
+{
+}
+
+
+std::string 
+StyledWriter::write( const Value &root )
+{
+   document_ = "";
+   addChildValues_ = false;
+   indentString_ = "";
+   writeCommentBeforeValue( root );
+   writeValue( root );
+   writeCommentAfterValueOnSameLine( root );
+   document_ += "\n";
+   return document_;
+}
+
+
+void 
+StyledWriter::writeValue( const Value &value )
+{
+   switch ( value.type() )
+   {
+   case nullValue:
+      pushValue( "null" );
+      break;
+   case intValue:
+      pushValue( valueToString( value.asInt() ) );
+      break;
+   case uintValue:
+      pushValue( valueToString( value.asUInt() ) );
+      break;
+   case realValue:
+      pushValue( valueToString( value.asDouble() ) );
+      break;
+   case stringValue:
+      pushValue( valueToQuotedString( value.asCString() ) );
+      break;
+   case booleanValue:
+      pushValue( valueToString( value.asBool() ) );
+      break;
+   case arrayValue:
+      writeArrayValue( value);
+      break;
+   case objectValue:
+      {
+         Value::Members members( value.getMemberNames() );
+         if ( members.empty() )
+            pushValue( "{}" );
+         else
+         {
+            writeWithIndent( "{" );
+            indent();
+            Value::Members::iterator it = members.begin();
+            while ( true )
+            {
+               const std::string &name = *it;
+               const Value &childValue = value[name];
+               writeCommentBeforeValue( childValue );
+               writeWithIndent( valueToQuotedString( name.c_str() ) );
+               document_ += " : ";
+               writeValue( childValue );
+               if ( ++it == members.end() )
+               {
+                  writeCommentAfterValueOnSameLine( childValue );
+                  break;
+               }
+               document_ += ",";
+               writeCommentAfterValueOnSameLine( childValue );
+            }
+            unindent();
+            writeWithIndent( "}" );
+         }
+      }
+      break;
+   }
+}
+
+
+void 
+StyledWriter::writeArrayValue( const Value &value )
+{
+   unsigned size = value.size();
+   if ( size == 0 )
+      pushValue( "[]" );
+   else
+   {
+      bool isArrayMultiLine = isMultineArray( value );
+      if ( isArrayMultiLine )
+      {
+         writeWithIndent( "[" );
+         indent();
+         bool hasChildValue = !childValues_.empty();
+         unsigned index =0;
+         while ( true )
+         {
+            const Value &childValue = value[index];
+            writeCommentBeforeValue( childValue );
+            if ( hasChildValue )
+               writeWithIndent( childValues_[index] );
+            else
+            {
+               writeIndent();
+               writeValue( childValue );
+            }
+            if ( ++index == size )
+            {
+               writeCommentAfterValueOnSameLine( childValue );
+               break;
+            }
+            document_ += ",";
+            writeCommentAfterValueOnSameLine( childValue );
+         }
+         unindent();
+         writeWithIndent( "]" );
+      }
+      else // output on a single line
+      {
+         assert( childValues_.size() == size );
+         document_ += "[ ";
+         for ( unsigned index =0; index < size; ++index )
+         {
+            if ( index > 0 )
+               document_ += ", ";
+            document_ += childValues_[index];
+         }
+         document_ += " ]";
+      }
+   }
+}
+
+
+bool 
+StyledWriter::isMultineArray( const Value &value )
+{
+   int size = value.size();
+   bool isMultiLine = size*3 >= rightMargin_ ;
+   childValues_.clear();
+   for ( int index =0; index < size  &&  !isMultiLine; ++index )
+   {
+      const Value &childValue = value[index];
+      isMultiLine = isMultiLine  ||
+                     ( (childValue.isArray()  ||  childValue.isObject())  &&  
+                        childValue.size() > 0 );
+   }
+   if ( !isMultiLine ) // check if line length > max line length
+   {
+      childValues_.reserve( size );
+      addChildValues_ = true;
+      int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
+      for ( int index =0; index < size  &&  !isMultiLine; ++index )
+      {
+         writeValue( value[index] );
+         lineLength += int( childValues_[index].length() );
+         isMultiLine = isMultiLine  &&  hasCommentForValue( value[index] );
+      }
+      addChildValues_ = false;
+      isMultiLine = isMultiLine  ||  lineLength >= rightMargin_;
+   }
+   return isMultiLine;
+}
+
+
+void 
+StyledWriter::pushValue( const std::string &value )
+{
+   if ( addChildValues_ )
+      childValues_.push_back( value );
+   else
+      document_ += value;
+}
+
+
+void 
+StyledWriter::writeIndent()
+{
+   if ( !document_.empty() )
+   {
+      char last = document_[document_.length()-1];
+      if ( last == ' ' )     // already indented
+         return;
+      if ( last != '\n' )    // Comments may add new-line
+         document_ += '\n';
+   }
+   document_ += indentString_;
+}
+
+
+void 
+StyledWriter::writeWithIndent( const std::string &value )
+{
+   writeIndent();
+   document_ += value;
+}
+
+
+void 
+StyledWriter::indent()
+{
+   indentString_ += std::string( indentSize_, ' ' );
+}
+
+
+void 
+StyledWriter::unindent()
+{
+   assert( int(indentString_.size()) >= indentSize_ );
+   indentString_.resize( indentString_.size() - indentSize_ );
+}
+
+
+void 
+StyledWriter::writeCommentBeforeValue( const Value &root )
+{
+   if ( !root.hasComment( commentBefore ) )
+      return;
+   document_ += normalizeEOL( root.getComment( commentBefore ) );
+   document_ += "\n";
+}
+
+
+void 
+StyledWriter::writeCommentAfterValueOnSameLine( const Value &root )
+{
+   if ( root.hasComment( commentAfterOnSameLine ) )
+      document_ += " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
+
+   if ( root.hasComment( commentAfter ) )
+   {
+      document_ += "\n";
+      document_ += normalizeEOL( root.getComment( commentAfter ) );
+      document_ += "\n";
+   }
+}
+
+
+bool 
+StyledWriter::hasCommentForValue( const Value &value )
+{
+   return value.hasComment( commentBefore )
+          ||  value.hasComment( commentAfterOnSameLine )
+          ||  value.hasComment( commentAfter );
+}
+
+
+std::string 
+StyledWriter::normalizeEOL( const std::string &text )
+{
+   std::string normalized;
+   normalized.reserve( text.length() );
+   const char *begin = text.c_str();
+   const char *end = begin + text.length();
+   const char *current = begin;
+   while ( current != end )
+   {
+      char c = *current++;
+      if ( c == '\r' ) // mac or dos EOL
+      {
+         if ( *current == '\n' ) // convert dos EOL
+            ++current;
+         normalized += '\n';
+      }
+      else // handle unix EOL & other char
+         normalized += c;
+   }
+   return normalized;
+}
+
+
+// Class StyledStreamWriter
+// //////////////////////////////////////////////////////////////////
+
+StyledStreamWriter::StyledStreamWriter( std::string indentation )
+   : document_(NULL)
+   , rightMargin_( 74 )
+   , indentation_( indentation )
+{
+}
+
+
+void
+StyledStreamWriter::write( std::ostream &out, const Value &root )
+{
+   document_ = &out;
+   addChildValues_ = false;
+   indentString_ = "";
+   writeCommentBeforeValue( root );
+   writeValue( root );
+   writeCommentAfterValueOnSameLine( root );
+   *document_ << "\n";
+   document_ = NULL; // Forget the stream, for safety.
+}
+
+
+void 
+StyledStreamWriter::writeValue( const Value &value )
+{
+   switch ( value.type() )
+   {
+   case nullValue:
+      pushValue( "null" );
+      break;
+   case intValue:
+      pushValue( valueToString( value.asInt() ) );
+      break;
+   case uintValue:
+      pushValue( valueToString( value.asUInt() ) );
+      break;
+   case realValue:
+      pushValue( valueToString( value.asDouble() ) );
+      break;
+   case stringValue:
+      pushValue( valueToQuotedString( value.asCString() ) );
+      break;
+   case booleanValue:
+      pushValue( valueToString( value.asBool() ) );
+      break;
+   case arrayValue:
+      writeArrayValue( value);
+      break;
+   case objectValue:
+      {
+         Value::Members members( value.getMemberNames() );
+         if ( members.empty() )
+            pushValue( "{}" );
+         else
+         {
+            writeWithIndent( "{" );
+            indent();
+            Value::Members::iterator it = members.begin();
+            while ( true )
+            {
+               const std::string &name = *it;
+               const Value &childValue = value[name];
+               writeCommentBeforeValue( childValue );
+               writeWithIndent( valueToQuotedString( name.c_str() ) );
+               *document_ << " : ";
+               writeValue( childValue );
+               if ( ++it == members.end() )
+               {
+                  writeCommentAfterValueOnSameLine( childValue );
+                  break;
+               }
+               *document_ << ",";
+               writeCommentAfterValueOnSameLine( childValue );
+            }
+            unindent();
+            writeWithIndent( "}" );
+         }
+      }
+      break;
+   }
+}
+
+
+void 
+StyledStreamWriter::writeArrayValue( const Value &value )
+{
+   unsigned size = value.size();
+   if ( size == 0 )
+      pushValue( "[]" );
+   else
+   {
+      bool isArrayMultiLine = isMultineArray( value );
+      if ( isArrayMultiLine )
+      {
+         writeWithIndent( "[" );
+         indent();
+         bool hasChildValue = !childValues_.empty();
+         unsigned index =0;
+         while ( true )
+         {
+            const Value &childValue = value[index];
+            writeCommentBeforeValue( childValue );
+            if ( hasChildValue )
+               writeWithIndent( childValues_[index] );
+            else
+            {
+	       writeIndent();
+               writeValue( childValue );
+            }
+            if ( ++index == size )
+            {
+               writeCommentAfterValueOnSameLine( childValue );
+               break;
+            }
+            *document_ << ",";
+            writeCommentAfterValueOnSameLine( childValue );
+         }
+         unindent();
+         writeWithIndent( "]" );
+      }
+      else // output on a single line
+      {
+         assert( childValues_.size() == size );
+         *document_ << "[ ";
+         for ( unsigned index =0; index < size; ++index )
+         {
+            if ( index > 0 )
+               *document_ << ", ";
+            *document_ << childValues_[index];
+         }
+         *document_ << " ]";
+      }
+   }
+}
+
+
+bool 
+StyledStreamWriter::isMultineArray( const Value &value )
+{
+   int size = value.size();
+   bool isMultiLine = size*3 >= rightMargin_ ;
+   childValues_.clear();
+   for ( int index =0; index < size  &&  !isMultiLine; ++index )
+   {
+      const Value &childValue = value[index];
+      isMultiLine = isMultiLine  ||
+                     ( (childValue.isArray()  ||  childValue.isObject())  &&  
+                        childValue.size() > 0 );
+   }
+   if ( !isMultiLine ) // check if line length > max line length
+   {
+      childValues_.reserve( size );
+      addChildValues_ = true;
+      int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
+      for ( int index =0; index < size  &&  !isMultiLine; ++index )
+      {
+         writeValue( value[index] );
+         lineLength += int( childValues_[index].length() );
+         isMultiLine = isMultiLine  &&  hasCommentForValue( value[index] );
+      }
+      addChildValues_ = false;
+      isMultiLine = isMultiLine  ||  lineLength >= rightMargin_;
+   }
+   return isMultiLine;
+}
+
+
+void 
+StyledStreamWriter::pushValue( const std::string &value )
+{
+   if ( addChildValues_ )
+      childValues_.push_back( value );
+   else
+      *document_ << value;
+}
+
+
+void 
+StyledStreamWriter::writeIndent()
+{
+  /*
+    Some comments in this method would have been nice. ;-)
+
+   if ( !document_.empty() )
+   {
+      char last = document_[document_.length()-1];
+      if ( last == ' ' )     // already indented
+         return;
+      if ( last != '\n' )    // Comments may add new-line
+         *document_ << '\n';
+   }
+  */
+   *document_ << '\n' << indentString_;
+}
+
+
+void 
+StyledStreamWriter::writeWithIndent( const std::string &value )
+{
+   writeIndent();
+   *document_ << value;
+}
+
+
+void 
+StyledStreamWriter::indent()
+{
+   indentString_ += indentation_;
+}
+
+
+void 
+StyledStreamWriter::unindent()
+{
+   assert( indentString_.size() >= indentation_.size() );
+   indentString_.resize( indentString_.size() - indentation_.size() );
+}
+
+
+void 
+StyledStreamWriter::writeCommentBeforeValue( const Value &root )
+{
+   if ( !root.hasComment( commentBefore ) )
+      return;
+   *document_ << normalizeEOL( root.getComment( commentBefore ) );
+   *document_ << "\n";
+}
+
+
+void 
+StyledStreamWriter::writeCommentAfterValueOnSameLine( const Value &root )
+{
+   if ( root.hasComment( commentAfterOnSameLine ) )
+      *document_ << " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
+
+   if ( root.hasComment( commentAfter ) )
+   {
+      *document_ << "\n";
+      *document_ << normalizeEOL( root.getComment( commentAfter ) );
+      *document_ << "\n";
+   }
+}
+
+
+bool 
+StyledStreamWriter::hasCommentForValue( const Value &value )
+{
+   return value.hasComment( commentBefore )
+          ||  value.hasComment( commentAfterOnSameLine )
+          ||  value.hasComment( commentAfter );
+}
+
+
+std::string 
+StyledStreamWriter::normalizeEOL( const std::string &text )
+{
+   std::string normalized;
+   normalized.reserve( text.length() );
+   const char *begin = text.c_str();
+   const char *end = begin + text.length();
+   const char *current = begin;
+   while ( current != end )
+   {
+      char c = *current++;
+      if ( c == '\r' ) // mac or dos EOL
+      {
+         if ( *current == '\n' ) // convert dos EOL
+            ++current;
+         normalized += '\n';
+      }
+      else // handle unix EOL & other char
+         normalized += c;
+   }
+   return normalized;
+}
+
+
+std::ostream& operator<<( std::ostream &sout, const Value &root )
+{
+   Json::StyledStreamWriter writer;
+   writer.write(sout, root);
+   return sout;
+}
+
+
+} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/plugin.cpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/plugin.cpp b/test/plugins/cordova.echo/src/blackberry/public/plugin.cpp
new file mode 100644
index 0000000..6906275
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/plugin.cpp
@@ -0,0 +1,320 @@
+#include "plugin.h"
+#include "tokenizer.h"
+
+#ifdef _WINDOWS
+#include <windows.h>
+BOOL APIENTRY DllMain( HANDLE hModule,
+                       DWORD ul_reason_for_call,
+                       LPVOID lpReserved )
+{
+    return TRUE;
+}
+#else
+#include <errno.h>
+#include <string.h>
+
+extern int errno;
+#endif
+
+SendPluginEv SendPluginEvent;
+
+string g_GetSysErrMsg( void )
+{
+    string strError = "Unknown";
+    // Problem loading
+#ifdef _WINDOWS
+    int nErrorCode = GetLastError();
+    LPTSTR s;
+    if ( ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+    NULL, nErrorCode, 0, ( LPTSTR ) &s, 0, NULL ) )
+    {
+        strError = s;
+    }
+    else
+    {
+        char szBuf[ 20 ];
+        _snprintf_s( szBuf, _countof(szBuf), 19, "%d", nErrorCode );
+        strError = szBuf;
+    }
+#else
+    char szError[80];
+    if ( strerror_r( errno, szError, sizeof(szError)  ) )
+    {
+        strError = "no description found";
+    }
+    else
+    {
+        strError = szError;
+    }
+#endif
+    return strError;
+}
+
+void g_sleep( unsigned int mseconds )
+{
+#ifdef _WINDOWS
+    Sleep( mseconds );
+#else
+    usleep( mseconds * 1000 );
+#endif
+}
+
+string& g_trim( string& str )
+{
+    // Whitespace characters
+    char whspc[] = " \t\r\n\v\f";
+
+    // Whack off first part
+    size_t pos = str.find_first_not_of( whspc );
+
+    if ( pos != string::npos )
+        str.replace( 0, pos, "" );
+
+    // Whack off trailing stuff
+    pos = str.find_last_not_of( whspc );
+
+    if ( pos != string::npos )
+        str.replace( pos + 1, str.length() - pos, "" );
+
+    return str;
+}
+
+void g_tokenize( const string& str, const string& delimiters, vector<string>& tokens )
+{
+    tokenize( str, tokens, delimiters );
+}
+
+char* SetEventFunc( SendPluginEv funcPtr )
+{
+    static char * szObjList = onGetObjList();
+    SendPluginEvent = funcPtr;
+    return szObjList;
+}
+
+
+const int nMAXSIZE = 512;
+char* g_pszRetVal = NULL;
+
+//-----------------------------------------------------------
+// Map from an object Id to an object instance
+//-----------------------------------------------------------
+typedef std::map<string, JSExt*> StringToJExt_T;
+
+//-----------------------------------------------------------
+// Map from a browser context to an id mapping
+//-----------------------------------------------------------
+typedef std::map<void*, StringToJExt_T*> VoidToMap_T;
+
+VoidToMap_T g_context2Map;
+
+class GlobalSharedModule
+{
+
+public:
+    GlobalSharedModule( void )
+    {
+        g_pszRetVal = new char[ nMAXSIZE ];
+    }
+
+    ~GlobalSharedModule()
+    {
+        delete [] g_pszRetVal;
+
+        VoidToMap_T::iterator posMaps;
+
+        for ( posMaps = g_context2Map.begin(); posMaps != g_context2Map.end(); ++posMaps )
+        {
+            StringToJExt_T& id2Obj = *posMaps->second;
+            StringToJExt_T::iterator posMap;
+
+            for ( posMap = id2Obj.begin(); posMap != id2Obj.end(); ++posMap )
+            {
+                JSExt* pJSExt = posMap->second;
+
+                if ( pJSExt->CanDelete() )
+                {
+                    delete pJSExt;
+                }
+            }
+
+            id2Obj.erase( id2Obj.begin(), id2Obj.end() );
+        }
+
+        g_context2Map.erase( g_context2Map.begin(), g_context2Map.end() );
+    }
+};
+
+GlobalSharedModule g_sharedModule;
+
+char* g_str2global( const string& strRetVal )
+{
+    int nLen = strRetVal.size();
+
+    if ( nLen >= nMAXSIZE )
+    {
+        delete [] g_pszRetVal;
+        g_pszRetVal = new char[ nLen + 1 ];
+    }
+
+    else
+    {
+        // To minimaize the number of memory reallocations, the assumption
+        // is that in most times this will be the case
+        delete [] g_pszRetVal;
+        g_pszRetVal = new char[ nMAXSIZE ];
+    }
+
+    strcpy( g_pszRetVal, strRetVal.c_str() );
+    return g_pszRetVal;
+}
+
+bool g_unregisterObject( const string& strObjId, void* pContext )
+{
+    // Called by the plugin extension implementation
+    // if the extension handles the deletion of its object
+
+    StringToJExt_T * pID2Obj = NULL;
+
+    VoidToMap_T::iterator iter = g_context2Map.find( pContext );
+
+    if ( iter != g_context2Map.end() )
+    {
+        pID2Obj = iter->second;
+    }
+    else
+    {
+        return false;
+    }
+
+    StringToJExt_T& mapID2Obj = *pID2Obj;
+
+    StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+    if ( r == mapID2Obj.end() )
+    {
+        return false;
+    }
+
+    mapID2Obj.erase( strObjId );
+    return true;
+}
+
+char* InvokeFunction( const char* szCommand, void* pContext )
+{
+    StringToJExt_T * pID2Obj = NULL;
+
+    VoidToMap_T::iterator iter = g_context2Map.find( pContext );
+
+    if ( iter != g_context2Map.end() )
+    {
+        pID2Obj = iter->second;
+    }
+    else
+    {
+        pID2Obj = new StringToJExt_T;
+        g_context2Map[ pContext ] = pID2Obj;
+    }
+
+    StringToJExt_T& mapID2Obj = *pID2Obj;
+
+    string strFullCommand = szCommand;
+    vector<string> arParams;
+    g_tokenize( strFullCommand, " ", arParams );
+    string strCommand = arParams[ 0 ];
+    string strRetVal = szERROR;
+
+    if ( strCommand == szCREATE )
+    {
+        string strClassName = arParams[ 1 ];
+        string strObjId = arParams[ 2 ];
+
+        StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+        if ( r != mapID2Obj.end() )
+        {
+            strRetVal += strObjId;
+            strRetVal += " :Object already exists.";
+            return g_str2global( strRetVal );
+        }
+
+        JSExt* pJSExt = onCreateObject( strClassName, strObjId );
+
+        if ( pJSExt == NULL )
+        {
+            strRetVal += strObjId;
+            strRetVal += " :Unknown object type ";
+            strRetVal += strClassName;
+            return g_str2global( strRetVal );
+        }
+
+        pJSExt->m_pContext = pContext;
+        mapID2Obj[ strObjId ] = pJSExt;
+
+        strRetVal = szOK;
+        strRetVal += strObjId;
+        return g_str2global( strRetVal );
+    }
+    else
+    if ( strCommand == szINVOKE )
+    {
+        string strObjId = arParams[ 1 ];
+        string strMethod = arParams[ 2 ];
+
+        StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+        if ( r == mapID2Obj.end() )
+        {
+            strRetVal += strObjId;
+            strRetVal += " :No object found for id.";
+            return g_str2global( strRetVal );
+        }
+
+        JSExt* pJSExt = r->second;
+
+        size_t nLoc = strFullCommand.find( strObjId );
+
+        if ( nLoc == string::npos )
+        {
+            strRetVal += strObjId;
+            strRetVal += " :Internal InvokeMethod error.";
+            return g_str2global( strRetVal );
+        }
+
+        if ( strMethod == szDISPOSE )
+        {
+            StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+            if ( r == mapID2Obj.end() )
+            {
+                strRetVal = szERROR;
+                strRetVal += strObjId;
+                return g_str2global( strRetVal );
+            }
+
+            JSExt * pJSExt = mapID2Obj[ strObjId ];
+
+            if ( pJSExt->CanDelete() )
+            {
+                delete pJSExt;
+            }
+
+            mapID2Obj.erase( strObjId );
+            strRetVal = szOK;
+            strRetVal += strObjId;
+            return g_str2global( strRetVal );
+        }
+
+        size_t nSuffixLoc = nLoc + strObjId.size();
+        string strInvoke = strFullCommand.substr( nSuffixLoc );
+        strInvoke = g_trim( strInvoke );
+        strRetVal = pJSExt->InvokeMethod( strInvoke );
+        return g_str2global( strRetVal );
+    }
+
+    strRetVal += " :Unknown command ";
+    strRetVal += strCommand;
+    return g_str2global( strRetVal );
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/plugin.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/plugin.h b/test/plugins/cordova.echo/src/blackberry/public/plugin.h
new file mode 100644
index 0000000..4ef7116
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/plugin.h
@@ -0,0 +1,70 @@
+#ifndef _PLUGIN_H
+#define _PLUGIN_H
+
+#include <map>
+#include <string>
+#include <vector>
+#include <unistd.h>
+//#include "tokenizer.h"
+
+using namespace std;
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+//%% Functions exported by this DLL
+//%% Should always be only SetEventFunc and InvokeFunction
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+// g++ requires extern "C" otherwise the names of SetEventFunc and InvokeFunction
+// are mangled C++ style. MS Visual Studio doesn't seem to care though.
+extern "C"
+{
+    typedef void (*SendPluginEv)( const char* szEvent, void* pContext );
+    char* SetEventFunc(SendPluginEv funcPtr);
+    char* InvokeFunction( const char* szCommand, void* pContext );
+}
+
+// JNEXT Framework function of the form:
+// typedef void (*SendPluginEv)( const char* szEvent );
+// used to notify JavaScript of an asynchronous event
+extern SendPluginEv SendPluginEvent;
+
+/////////////////////////////////////////////////////////////////////////
+// Constants and methods common to all JNEXT extensions types
+/////////////////////////////////////////////////////////////////////////
+#define szERROR         "Error "
+#define szOK            "Ok "
+
+#define szDISPOSE       "Dispose"
+#define szINVOKE        "InvokeMethod"
+#define szCREATE        "CreateObj"
+
+/////////////////////////////////////////////////////////////////////////
+// Utility functions
+/////////////////////////////////////////////////////////////////////////
+string& g_trim( string& str );
+void g_tokenize(const string& str,const string& delimiters, vector<string>& tokens);
+char* g_str2static( const string& strRetVal );
+void g_sleep( unsigned int mseconds );
+bool g_unregisterObject( const string& strObjId, void* pContext );
+
+
+/////////////////////////////////////////////////////////////////////////
+// Abstract extension object
+/////////////////////////////////////////////////////////////////////////
+class JSExt
+{
+public:
+    virtual ~JSExt() {};
+    virtual string InvokeMethod( const string& strCommand ) = 0;
+    virtual bool CanDelete( void ) = 0;
+    virtual void TryDelete( void ) {}
+public:
+    void* m_pContext;
+};
+
+/////////////////////////////////////////////////////////////////////////
+// Callback functions to be implemented by the plugin implementation
+/////////////////////////////////////////////////////////////////////////
+extern char* onGetObjList( void );
+extern JSExt* onCreateObject( const string& strClassName, const string& strObjId );
+
+#endif

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/tokenizer.cpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/tokenizer.cpp b/test/plugins/cordova.echo/src/blackberry/public/tokenizer.cpp
new file mode 100644
index 0000000..4a39573
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/tokenizer.cpp
@@ -0,0 +1,222 @@
+/************************************************************************
+The zlib/libpng License
+
+Copyright (c) 2006 Joerg Wiedenmann
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from
+the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented;
+you must not claim that you wrote the original software.
+If you use this software in a product, an acknowledgment
+in the product documentation would be appreciated but is
+not required.
+
+2. Altered source versions must be plainly marked as such,
+and must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source distribution.
+
+***********************************************************************/
+
+/********************************************************************
+	created:	2006-01-28
+	filename: 	tokenizer.cpp
+	author:		J�rg Wiedenmann
+	
+	purpose:	A tokenizer function which provides a very
+				customizable way of breaking up strings.
+
+	history:	2006-01-28, Original version
+				2006-03-04, Fixed a small parsing bug, thanks Elias.
+*********************************************************************/
+
+#include "tokenizer.h"
+
+using namespace std;
+
+void tokenize ( const string& str, vector<string>& result,
+			   const string& delimiters, const string& delimiters_preserve,
+			   const string& quote, const string& esc )
+{
+	// clear the vector
+	if ( false == result.empty() )
+	{
+		result.clear();
+	}
+
+	string::size_type pos = 0; // the current position (char) in the string
+	char ch = 0; // buffer for the current character
+	char delimiter = 0;	// the buffer for the delimiter char which
+							// will be added to the tokens if the delimiter
+							// is preserved
+	char current_quote = 0; // the char of the current open quote
+	bool quoted = false; // indicator if there is an open quote
+	string token;  // string buffer for the token
+	bool token_complete = false; // indicates if the current token is
+								 // read to be added to the result vector
+	string::size_type len = str.length();  // length of the input-string
+
+	// for every char in the input-string
+	while ( len > pos )
+	{
+		// get the character of the string and reset the delimiter buffer
+		ch = str.at(pos);
+		delimiter = 0;
+
+		// assume ch isn't a delimiter
+		bool add_char = true;
+
+		// check ...
+
+		// ... if the delimiter is an escaped character
+		bool escaped = false; // indicates if the next char is protected
+		if ( false == esc.empty() ) // check if esc-chars are  provided
+		{
+			if ( string::npos != esc.find_first_of(ch) )
+			{
+				// get the escaped char
+				++pos;
+				if ( pos < len ) // if there are more chars left
+				{
+					// get the next one
+					ch = str.at(pos);
+
+					// add the escaped character to the token
+					add_char = true;
+				}
+				else // cannot get any more characters
+				{
+					// don't add the esc-char
+					add_char = false;
+				}
+
+				// ignore the remaining delimiter checks
+				escaped = true;
+			}
+		}
+
+		// ... if the delimiter is a quote
+		if ( false == quote.empty() && false == escaped )
+		{
+			// if quote chars are provided and the char isn't protected
+			if ( string::npos != quote.find_first_of(ch) )
+			{
+				// if not quoted, set state to open quote and set
+				// the quote character
+				if ( false == quoted )
+				{
+					quoted = true;
+					current_quote = ch;
+
+					// don't add the quote-char to the token
+					add_char = false;
+				}
+				else // if quote is open already
+				{
+					// check if it is the matching character to close it
+					if ( current_quote == ch )
+					{
+						// close quote and reset the quote character
+						quoted = false;
+						current_quote = 0;
+
+						// don't add the quote-char to the token
+						add_char = false;
+					}
+				} // else
+			}
+		}
+
+		// ... if the delimiter isn't preserved
+		if ( false == delimiters.empty() && false == escaped &&
+			 false == quoted )
+		{
+			// if a delimiter is provided and the char isn't protected by
+			// quote or escape char
+			if ( string::npos != delimiters.find_first_of(ch) )
+			{
+				// if ch is a delimiter and the token string isn't empty
+				// the token is complete
+				if ( false == token.empty() ) // BUGFIX: 2006-03-04
+				{
+					token_complete = true;
+				}
+
+				// don't add the delimiter to the token
+				add_char = false;
+			}
+		}
+
+		// ... if the delimiter is preserved - add it as a token
+		bool add_delimiter = false;
+		if ( false == delimiters_preserve.empty() && false == escaped &&
+			 false == quoted )
+		{
+			// if a delimiter which will be preserved is provided and the
+			// char isn't protected by quote or escape char
+			if ( string::npos != delimiters_preserve.find_first_of(ch) )
+			{
+				// if ch is a delimiter and the token string isn't empty
+				// the token is complete
+				if ( false == token.empty() ) // BUGFIX: 2006-03-04
+				{
+					token_complete = true;
+				}
+
+				// don't add the delimiter to the token
+				add_char = false;
+
+				// add the delimiter
+				delimiter = ch;
+				add_delimiter = true;
+			}
+		}
+
+
+		// add the character to the token
+		if ( true == add_char )
+		{
+			// add the current char
+			token.push_back( ch );
+		}
+
+		// add the token if it is complete
+		if ( true == token_complete && false == token.empty() )
+		{
+			// add the token string
+			result.push_back( token );
+
+			// clear the contents
+			token.clear();
+
+			// build the next token
+			token_complete = false;
+		}
+
+		// add the delimiter
+		if ( true == add_delimiter )
+		{
+			// the next token is the delimiter
+			string delim_token;
+			delim_token.push_back( delimiter );
+			result.push_back( delim_token );
+
+			// REMOVED: 2006-03-04, Bugfix
+		}
+
+		// repeat for the next character
+		++pos;
+	} // while
+
+	// add the final token
+	if ( false == token.empty() )
+	{
+		result.push_back( token );
+	}
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/tokenizer.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/tokenizer.h b/test/plugins/cordova.echo/src/blackberry/public/tokenizer.h
new file mode 100644
index 0000000..75f567c
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/tokenizer.h
@@ -0,0 +1,55 @@
+/************************************************************************
+The zlib/libpng License
+
+Copyright (c) 2006 Joerg Wiedenmann
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from
+the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented;
+	you must not claim that you wrote the original software.
+	If you use this software in a product, an acknowledgment
+	in the product documentation would be appreciated but is
+	not required.
+
+2. Altered source versions must be plainly marked as such,
+	and must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source distribution.
+
+***********************************************************************/
+
+/********************************************************************
+	created:	2006-01-28
+	filename: 	tokenizer.cpp
+	author:		J�rg Wiedenmann
+
+	purpose:	A tokenizer function which provides a very
+				customizable way of breaking up strings.
+*********************************************************************/
+
+#include <vector>
+#include <string>
+using namespace std;
+
+// Function to break up a string into tokens
+//
+// Parameters:
+//-----------
+// str = the input string that will be tokenized
+// result = the tokens for str
+// delimiters = the delimiter characters
+// delimiters preserve = same as above, but the delimiter characters
+//		will be put into the result as a token
+// quote = characters to protect the enclosed characters
+// esc = characters to protect a single character
+//
+
+void tokenize ( const string& str, vector<string>& result,
+			const string& delimiters, const string& delimiters_preserve = "",
+			const string& quote = "\"", const string& esc = "\\" );

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/simulator/echoJnext.so
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/simulator/echoJnext.so b/test/plugins/cordova.echo/src/blackberry/simulator/echoJnext.so
new file mode 100644
index 0000000..2b3c5f5
Binary files /dev/null and b/test/plugins/cordova.echo/src/blackberry/simulator/echoJnext.so differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/src/echo.cpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/src/echo.cpp b/test/plugins/cordova.echo/src/blackberry/src/echo.cpp
new file mode 100644
index 0000000..0d5cc2f
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/src/echo.cpp
@@ -0,0 +1,121 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+
+#include <../public/json/reader.h>
+#include <string>
+#include <sstream>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "echo.hpp"
+
+using namespace std;
+
+/**
+ * Default constructor.
+ */
+Echo::Echo(const std::string& id) : m_id(id) {
+}
+
+/**
+ * Memory destructor.
+ */
+Echo::~Echo() {
+}
+
+/**
+ * This method returns the list of objects implemented by this native
+ * extension.
+ */
+char* onGetObjList() {
+    static char name[] = "Echo";
+    return name;
+}
+
+/**
+ * This method is used by JNext to instantiate the Memory object when
+ * an object is created on the JavaScript server side.
+ */
+JSExt* onCreateObject(const string& className, const string& id) {
+    if (className == "Echo") {
+        return new Echo(id);
+    }
+
+    return NULL;
+}
+
+/**
+ * Method used by JNext to determine if the object can be deleted.
+ */
+bool Echo::CanDelete() {
+    return true;
+}
+
+/**
+ * It will be called from JNext JavaScript side with passed string.
+ * This method implements the interface for the JavaScript to native binding
+ * for invoking native code. This method is triggered when JNext.invoke is
+ * called on the JavaScript side with this native objects id.
+ */
+string Echo::InvokeMethod(const string& command) {
+    int index = command.find_first_of(" ");
+    std::string method = command.substr(0, index);
+    
+    // read in arguments
+    Json::Value obj;
+    if (static_cast<int>(command.length()) > index && index != -1) {
+        std::string jsonObject = command.substr(index + 1, command.length());
+        Json::Reader reader;
+
+        bool parse = reader.parse(jsonObject, obj);
+        if (!parse) {
+            fprintf(stderr, "%s", "error parsing\n");
+            return "Cannot parse JSON object";
+        }
+    }    
+    
+    // Determine which function should be executed
+    if (method == "doEcho") {
+        std::string message = obj["message"].asString();
+        if(message.length() > 0) {
+            return doEcho(message);
+        }else{
+             return doEcho("Nothing to echo.");
+        }
+    }else{
+        return doEcho("Unsupported Method");
+    }
+}
+
+/**
+ * Method that sends off Event message
+ */
+string Echo::doEcho(const std::string& message) {
+    std::string eventString = m_id;
+    eventString.append(" ");
+    eventString.append("cordova.echo.callback");
+    eventString.append(" ");
+    eventString.append(message);
+    SendPluginEvent(eventString.c_str(), m_pContext);
+    return eventString;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/src/echo.hpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/src/echo.hpp b/test/plugins/cordova.echo/src/blackberry/src/echo.hpp
new file mode 100644
index 0000000..408be69
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/src/echo.hpp
@@ -0,0 +1,45 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+#ifndef ECHO_HPP_
+#define ECHO_HPP_
+
+#include <string>
+#include <pthread.h>
+#include "../public/plugin.h"
+
+class Echo: public JSExt {
+
+public:
+    explicit Echo(const std::string& id);
+    virtual ~Echo();
+
+// Interfaces of JSExt
+    virtual bool CanDelete();
+    virtual std::string InvokeMethod(const std::string& command);
+
+private:
+    std::string doEcho(const std::string& message);
+
+    std::string m_id;
+};
+
+#endif /* ECHO_HPP_ */

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/device/echoJnext.so
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/device/echoJnext.so b/test/plugins/cordova.echo/src/device/echoJnext.so
new file mode 100755
index 0000000..169714a
Binary files /dev/null and b/test/plugins/cordova.echo/src/device/echoJnext.so differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/simulator/echoJnext.so
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/simulator/echoJnext.so b/test/plugins/cordova.echo/src/simulator/echoJnext.so
new file mode 100644
index 0000000..2b3c5f5
Binary files /dev/null and b/test/plugins/cordova.echo/src/simulator/echoJnext.so differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/projects/BlackBerry10/www/config.xml
----------------------------------------------------------------------
diff --git a/test/projects/BlackBerry10/www/config.xml b/test/projects/BlackBerry10/www/config.xml
deleted file mode 100644
index 6b132c2..0000000
--- a/test/projects/BlackBerry10/www/config.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
--->
-<!--
-  Widget Configuration Reference:
-    http://docs.blackberry.com/en/developers/deliverables/15274/
--->
-
-<widget xmlns="http://www.w3.org/ns/widgets"
-        xmlns:rim="http://www.blackberry.com/ns/widgets"
-	version="1.0.0.0" id="cordovaExample">
-
-  <name>cordovaExample</name>
-
-  <author>Your Name Here</author>
-
-  <description>
-       A sample Apache Cordova application that responds to the deviceready event.
-  </description>
-    
-  <license href="http://opensource.org/licenses/alphabetical">
-  </license>
-
-  <!-- Cordova API -->
-  <feature id="blackberry.system" required="true" version="1.0.0.0" />
-  <feature id="org.apache.cordova" required="true" version="1.0.0" />
-  <feature id="blackberry.find" required="true" version="1.0.0.0" />
-  <feature id="blackberry.identity" required="true" version="1.0.0.0" />
-  <feature id="blackberry.identity.phone" required="true" version="1.0.0.0" />
-  <feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
-  <feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
-  <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
-  <feature id="blackberry.utils" required="true" version="1.0.0.0" />
-  <feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
-  <feature id="blackberry.app" required="true" version="1.0.0.0" />
-  <feature id="blackberry.app.event" required="true" version="1.0.0.0" />
-  <feature id="blackberry.system.event" required="true" version="1.0.0.0"/>
-  <feature id="blackberry.widgetcache" required="true" version="1.0.0.0"/>
-  <feature id="blackberry.media.camera" />
-  <feature id="blackberry.ui.dialog" />
-  <feature id="blackberry.connection" />
-  <feature id="blackberry.bbm.platform" />
-  <feature id="blackberry.invoke.card" />
-  <feature id="blackberry.pim.contacts" />
-  <feature id="blackberry.ui.contextmenu" />
-  <feature id="blackberry.io.filetransfer" />
-  <feature id="blackberry.io" />
-  <feature id="blackberry.invoke" />
-  <feature id="blackberry.invoked" />
-  <feature id="blackberry.push" />
-  <feature id="blackberry.media.microphone" required="true" version="1.0.0.0"/>
-  
-  <!-- Cordova API -->
-  <access subdomains="true" uri="file:///store/home" />
-  <access subdomains="true" uri="file:///SDCard" />
-
-  <!-- Expose access to all URIs, including the file and http protocols -->
-  <access subdomains="true" uri="*" />
-
-  
-  <icon rim:hover="false" src="res/icon/blackberry/icon-80.png" />
-  <icon rim:hover="true" src="res/icon/blackberry/icon-80.png" />
-
-  <rim:loadingScreen backgroundColor="#CFCFCF"
-                     foregroundImage="res/screen/blackberry/screen-225.png"
-		     onFirstLaunch="true">
-    <rim:transitionEffect type="fadeOut" />
-  </rim:loadingScreen>
-
-  <content src="index.html" />
-
-  <rim:permissions>
-    <rim:permit>use_camera</rim:permit>
-    <rim:permit>read_device_identifying_information</rim:permit>
-    <rim:permit>access_shared</rim:permit>
-    <rim:permit>read_geolocation</rim:permit>
-    <rim:permit>record_audio</rim:permit> 
-    <rim:permit>access_pimdomain_contacts</rim:permit> 
-  </rim:permissions>
-
-</widget>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/projects/BlackBerry10/www/plugins.xml
----------------------------------------------------------------------
diff --git a/test/projects/BlackBerry10/www/plugins.xml b/test/projects/BlackBerry10/www/plugins.xml
deleted file mode 100644
index 3d41236..0000000
--- a/test/projects/BlackBerry10/www/plugins.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
--->
-<plugins>
-  <plugin name="App"            value="org.apache.cordova.app.App"/>
-  <plugin name="Device"         value="org.apache.cordova.device.Device"/>
-  <plugin name="Camera"         value="org.apache.cordova.camera.Camera"/>
-  <plugin name="NetworkStatus"  value="org.apache.cordova.network.Network"/>
-  <plugin name="Notification"   value="org.apache.cordova.notification.Notification"/>
-  <plugin name="Accelerometer"  value="org.apache.cordova.accelerometer.Accelerometer"/>
-  <plugin name="Geolocation"    value="org.apache.cordova.geolocation.Geolocation"/>
-  <plugin name="File"           value="org.apache.cordova.file.FileManager"/>
-  <plugin name="FileTransfer"   value="org.apache.cordova.http.FileTransfer"/>
-  <plugin name="Contacts"       value="org.apache.cordova.pim.Contact"/>
-  <plugin name="Capture"        value="org.apache.cordova.capture.MediaCapture"/>
-  <plugin name="Battery"        value="org.apache.cordova.battery.Battery"/>
-  <plugin name="Media"          value="org.apache.cordova.media.Media"/>
-  <plugin name="Globalization"  value="org.apache.cordova.globalization.Globalization"/>
-</plugins>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/projects/blackberry/www/config.xml
----------------------------------------------------------------------
diff --git a/test/projects/blackberry/www/config.xml b/test/projects/blackberry/www/config.xml
new file mode 100644
index 0000000..6b132c2
--- /dev/null
+++ b/test/projects/blackberry/www/config.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+-->
+<!--
+  Widget Configuration Reference:
+    http://docs.blackberry.com/en/developers/deliverables/15274/
+-->
+
+<widget xmlns="http://www.w3.org/ns/widgets"
+        xmlns:rim="http://www.blackberry.com/ns/widgets"
+	version="1.0.0.0" id="cordovaExample">
+
+  <name>cordovaExample</name>
+
+  <author>Your Name Here</author>
+
+  <description>
+       A sample Apache Cordova application that responds to the deviceready event.
+  </description>
+    
+  <license href="http://opensource.org/licenses/alphabetical">
+  </license>
+
+  <!-- Cordova API -->
+  <feature id="blackberry.system" required="true" version="1.0.0.0" />
+  <feature id="org.apache.cordova" required="true" version="1.0.0" />
+  <feature id="blackberry.find" required="true" version="1.0.0.0" />
+  <feature id="blackberry.identity" required="true" version="1.0.0.0" />
+  <feature id="blackberry.identity.phone" required="true" version="1.0.0.0" />
+  <feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
+  <feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
+  <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
+  <feature id="blackberry.utils" required="true" version="1.0.0.0" />
+  <feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
+  <feature id="blackberry.app" required="true" version="1.0.0.0" />
+  <feature id="blackberry.app.event" required="true" version="1.0.0.0" />
+  <feature id="blackberry.system.event" required="true" version="1.0.0.0"/>
+  <feature id="blackberry.widgetcache" required="true" version="1.0.0.0"/>
+  <feature id="blackberry.media.camera" />
+  <feature id="blackberry.ui.dialog" />
+  <feature id="blackberry.connection" />
+  <feature id="blackberry.bbm.platform" />
+  <feature id="blackberry.invoke.card" />
+  <feature id="blackberry.pim.contacts" />
+  <feature id="blackberry.ui.contextmenu" />
+  <feature id="blackberry.io.filetransfer" />
+  <feature id="blackberry.io" />
+  <feature id="blackberry.invoke" />
+  <feature id="blackberry.invoked" />
+  <feature id="blackberry.push" />
+  <feature id="blackberry.media.microphone" required="true" version="1.0.0.0"/>
+  
+  <!-- Cordova API -->
+  <access subdomains="true" uri="file:///store/home" />
+  <access subdomains="true" uri="file:///SDCard" />
+
+  <!-- Expose access to all URIs, including the file and http protocols -->
+  <access subdomains="true" uri="*" />
+
+  
+  <icon rim:hover="false" src="res/icon/blackberry/icon-80.png" />
+  <icon rim:hover="true" src="res/icon/blackberry/icon-80.png" />
+
+  <rim:loadingScreen backgroundColor="#CFCFCF"
+                     foregroundImage="res/screen/blackberry/screen-225.png"
+		     onFirstLaunch="true">
+    <rim:transitionEffect type="fadeOut" />
+  </rim:loadingScreen>
+
+  <content src="index.html" />
+
+  <rim:permissions>
+    <rim:permit>use_camera</rim:permit>
+    <rim:permit>read_device_identifying_information</rim:permit>
+    <rim:permit>access_shared</rim:permit>
+    <rim:permit>read_geolocation</rim:permit>
+    <rim:permit>record_audio</rim:permit> 
+    <rim:permit>access_pimdomain_contacts</rim:permit> 
+  </rim:permissions>
+
+</widget>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/projects/blackberry/www/plugins.xml
----------------------------------------------------------------------
diff --git a/test/projects/blackberry/www/plugins.xml b/test/projects/blackberry/www/plugins.xml
new file mode 100644
index 0000000..3d41236
--- /dev/null
+++ b/test/projects/blackberry/www/plugins.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+-->
+<plugins>
+  <plugin name="App"            value="org.apache.cordova.app.App"/>
+  <plugin name="Device"         value="org.apache.cordova.device.Device"/>
+  <plugin name="Camera"         value="org.apache.cordova.camera.Camera"/>
+  <plugin name="NetworkStatus"  value="org.apache.cordova.network.Network"/>
+  <plugin name="Notification"   value="org.apache.cordova.notification.Notification"/>
+  <plugin name="Accelerometer"  value="org.apache.cordova.accelerometer.Accelerometer"/>
+  <plugin name="Geolocation"    value="org.apache.cordova.geolocation.Geolocation"/>
+  <plugin name="File"           value="org.apache.cordova.file.FileManager"/>
+  <plugin name="FileTransfer"   value="org.apache.cordova.http.FileTransfer"/>
+  <plugin name="Contacts"       value="org.apache.cordova.pim.Contact"/>
+  <plugin name="Capture"        value="org.apache.cordova.capture.MediaCapture"/>
+  <plugin name="Battery"        value="org.apache.cordova.battery.Battery"/>
+  <plugin name="Media"          value="org.apache.cordova.media.Media"/>
+  <plugin name="Globalization"  value="org.apache.cordova.globalization.Globalization"/>
+</plugins>


[03/54] [abbrv] renamed blackberry assets

Posted by ti...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json/value.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json/value.h b/test/plugins/cordova.echo/src/blackberry/public/json/value.h
new file mode 100644
index 0000000..58bfd88
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json/value.h
@@ -0,0 +1,1069 @@
+#ifndef CPPTL_JSON_H_INCLUDED
+# define CPPTL_JSON_H_INCLUDED
+
+# include "forwards.h"
+# include <string>
+# include <vector>
+
+# ifndef JSON_USE_CPPTL_SMALLMAP
+#  include <map>
+# else
+#  include <cpptl/smallmap.h>
+# endif
+# ifdef JSON_USE_CPPTL
+#  include <cpptl/forwards.h>
+# endif
+
+/** \brief JSON (JavaScript Object Notation).
+ */
+namespace Json {
+
+   /** \brief Type of the value held by a Value object.
+    */
+   enum ValueType
+   {
+      nullValue = 0, ///< 'null' value
+      intValue,      ///< signed integer value
+      uintValue,     ///< unsigned integer value
+      realValue,     ///< double value
+      stringValue,   ///< UTF-8 string value
+      booleanValue,  ///< bool value
+      arrayValue,    ///< array value (ordered list)
+      objectValue    ///< object value (collection of name/value pairs).
+   };
+
+   enum CommentPlacement
+   {
+      commentBefore = 0,        ///< a comment placed on the line before a value
+      commentAfterOnSameLine,   ///< a comment just after a value on the same line
+      commentAfter,             ///< a comment on the line after a value (only make sense for root value)
+      numberOfCommentPlacement
+   };
+
+//# ifdef JSON_USE_CPPTL
+//   typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
+//   typedef CppTL::AnyEnumerator<const Value &> EnumValues;
+//# endif
+
+   /** \brief Lightweight wrapper to tag static string.
+    *
+    * Value constructor and objectValue member assignement takes advantage of the
+    * StaticString and avoid the cost of string duplication when storing the
+    * string or the member name.
+    *
+    * Example of usage:
+    * \code
+    * Json::Value aValue( StaticString("some text") );
+    * Json::Value object;
+    * static const StaticString code("code");
+    * object[code] = 1234;
+    * \endcode
+    */
+   class JSON_API StaticString
+   {
+   public:
+      explicit StaticString( const char *czstring )
+         : str_( czstring )
+      {
+      }
+
+      operator const char *() const
+      {
+         return str_;
+      }
+
+      const char *c_str() const
+      {
+         return str_;
+      }
+
+   private:
+      const char *str_;
+   };
+
+   /** \brief Represents a <a HREF="http://www.json.org">JSON</a> value.
+    *
+    * This class is a discriminated union wrapper that can represents a:
+    * - signed integer [range: Value::minInt - Value::maxInt]
+    * - unsigned integer (range: 0 - Value::maxUInt)
+    * - double
+    * - UTF-8 string
+    * - boolean
+    * - 'null'
+    * - an ordered list of Value
+    * - collection of name/value pairs (javascript object)
+    *
+    * The type of the held value is represented by a #ValueType and 
+    * can be obtained using type().
+    *
+    * values of an #objectValue or #arrayValue can be accessed using operator[]() methods. 
+    * Non const methods will automatically create the a #nullValue element 
+    * if it does not exist. 
+    * The sequence of an #arrayValue will be automatically resize and initialized 
+    * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue.
+    *
+    * The get() methods can be used to obtanis default value in the case the required element
+    * does not exist.
+    *
+    * It is possible to iterate over the list of a #objectValue values using 
+    * the getMemberNames() method.
+    */
+   class JSON_API Value 
+   {
+      friend class ValueIteratorBase;
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+      friend class ValueInternalLink;
+      friend class ValueInternalMap;
+# endif
+   public:
+      typedef std::vector<std::string> Members;
+      typedef ValueIterator iterator;
+      typedef ValueConstIterator const_iterator;
+      typedef Json::UInt UInt;
+      typedef Json::Int Int;
+      typedef UInt ArrayIndex;
+
+      static const Value null;
+      static const Int minInt;
+      static const Int maxInt;
+      static const UInt maxUInt;
+
+   private:
+#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+# ifndef JSON_VALUE_USE_INTERNAL_MAP
+      class CZString 
+      {
+      public:
+         enum DuplicationPolicy 
+         {
+            noDuplication = 0,
+            duplicate,
+            duplicateOnCopy
+         };
+         CZString( int index );
+         CZString( const char *cstr, DuplicationPolicy allocate );
+         CZString( const CZString &other );
+         ~CZString();
+         CZString &operator =( const CZString &other );
+         bool operator<( const CZString &other ) const;
+         bool operator==( const CZString &other ) const;
+         int index() const;
+         const char *c_str() const;
+         bool isStaticString() const;
+      private:
+         void swap( CZString &other );
+         const char *cstr_;
+         int index_;
+      };
+
+   public:
+#  ifndef JSON_USE_CPPTL_SMALLMAP
+      typedef std::map<CZString, Value> ObjectValues;
+#  else
+      typedef CppTL::SmallMap<CZString, Value> ObjectValues;
+#  endif // ifndef JSON_USE_CPPTL_SMALLMAP
+# endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
+#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+   public:
+      /** \brief Create a default Value of the given type.
+
+        This is a very useful constructor.
+        To create an empty array, pass arrayValue.
+        To create an empty object, pass objectValue.
+        Another Value can then be set to this one by assignment.
+	This is useful since clear() and resize() will not alter types.
+
+        Examples:
+	\code
+	Json::Value null_value; // null
+	Json::Value arr_value(Json::arrayValue); // []
+	Json::Value obj_value(Json::objectValue); // {}
+	\endcode
+      */
+      Value( ValueType type = nullValue );
+      Value( Int value );
+      Value( UInt value );
+      Value( double value );
+      Value( const char *value );
+      Value( const char *beginValue, const char *endValue );
+      /** \brief Constructs a value from a static string.
+
+       * Like other value string constructor but do not duplicate the string for
+       * internal storage. The given string must remain alive after the call to this
+       * constructor.
+       * Example of usage:
+       * \code
+       * Json::Value aValue( StaticString("some text") );
+       * \endcode
+       */
+      Value( const StaticString &value );
+      Value( const std::string &value );
+# ifdef JSON_USE_CPPTL
+      Value( const CppTL::ConstString &value );
+# endif
+      Value( bool value );
+      Value( const Value &other );
+      ~Value();
+
+      Value &operator=( const Value &other );
+      /// Swap values.
+      /// \note Currently, comments are intentionally not swapped, for
+      /// both logic and efficiency.
+      void swap( Value &other );
+
+      ValueType type() const;
+
+      bool operator <( const Value &other ) const;
+      bool operator <=( const Value &other ) const;
+      bool operator >=( const Value &other ) const;
+      bool operator >( const Value &other ) const;
+
+      bool operator ==( const Value &other ) const;
+      bool operator !=( const Value &other ) const;
+
+      int compare( const Value &other );
+
+      const char *asCString() const;
+      std::string asString() const;
+# ifdef JSON_USE_CPPTL
+      CppTL::ConstString asConstString() const;
+# endif
+      Int asInt() const;
+      UInt asUInt() const;
+      double asDouble() const;
+      bool asBool() const;
+
+      bool isNull() const;
+      bool isBool() const;
+      bool isInt() const;
+      bool isUInt() const;
+      bool isIntegral() const;
+      bool isDouble() const;
+      bool isNumeric() const;
+      bool isString() const;
+      bool isArray() const;
+      bool isObject() const;
+
+      bool isConvertibleTo( ValueType other ) const;
+
+      /// Number of values in array or object
+      UInt size() const;
+
+      /// \brief Return true if empty array, empty object, or null;
+      /// otherwise, false.
+      bool empty() const;
+
+      /// Return isNull()
+      bool operator!() const;
+
+      /// Remove all object members and array elements.
+      /// \pre type() is arrayValue, objectValue, or nullValue
+      /// \post type() is unchanged
+      void clear();
+
+      /// Resize the array to size elements. 
+      /// New elements are initialized to null.
+      /// May only be called on nullValue or arrayValue.
+      /// \pre type() is arrayValue or nullValue
+      /// \post type() is arrayValue
+      void resize( UInt size );
+
+      /// Access an array element (zero based index ).
+      /// If the array contains less than index element, then null value are inserted
+      /// in the array so that its size is index+1.
+      /// (You may need to say 'value[0u]' to get your compiler to distinguish
+      ///  this from the operator[] which takes a string.)
+      Value &operator[]( UInt index );
+      /// Access an array element (zero based index )
+      /// (You may need to say 'value[0u]' to get your compiler to distinguish
+      ///  this from the operator[] which takes a string.)
+      const Value &operator[]( UInt index ) const;
+      /// If the array contains at least index+1 elements, returns the element value, 
+      /// otherwise returns defaultValue.
+      Value get( UInt index, 
+                 const Value &defaultValue ) const;
+      /// Return true if index < size().
+      bool isValidIndex( UInt index ) const;
+      /// \brief Append value to array at the end.
+      ///
+      /// Equivalent to jsonvalue[jsonvalue.size()] = value;
+      Value &append( const Value &value );
+
+      /// Access an object value by name, create a null member if it does not exist.
+      Value &operator[]( const char *key );
+      /// Access an object value by name, returns null if there is no member with that name.
+      const Value &operator[]( const char *key ) const;
+      /// Access an object value by name, create a null member if it does not exist.
+      Value &operator[]( const std::string &key );
+      /// Access an object value by name, returns null if there is no member with that name.
+      const Value &operator[]( const std::string &key ) const;
+      /** \brief Access an object value by name, create a null member if it does not exist.
+
+       * If the object as no entry for that name, then the member name used to store
+       * the new entry is not duplicated.
+       * Example of use:
+       * \code
+       * Json::Value object;
+       * static const StaticString code("code");
+       * object[code] = 1234;
+       * \endcode
+       */
+      Value &operator[]( const StaticString &key );
+# ifdef JSON_USE_CPPTL
+      /// Access an object value by name, create a null member if it does not exist.
+      Value &operator[]( const CppTL::ConstString &key );
+      /// Access an object value by name, returns null if there is no member with that name.
+      const Value &operator[]( const CppTL::ConstString &key ) const;
+# endif
+      /// Return the member named key if it exist, defaultValue otherwise.
+      Value get( const char *key, 
+                 const Value &defaultValue ) const;
+      /// Return the member named key if it exist, defaultValue otherwise.
+      Value get( const std::string &key,
+                 const Value &defaultValue ) const;
+# ifdef JSON_USE_CPPTL
+      /// Return the member named key if it exist, defaultValue otherwise.
+      Value get( const CppTL::ConstString &key,
+                 const Value &defaultValue ) const;
+# endif
+      /// \brief Remove and return the named member.  
+      ///
+      /// Do nothing if it did not exist.
+      /// \return the removed Value, or null.
+      /// \pre type() is objectValue or nullValue
+      /// \post type() is unchanged
+      Value removeMember( const char* key );
+      /// Same as removeMember(const char*)
+      Value removeMember( const std::string &key );
+
+      /// Return true if the object has a member named key.
+      bool isMember( const char *key ) const;
+      /// Return true if the object has a member named key.
+      bool isMember( const std::string &key ) const;
+# ifdef JSON_USE_CPPTL
+      /// Return true if the object has a member named key.
+      bool isMember( const CppTL::ConstString &key ) const;
+# endif
+
+      /// \brief Return a list of the member names.
+      ///
+      /// If null, return an empty list.
+      /// \pre type() is objectValue or nullValue
+      /// \post if type() was nullValue, it remains nullValue
+      Members getMemberNames() const;
+
+//# ifdef JSON_USE_CPPTL
+//      EnumMemberNames enumMemberNames() const;
+//      EnumValues enumValues() const;
+//# endif
+
+      /// Comments must be //... or /* ... */
+      void setComment( const char *comment,
+                       CommentPlacement placement );
+      /// Comments must be //... or /* ... */
+      void setComment( const std::string &comment,
+                       CommentPlacement placement );
+      bool hasComment( CommentPlacement placement ) const;
+      /// Include delimiters and embedded newlines.
+      std::string getComment( CommentPlacement placement ) const;
+
+      std::string toStyledString() const;
+
+      const_iterator begin() const;
+      const_iterator end() const;
+
+      iterator begin();
+      iterator end();
+
+   private:
+      Value &resolveReference( const char *key, 
+                               bool isStatic );
+
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+      inline bool isItemAvailable() const
+      {
+         return itemIsUsed_ == 0;
+      }
+
+      inline void setItemUsed( bool isUsed = true )
+      {
+         itemIsUsed_ = isUsed ? 1 : 0;
+      }
+
+      inline bool isMemberNameStatic() const
+      {
+         return memberNameIsStatic_ == 0;
+      }
+
+      inline void setMemberNameIsStatic( bool isStatic )
+      {
+         memberNameIsStatic_ = isStatic ? 1 : 0;
+      }
+# endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP
+
+   private:
+      struct CommentInfo
+      {
+         CommentInfo();
+         ~CommentInfo();
+
+         void setComment( const char *text );
+
+         char *comment_;
+      };
+
+      //struct MemberNamesTransform
+      //{
+      //   typedef const char *result_type;
+      //   const char *operator()( const CZString &name ) const
+      //   {
+      //      return name.c_str();
+      //   }
+      //};
+
+      union ValueHolder
+      {
+         Int int_;
+         UInt uint_;
+         double real_;
+         bool bool_;
+         char *string_;
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+         ValueInternalArray *array_;
+         ValueInternalMap *map_;
+#else
+         ObjectValues *map_;
+# endif
+      } value_;
+      ValueType type_ : 8;
+      int allocated_ : 1;     // Notes: if declared as bool, bitfield is useless.
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+      unsigned int itemIsUsed_ : 1;      // used by the ValueInternalMap container.
+      int memberNameIsStatic_ : 1;       // used by the ValueInternalMap container.
+# endif
+      CommentInfo *comments_;
+   };
+
+
+   /** \brief Experimental and untested: represents an element of the "path" to access a node.
+    */
+   class PathArgument
+   {
+   public:
+      friend class Path;
+
+      PathArgument();
+      PathArgument( UInt index );
+      PathArgument( const char *key );
+      PathArgument( const std::string &key );
+
+   private:
+      enum Kind
+      {
+         kindNone = 0,
+         kindIndex,
+         kindKey
+      };
+      std::string key_;
+      UInt index_;
+      Kind kind_;
+   };
+
+   /** \brief Experimental and untested: represents a "path" to access a node.
+    *
+    * Syntax:
+    * - "." => root node
+    * - ".[n]" => elements at index 'n' of root node (an array value)
+    * - ".name" => member named 'name' of root node (an object value)
+    * - ".name1.name2.name3"
+    * - ".[0][1][2].name1[3]"
+    * - ".%" => member name is provided as parameter
+    * - ".[%]" => index is provied as parameter
+    */
+   class Path
+   {
+   public:
+      Path( const std::string &path,
+            const PathArgument &a1 = PathArgument(),
+            const PathArgument &a2 = PathArgument(),
+            const PathArgument &a3 = PathArgument(),
+            const PathArgument &a4 = PathArgument(),
+            const PathArgument &a5 = PathArgument() );
+
+      const Value &resolve( const Value &root ) const;
+      Value resolve( const Value &root, 
+                     const Value &defaultValue ) const;
+      /// Creates the "path" to access the specified node and returns a reference on the node.
+      Value &make( Value &root ) const;
+
+   private:
+      typedef std::vector<const PathArgument *> InArgs;
+      typedef std::vector<PathArgument> Args;
+
+      void makePath( const std::string &path,
+                     const InArgs &in );
+      void addPathInArg( const std::string &path, 
+                         const InArgs &in, 
+                         InArgs::const_iterator &itInArg, 
+                         PathArgument::Kind kind );
+      void invalidPath( const std::string &path, 
+                        int location );
+
+      Args args_;
+   };
+
+   /** \brief Experimental do not use: Allocator to customize member name and string value memory management done by Value.
+    *
+    * - makeMemberName() and releaseMemberName() are called to respectively duplicate and
+    *   free an Json::objectValue member name.
+    * - duplicateStringValue() and releaseStringValue() are called similarly to
+    *   duplicate and free a Json::stringValue value.
+    */
+   class ValueAllocator
+   {
+   public:
+      enum { unknown = (unsigned)-1 };
+
+      virtual ~ValueAllocator();
+
+      virtual char *makeMemberName( const char *memberName ) = 0;
+      virtual void releaseMemberName( char *memberName ) = 0;
+      virtual char *duplicateStringValue( const char *value, 
+                                          unsigned int length = unknown ) = 0;
+      virtual void releaseStringValue( char *value ) = 0;
+   };
+
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   /** \brief Allocator to customize Value internal map.
+    * Below is an example of a simple implementation (default implementation actually
+    * use memory pool for speed).
+    * \code
+      class DefaultValueMapAllocator : public ValueMapAllocator
+      {
+      public: // overridden from ValueMapAllocator
+         virtual ValueInternalMap *newMap()
+         {
+            return new ValueInternalMap();
+         }
+
+         virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
+         {
+            return new ValueInternalMap( other );
+         }
+
+         virtual void destructMap( ValueInternalMap *map )
+         {
+            delete map;
+         }
+
+         virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
+         {
+            return new ValueInternalLink[size];
+         }
+
+         virtual void releaseMapBuckets( ValueInternalLink *links )
+         {
+            delete [] links;
+         }
+
+         virtual ValueInternalLink *allocateMapLink()
+         {
+            return new ValueInternalLink();
+         }
+
+         virtual void releaseMapLink( ValueInternalLink *link )
+         {
+            delete link;
+         }
+      };
+    * \endcode
+    */ 
+   class JSON_API ValueMapAllocator
+   {
+   public:
+      virtual ~ValueMapAllocator();
+      virtual ValueInternalMap *newMap() = 0;
+      virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0;
+      virtual void destructMap( ValueInternalMap *map ) = 0;
+      virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0;
+      virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
+      virtual ValueInternalLink *allocateMapLink() = 0;
+      virtual void releaseMapLink( ValueInternalLink *link ) = 0;
+   };
+
+   /** \brief ValueInternalMap hash-map bucket chain link (for internal use only).
+    * \internal previous_ & next_ allows for bidirectional traversal.
+    */
+   class JSON_API ValueInternalLink
+   {
+   public:
+      enum { itemPerLink = 6 };  // sizeof(ValueInternalLink) = 128 on 32 bits architecture.
+      enum InternalFlags { 
+         flagAvailable = 0,
+         flagUsed = 1
+      };
+
+      ValueInternalLink();
+
+      ~ValueInternalLink();
+
+      Value items_[itemPerLink];
+      char *keys_[itemPerLink];
+      ValueInternalLink *previous_;
+      ValueInternalLink *next_;
+   };
+
+
+   /** \brief A linked page based hash-table implementation used internally by Value.
+    * \internal ValueInternalMap is a tradional bucket based hash-table, with a linked
+    * list in each bucket to handle collision. There is an addional twist in that
+    * each node of the collision linked list is a page containing a fixed amount of
+    * value. This provides a better compromise between memory usage and speed.
+    * 
+    * Each bucket is made up of a chained list of ValueInternalLink. The last
+    * link of a given bucket can be found in the 'previous_' field of the following bucket.
+    * The last link of the last bucket is stored in tailLink_ as it has no following bucket.
+    * Only the last link of a bucket may contains 'available' item. The last link always
+    * contains at least one element unless is it the bucket one very first link.
+    */
+   class JSON_API ValueInternalMap
+   {
+      friend class ValueIteratorBase;
+      friend class Value;
+   public:
+      typedef unsigned int HashKey;
+      typedef unsigned int BucketIndex;
+
+# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+      struct IteratorState
+      {
+         IteratorState() 
+            : map_(0)
+            , link_(0)
+            , itemIndex_(0)
+            , bucketIndex_(0) 
+         {
+         }
+         ValueInternalMap *map_;
+         ValueInternalLink *link_;
+         BucketIndex itemIndex_;
+         BucketIndex bucketIndex_;
+      };
+# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+      ValueInternalMap();
+      ValueInternalMap( const ValueInternalMap &other );
+      ValueInternalMap &operator =( const ValueInternalMap &other );
+      ~ValueInternalMap();
+
+      void swap( ValueInternalMap &other );
+
+      BucketIndex size() const;
+
+      void clear();
+
+      bool reserveDelta( BucketIndex growth );
+
+      bool reserve( BucketIndex newItemCount );
+
+      const Value *find( const char *key ) const;
+
+      Value *find( const char *key );
+
+      Value &resolveReference( const char *key, 
+                               bool isStatic );
+
+      void remove( const char *key );
+
+      void doActualRemove( ValueInternalLink *link, 
+                           BucketIndex index,
+                           BucketIndex bucketIndex );
+
+      ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
+
+      Value &setNewItem( const char *key, 
+                         bool isStatic, 
+                         ValueInternalLink *link, 
+                         BucketIndex index );
+
+      Value &unsafeAdd( const char *key, 
+                        bool isStatic, 
+                        HashKey hashedKey );
+
+      HashKey hash( const char *key ) const;
+
+      int compare( const ValueInternalMap &other ) const;
+
+   private:
+      void makeBeginIterator( IteratorState &it ) const;
+      void makeEndIterator( IteratorState &it ) const;
+      static bool equals( const IteratorState &x, const IteratorState &other );
+      static void increment( IteratorState &iterator );
+      static void incrementBucket( IteratorState &iterator );
+      static void decrement( IteratorState &iterator );
+      static const char *key( const IteratorState &iterator );
+      static const char *key( const IteratorState &iterator, bool &isStatic );
+      static Value &value( const IteratorState &iterator );
+      static int distance( const IteratorState &x, const IteratorState &y );
+
+   private:
+      ValueInternalLink *buckets_;
+      ValueInternalLink *tailLink_;
+      BucketIndex bucketsSize_;
+      BucketIndex itemCount_;
+   };
+
+   /** \brief A simplified deque implementation used internally by Value.
+   * \internal
+   * It is based on a list of fixed "page", each page contains a fixed number of items.
+   * Instead of using a linked-list, a array of pointer is used for fast item look-up.
+   * Look-up for an element is as follow:
+   * - compute page index: pageIndex = itemIndex / itemsPerPage
+   * - look-up item in page: pages_[pageIndex][itemIndex % itemsPerPage]
+   *
+   * Insertion is amortized constant time (only the array containing the index of pointers
+   * need to be reallocated when items are appended).
+   */
+   class JSON_API ValueInternalArray
+   {
+      friend class Value;
+      friend class ValueIteratorBase;
+   public:
+      enum { itemsPerPage = 8 };    // should be a power of 2 for fast divide and modulo.
+      typedef Value::ArrayIndex ArrayIndex;
+      typedef unsigned int PageIndex;
+
+# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+      struct IteratorState // Must be a POD
+      {
+         IteratorState() 
+            : array_(0)
+            , currentPageIndex_(0)
+            , currentItemIndex_(0) 
+         {
+         }
+         ValueInternalArray *array_;
+         Value **currentPageIndex_;
+         unsigned int currentItemIndex_;
+      };
+# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+      ValueInternalArray();
+      ValueInternalArray( const ValueInternalArray &other );
+      ValueInternalArray &operator =( const ValueInternalArray &other );
+      ~ValueInternalArray();
+      void swap( ValueInternalArray &other );
+
+      void clear();
+      void resize( ArrayIndex newSize );
+
+      Value &resolveReference( ArrayIndex index );
+
+      Value *find( ArrayIndex index ) const;
+
+      ArrayIndex size() const;
+
+      int compare( const ValueInternalArray &other ) const;
+
+   private:
+      static bool equals( const IteratorState &x, const IteratorState &other );
+      static void increment( IteratorState &iterator );
+      static void decrement( IteratorState &iterator );
+      static Value &dereference( const IteratorState &iterator );
+      static Value &unsafeDereference( const IteratorState &iterator );
+      static int distance( const IteratorState &x, const IteratorState &y );
+      static ArrayIndex indexOf( const IteratorState &iterator );
+      void makeBeginIterator( IteratorState &it ) const;
+      void makeEndIterator( IteratorState &it ) const;
+      void makeIterator( IteratorState &it, ArrayIndex index ) const;
+
+      void makeIndexValid( ArrayIndex index );
+
+      Value **pages_;
+      ArrayIndex size_;
+      PageIndex pageCount_;
+   };
+
+   /** \brief Experimental: do not use. Allocator to customize Value internal array.
+    * Below is an example of a simple implementation (actual implementation use
+    * memory pool).
+      \code
+class DefaultValueArrayAllocator : public ValueArrayAllocator
+{
+public: // overridden from ValueArrayAllocator
+   virtual ~DefaultValueArrayAllocator()
+   {
+   }
+
+   virtual ValueInternalArray *newArray()
+   {
+      return new ValueInternalArray();
+   }
+
+   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
+   {
+      return new ValueInternalArray( other );
+   }
+
+   virtual void destruct( ValueInternalArray *array )
+   {
+      delete array;
+   }
+
+   virtual void reallocateArrayPageIndex( Value **&indexes, 
+                                          ValueInternalArray::PageIndex &indexCount,
+                                          ValueInternalArray::PageIndex minNewIndexCount )
+   {
+      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
+      if ( minNewIndexCount > newIndexCount )
+         newIndexCount = minNewIndexCount;
+      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
+      if ( !newIndexes )
+         throw std::bad_alloc();
+      indexCount = newIndexCount;
+      indexes = static_cast<Value **>( newIndexes );
+   }
+   virtual void releaseArrayPageIndex( Value **indexes, 
+                                       ValueInternalArray::PageIndex indexCount )
+   {
+      if ( indexes )
+         free( indexes );
+   }
+
+   virtual Value *allocateArrayPage()
+   {
+      return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
+   }
+
+   virtual void releaseArrayPage( Value *value )
+   {
+      if ( value )
+         free( value );
+   }
+};
+      \endcode
+    */ 
+   class JSON_API ValueArrayAllocator
+   {
+   public:
+      virtual ~ValueArrayAllocator();
+      virtual ValueInternalArray *newArray() = 0;
+      virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0;
+      virtual void destructArray( ValueInternalArray *array ) = 0;
+      /** \brief Reallocate array page index.
+       * Reallocates an array of pointer on each page.
+       * \param indexes [input] pointer on the current index. May be \c NULL.
+       *                [output] pointer on the new index of at least 
+       *                         \a minNewIndexCount pages. 
+       * \param indexCount [input] current number of pages in the index.
+       *                   [output] number of page the reallocated index can handle.
+       *                            \b MUST be >= \a minNewIndexCount.
+       * \param minNewIndexCount Minimum number of page the new index must be able to
+       *                         handle.
+       */
+      virtual void reallocateArrayPageIndex( Value **&indexes, 
+                                             ValueInternalArray::PageIndex &indexCount,
+                                             ValueInternalArray::PageIndex minNewIndexCount ) = 0;
+      virtual void releaseArrayPageIndex( Value **indexes, 
+                                          ValueInternalArray::PageIndex indexCount ) = 0;
+      virtual Value *allocateArrayPage() = 0;
+      virtual void releaseArrayPage( Value *value ) = 0;
+   };
+#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
+
+
+   /** \brief base class for Value iterators.
+    *
+    */
+   class ValueIteratorBase
+   {
+   public:
+      typedef unsigned int size_t;
+      typedef int difference_type;
+      typedef ValueIteratorBase SelfType;
+
+      ValueIteratorBase();
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+      explicit ValueIteratorBase( const Value::ObjectValues::iterator &current );
+#else
+      ValueIteratorBase( const ValueInternalArray::IteratorState &state );
+      ValueIteratorBase( const ValueInternalMap::IteratorState &state );
+#endif
+
+      bool operator ==( const SelfType &other ) const
+      {
+         return isEqual( other );
+      }
+
+      bool operator !=( const SelfType &other ) const
+      {
+         return !isEqual( other );
+      }
+
+      difference_type operator -( const SelfType &other ) const
+      {
+         return computeDistance( other );
+      }
+
+      /// Return either the index or the member name of the referenced value as a Value.
+      Value key() const;
+
+      /// Return the index of the referenced Value. -1 if it is not an arrayValue.
+      UInt index() const;
+
+      /// Return the member name of the referenced Value. "" if it is not an objectValue.
+      const char *memberName() const;
+
+   protected:
+      Value &deref() const;
+
+      void increment();
+
+      void decrement();
+
+      difference_type computeDistance( const SelfType &other ) const;
+
+      bool isEqual( const SelfType &other ) const;
+
+      void copy( const SelfType &other );
+
+   private:
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+      Value::ObjectValues::iterator current_;
+      // Indicates that iterator is for a null value.
+      bool isNull_;
+#else
+      union
+      {
+         ValueInternalArray::IteratorState array_;
+         ValueInternalMap::IteratorState map_;
+      } iterator_;
+      bool isArray_;
+#endif
+   };
+
+   /** \brief const iterator for object and array value.
+    *
+    */
+   class ValueConstIterator : public ValueIteratorBase
+   {
+      friend class Value;
+   public:
+      typedef unsigned int size_t;
+      typedef int difference_type;
+      typedef const Value &reference;
+      typedef const Value *pointer;
+      typedef ValueConstIterator SelfType;
+
+      ValueConstIterator();
+   private:
+      /*! \internal Use by Value to create an iterator.
+       */
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+      explicit ValueConstIterator( const Value::ObjectValues::iterator &current );
+#else
+      ValueConstIterator( const ValueInternalArray::IteratorState &state );
+      ValueConstIterator( const ValueInternalMap::IteratorState &state );
+#endif
+   public:
+      SelfType &operator =( const ValueIteratorBase &other );
+
+      SelfType operator++( int )
+      {
+         SelfType temp( *this );
+         ++*this;
+         return temp;
+      }
+
+      SelfType operator--( int )
+      {
+         SelfType temp( *this );
+         --*this;
+         return temp;
+      }
+
+      SelfType &operator--()
+      {
+         decrement();
+         return *this;
+      }
+
+      SelfType &operator++()
+      {
+         increment();
+         return *this;
+      }
+
+      reference operator *() const
+      {
+         return deref();
+      }
+   };
+
+
+   /** \brief Iterator for object and array value.
+    */
+   class ValueIterator : public ValueIteratorBase
+   {
+      friend class Value;
+   public:
+      typedef unsigned int size_t;
+      typedef int difference_type;
+      typedef Value &reference;
+      typedef Value *pointer;
+      typedef ValueIterator SelfType;
+
+      ValueIterator();
+      ValueIterator( const ValueConstIterator &other );
+      ValueIterator( const ValueIterator &other );
+   private:
+      /*! \internal Use by Value to create an iterator.
+       */
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+      explicit ValueIterator( const Value::ObjectValues::iterator &current );
+#else
+      ValueIterator( const ValueInternalArray::IteratorState &state );
+      ValueIterator( const ValueInternalMap::IteratorState &state );
+#endif
+   public:
+
+      SelfType &operator =( const SelfType &other );
+
+      SelfType operator++( int )
+      {
+         SelfType temp( *this );
+         ++*this;
+         return temp;
+      }
+
+      SelfType operator--( int )
+      {
+         SelfType temp( *this );
+         --*this;
+         return temp;
+      }
+
+      SelfType &operator--()
+      {
+         decrement();
+         return *this;
+      }
+
+      SelfType &operator++()
+      {
+         increment();
+         return *this;
+      }
+
+      reference operator *() const
+      {
+         return deref();
+      }
+   };
+
+
+} // namespace Json
+
+
+#endif // CPPTL_JSON_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json/writer.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json/writer.h b/test/plugins/cordova.echo/src/blackberry/public/json/writer.h
new file mode 100644
index 0000000..5f4b83b
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json/writer.h
@@ -0,0 +1,174 @@
+#ifndef JSON_WRITER_H_INCLUDED
+# define JSON_WRITER_H_INCLUDED
+
+# include "value.h"
+# include <vector>
+# include <string>
+# include <iostream>
+
+namespace Json {
+
+   class Value;
+
+   /** \brief Abstract class for writers.
+    */
+   class JSON_API Writer
+   {
+   public:
+      virtual ~Writer();
+
+      virtual std::string write( const Value &root ) = 0;
+   };
+
+   /** \brief Outputs a Value in <a HREF="http://www.json.org">JSON</a> format without formatting (not human friendly).
+    *
+    * The JSON document is written in a single line. It is not intended for 'human' consumption,
+    * but may be usefull to support feature such as RPC where bandwith is limited.
+    * \sa Reader, Value
+    */
+   class JSON_API FastWriter : public Writer
+   {
+   public:
+      FastWriter();
+      virtual ~FastWriter(){}
+
+      void enableYAMLCompatibility();
+
+   public: // overridden from Writer
+      virtual std::string write( const Value &root );
+
+   private:
+      void writeValue( const Value &value );
+
+      std::string document_;
+      bool yamlCompatiblityEnabled_;
+   };
+
+   /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way.
+    *
+    * The rules for line break and indent are as follow:
+    * - Object value:
+    *     - if empty then print {} without indent and line break
+    *     - if not empty the print '{', line break & indent, print one value per line
+    *       and then unindent and line break and print '}'.
+    * - Array value:
+    *     - if empty then print [] without indent and line break
+    *     - if the array contains no object value, empty array or some other value types,
+    *       and all the values fit on one lines, then print the array on a single line.
+    *     - otherwise, it the values do not fit on one line, or the array contains
+    *       object or non empty array, then print one value per line.
+    *
+    * If the Value have comments then they are outputed according to their #CommentPlacement.
+    *
+    * \sa Reader, Value, Value::setComment()
+    */
+   class JSON_API StyledWriter: public Writer
+   {
+   public:
+      StyledWriter();
+      virtual ~StyledWriter(){}
+
+   public: // overridden from Writer
+      /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
+       * \param root Value to serialize.
+       * \return String containing the JSON document that represents the root value.
+       */
+      virtual std::string write( const Value &root );
+
+   private:
+      void writeValue( const Value &value );
+      void writeArrayValue( const Value &value );
+      bool isMultineArray( const Value &value );
+      void pushValue( const std::string &value );
+      void writeIndent();
+      void writeWithIndent( const std::string &value );
+      void indent();
+      void unindent();
+      void writeCommentBeforeValue( const Value &root );
+      void writeCommentAfterValueOnSameLine( const Value &root );
+      bool hasCommentForValue( const Value &value );
+      static std::string normalizeEOL( const std::string &text );
+
+      typedef std::vector<std::string> ChildValues;
+
+      ChildValues childValues_;
+      std::string document_;
+      std::string indentString_;
+      int rightMargin_;
+      int indentSize_;
+      bool addChildValues_;
+   };
+
+   /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way,
+        to a stream rather than to a string.
+    *
+    * The rules for line break and indent are as follow:
+    * - Object value:
+    *     - if empty then print {} without indent and line break
+    *     - if not empty the print '{', line break & indent, print one value per line
+    *       and then unindent and line break and print '}'.
+    * - Array value:
+    *     - if empty then print [] without indent and line break
+    *     - if the array contains no object value, empty array or some other value types,
+    *       and all the values fit on one lines, then print the array on a single line.
+    *     - otherwise, it the values do not fit on one line, or the array contains
+    *       object or non empty array, then print one value per line.
+    *
+    * If the Value have comments then they are outputed according to their #CommentPlacement.
+    *
+    * \param indentation Each level will be indented by this amount extra.
+    * \sa Reader, Value, Value::setComment()
+    */
+   class JSON_API StyledStreamWriter
+   {
+   public:
+      StyledStreamWriter( std::string indentation="\t" );
+      ~StyledStreamWriter(){}
+
+   public:
+      /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
+       * \param out Stream to write to. (Can be ostringstream, e.g.)
+       * \param root Value to serialize.
+       * \note There is no point in deriving from Writer, since write() should not return a value.
+       */
+      void write( std::ostream &out, const Value &root );
+
+   private:
+      void writeValue( const Value &value );
+      void writeArrayValue( const Value &value );
+      bool isMultineArray( const Value &value );
+      void pushValue( const std::string &value );
+      void writeIndent();
+      void writeWithIndent( const std::string &value );
+      void indent();
+      void unindent();
+      void writeCommentBeforeValue( const Value &root );
+      void writeCommentAfterValueOnSameLine( const Value &root );
+      bool hasCommentForValue( const Value &value );
+      static std::string normalizeEOL( const std::string &text );
+
+      typedef std::vector<std::string> ChildValues;
+
+      ChildValues childValues_;
+      std::ostream* document_;
+      std::string indentString_;
+      int rightMargin_;
+      std::string indentation_;
+      bool addChildValues_;
+   };
+
+   std::string JSON_API valueToString( Int value );
+   std::string JSON_API valueToString( UInt value );
+   std::string JSON_API valueToString( double value );
+   std::string JSON_API valueToString( bool value );
+   std::string JSON_API valueToQuotedString( const char *value );
+
+   /// \brief Output using the StyledStreamWriter.
+   /// \see Json::operator>>()
+   std::ostream& operator<<( std::ostream&, const Value &root );
+
+} // namespace Json
+
+
+
+#endif // JSON_WRITER_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json_batchallocator.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json_batchallocator.h b/test/plugins/cordova.echo/src/blackberry/public/json_batchallocator.h
new file mode 100644
index 0000000..87ea5ed
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json_batchallocator.h
@@ -0,0 +1,125 @@
+#ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED
+# define JSONCPP_BATCHALLOCATOR_H_INCLUDED
+
+# include <stdlib.h>
+# include <assert.h>
+
+# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
+
+namespace Json {
+
+/* Fast memory allocator.
+ *
+ * This memory allocator allocates memory for a batch of object (specified by
+ * the page size, the number of object in each page).
+ *
+ * It does not allow the destruction of a single object. All the allocated objects
+ * can be destroyed at once. The memory can be either released or reused for future
+ * allocation.
+ * 
+ * The in-place new operator must be used to construct the object using the pointer
+ * returned by allocate.
+ */
+template<typename AllocatedType
+        ,const unsigned int objectPerAllocation>
+class BatchAllocator
+{
+public:
+   typedef AllocatedType Type;
+
+   BatchAllocator( unsigned int objectsPerPage = 255 )
+      : freeHead_( 0 )
+      , objectsPerPage_( objectsPerPage )
+   {
+//      printf( "Size: %d => %s\n", sizeof(AllocatedType), typeid(AllocatedType).name() );
+      assert( sizeof(AllocatedType) * objectPerAllocation >= sizeof(AllocatedType *) ); // We must be able to store a slist in the object free space.
+      assert( objectsPerPage >= 16 );
+      batches_ = allocateBatch( 0 );   // allocated a dummy page
+      currentBatch_ = batches_;
+   }
+
+   ~BatchAllocator()
+   {
+      for ( BatchInfo *batch = batches_; batch;  )
+      {
+         BatchInfo *nextBatch = batch->next_;
+         free( batch );
+         batch = nextBatch;
+      }
+   }
+
+   /// allocate space for an array of objectPerAllocation object.
+   /// @warning it is the responsability of the caller to call objects constructors.
+   AllocatedType *allocate()
+   {
+      if ( freeHead_ ) // returns node from free list.
+      {
+         AllocatedType *object = freeHead_;
+         freeHead_ = *(AllocatedType **)object;
+         return object;
+      }
+      if ( currentBatch_->used_ == currentBatch_->end_ )
+      {
+         currentBatch_ = currentBatch_->next_;
+         while ( currentBatch_  &&  currentBatch_->used_ == currentBatch_->end_ )
+            currentBatch_ = currentBatch_->next_;
+
+         if ( !currentBatch_  ) // no free batch found, allocate a new one
+         { 
+            currentBatch_ = allocateBatch( objectsPerPage_ );
+            currentBatch_->next_ = batches_; // insert at the head of the list
+            batches_ = currentBatch_;
+         }
+      }
+      AllocatedType *allocated = currentBatch_->used_;
+      currentBatch_->used_ += objectPerAllocation;
+      return allocated;
+   }
+
+   /// Release the object.
+   /// @warning it is the responsability of the caller to actually destruct the object.
+   void release( AllocatedType *object )
+   {
+      assert( object != 0 );
+      *(AllocatedType **)object = freeHead_;
+      freeHead_ = object;
+   }
+
+private:
+   struct BatchInfo
+   {
+      BatchInfo *next_;
+      AllocatedType *used_;
+      AllocatedType *end_;
+      AllocatedType buffer_[objectPerAllocation];
+   };
+
+   // disabled copy constructor and assignement operator.
+   BatchAllocator( const BatchAllocator & );
+   void operator =( const BatchAllocator &);
+
+   static BatchInfo *allocateBatch( unsigned int objectsPerPage )
+   {
+      const unsigned int mallocSize = sizeof(BatchInfo) - sizeof(AllocatedType)* objectPerAllocation
+                                + sizeof(AllocatedType) * objectPerAllocation * objectsPerPage;
+      BatchInfo *batch = static_cast<BatchInfo*>( malloc( mallocSize ) );
+      batch->next_ = 0;
+      batch->used_ = batch->buffer_;
+      batch->end_ = batch->buffer_ + objectsPerPage;
+      return batch;
+   }
+
+   BatchInfo *batches_;
+   BatchInfo *currentBatch_;
+   /// Head of a single linked list within the allocated space of freeed object
+   AllocatedType *freeHead_;
+   unsigned int objectsPerPage_;
+};
+
+
+} // namespace Json
+
+# endif // ifndef JSONCPP_DOC_INCLUDE_IMPLEMENTATION
+
+#endif // JSONCPP_BATCHALLOCATOR_H_INCLUDED
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json_internalarray.inl
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json_internalarray.inl b/test/plugins/cordova.echo/src/blackberry/public/json_internalarray.inl
new file mode 100644
index 0000000..9b985d2
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json_internalarray.inl
@@ -0,0 +1,448 @@
+// included by json_value.cpp
+// everything is within Json namespace
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueInternalArray
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueArrayAllocator::~ValueArrayAllocator()
+{
+}
+
+// //////////////////////////////////////////////////////////////////
+// class DefaultValueArrayAllocator
+// //////////////////////////////////////////////////////////////////
+#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+class DefaultValueArrayAllocator : public ValueArrayAllocator
+{
+public: // overridden from ValueArrayAllocator
+   virtual ~DefaultValueArrayAllocator()
+   {
+   }
+
+   virtual ValueInternalArray *newArray()
+   {
+      return new ValueInternalArray();
+   }
+
+   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
+   {
+      return new ValueInternalArray( other );
+   }
+
+   virtual void destructArray( ValueInternalArray *array )
+   {
+      delete array;
+   }
+
+   virtual void reallocateArrayPageIndex( Value **&indexes, 
+                                          ValueInternalArray::PageIndex &indexCount,
+                                          ValueInternalArray::PageIndex minNewIndexCount )
+   {
+      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
+      if ( minNewIndexCount > newIndexCount )
+         newIndexCount = minNewIndexCount;
+      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
+      if ( !newIndexes )
+         throw std::bad_alloc();
+      indexCount = newIndexCount;
+      indexes = static_cast<Value **>( newIndexes );
+   }
+   virtual void releaseArrayPageIndex( Value **indexes, 
+                                       ValueInternalArray::PageIndex indexCount )
+   {
+      if ( indexes )
+         free( indexes );
+   }
+
+   virtual Value *allocateArrayPage()
+   {
+      return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
+   }
+
+   virtual void releaseArrayPage( Value *value )
+   {
+      if ( value )
+         free( value );
+   }
+};
+
+#else // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+/// @todo make this thread-safe (lock when accessign batch allocator)
+class DefaultValueArrayAllocator : public ValueArrayAllocator
+{
+public: // overridden from ValueArrayAllocator
+   virtual ~DefaultValueArrayAllocator()
+   {
+   }
+
+   virtual ValueInternalArray *newArray()
+   {
+      ValueInternalArray *array = arraysAllocator_.allocate();
+      new (array) ValueInternalArray(); // placement new
+      return array;
+   }
+
+   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
+   {
+      ValueInternalArray *array = arraysAllocator_.allocate();
+      new (array) ValueInternalArray( other ); // placement new
+      return array;
+   }
+
+   virtual void destructArray( ValueInternalArray *array )
+   {
+      if ( array )
+      {
+         array->~ValueInternalArray();
+         arraysAllocator_.release( array );
+      }
+   }
+
+   virtual void reallocateArrayPageIndex( Value **&indexes, 
+                                          ValueInternalArray::PageIndex &indexCount,
+                                          ValueInternalArray::PageIndex minNewIndexCount )
+   {
+      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
+      if ( minNewIndexCount > newIndexCount )
+         newIndexCount = minNewIndexCount;
+      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
+      if ( !newIndexes )
+         throw std::bad_alloc();
+      indexCount = newIndexCount;
+      indexes = static_cast<Value **>( newIndexes );
+   }
+   virtual void releaseArrayPageIndex( Value **indexes, 
+                                       ValueInternalArray::PageIndex indexCount )
+   {
+      if ( indexes )
+         free( indexes );
+   }
+
+   virtual Value *allocateArrayPage()
+   {
+      return static_cast<Value *>( pagesAllocator_.allocate() );
+   }
+
+   virtual void releaseArrayPage( Value *value )
+   {
+      if ( value )
+         pagesAllocator_.release( value );
+   }
+private:
+   BatchAllocator<ValueInternalArray,1> arraysAllocator_;
+   BatchAllocator<Value,ValueInternalArray::itemsPerPage> pagesAllocator_;
+};
+#endif // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+
+static ValueArrayAllocator *&arrayAllocator()
+{
+   static DefaultValueArrayAllocator defaultAllocator;
+   static ValueArrayAllocator *arrayAllocator = &defaultAllocator;
+   return arrayAllocator;
+}
+
+static struct DummyArrayAllocatorInitializer {
+   DummyArrayAllocatorInitializer() 
+   {
+      arrayAllocator();      // ensure arrayAllocator() statics are initialized before main().
+   }
+} dummyArrayAllocatorInitializer;
+
+// //////////////////////////////////////////////////////////////////
+// class ValueInternalArray
+// //////////////////////////////////////////////////////////////////
+bool 
+ValueInternalArray::equals( const IteratorState &x, 
+                            const IteratorState &other )
+{
+   return x.array_ == other.array_  
+          &&  x.currentItemIndex_ == other.currentItemIndex_  
+          &&  x.currentPageIndex_ == other.currentPageIndex_;
+}
+
+
+void 
+ValueInternalArray::increment( IteratorState &it )
+{
+   JSON_ASSERT_MESSAGE( it.array_  &&
+      (it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
+      != it.array_->size_,
+      "ValueInternalArray::increment(): moving iterator beyond end" );
+   ++(it.currentItemIndex_);
+   if ( it.currentItemIndex_ == itemsPerPage )
+   {
+      it.currentItemIndex_ = 0;
+      ++(it.currentPageIndex_);
+   }
+}
+
+
+void 
+ValueInternalArray::decrement( IteratorState &it )
+{
+   JSON_ASSERT_MESSAGE( it.array_  &&  it.currentPageIndex_ == it.array_->pages_ 
+                        &&  it.currentItemIndex_ == 0,
+      "ValueInternalArray::decrement(): moving iterator beyond end" );
+   if ( it.currentItemIndex_ == 0 )
+   {
+      it.currentItemIndex_ = itemsPerPage-1;
+      --(it.currentPageIndex_);
+   }
+   else
+   {
+      --(it.currentItemIndex_);
+   }
+}
+
+
+Value &
+ValueInternalArray::unsafeDereference( const IteratorState &it )
+{
+   return (*(it.currentPageIndex_))[it.currentItemIndex_];
+}
+
+
+Value &
+ValueInternalArray::dereference( const IteratorState &it )
+{
+   JSON_ASSERT_MESSAGE( it.array_  &&
+      (it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
+      < it.array_->size_,
+      "ValueInternalArray::dereference(): dereferencing invalid iterator" );
+   return unsafeDereference( it );
+}
+
+void 
+ValueInternalArray::makeBeginIterator( IteratorState &it ) const
+{
+   it.array_ = const_cast<ValueInternalArray *>( this );
+   it.currentItemIndex_ = 0;
+   it.currentPageIndex_ = pages_;
+}
+
+
+void 
+ValueInternalArray::makeIterator( IteratorState &it, ArrayIndex index ) const
+{
+   it.array_ = const_cast<ValueInternalArray *>( this );
+   it.currentItemIndex_ = index % itemsPerPage;
+   it.currentPageIndex_ = pages_ + index / itemsPerPage;
+}
+
+
+void 
+ValueInternalArray::makeEndIterator( IteratorState &it ) const
+{
+   makeIterator( it, size_ );
+}
+
+
+ValueInternalArray::ValueInternalArray()
+   : pages_( 0 )
+   , size_( 0 )
+   , pageCount_( 0 )
+{
+}
+
+
+ValueInternalArray::ValueInternalArray( const ValueInternalArray &other )
+   : pages_( 0 )
+   , pageCount_( 0 )
+   , size_( other.size_ )
+{
+   PageIndex minNewPages = other.size_ / itemsPerPage;
+   arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
+   JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages, 
+                        "ValueInternalArray::reserve(): bad reallocation" );
+   IteratorState itOther;
+   other.makeBeginIterator( itOther );
+   Value *value;
+   for ( ArrayIndex index = 0; index < size_; ++index, increment(itOther) )
+   {
+      if ( index % itemsPerPage == 0 )
+      {
+         PageIndex pageIndex = index / itemsPerPage;
+         value = arrayAllocator()->allocateArrayPage();
+         pages_[pageIndex] = value;
+      }
+      new (value) Value( dereference( itOther ) );
+   }
+}
+
+
+ValueInternalArray &
+ValueInternalArray::operator =( const ValueInternalArray &other )
+{
+   ValueInternalArray temp( other );
+   swap( temp );
+   return *this;
+}
+
+
+ValueInternalArray::~ValueInternalArray()
+{
+   // destroy all constructed items
+   IteratorState it;
+   IteratorState itEnd;
+   makeBeginIterator( it);
+   makeEndIterator( itEnd );
+   for ( ; !equals(it,itEnd); increment(it) )
+   {
+      Value *value = &dereference(it);
+      value->~Value();
+   }
+   // release all pages
+   PageIndex lastPageIndex = size_ / itemsPerPage;
+   for ( PageIndex pageIndex = 0; pageIndex < lastPageIndex; ++pageIndex )
+      arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
+   // release pages index
+   arrayAllocator()->releaseArrayPageIndex( pages_, pageCount_ );
+}
+
+
+void 
+ValueInternalArray::swap( ValueInternalArray &other )
+{
+   Value **tempPages = pages_;
+   pages_ = other.pages_;
+   other.pages_ = tempPages;
+   ArrayIndex tempSize = size_;
+   size_ = other.size_;
+   other.size_ = tempSize;
+   PageIndex tempPageCount = pageCount_;
+   pageCount_ = other.pageCount_;
+   other.pageCount_ = tempPageCount;
+}
+
+void 
+ValueInternalArray::clear()
+{
+   ValueInternalArray dummy;
+   swap( dummy );
+}
+
+
+void 
+ValueInternalArray::resize( ArrayIndex newSize )
+{
+   if ( newSize == 0 )
+      clear();
+   else if ( newSize < size_ )
+   {
+      IteratorState it;
+      IteratorState itEnd;
+      makeIterator( it, newSize );
+      makeIterator( itEnd, size_ );
+      for ( ; !equals(it,itEnd); increment(it) )
+      {
+         Value *value = &dereference(it);
+         value->~Value();
+      }
+      PageIndex pageIndex = (newSize + itemsPerPage - 1) / itemsPerPage;
+      PageIndex lastPageIndex = size_ / itemsPerPage;
+      for ( ; pageIndex < lastPageIndex; ++pageIndex )
+         arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
+      size_ = newSize;
+   }
+   else if ( newSize > size_ )
+      resolveReference( newSize );
+}
+
+
+void 
+ValueInternalArray::makeIndexValid( ArrayIndex index )
+{
+   // Need to enlarge page index ?
+   if ( index >= pageCount_ * itemsPerPage )
+   {
+      PageIndex minNewPages = (index + 1) / itemsPerPage;
+      arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
+      JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages, "ValueInternalArray::reserve(): bad reallocation" );
+   }
+
+   // Need to allocate new pages ?
+   ArrayIndex nextPageIndex = 
+      (size_ % itemsPerPage) != 0 ? size_ - (size_%itemsPerPage) + itemsPerPage
+                                  : size_;
+   if ( nextPageIndex <= index )
+   {
+      PageIndex pageIndex = nextPageIndex / itemsPerPage;
+      PageIndex pageToAllocate = (index - nextPageIndex) / itemsPerPage + 1;
+      for ( ; pageToAllocate-- > 0; ++pageIndex )
+         pages_[pageIndex] = arrayAllocator()->allocateArrayPage();
+   }
+
+   // Initialize all new entries
+   IteratorState it;
+   IteratorState itEnd;
+   makeIterator( it, size_ );
+   size_ = index + 1;
+   makeIterator( itEnd, size_ );
+   for ( ; !equals(it,itEnd); increment(it) )
+   {
+      Value *value = &dereference(it);
+      new (value) Value(); // Construct a default value using placement new
+   }
+}
+
+Value &
+ValueInternalArray::resolveReference( ArrayIndex index )
+{
+   if ( index >= size_ )
+      makeIndexValid( index );
+   return pages_[index/itemsPerPage][index%itemsPerPage];
+}
+
+Value *
+ValueInternalArray::find( ArrayIndex index ) const
+{
+   if ( index >= size_ )
+      return 0;
+   return &(pages_[index/itemsPerPage][index%itemsPerPage]);
+}
+
+ValueInternalArray::ArrayIndex 
+ValueInternalArray::size() const
+{
+   return size_;
+}
+
+int 
+ValueInternalArray::distance( const IteratorState &x, const IteratorState &y )
+{
+   return indexOf(y) - indexOf(x);
+}
+
+
+ValueInternalArray::ArrayIndex 
+ValueInternalArray::indexOf( const IteratorState &iterator )
+{
+   if ( !iterator.array_ )
+      return ArrayIndex(-1);
+   return ArrayIndex(
+      (iterator.currentPageIndex_ - iterator.array_->pages_) * itemsPerPage 
+      + iterator.currentItemIndex_ );
+}
+
+
+int 
+ValueInternalArray::compare( const ValueInternalArray &other ) const
+{
+   int sizeDiff( size_ - other.size_ );
+   if ( sizeDiff != 0 )
+      return sizeDiff;
+   
+   for ( ArrayIndex index =0; index < size_; ++index )
+   {
+      int diff = pages_[index/itemsPerPage][index%itemsPerPage].compare( 
+         other.pages_[index/itemsPerPage][index%itemsPerPage] );
+      if ( diff != 0 )
+         return diff;
+   }
+   return 0;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json_internalmap.inl
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json_internalmap.inl b/test/plugins/cordova.echo/src/blackberry/public/json_internalmap.inl
new file mode 100644
index 0000000..1977148
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json_internalmap.inl
@@ -0,0 +1,607 @@
+// included by json_value.cpp
+// everything is within Json namespace
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueInternalMap
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+/** \internal MUST be safely initialized using memset( this, 0, sizeof(ValueInternalLink) );
+   * This optimization is used by the fast allocator.
+   */
+ValueInternalLink::ValueInternalLink()
+   : previous_( 0 )
+   , next_( 0 )
+{
+}
+
+ValueInternalLink::~ValueInternalLink()
+{ 
+   for ( int index =0; index < itemPerLink; ++index )
+   {
+      if ( !items_[index].isItemAvailable() )
+      {
+         if ( !items_[index].isMemberNameStatic() )
+            free( keys_[index] );
+      }
+      else
+         break;
+   }
+}
+
+
+
+ValueMapAllocator::~ValueMapAllocator()
+{
+}
+
+#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+class DefaultValueMapAllocator : public ValueMapAllocator
+{
+public: // overridden from ValueMapAllocator
+   virtual ValueInternalMap *newMap()
+   {
+      return new ValueInternalMap();
+   }
+
+   virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
+   {
+      return new ValueInternalMap( other );
+   }
+
+   virtual void destructMap( ValueInternalMap *map )
+   {
+      delete map;
+   }
+
+   virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
+   {
+      return new ValueInternalLink[size];
+   }
+
+   virtual void releaseMapBuckets( ValueInternalLink *links )
+   {
+      delete [] links;
+   }
+
+   virtual ValueInternalLink *allocateMapLink()
+   {
+      return new ValueInternalLink();
+   }
+
+   virtual void releaseMapLink( ValueInternalLink *link )
+   {
+      delete link;
+   }
+};
+#else
+/// @todo make this thread-safe (lock when accessign batch allocator)
+class DefaultValueMapAllocator : public ValueMapAllocator
+{
+public: // overridden from ValueMapAllocator
+   virtual ValueInternalMap *newMap()
+   {
+      ValueInternalMap *map = mapsAllocator_.allocate();
+      new (map) ValueInternalMap(); // placement new
+      return map;
+   }
+
+   virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
+   {
+      ValueInternalMap *map = mapsAllocator_.allocate();
+      new (map) ValueInternalMap( other ); // placement new
+      return map;
+   }
+
+   virtual void destructMap( ValueInternalMap *map )
+   {
+      if ( map )
+      {
+         map->~ValueInternalMap();
+         mapsAllocator_.release( map );
+      }
+   }
+
+   virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
+   {
+      return new ValueInternalLink[size];
+   }
+
+   virtual void releaseMapBuckets( ValueInternalLink *links )
+   {
+      delete [] links;
+   }
+
+   virtual ValueInternalLink *allocateMapLink()
+   {
+      ValueInternalLink *link = linksAllocator_.allocate();
+      memset( link, 0, sizeof(ValueInternalLink) );
+      return link;
+   }
+
+   virtual void releaseMapLink( ValueInternalLink *link )
+   {
+      link->~ValueInternalLink();
+      linksAllocator_.release( link );
+   }
+private:
+   BatchAllocator<ValueInternalMap,1> mapsAllocator_;
+   BatchAllocator<ValueInternalLink,1> linksAllocator_;
+};
+#endif
+
+static ValueMapAllocator *&mapAllocator()
+{
+   static DefaultValueMapAllocator defaultAllocator;
+   static ValueMapAllocator *mapAllocator = &defaultAllocator;
+   return mapAllocator;
+}
+
+static struct DummyMapAllocatorInitializer {
+   DummyMapAllocatorInitializer() 
+   {
+      mapAllocator();      // ensure mapAllocator() statics are initialized before main().
+   }
+} dummyMapAllocatorInitializer;
+
+
+
+// h(K) = value * K >> w ; with w = 32 & K prime w.r.t. 2^32.
+
+/*
+use linked list hash map. 
+buckets array is a container.
+linked list element contains 6 key/values. (memory = (16+4) * 6 + 4 = 124)
+value have extra state: valid, available, deleted
+*/
+
+
+ValueInternalMap::ValueInternalMap()
+   : buckets_( 0 )
+   , tailLink_( 0 )
+   , bucketsSize_( 0 )
+   , itemCount_( 0 )
+{
+}
+
+
+ValueInternalMap::ValueInternalMap( const ValueInternalMap &other )
+   : buckets_( 0 )
+   , tailLink_( 0 )
+   , bucketsSize_( 0 )
+   , itemCount_( 0 )
+{
+   reserve( other.itemCount_ );
+   IteratorState it;
+   IteratorState itEnd;
+   other.makeBeginIterator( it );
+   other.makeEndIterator( itEnd );
+   for ( ; !equals(it,itEnd); increment(it) )
+   {
+      bool isStatic;
+      const char *memberName = key( it, isStatic );
+      const Value &aValue = value( it );
+      resolveReference(memberName, isStatic) = aValue;
+   }
+}
+
+
+ValueInternalMap &
+ValueInternalMap::operator =( const ValueInternalMap &other )
+{
+   ValueInternalMap dummy( other );
+   swap( dummy );
+   return *this;
+}
+
+
+ValueInternalMap::~ValueInternalMap()
+{
+   if ( buckets_ )
+   {
+      for ( BucketIndex bucketIndex =0; bucketIndex < bucketsSize_; ++bucketIndex )
+      {
+         ValueInternalLink *link = buckets_[bucketIndex].next_;
+         while ( link )
+         {
+            ValueInternalLink *linkToRelease = link;
+            link = link->next_;
+            mapAllocator()->releaseMapLink( linkToRelease );
+         }
+      }
+      mapAllocator()->releaseMapBuckets( buckets_ );
+   }
+}
+
+
+void 
+ValueInternalMap::swap( ValueInternalMap &other )
+{
+   ValueInternalLink *tempBuckets = buckets_;
+   buckets_ = other.buckets_;
+   other.buckets_ = tempBuckets;
+   ValueInternalLink *tempTailLink = tailLink_;
+   tailLink_ = other.tailLink_;
+   other.tailLink_ = tempTailLink;
+   BucketIndex tempBucketsSize = bucketsSize_;
+   bucketsSize_ = other.bucketsSize_;
+   other.bucketsSize_ = tempBucketsSize;
+   BucketIndex tempItemCount = itemCount_;
+   itemCount_ = other.itemCount_;
+   other.itemCount_ = tempItemCount;
+}
+
+
+void 
+ValueInternalMap::clear()
+{
+   ValueInternalMap dummy;
+   swap( dummy );
+}
+
+
+ValueInternalMap::BucketIndex 
+ValueInternalMap::size() const
+{
+   return itemCount_;
+}
+
+bool 
+ValueInternalMap::reserveDelta( BucketIndex growth )
+{
+   return reserve( itemCount_ + growth );
+}
+
+bool 
+ValueInternalMap::reserve( BucketIndex newItemCount )
+{
+   if ( !buckets_  &&  newItemCount > 0 )
+   {
+      buckets_ = mapAllocator()->allocateMapBuckets( 1 );
+      bucketsSize_ = 1;
+      tailLink_ = &buckets_[0];
+   }
+//   BucketIndex idealBucketCount = (newItemCount + ValueInternalLink::itemPerLink) / ValueInternalLink::itemPerLink;
+   return true;
+}
+
+
+const Value *
+ValueInternalMap::find( const char *key ) const
+{
+   if ( !bucketsSize_ )
+      return 0;
+   HashKey hashedKey = hash( key );
+   BucketIndex bucketIndex = hashedKey % bucketsSize_;
+   for ( const ValueInternalLink *current = &buckets_[bucketIndex]; 
+         current != 0; 
+         current = current->next_ )
+   {
+      for ( BucketIndex index=0; index < ValueInternalLink::itemPerLink; ++index )
+      {
+         if ( current->items_[index].isItemAvailable() )
+            return 0;
+         if ( strcmp( key, current->keys_[index] ) == 0 )
+            return &current->items_[index];
+      }
+   }
+   return 0;
+}
+
+
+Value *
+ValueInternalMap::find( const char *key )
+{
+   const ValueInternalMap *constThis = this;
+   return const_cast<Value *>( constThis->find( key ) );
+}
+
+
+Value &
+ValueInternalMap::resolveReference( const char *key,
+                                    bool isStatic )
+{
+   HashKey hashedKey = hash( key );
+   if ( bucketsSize_ )
+   {
+      BucketIndex bucketIndex = hashedKey % bucketsSize_;
+      ValueInternalLink **previous = 0;
+      BucketIndex index;
+      for ( ValueInternalLink *current = &buckets_[bucketIndex]; 
+            current != 0; 
+            previous = &current->next_, current = current->next_ )
+      {
+         for ( index=0; index < ValueInternalLink::itemPerLink; ++index )
+         {
+            if ( current->items_[index].isItemAvailable() )
+               return setNewItem( key, isStatic, current, index );
+            if ( strcmp( key, current->keys_[index] ) == 0 )
+               return current->items_[index];
+         }
+      }
+   }
+
+   reserveDelta( 1 );
+   return unsafeAdd( key, isStatic, hashedKey );
+}
+
+
+void 
+ValueInternalMap::remove( const char *key )
+{
+   HashKey hashedKey = hash( key );
+   if ( !bucketsSize_ )
+      return;
+   BucketIndex bucketIndex = hashedKey % bucketsSize_;
+   for ( ValueInternalLink *link = &buckets_[bucketIndex]; 
+         link != 0; 
+         link = link->next_ )
+   {
+      BucketIndex index;
+      for ( index =0; index < ValueInternalLink::itemPerLink; ++index )
+      {
+         if ( link->items_[index].isItemAvailable() )
+            return;
+         if ( strcmp( key, link->keys_[index] ) == 0 )
+         {
+            doActualRemove( link, index, bucketIndex );
+            return;
+         }
+      }
+   }
+}
+
+void 
+ValueInternalMap::doActualRemove( ValueInternalLink *link, 
+                                  BucketIndex index,
+                                  BucketIndex bucketIndex )
+{
+   // find last item of the bucket and swap it with the 'removed' one.
+   // set removed items flags to 'available'.
+   // if last page only contains 'available' items, then desallocate it (it's empty)
+   ValueInternalLink *&lastLink = getLastLinkInBucket( index );
+   BucketIndex lastItemIndex = 1; // a link can never be empty, so start at 1
+   for ( ;   
+         lastItemIndex < ValueInternalLink::itemPerLink; 
+         ++lastItemIndex ) // may be optimized with dicotomic search
+   {
+      if ( lastLink->items_[lastItemIndex].isItemAvailable() )
+         break;
+   }
+   
+   BucketIndex lastUsedIndex = lastItemIndex - 1;
+   Value *valueToDelete = &link->items_[index];
+   Value *valueToPreserve = &lastLink->items_[lastUsedIndex];
+   if ( valueToDelete != valueToPreserve )
+      valueToDelete->swap( *valueToPreserve );
+   if ( lastUsedIndex == 0 )  // page is now empty
+   {  // remove it from bucket linked list and delete it.
+      ValueInternalLink *linkPreviousToLast = lastLink->previous_;
+      if ( linkPreviousToLast != 0 )   // can not deleted bucket link.
+      {
+         mapAllocator()->releaseMapLink( lastLink );
+         linkPreviousToLast->next_ = 0;
+         lastLink = linkPreviousToLast;
+      }
+   }
+   else
+   {
+      Value dummy;
+      valueToPreserve->swap( dummy ); // restore deleted to default Value.
+      valueToPreserve->setItemUsed( false );
+   }
+   --itemCount_;
+}
+
+
+ValueInternalLink *&
+ValueInternalMap::getLastLinkInBucket( BucketIndex bucketIndex )
+{
+   if ( bucketIndex == bucketsSize_ - 1 )
+      return tailLink_;
+   ValueInternalLink *&previous = buckets_[bucketIndex+1].previous_;
+   if ( !previous )
+      previous = &buckets_[bucketIndex];
+   return previous;
+}
+
+
+Value &
+ValueInternalMap::setNewItem( const char *key, 
+                              bool isStatic,
+                              ValueInternalLink *link, 
+                              BucketIndex index )
+{
+   char *duplicatedKey = valueAllocator()->makeMemberName( key );
+   ++itemCount_;
+   link->keys_[index] = duplicatedKey;
+   link->items_[index].setItemUsed();
+   link->items_[index].setMemberNameIsStatic( isStatic );
+   return link->items_[index]; // items already default constructed.
+}
+
+
+Value &
+ValueInternalMap::unsafeAdd( const char *key, 
+                             bool isStatic, 
+                             HashKey hashedKey )
+{
+   JSON_ASSERT_MESSAGE( bucketsSize_ > 0, "ValueInternalMap::unsafeAdd(): internal logic error." );
+   BucketIndex bucketIndex = hashedKey % bucketsSize_;
+   ValueInternalLink *&previousLink = getLastLinkInBucket( bucketIndex );
+   ValueInternalLink *link = previousLink;
+   BucketIndex index;
+   for ( index =0; index < ValueInternalLink::itemPerLink; ++index )
+   {
+      if ( link->items_[index].isItemAvailable() )
+         break;
+   }
+   if ( index == ValueInternalLink::itemPerLink ) // need to add a new page
+   {
+      ValueInternalLink *newLink = mapAllocator()->allocateMapLink();
+      index = 0;
+      link->next_ = newLink;
+      previousLink = newLink;
+      link = newLink;
+   }
+   return setNewItem( key, isStatic, link, index );
+}
+
+
+ValueInternalMap::HashKey 
+ValueInternalMap::hash( const char *key ) const
+{
+   HashKey hash = 0;
+   while ( *key )
+      hash += *key++ * 37;
+   return hash;
+}
+
+
+int 
+ValueInternalMap::compare( const ValueInternalMap &other ) const
+{
+   int sizeDiff( itemCount_ - other.itemCount_ );
+   if ( sizeDiff != 0 )
+      return sizeDiff;
+   // Strict order guaranty is required. Compare all keys FIRST, then compare values.
+   IteratorState it;
+   IteratorState itEnd;
+   makeBeginIterator( it );
+   makeEndIterator( itEnd );
+   for ( ; !equals(it,itEnd); increment(it) )
+   {
+      if ( !other.find( key( it ) ) )
+         return 1;
+   }
+
+   // All keys are equals, let's compare values
+   makeBeginIterator( it );
+   for ( ; !equals(it,itEnd); increment(it) )
+   {
+      const Value *otherValue = other.find( key( it ) );
+      int valueDiff = value(it).compare( *otherValue );
+      if ( valueDiff != 0 )
+         return valueDiff;
+   }
+   return 0;
+}
+
+
+void 
+ValueInternalMap::makeBeginIterator( IteratorState &it ) const
+{
+   it.map_ = const_cast<ValueInternalMap *>( this );
+   it.bucketIndex_ = 0;
+   it.itemIndex_ = 0;
+   it.link_ = buckets_;
+}
+
+
+void 
+ValueInternalMap::makeEndIterator( IteratorState &it ) const
+{
+   it.map_ = const_cast<ValueInternalMap *>( this );
+   it.bucketIndex_ = bucketsSize_;
+   it.itemIndex_ = 0;
+   it.link_ = 0;
+}
+
+
+bool 
+ValueInternalMap::equals( const IteratorState &x, const IteratorState &other )
+{
+   return x.map_ == other.map_  
+          &&  x.bucketIndex_ == other.bucketIndex_  
+          &&  x.link_ == other.link_
+          &&  x.itemIndex_ == other.itemIndex_;
+}
+
+
+void 
+ValueInternalMap::incrementBucket( IteratorState &iterator )
+{
+   ++iterator.bucketIndex_;
+   JSON_ASSERT_MESSAGE( iterator.bucketIndex_ <= iterator.map_->bucketsSize_,
+      "ValueInternalMap::increment(): attempting to iterate beyond end." );
+   if ( iterator.bucketIndex_ == iterator.map_->bucketsSize_ )
+      iterator.link_ = 0;
+   else
+      iterator.link_ = &(iterator.map_->buckets_[iterator.bucketIndex_]);
+   iterator.itemIndex_ = 0;
+}
+
+
+void 
+ValueInternalMap::increment( IteratorState &iterator )
+{
+   JSON_ASSERT_MESSAGE( iterator.map_, "Attempting to iterator using invalid iterator." );
+   ++iterator.itemIndex_;
+   if ( iterator.itemIndex_ == ValueInternalLink::itemPerLink )
+   {
+      JSON_ASSERT_MESSAGE( iterator.link_ != 0,
+         "ValueInternalMap::increment(): attempting to iterate beyond end." );
+      iterator.link_ = iterator.link_->next_;
+      if ( iterator.link_ == 0 )
+         incrementBucket( iterator );
+   }
+   else if ( iterator.link_->items_[iterator.itemIndex_].isItemAvailable() )
+   {
+      incrementBucket( iterator );
+   }
+}
+
+
+void 
+ValueInternalMap::decrement( IteratorState &iterator )
+{
+   if ( iterator.itemIndex_ == 0 )
+   {
+      JSON_ASSERT_MESSAGE( iterator.map_, "Attempting to iterate using invalid iterator." );
+      if ( iterator.link_ == &iterator.map_->buckets_[iterator.bucketIndex_] )
+      {
+         JSON_ASSERT_MESSAGE( iterator.bucketIndex_ > 0, "Attempting to iterate beyond beginning." );
+         --(iterator.bucketIndex_);
+      }
+      iterator.link_ = iterator.link_->previous_;
+      iterator.itemIndex_ = ValueInternalLink::itemPerLink - 1;
+   }
+}
+
+
+const char *
+ValueInternalMap::key( const IteratorState &iterator )
+{
+   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
+   return iterator.link_->keys_[iterator.itemIndex_];
+}
+
+const char *
+ValueInternalMap::key( const IteratorState &iterator, bool &isStatic )
+{
+   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
+   isStatic = iterator.link_->items_[iterator.itemIndex_].isMemberNameStatic();
+   return iterator.link_->keys_[iterator.itemIndex_];
+}
+
+
+Value &
+ValueInternalMap::value( const IteratorState &iterator )
+{
+   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
+   return iterator.link_->items_[iterator.itemIndex_];
+}
+
+
+int 
+ValueInternalMap::distance( const IteratorState &x, const IteratorState &y )
+{
+   int offset = 0;
+   IteratorState it = x;
+   while ( !equals( it, y ) )
+      increment( it );
+   return offset;
+}


[24/54] [abbrv] git commit: adding force actions for blackberry and android

Posted by ti...@apache.org.
adding force actions for blackberry and android


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/12094410
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/12094410
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/12094410

Branch: refs/heads/future
Commit: 120944104328065b17405ca2d05bfdb51d2d2332
Parents: 8a00a0b
Author: Anis Kadri <an...@apache.org>
Authored: Thu Apr 4 13:45:25 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Thu Apr 4 13:45:25 2013 -0700

----------------------------------------------------------------------
 platforms/android.js    |   38 +++++++++++++++++++++-----------------
 platforms/blackberry.js |   12 ++++++++----
 2 files changed, 29 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/12094410/platforms/android.js
----------------------------------------------------------------------
diff --git a/platforms/android.js b/platforms/android.js
index 2f78bf4..323ff28 100644
--- a/platforms/android.js
+++ b/platforms/android.js
@@ -43,32 +43,36 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
 
     variables = variables || {}
 
-	// get config.xml filename
-	var config_xml_filename = 'res/xml/config.xml';
+	  // get config.xml filename
+	  var config_xml_filename = 'res/xml/config.xml';
     if(fs.existsSync(path.resolve(project_dir, 'res/xml/plugins.xml'))) {
         config_xml_filename = 'res/xml/plugins.xml';
     }
 
     // collision detection 
-    if(action == "install" && pluginInstalled(plugin_et, project_dir, config_xml_filename)) {
-        throw "Plugin "+plugin_id+" already installed"
-    } else if(action == "uninstall" && !pluginInstalled(plugin_et, project_dir, config_xml_filename)) {
-        throw "Plugin "+plugin_id+" not installed"
+    if(action.match(/force-/) == null) {
+      if(action == "install" && pluginInstalled(plugin_et, project_dir, config_xml_filename)) {
+          throw "Plugin "+plugin_id+" already installed"
+      } else if(action == "uninstall" && !pluginInstalled(plugin_et, project_dir, config_xml_filename)) {
+          throw "Plugin "+plugin_id+" not installed"
+      }
+    } else {
+      action = action.replace('force-', '');
     }
 
-	root = et.Element("config-file");
-	root.attrib['parent'] = '.'
-    plugin_et.findall('./access').forEach(function (tag) { 
-		root.append(tag);
-	});
+    root = et.Element("config-file");
+    root.attrib['parent'] = '.'
+      plugin_et.findall('./access').forEach(function (tag) { 
+      root.append(tag);
+    });
 
-	if (root.len()) {
-		(configChanges[config_xml_filename]) ?
-        	configChanges[config_xml_filename].push(root) :
-        	configChanges[config_xml_filename] = [root];
-	}
+    if (root.len()) {
+      (configChanges[config_xml_filename]) ?
+            configChanges[config_xml_filename].push(root) :
+            configChanges[config_xml_filename] = [root];
+    }
 
-	// find which config-files we're interested in
+    // find which config-files we're interested in
     Object.keys(configChanges).forEach(function (configFile) {
         if (!fs.existsSync(path.resolve(project_dir, configFile))) {
             delete configChanges[configFile];

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/12094410/platforms/blackberry.js
----------------------------------------------------------------------
diff --git a/platforms/blackberry.js b/platforms/blackberry.js
index 718e9ff..c927181 100644
--- a/platforms/blackberry.js
+++ b/platforms/blackberry.js
@@ -46,10 +46,14 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et) {
     });
 
     // collision detection 
-    if(action == "install" && pluginInstalled(plugin_et, project_dir)) {
-        throw "Plugin "+plugin_id+" already installed"
-    } else if(action == "uninstall" && !pluginInstalled(plugin_et, project_dir)) {
-        throw "Plugin "+plugin_id+" not installed"
+    if(action.match(/force-/) == null) {
+      if(action == "install" && pluginInstalled(plugin_et, project_dir)) {
+          throw "Plugin "+plugin_id+" already installed"
+      } else if(action == "uninstall" && !pluginInstalled(plugin_et, project_dir)) {
+          throw "Plugin "+plugin_id+" not installed"
+      }
+    } else {
+      action = action.replace('force-', '');
     }
     
     // move asset files


[22/54] [abbrv] git commit: updating options

Posted by ti...@apache.org.
updating options


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/479d892b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/479d892b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/479d892b

Branch: refs/heads/future
Commit: 479d892b2f48d821273ff00b2c8e003f6680531b
Parents: a2fbc04
Author: Anis Kadri <an...@apache.org>
Authored: Tue Apr 2 20:06:27 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Tue Apr 2 20:06:27 2013 -0700

----------------------------------------------------------------------
 test/plugman.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/479d892b/test/plugman.js
----------------------------------------------------------------------
diff --git a/test/plugman.js b/test/plugman.js
index 0222085..4db2553 100644
--- a/test/plugman.js
+++ b/test/plugman.js
@@ -91,7 +91,7 @@ exports['should revert ios install on failures'] = function (test) {
   var test_project_dir = path.join(test_dir, 'ios-config-xml'),
       test_plugin_dir = path.join(test_dir, 'FaultyPlugin'),
       srcDir = path.resolve(test_project_dir, 'SampleApp/Plugins'),
-      options = {silent: false},
+      options = {silent: true},
       command;
 
     // copy the ios test project to a temp directory


[32/54] [abbrv] git commit: Rewire commands: Split into --fetch, --install, --uninstall, --remove.

Posted by ti...@apache.org.
Rewire commands: Split into --fetch, --install, --uninstall, --remove.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/b649373b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/b649373b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/b649373b

Branch: refs/heads/future
Commit: b649373bf394855677d5cacc62cd869ba4d37b95
Parents: 6be1ac8
Author: Braden Shepherdson <br...@gmail.com>
Authored: Tue Mar 26 12:05:31 2013 -0400
Committer: Tim Kim <ti...@adobe.com>
Committed: Mon Apr 8 17:00:20 2013 -0700

----------------------------------------------------------------------
 plugman.js |   50 ++++++++++++++++++++++++++++++++++----------------
 1 files changed, 34 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b649373b/plugman.js
----------------------------------------------------------------------
diff --git a/plugman.js b/plugman.js
index f0ad02c..f129247 100755
--- a/plugman.js
+++ b/plugman.js
@@ -39,6 +39,9 @@ var known_opts = { 'platform' : [ 'ios', 'android', 'blackberry' ,'www' ]
             , 'project' : path
             , 'plugin' : [String, path, url]
             , 'remove' : Boolean
+            , 'install' : Boolean
+            , 'uninstall' : Boolean
+            , 'fetch' : Boolean
             , 'list' : Boolean
             , 'v' : Boolean
             , 'debug' : Boolean
@@ -82,10 +85,16 @@ else if (cli_opts.list) {
 else if (cli_opts.prepare && cli_opts.project && cli_opts.www) {
     plugin_loader.handlePrepare(cli_opts.project, plugins_dir, cli_opts.www, cli_opts.platform);
 }
+else if (cli_opts.remove) {
+    removePlugin(cli_opts.plugin);
+}
+else if (cli_opts.fetch) {
+    fetchPlugin(cli_opts.plugin);
+}
 else if (!cli_opts.platform || !cli_opts.project || !cli_opts.plugin) {
     printUsage();
 }
-else if (cli_opts.remove) {
+else if (cli_opts.uninstall) {
     handlePlugin('uninstall', cli_opts.platform, cli_opts.project, cli_opts.plugin);
 }
 else {
@@ -102,20 +111,14 @@ else {
 
 function printUsage() {
     platforms = known_opts.platform.join('|');
-<<<<<<< HEAD
-    console.error('Usage\n---------');
-    console.error('Add a plugin:\n\t' + package.name + ' --platform <'+ platforms +'> --project <directory> --variable <preference_name>="<substituion>" --plugin <directory|git-url|name>\n');
-    console.error('Remove a plugin:\n\t' + package.name + ' --remove --platform <'+ platforms +'> --project <directory> --plugin <directory|git-url|name>\n');
-    console.error('List plugins:\n\t' + package.name + ' --list\n');
-    process.exit(1);
-=======
     console.log('Usage\n---------');
-    console.log('Add a plugin:\n\t' + package.name + ' --platform <'+ platforms +'> --project <directory> --plugin <directory|git-url|name>\n');
-    console.log('Remove a plugin:\n\t' + package.name + ' --remove --platform <'+ platforms +'> --project <directory> --plugin <directory|git-url|name>\n');
-    console.log('List plugins:\n\t' + package.name + ' --list\n');
+    console.log('Fetch a plugin:\n\t' + package.name + ' --fetch --plugin <directory|git-url|name> [--plugins_dir <directory>]\n');
+    console.log('Install an already fetched plugin:\n\t' + package.name + ' --platform <'+ platforms +'> --project <directory> --plugin <name> [--plugins_dir <directory>]\n');
+    console.log('Uninstall a plugin:\n\t' + package.name + ' --remove --platform <'+ platforms +'> --project <directory> --plugin <name> [--plugins_dir <directory>]\n');
+    console.log('Delete the local copy of a plugin:\n\t' + package.name + ' --remove --plugin <name> [--plugins_dir <directory>]\n');
+    console.log('List plugins:\n\t' + package.name + ' --list [--plugins_dir <directory>]\n');
     console.log('Prepare project:\n\t' + package.name + ' --prepare --platform <ios|android|bb10> --project <directory> --www <directory> [--plugins_dir <directory>]');
     console.log('\n\t--plugins_dir defaults to <project>/cordova/plugins, but can be any directory containing a subdirectory for each plugin');
->>>>>>> --prepare with ported JS installation, cache plugins locally
 }
 
 function execAction(action, platform, project_dir, plugin_dir, cli_variables) {
@@ -161,9 +164,7 @@ function execAction(action, platform, project_dir, plugin_dir, cli_variables) {
     }
 }
 
-function handlePlugin(action, platform, project_dir, plugin_dir, cli_variables) {
-    var plugin_xml_path, async = false;
-
+function fetchPlugin(plugin_dir) {
     // Ensure the containing directory exists.
     shell.mkdir('-p', plugins_dir);
 
@@ -183,6 +184,22 @@ function handlePlugin(action, platform, project_dir, plugin_dir, cli_variables)
 
         plugin_dir = dest;
     }
+}
+
+function removePlugin(name) {
+    shell.rm('-rf', path.join(plugins_dir, cli_opts.plugin));
+    console.log('Plugin ' + cli_opts.plugin + ' deleted.');
+}
+
+// function handlePlugin(action, platform, project_dir, plugin_dir, cli_variables) 
+function handlePlugin(action, platform, project_dir, name) {
+    var plugin_xml_path, async;
+
+    // Check that the plugin has already been fetched.
+    var plugin_dir = path.join(plugins_dir, name);
+    if (!fs.existsSync(plugin_dir)) {
+        throw new Error('Plugin ' + name + ' not found. You may need to --fetch it.');
+    }
 
     plugin_xml_path = path.join(plugin_dir, 'plugin.xml');
     if (!fs.existsSync(plugin_xml_path)) {
@@ -190,7 +207,8 @@ function handlePlugin(action, platform, project_dir, plugin_dir, cli_variables)
         async = true;
         plugins.getPluginInfo(plugin_dir,
             function(plugin_info) {
-                execAction(action, platform, project_dir, plugins.clonePluginGitRepo(plugin_info.url), cli_variables);
+                execAction(action, platform, project_dir, plugins.clonePluginGitRepo(plugin_info.url), plugins_dir);
+                //execAction(action, platform, project_dir, plugins.clonePluginGitRepo(plugin_info.url), cli_variables);
             },
             function(e) {
                 throw new Error(action + ' failed. "' + plugin_xml_path + '" not found');


[02/54] [abbrv] renamed blackberry assets

Posted by ti...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json_reader.cpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json_reader.cpp b/test/plugins/cordova.echo/src/blackberry/public/json_reader.cpp
new file mode 100644
index 0000000..750088c
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json_reader.cpp
@@ -0,0 +1,894 @@
+#include <json/reader.h>
+#include <json/value.h>
+#include <utility>
+#include <cstdio>
+#include <cassert>
+#include <cstring>
+#include <iostream>
+#include <stdexcept>
+
+#if _MSC_VER >= 1400 // VC++ 8.0
+#pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
+#endif
+
+namespace Json {
+
+// QNX is strict about declaring C symbols in the std namespace.
+#ifdef __QNXNTO__
+using std::memcpy;
+using std::sprintf;
+using std::sscanf;
+#endif
+
+// Implementation of class Features
+// ////////////////////////////////
+
+Features::Features()
+   : allowComments_( true )
+   , strictRoot_( false )
+{
+}
+
+
+Features 
+Features::all()
+{
+   return Features();
+}
+
+
+Features 
+Features::strictMode()
+{
+   Features features;
+   features.allowComments_ = false;
+   features.strictRoot_ = true;
+   return features;
+}
+
+// Implementation of class Reader
+// ////////////////////////////////
+
+
+static inline bool 
+in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4 )
+{
+   return c == c1  ||  c == c2  ||  c == c3  ||  c == c4;
+}
+
+static inline bool 
+in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4, Reader::Char c5 )
+{
+   return c == c1  ||  c == c2  ||  c == c3  ||  c == c4  ||  c == c5;
+}
+
+
+static bool 
+containsNewLine( Reader::Location begin, 
+                 Reader::Location end )
+{
+   for ( ;begin < end; ++begin )
+      if ( *begin == '\n'  ||  *begin == '\r' )
+         return true;
+   return false;
+}
+
+static std::string codePointToUTF8(unsigned int cp)
+{
+   std::string result;
+   
+   // based on description from http://en.wikipedia.org/wiki/UTF-8
+
+   if (cp <= 0x7f) 
+   {
+      result.resize(1);
+      result[0] = static_cast<char>(cp);
+   } 
+   else if (cp <= 0x7FF) 
+   {
+      result.resize(2);
+      result[1] = static_cast<char>(0x80 | (0x3f & cp));
+      result[0] = static_cast<char>(0xC0 | (0x1f & (cp >> 6)));
+   } 
+   else if (cp <= 0xFFFF) 
+   {
+      result.resize(3);
+      result[2] = static_cast<char>(0x80 | (0x3f & cp));
+      result[1] = 0x80 | static_cast<char>((0x3f & (cp >> 6)));
+      result[0] = 0xE0 | static_cast<char>((0xf & (cp >> 12)));
+   }
+   else if (cp <= 0x10FFFF) 
+   {
+      result.resize(4);
+      result[3] = static_cast<char>(0x80 | (0x3f & cp));
+      result[2] = static_cast<char>(0x80 | (0x3f & (cp >> 6)));
+      result[1] = static_cast<char>(0x80 | (0x3f & (cp >> 12)));
+      result[0] = static_cast<char>(0xF0 | (0x7 & (cp >> 18)));
+   }
+
+   return result;
+}
+
+
+// Class Reader
+// //////////////////////////////////////////////////////////////////
+
+Reader::Reader()
+   : features_( Features::all() )
+{
+}
+
+
+Reader::Reader( const Features &features )
+   : features_( features )
+{
+}
+
+
+bool
+Reader::parse( const std::string &document, 
+               Value &root,
+               bool collectComments )
+{
+   document_ = document;
+   const char *begin = document_.c_str();
+   const char *end = begin + document_.length();
+   return parse( begin, end, root, collectComments );
+}
+
+
+bool
+Reader::parse( std::istream& sin,
+               Value &root,
+               bool collectComments )
+{
+   //std::istream_iterator<char> begin(sin);
+   //std::istream_iterator<char> end;
+   // Those would allow streamed input from a file, if parse() were a
+   // template function.
+
+   // Since std::string is reference-counted, this at least does not
+   // create an extra copy.
+   std::string doc;
+   std::getline(sin, doc, (char)EOF);
+   return parse( doc, root, collectComments );
+}
+
+bool 
+Reader::parse( const char *beginDoc, const char *endDoc, 
+               Value &root,
+               bool collectComments )
+{
+   if ( !features_.allowComments_ )
+   {
+      collectComments = false;
+   }
+
+   begin_ = beginDoc;
+   end_ = endDoc;
+   collectComments_ = collectComments;
+   current_ = begin_;
+   lastValueEnd_ = 0;
+   lastValue_ = 0;
+   commentsBefore_ = "";
+   errors_.clear();
+   while ( !nodes_.empty() )
+      nodes_.pop();
+   nodes_.push( &root );
+   
+   bool successful = readValue();
+   Token token;
+   skipCommentTokens( token );
+   if ( collectComments_  &&  !commentsBefore_.empty() )
+      root.setComment( commentsBefore_, commentAfter );
+   if ( features_.strictRoot_ )
+   {
+      if ( !root.isArray()  &&  !root.isObject() )
+      {
+         // Set error location to start of doc, ideally should be first token found in doc
+         token.type_ = tokenError;
+         token.start_ = beginDoc;
+         token.end_ = endDoc;
+         addError( "A valid JSON document must be either an array or an object value.",
+                   token );
+         return false;
+      }
+   }
+   return successful;
+}
+
+
+bool
+Reader::readValue()
+{
+   Token token;
+   skipCommentTokens( token );
+   bool successful = true;
+
+   if ( collectComments_  &&  !commentsBefore_.empty() )
+   {
+      currentValue().setComment( commentsBefore_, commentBefore );
+      commentsBefore_ = "";
+   }
+
+
+   switch ( token.type_ )
+   {
+   case tokenObjectBegin:
+      successful = readObject( token );
+      break;
+   case tokenArrayBegin:
+      successful = readArray( token );
+      break;
+   case tokenNumber:
+      successful = decodeNumber( token );
+      break;
+   case tokenString:
+      successful = decodeString( token );
+      break;
+   case tokenTrue:
+      currentValue() = true;
+      break;
+   case tokenFalse:
+      currentValue() = false;
+      break;
+   case tokenNull:
+      currentValue() = Value();
+      break;
+   default:
+      return addError( "Syntax error: value, object or array expected.", token );
+   }
+
+   if ( collectComments_ )
+   {
+      lastValueEnd_ = current_;
+      lastValue_ = &currentValue();
+   }
+
+   return successful;
+}
+
+
+void 
+Reader::skipCommentTokens( Token &token )
+{
+   if ( features_.allowComments_ )
+   {
+      do
+      {
+         readToken( token );
+      }
+      while ( token.type_ == tokenComment );
+   }
+   else
+   {
+      readToken( token );
+   }
+}
+
+
+bool 
+Reader::expectToken( TokenType type, Token &token, const char *message )
+{
+   readToken( token );
+   if ( token.type_ != type )
+      return addError( message, token );
+   return true;
+}
+
+
+bool 
+Reader::readToken( Token &token )
+{
+   skipSpaces();
+   token.start_ = current_;
+   Char c = getNextChar();
+   bool ok = true;
+   switch ( c )
+   {
+   case '{':
+      token.type_ = tokenObjectBegin;
+      break;
+   case '}':
+      token.type_ = tokenObjectEnd;
+      break;
+   case '[':
+      token.type_ = tokenArrayBegin;
+      break;
+   case ']':
+      token.type_ = tokenArrayEnd;
+      break;
+   case '"':
+      token.type_ = tokenString;
+      ok = readString();
+      break;
+   case '/':
+      token.type_ = tokenComment;
+      ok = readComment();
+      break;
+   case '0':
+   case '1':
+   case '2':
+   case '3':
+   case '4':
+   case '5':
+   case '6':
+   case '7':
+   case '8':
+   case '9':
+   case '-':
+      token.type_ = tokenNumber;
+      readNumber();
+      break;
+   case 't':
+      token.type_ = tokenTrue;
+      ok = match( "rue", 3 );
+      break;
+   case 'f':
+      token.type_ = tokenFalse;
+      ok = match( "alse", 4 );
+      break;
+   case 'n':
+      token.type_ = tokenNull;
+      ok = match( "ull", 3 );
+      break;
+   case ',':
+      token.type_ = tokenArraySeparator;
+      break;
+   case ':':
+      token.type_ = tokenMemberSeparator;
+      break;
+   case 0:
+      token.type_ = tokenEndOfStream;
+      break;
+   default:
+      ok = false;
+      break;
+   }
+   if ( !ok )
+      token.type_ = tokenError;
+   token.end_ = current_;
+   return true;
+}
+
+
+void 
+Reader::skipSpaces()
+{
+   while ( current_ != end_ )
+   {
+      Char c = *current_;
+      if ( c == ' '  ||  c == '\t'  ||  c == '\r'  ||  c == '\n' )
+         ++current_;
+      else
+         break;
+   }
+}
+
+
+bool 
+Reader::match( Location pattern, 
+               int patternLength )
+{
+   if ( end_ - current_ < patternLength )
+      return false;
+   int index = patternLength;
+   while ( index-- )
+      if ( current_[index] != pattern[index] )
+         return false;
+   current_ += patternLength;
+   return true;
+}
+
+
+bool
+Reader::readComment()
+{
+   Location commentBegin = current_ - 1;
+   Char c = getNextChar();
+   bool successful = false;
+   if ( c == '*' )
+      successful = readCStyleComment();
+   else if ( c == '/' )
+      successful = readCppStyleComment();
+   if ( !successful )
+      return false;
+
+   if ( collectComments_ )
+   {
+      CommentPlacement placement = commentBefore;
+      if ( lastValueEnd_  &&  !containsNewLine( lastValueEnd_, commentBegin ) )
+      {
+         if ( c != '*'  ||  !containsNewLine( commentBegin, current_ ) )
+            placement = commentAfterOnSameLine;
+      }
+
+      addComment( commentBegin, current_, placement );
+   }
+   return true;
+}
+
+
+void 
+Reader::addComment( Location begin, 
+                    Location end, 
+                    CommentPlacement placement )
+{
+   assert( collectComments_ );
+   if ( placement == commentAfterOnSameLine )
+   {
+      assert( lastValue_ != 0 );
+      lastValue_->setComment( std::string( begin, end ), placement );
+   }
+   else
+   {
+      if ( !commentsBefore_.empty() )
+         commentsBefore_ += "\n";
+      commentsBefore_ += std::string( begin, end );
+   }
+}
+
+
+bool 
+Reader::readCStyleComment()
+{
+   while ( current_ != end_ )
+   {
+      Char c = getNextChar();
+      if ( c == '*'  &&  *current_ == '/' )
+         break;
+   }
+   return getNextChar() == '/';
+}
+
+
+bool 
+Reader::readCppStyleComment()
+{
+   while ( current_ != end_ )
+   {
+      Char c = getNextChar();
+      if (  c == '\r'  ||  c == '\n' )
+         break;
+   }
+   return true;
+}
+
+
+void 
+Reader::readNumber()
+{
+   while ( current_ != end_ )
+   {
+      if ( !(*current_ >= '0'  &&  *current_ <= '9')  &&
+           !in( *current_, '.', 'e', 'E', '+', '-' ) )
+         break;
+      ++current_;
+   }
+}
+
+bool
+Reader::readString()
+{
+   Char c = 0;
+   while ( current_ != end_ )
+   {
+      c = getNextChar();
+      if ( c == '\\' )
+         getNextChar();
+      else if ( c == '"' )
+         break;
+   }
+   return c == '"';
+}
+
+
+bool 
+Reader::readObject( Token &tokenStart )
+{
+   Token tokenName;
+   Token something = tokenStart;
+   std::string name;
+   currentValue() = Value( objectValue );
+   while ( readToken( tokenName ) )
+   {
+      bool initialTokenOk = true;
+      while ( tokenName.type_ == tokenComment  &&  initialTokenOk )
+         initialTokenOk = readToken( tokenName );
+      if  ( !initialTokenOk )
+         break;
+      if ( tokenName.type_ == tokenObjectEnd  &&  name.empty() )  // empty object
+         return true;
+      if ( tokenName.type_ != tokenString )
+         break;
+      
+      name = "";
+      if ( !decodeString( tokenName, name ) )
+         return recoverFromError( tokenObjectEnd );
+
+      Token colon;
+      if ( !readToken( colon ) ||  colon.type_ != tokenMemberSeparator )
+      {
+         return addErrorAndRecover( "Missing ':' after object member name", 
+                                    colon, 
+                                    tokenObjectEnd );
+      }
+      Value &value = currentValue()[ name ];
+      nodes_.push( &value );
+      bool ok = readValue();
+      nodes_.pop();
+      if ( !ok ) // error already set
+         return recoverFromError( tokenObjectEnd );
+
+      Token comma;
+      if ( !readToken( comma )
+            ||  ( comma.type_ != tokenObjectEnd  &&  
+                  comma.type_ != tokenArraySeparator &&
+		  comma.type_ != tokenComment ) )
+      {
+         return addErrorAndRecover( "Missing ',' or '}' in object declaration", 
+                                    comma, 
+                                    tokenObjectEnd );
+      }
+      bool finalizeTokenOk = true;
+      while ( comma.type_ == tokenComment &&
+              finalizeTokenOk )
+         finalizeTokenOk = readToken( comma );
+      if ( comma.type_ == tokenObjectEnd )
+         return true;
+   }
+   return addErrorAndRecover( "Missing '}' or object member name", 
+                              tokenName, 
+                              tokenObjectEnd );
+}
+
+
+bool 
+Reader::readArray( Token &tokenStart )
+{
+   Token something = tokenStart;
+   currentValue() = Value( arrayValue );
+   skipSpaces();
+   if ( *current_ == ']' ) // empty array
+   {
+      Token endArray;
+      readToken( endArray );
+      return true;
+   }
+   int index = 0;
+   while ( true )
+   {
+      Value &value = currentValue()[ index++ ];
+      nodes_.push( &value );
+      bool ok = readValue();
+      nodes_.pop();
+      if ( !ok ) // error already set
+         return recoverFromError( tokenArrayEnd );
+
+      Token token;
+      // Accept Comment after last item in the array.
+      ok = readToken( token );
+      while ( token.type_ == tokenComment  &&  ok )
+      {
+         ok = readToken( token );
+      }
+      bool badTokenType = ( token.type_ == tokenArraySeparator  &&  
+                            token.type_ == tokenArrayEnd );
+      if ( !ok  ||  badTokenType )
+      {
+         return addErrorAndRecover( "Missing ',' or ']' in array declaration", 
+                                    token, 
+                                    tokenArrayEnd );
+      }
+      if ( token.type_ == tokenArrayEnd )
+         break;
+   }
+   return true;
+}
+
+
+bool 
+Reader::decodeNumber( Token &token )
+{
+   bool isDouble = false;
+   for ( Location inspect = token.start_; inspect != token.end_; ++inspect )
+   {
+      isDouble = isDouble  
+                 ||  in( *inspect, '.', 'e', 'E', '+' )  
+                 ||  ( *inspect == '-'  &&  inspect != token.start_ );
+   }
+   if ( isDouble )
+      return decodeDouble( token );
+   Location current = token.start_;
+   bool isNegative = *current == '-';
+   if ( isNegative )
+      ++current;
+   Value::UInt threshold = (isNegative ? Value::UInt(-Value::minInt) 
+                                       : Value::maxUInt) / 10;
+   Value::UInt value = 0;
+   while ( current < token.end_ )
+   {
+      Char c = *current++;
+      if ( c < '0'  ||  c > '9' )
+         return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
+      if ( value >= threshold )
+         return decodeDouble( token );
+      value = value * 10 + Value::UInt(c - '0');
+   }
+   if ( isNegative )
+      currentValue() = -Value::Int( value );
+   else if ( value <= Value::UInt(Value::maxInt) )
+      currentValue() = Value::Int( value );
+   else
+      currentValue() = value;
+   return true;
+}
+
+
+bool 
+Reader::decodeDouble( Token &token )
+{
+   double value = 0;
+   const int bufferSize = 32;
+   int count;
+   int length = int(token.end_ - token.start_);
+   if ( length <= bufferSize )
+   {
+      Char buffer[bufferSize];
+      memcpy( buffer, token.start_, length );
+      buffer[length] = 0;
+      count = sscanf( buffer, "%lf", &value );
+   }
+   else
+   {
+      std::string buffer( token.start_, token.end_ );
+      count = sscanf( buffer.c_str(), "%lf", &value );
+   }
+
+   if ( count != 1 )
+      return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
+   currentValue() = value;
+   return true;
+}
+
+
+bool 
+Reader::decodeString( Token &token )
+{
+   std::string decoded;
+   if ( !decodeString( token, decoded ) )
+      return false;
+   currentValue() = decoded;
+   return true;
+}
+
+
+bool 
+Reader::decodeString( Token &token, std::string &decoded )
+{
+   decoded.reserve( token.end_ - token.start_ - 2 );
+   Location current = token.start_ + 1; // skip '"'
+   Location end = token.end_ - 1;      // do not include '"'
+   while ( current != end )
+   {
+      Char c = *current++;
+      if ( c == '"' )
+         break;
+      else if ( c == '\\' )
+      {
+         if ( current == end )
+            return addError( "Empty escape sequence in string", token, current );
+         Char escape = *current++;
+         switch ( escape )
+         {
+         case '"': decoded += '"'; break;
+         case '/': decoded += '/'; break;
+         case '\\': decoded += '\\'; break;
+         case 'b': decoded += '\b'; break;
+         case 'f': decoded += '\f'; break;
+         case 'n': decoded += '\n'; break;
+         case 'r': decoded += '\r'; break;
+         case 't': decoded += '\t'; break;
+         case 'u':
+            {
+               unsigned int unicode;
+               if ( !decodeUnicodeCodePoint( token, current, end, unicode ) )
+                  return false;
+               decoded += codePointToUTF8(unicode);
+            }
+            break;
+         default:
+            return addError( "Bad escape sequence in string", token, current );
+         }
+      }
+      else
+      {
+         decoded += c;
+      }
+   }
+   return true;
+}
+
+bool
+Reader::decodeUnicodeCodePoint( Token &token, 
+                                     Location &current, 
+                                     Location end, 
+                                     unsigned int &unicode )
+{
+
+   if ( !decodeUnicodeEscapeSequence( token, current, end, unicode ) )
+      return false;
+   if (unicode >= 0xD800 && unicode <= 0xDBFF)
+   {
+      // surrogate pairs
+      if (end - current < 6)
+         return addError( "additional six characters expected to parse unicode surrogate pair.", token, current );
+      unsigned int surrogatePair;
+      if (*(current++) == '\\' && *(current++)== 'u')
+      {
+         if (decodeUnicodeEscapeSequence( token, current, end, surrogatePair ))
+         {
+            unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF);
+         } 
+         else
+            return false;
+      } 
+      else
+         return addError( "expecting another \\u token to begin the second half of a unicode surrogate pair", token, current );
+   }
+   return true;
+}
+
+bool 
+Reader::decodeUnicodeEscapeSequence( Token &token, 
+                                     Location &current, 
+                                     Location end, 
+                                     unsigned int &unicode )
+{
+   if ( end - current < 4 )
+      return addError( "Bad unicode escape sequence in string: four digits expected.", token, current );
+   unicode = 0;
+   for ( int index =0; index < 4; ++index )
+   {
+      Char c = *current++;
+      unicode *= 16;
+      if ( c >= '0'  &&  c <= '9' )
+         unicode += c - '0';
+      else if ( c >= 'a'  &&  c <= 'f' )
+         unicode += c - 'a' + 10;
+      else if ( c >= 'A'  &&  c <= 'F' )
+         unicode += c - 'A' + 10;
+      else
+         return addError( "Bad unicode escape sequence in string: hexadecimal digit expected.", token, current );
+   }
+   return true;
+}
+
+
+bool 
+Reader::addError( const std::string &message, 
+                  Token &token,
+                  Location extra )
+{
+   ErrorInfo info;
+   info.token_ = token;
+   info.message_ = message;
+   info.extra_ = extra;
+   errors_.push_back( info );
+   return false;
+}
+
+
+bool 
+Reader::recoverFromError( TokenType skipUntilToken )
+{
+   int errorCount = int(errors_.size());
+   Token skip;
+   while ( true )
+   {
+      if ( !readToken(skip) )
+         errors_.resize( errorCount ); // discard errors caused by recovery
+      if ( skip.type_ == skipUntilToken  ||  skip.type_ == tokenEndOfStream )
+         break;
+   }
+   errors_.resize( errorCount );
+   return false;
+}
+
+
+bool 
+Reader::addErrorAndRecover( const std::string &message, 
+                            Token &token,
+                            TokenType skipUntilToken )
+{
+   addError( message, token );
+   return recoverFromError( skipUntilToken );
+}
+
+
+Value &
+Reader::currentValue()
+{
+   return *(nodes_.top());
+}
+
+
+Reader::Char 
+Reader::getNextChar()
+{
+   if ( current_ == end_ )
+      return 0;
+   return *current_++;
+}
+
+
+void 
+Reader::getLocationLineAndColumn( Location location,
+                                  int &line,
+                                  int &column ) const
+{
+   Location current = begin_;
+   Location lastLineStart = current;
+   line = 0;
+   while ( current < location  &&  current != end_ )
+   {
+      Char c = *current++;
+      if ( c == '\r' )
+      {
+         if ( *current == '\n' )
+            ++current;
+         lastLineStart = current;
+         ++line;
+      }
+      else if ( c == '\n' )
+      {
+         lastLineStart = current;
+         ++line;
+      }
+   }
+   // column & line start at 1
+   column = int(location - lastLineStart) + 1;
+   ++line;
+}
+
+
+std::string
+Reader::getLocationLineAndColumn( Location location ) const
+{
+   int line, column;
+   getLocationLineAndColumn( location, line, column );
+   char buffer[18+16+16+1];
+   sprintf( buffer, "Line %d, Column %d", line, column );
+   return buffer;
+}
+
+
+std::string 
+Reader::getFormatedErrorMessages() const
+{
+   std::string formattedMessage;
+   for ( Errors::const_iterator itError = errors_.begin();
+         itError != errors_.end();
+         ++itError )
+   {
+      const ErrorInfo &error = *itError;
+      formattedMessage += "* " + getLocationLineAndColumn( error.token_.start_ ) + "\n";
+      formattedMessage += "  " + error.message_ + "\n";
+      if ( error.extra_ )
+         formattedMessage += "See " + getLocationLineAndColumn( error.extra_ ) + " for detail.\n";
+   }
+   return formattedMessage;
+}
+
+
+std::istream& operator>>( std::istream &sin, Value &root )
+{
+    Json::Reader reader;
+    bool ok = reader.parse(sin, root, true);
+    //JSON_ASSERT( ok );
+    if (!ok) throw std::runtime_error(reader.getFormatedErrorMessages());
+    return sin;
+}
+
+
+} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json_value.cpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json_value.cpp b/test/plugins/cordova.echo/src/blackberry/public/json_value.cpp
new file mode 100644
index 0000000..6e5dcd3
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json_value.cpp
@@ -0,0 +1,1726 @@
+#include <iostream>
+#include <json/value.h>
+#include <json/writer.h>
+#include <utility>
+#include <stdexcept>
+#include <cstring>
+#include <cassert>
+#ifdef JSON_USE_CPPTL
+# include <cpptl/conststring.h>
+#endif
+#include <cstddef>    // size_t
+#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+# include "json_batchallocator.h"
+#endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
+
+#define JSON_ASSERT_UNREACHABLE assert( false )
+#define JSON_ASSERT( condition ) assert( condition );  // @todo <= change this into an exception throw
+#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) throw std::runtime_error( message );
+
+namespace Json {
+
+// QNX is strict about declaring C symbols in the std namespace.
+#ifdef __QNXNTO__
+using std::memcpy;
+using std::strchr;
+using std::strcmp;
+using std::strlen;
+#endif
+
+const Value Value::null;
+const Int Value::minInt = Int( ~(UInt(-1)/2) );
+const Int Value::maxInt = Int( UInt(-1)/2 );
+const UInt Value::maxUInt = UInt(-1);
+
+// A "safe" implementation of strdup. Allow null pointer to be passed. 
+// Also avoid warning on msvc80.
+//
+//inline char *safeStringDup( const char *czstring )
+//{
+//   if ( czstring )
+//   {
+//      const size_t length = (unsigned int)( strlen(czstring) + 1 );
+//      char *newString = static_cast<char *>( malloc( length ) );
+//      memcpy( newString, czstring, length );
+//      return newString;
+//   }
+//   return 0;
+//}
+//
+//inline char *safeStringDup( const std::string &str )
+//{
+//   if ( !str.empty() )
+//   {
+//      const size_t length = str.length();
+//      char *newString = static_cast<char *>( malloc( length + 1 ) );
+//      memcpy( newString, str.c_str(), length );
+//      newString[length] = 0;
+//      return newString;
+//   }
+//   return 0;
+//}
+
+ValueAllocator::~ValueAllocator()
+{
+}
+
+class DefaultValueAllocator : public ValueAllocator
+{
+public:
+   virtual ~DefaultValueAllocator()
+   {
+   }
+
+   virtual char *makeMemberName( const char *memberName )
+   {
+      return duplicateStringValue( memberName );
+   }
+
+   virtual void releaseMemberName( char *memberName )
+   {
+      releaseStringValue( memberName );
+   }
+
+   virtual char *duplicateStringValue( const char *value, 
+                                       unsigned int length = unknown )
+   {
+      //@todo invesgate this old optimization
+      //if ( !value  ||  value[0] == 0 )
+      //   return 0;
+
+      if ( length == unknown )
+         length = (unsigned int)strlen(value);
+      char *newString = static_cast<char *>( malloc( length + 1 ) );
+      memcpy( newString, value, length );
+      newString[length] = 0;
+      return newString;
+   }
+
+   virtual void releaseStringValue( char *value )
+   {
+      if ( value )
+         free( value );
+   }
+};
+
+static ValueAllocator *&valueAllocator()
+{
+   static DefaultValueAllocator defaultAllocator;
+   static ValueAllocator *valueAllocator = &defaultAllocator;
+   return valueAllocator;
+}
+
+static struct DummyValueAllocatorInitializer {
+   DummyValueAllocatorInitializer() 
+   {
+      valueAllocator();      // ensure valueAllocator() statics are initialized before main().
+   }
+} dummyValueAllocatorInitializer;
+
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// ValueInternals...
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+# include "json_internalarray.inl"
+# include "json_internalmap.inl"
+#endif // JSON_VALUE_USE_INTERNAL_MAP
+
+# include "json_valueiterator.inl"
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class Value::CommentInfo
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+
+Value::CommentInfo::CommentInfo()
+   : comment_( 0 )
+{
+}
+
+Value::CommentInfo::~CommentInfo()
+{
+   if ( comment_ )
+      valueAllocator()->releaseStringValue( comment_ );
+}
+
+
+void 
+Value::CommentInfo::setComment( const char *text )
+{
+   if ( comment_ )
+      valueAllocator()->releaseStringValue( comment_ );
+   JSON_ASSERT( text );
+   JSON_ASSERT_MESSAGE( text[0]=='\0' || text[0]=='/', "Comments must start with /");
+   // It seems that /**/ style comments are acceptable as well.
+   comment_ = valueAllocator()->duplicateStringValue( text );
+}
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class Value::CZString
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+# ifndef JSON_VALUE_USE_INTERNAL_MAP
+
+// Notes: index_ indicates if the string was allocated when
+// a string is stored.
+
+Value::CZString::CZString( int index )
+   : cstr_( 0 )
+   , index_( index )
+{
+}
+
+Value::CZString::CZString( const char *cstr, DuplicationPolicy allocate )
+   : cstr_( allocate == duplicate ? valueAllocator()->makeMemberName(cstr) 
+                                  : cstr )
+   , index_( allocate )
+{
+}
+
+Value::CZString::CZString( const CZString &other )
+: cstr_( other.index_ != noDuplication &&  other.cstr_ != 0
+                ?  valueAllocator()->makeMemberName( other.cstr_ )
+                : other.cstr_ )
+   , index_( other.cstr_ ? (other.index_ == noDuplication ? noDuplication : duplicate)
+                         : other.index_ )
+{
+}
+
+Value::CZString::~CZString()
+{
+   if ( cstr_  &&  index_ == duplicate )
+      valueAllocator()->releaseMemberName( const_cast<char *>( cstr_ ) );
+}
+
+void 
+Value::CZString::swap( CZString &other )
+{
+   std::swap( cstr_, other.cstr_ );
+   std::swap( index_, other.index_ );
+}
+
+Value::CZString &
+Value::CZString::operator =( const CZString &other )
+{
+   CZString temp( other );
+   swap( temp );
+   return *this;
+}
+
+bool 
+Value::CZString::operator<( const CZString &other ) const 
+{
+   if ( cstr_ )
+      return strcmp( cstr_, other.cstr_ ) < 0;
+   return index_ < other.index_;
+}
+
+bool 
+Value::CZString::operator==( const CZString &other ) const 
+{
+   if ( cstr_ )
+      return strcmp( cstr_, other.cstr_ ) == 0;
+   return index_ == other.index_;
+}
+
+
+int 
+Value::CZString::index() const
+{
+   return index_;
+}
+
+
+const char *
+Value::CZString::c_str() const
+{
+   return cstr_;
+}
+
+bool 
+Value::CZString::isStaticString() const
+{
+   return index_ == noDuplication;
+}
+
+#endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class Value::Value
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+/*! \internal Default constructor initialization must be equivalent to:
+ * memset( this, 0, sizeof(Value) )
+ * This optimization is used in ValueInternalMap fast allocator.
+ */
+Value::Value( ValueType type )
+   : type_( type )
+   , allocated_( 0 )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   switch ( type )
+   {
+   case nullValue:
+      break;
+   case intValue:
+   case uintValue:
+      value_.int_ = 0;
+      break;
+   case realValue:
+      value_.real_ = 0.0;
+      break;
+   case stringValue:
+      value_.string_ = 0;
+      break;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      value_.map_ = new ObjectValues();
+      break;
+#else
+   case arrayValue:
+      value_.array_ = arrayAllocator()->newArray();
+      break;
+   case objectValue:
+      value_.map_ = mapAllocator()->newMap();
+      break;
+#endif
+   case booleanValue:
+      value_.bool_ = false;
+      break;
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+}
+
+
+Value::Value( Int value )
+   : type_( intValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.int_ = value;
+}
+
+
+Value::Value( UInt value )
+   : type_( uintValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.uint_ = value;
+}
+
+Value::Value( double value )
+   : type_( realValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.real_ = value;
+}
+
+Value::Value( const char *value )
+   : type_( stringValue )
+   , allocated_( true )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = valueAllocator()->duplicateStringValue( value );
+}
+
+
+Value::Value( const char *beginValue, 
+              const char *endValue )
+   : type_( stringValue )
+   , allocated_( true )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = valueAllocator()->duplicateStringValue( beginValue, 
+                                                            UInt(endValue - beginValue) );
+}
+
+
+Value::Value( const std::string &value )
+   : type_( stringValue )
+   , allocated_( true )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = valueAllocator()->duplicateStringValue( value.c_str(), 
+                                                            (unsigned int)value.length() );
+
+}
+
+Value::Value( const StaticString &value )
+   : type_( stringValue )
+   , allocated_( false )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = const_cast<char *>( value.c_str() );
+}
+
+
+# ifdef JSON_USE_CPPTL
+Value::Value( const CppTL::ConstString &value )
+   : type_( stringValue )
+   , allocated_( true )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.string_ = valueAllocator()->duplicateStringValue( value, value.length() );
+}
+# endif
+
+Value::Value( bool value )
+   : type_( booleanValue )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   value_.bool_ = value;
+}
+
+
+Value::Value( const Value &other )
+   : type_( other.type_ )
+   , comments_( 0 )
+# ifdef JSON_VALUE_USE_INTERNAL_MAP
+   , itemIsUsed_( 0 )
+#endif
+{
+   switch ( type_ )
+   {
+   case nullValue:
+   case intValue:
+   case uintValue:
+   case realValue:
+   case booleanValue:
+      value_ = other.value_;
+      break;
+   case stringValue:
+      if ( other.value_.string_ )
+      {
+         value_.string_ = valueAllocator()->duplicateStringValue( other.value_.string_ );
+         allocated_ = true;
+      }
+      else
+         value_.string_ = 0;
+      break;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      value_.map_ = new ObjectValues( *other.value_.map_ );
+      break;
+#else
+   case arrayValue:
+      value_.array_ = arrayAllocator()->newArrayCopy( *other.value_.array_ );
+      break;
+   case objectValue:
+      value_.map_ = mapAllocator()->newMapCopy( *other.value_.map_ );
+      break;
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   if ( other.comments_ )
+   {
+      comments_ = new CommentInfo[numberOfCommentPlacement];
+      for ( int comment =0; comment < numberOfCommentPlacement; ++comment )
+      {
+         const CommentInfo &otherComment = other.comments_[comment];
+         if ( otherComment.comment_ )
+            comments_[comment].setComment( otherComment.comment_ );
+      }
+   }
+}
+
+
+Value::~Value()
+{
+   switch ( type_ )
+   {
+   case nullValue:
+   case intValue:
+   case uintValue:
+   case realValue:
+   case booleanValue:
+      break;
+   case stringValue:
+      if ( allocated_ )
+         valueAllocator()->releaseStringValue( value_.string_ );
+      break;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      delete value_.map_;
+      break;
+#else
+   case arrayValue:
+      arrayAllocator()->destructArray( value_.array_ );
+      break;
+   case objectValue:
+      mapAllocator()->destructMap( value_.map_ );
+      break;
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+
+   if ( comments_ )
+      delete[] comments_;
+}
+
+Value &
+Value::operator=( const Value &other )
+{
+   Value temp( other );
+   swap( temp );
+   return *this;
+}
+
+void 
+Value::swap( Value &other )
+{
+   ValueType temp = type_;
+   type_ = other.type_;
+   other.type_ = temp;
+   std::swap( value_, other.value_ );
+   int temp2 = allocated_;
+   allocated_ = other.allocated_;
+   other.allocated_ = temp2;
+}
+
+ValueType 
+Value::type() const
+{
+   return type_;
+}
+
+
+int 
+Value::compare( const Value &other )
+{
+   /*
+   int typeDelta = other.type_ - type_;
+   switch ( type_ )
+   {
+   case nullValue:
+
+      return other.type_ == type_;
+   case intValue:
+      if ( other.type_.isNumeric()
+   case uintValue:
+   case realValue:
+   case booleanValue:
+      break;
+   case stringValue,
+      break;
+   case arrayValue:
+      delete value_.array_;
+      break;
+   case objectValue:
+      delete value_.map_;
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   */
+   return 0;  // unreachable
+}
+
+bool 
+Value::operator <( const Value &other ) const
+{
+   int typeDelta = type_ - other.type_;
+   if ( typeDelta )
+      return typeDelta < 0 ? true : false;
+   switch ( type_ )
+   {
+   case nullValue:
+      return false;
+   case intValue:
+      return value_.int_ < other.value_.int_;
+   case uintValue:
+      return value_.uint_ < other.value_.uint_;
+   case realValue:
+      return value_.real_ < other.value_.real_;
+   case booleanValue:
+      return value_.bool_ < other.value_.bool_;
+   case stringValue:
+      return ( value_.string_ == 0  &&  other.value_.string_ )
+             || ( other.value_.string_  
+                  &&  value_.string_  
+                  && strcmp( value_.string_, other.value_.string_ ) < 0 );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      {
+         int delta = int( value_.map_->size() - other.value_.map_->size() );
+         if ( delta )
+            return delta < 0;
+         return (*value_.map_) < (*other.value_.map_);
+      }
+#else
+   case arrayValue:
+      return value_.array_->compare( *(other.value_.array_) ) < 0;
+   case objectValue:
+      return value_.map_->compare( *(other.value_.map_) ) < 0;
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0;  // unreachable
+}
+
+bool 
+Value::operator <=( const Value &other ) const
+{
+   return !(other > *this);
+}
+
+bool 
+Value::operator >=( const Value &other ) const
+{
+   return !(*this < other);
+}
+
+bool 
+Value::operator >( const Value &other ) const
+{
+   return other < *this;
+}
+
+bool 
+Value::operator ==( const Value &other ) const
+{
+   //if ( type_ != other.type_ )
+   // GCC 2.95.3 says:
+   // attempt to take address of bit-field structure member `Json::Value::type_'
+   // Beats me, but a temp solves the problem.
+   int temp = other.type_;
+   if ( type_ != temp )
+      return false;
+   switch ( type_ )
+   {
+   case nullValue:
+      return true;
+   case intValue:
+      return value_.int_ == other.value_.int_;
+   case uintValue:
+      return value_.uint_ == other.value_.uint_;
+   case realValue:
+      return value_.real_ == other.value_.real_;
+   case booleanValue:
+      return value_.bool_ == other.value_.bool_;
+   case stringValue:
+      return ( value_.string_ == other.value_.string_ )
+             || ( other.value_.string_  
+                  &&  value_.string_  
+                  && strcmp( value_.string_, other.value_.string_ ) == 0 );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      return value_.map_->size() == other.value_.map_->size()
+             && (*value_.map_) == (*other.value_.map_);
+#else
+   case arrayValue:
+      return value_.array_->compare( *(other.value_.array_) ) == 0;
+   case objectValue:
+      return value_.map_->compare( *(other.value_.map_) ) == 0;
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0;  // unreachable
+}
+
+bool 
+Value::operator !=( const Value &other ) const
+{
+   return !( *this == other );
+}
+
+const char *
+Value::asCString() const
+{
+   JSON_ASSERT( type_ == stringValue );
+   return value_.string_;
+}
+
+
+std::string 
+Value::asString() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return "";
+   case stringValue:
+      return value_.string_ ? value_.string_ : "";
+   case booleanValue:
+      return value_.bool_ ? "true" : "false";
+   case intValue:
+   case uintValue:
+   case realValue:
+   case arrayValue:
+   case objectValue:
+      JSON_ASSERT_MESSAGE( false, "Type is not convertible to string" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return ""; // unreachable
+}
+
+# ifdef JSON_USE_CPPTL
+CppTL::ConstString 
+Value::asConstString() const
+{
+   return CppTL::ConstString( asString().c_str() );
+}
+# endif
+
+Value::Int 
+Value::asInt() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return 0;
+   case intValue:
+      return value_.int_;
+   case uintValue:
+      JSON_ASSERT_MESSAGE( value_.uint_ < (unsigned)maxInt, "integer out of signed integer range" );
+      return value_.uint_;
+   case realValue:
+      JSON_ASSERT_MESSAGE( value_.real_ >= minInt  &&  value_.real_ <= maxInt, "Real out of signed integer range" );
+      return Int( value_.real_ );
+   case booleanValue:
+      return value_.bool_ ? 1 : 0;
+   case stringValue:
+   case arrayValue:
+   case objectValue:
+      JSON_ASSERT_MESSAGE( false, "Type is not convertible to int" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+Value::UInt 
+Value::asUInt() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return 0;
+   case intValue:
+      JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to unsigned integer" );
+      return value_.int_;
+   case uintValue:
+      return value_.uint_;
+   case realValue:
+      JSON_ASSERT_MESSAGE( value_.real_ >= 0  &&  value_.real_ <= maxUInt,  "Real out of unsigned integer range" );
+      return UInt( value_.real_ );
+   case booleanValue:
+      return value_.bool_ ? 1 : 0;
+   case stringValue:
+   case arrayValue:
+   case objectValue:
+      JSON_ASSERT_MESSAGE( false, "Type is not convertible to uint" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+double 
+Value::asDouble() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return 0.0;
+   case intValue:
+      return value_.int_;
+   case uintValue:
+      return value_.uint_;
+   case realValue:
+      return value_.real_;
+   case booleanValue:
+      return value_.bool_ ? 1.0 : 0.0;
+   case stringValue:
+   case arrayValue:
+   case objectValue:
+      JSON_ASSERT_MESSAGE( false, "Type is not convertible to double" );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+bool 
+Value::asBool() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return false;
+   case intValue:
+   case uintValue:
+      return value_.int_ != 0;
+   case realValue:
+      return value_.real_ != 0.0;
+   case booleanValue:
+      return value_.bool_;
+   case stringValue:
+      return value_.string_  &&  value_.string_[0] != 0;
+   case arrayValue:
+   case objectValue:
+      return value_.map_->size() != 0;
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return false; // unreachable;
+}
+
+
+bool 
+Value::isConvertibleTo( ValueType other ) const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+      return true;
+   case intValue:
+      return ( other == nullValue  &&  value_.int_ == 0 )
+             || other == intValue
+             || ( other == uintValue  && value_.int_ >= 0 )
+             || other == realValue
+             || other == stringValue
+             || other == booleanValue;
+   case uintValue:
+      return ( other == nullValue  &&  value_.uint_ == 0 )
+             || ( other == intValue  && value_.uint_ <= (unsigned)maxInt )
+             || other == uintValue
+             || other == realValue
+             || other == stringValue
+             || other == booleanValue;
+   case realValue:
+      return ( other == nullValue  &&  value_.real_ == 0.0 )
+             || ( other == intValue  &&  value_.real_ >= minInt  &&  value_.real_ <= maxInt )
+             || ( other == uintValue  &&  value_.real_ >= 0  &&  value_.real_ <= maxUInt )
+             || other == realValue
+             || other == stringValue
+             || other == booleanValue;
+   case booleanValue:
+      return ( other == nullValue  &&  value_.bool_ == false )
+             || other == intValue
+             || other == uintValue
+             || other == realValue
+             || other == stringValue
+             || other == booleanValue;
+   case stringValue:
+      return other == stringValue
+             || ( other == nullValue  &&  (!value_.string_  ||  value_.string_[0] == 0) );
+   case arrayValue:
+      return other == arrayValue
+             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
+   case objectValue:
+      return other == objectValue
+             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return false; // unreachable;
+}
+
+
+/// Number of values in array or object
+Value::UInt 
+Value::size() const
+{
+   switch ( type_ )
+   {
+   case nullValue:
+   case intValue:
+   case uintValue:
+   case realValue:
+   case booleanValue:
+   case stringValue:
+      return 0;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:  // size of the array is highest index + 1
+      if ( !value_.map_->empty() )
+      {
+         ObjectValues::const_iterator itLast = value_.map_->end();
+         --itLast;
+         return (*itLast).first.index()+1;
+      }
+      return 0;
+   case objectValue:
+      return Int( value_.map_->size() );
+#else
+   case arrayValue:
+      return Int( value_.array_->size() );
+   case objectValue:
+      return Int( value_.map_->size() );
+#endif
+   default:
+      JSON_ASSERT_UNREACHABLE;
+   }
+   return 0; // unreachable;
+}
+
+
+bool 
+Value::empty() const
+{
+   if ( isNull() || isArray() || isObject() )
+      return size() == 0u;
+   else
+      return false;
+}
+
+
+bool
+Value::operator!() const
+{
+   return isNull();
+}
+
+
+void 
+Value::clear()
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue  || type_ == objectValue );
+
+   switch ( type_ )
+   {
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+   case objectValue:
+      value_.map_->clear();
+      break;
+#else
+   case arrayValue:
+      value_.array_->clear();
+      break;
+   case objectValue:
+      value_.map_->clear();
+      break;
+#endif
+   default:
+      break;
+   }
+}
+
+void 
+Value::resize( UInt newSize )
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
+   if ( type_ == nullValue )
+      *this = Value( arrayValue );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   UInt oldSize = size();
+   if ( newSize == 0 )
+      clear();
+   else if ( newSize > oldSize )
+      (*this)[ newSize - 1 ];
+   else
+   {
+      for ( UInt index = newSize; index < oldSize; ++index )
+         value_.map_->erase( index );
+      assert( size() == newSize );
+   }
+#else
+   value_.array_->resize( newSize );
+#endif
+}
+
+
+Value &
+Value::operator[]( UInt index )
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
+   if ( type_ == nullValue )
+      *this = Value( arrayValue );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString key( index );
+   ObjectValues::iterator it = value_.map_->lower_bound( key );
+   if ( it != value_.map_->end()  &&  (*it).first == key )
+      return (*it).second;
+
+   ObjectValues::value_type defaultValue( key, null );
+   it = value_.map_->insert( it, defaultValue );
+   return (*it).second;
+#else
+   return value_.array_->resolveReference( index );
+#endif
+}
+
+
+const Value &
+Value::operator[]( UInt index ) const
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
+   if ( type_ == nullValue )
+      return null;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString key( index );
+   ObjectValues::const_iterator it = value_.map_->find( key );
+   if ( it == value_.map_->end() )
+      return null;
+   return (*it).second;
+#else
+   Value *value = value_.array_->find( index );
+   return value ? *value : null;
+#endif
+}
+
+
+Value &
+Value::operator[]( const char *key )
+{
+   return resolveReference( key, false );
+}
+
+
+Value &
+Value::resolveReference( const char *key, 
+                         bool isStatic )
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
+   if ( type_ == nullValue )
+      *this = Value( objectValue );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString actualKey( key, isStatic ? CZString::noDuplication 
+                                     : CZString::duplicateOnCopy );
+   ObjectValues::iterator it = value_.map_->lower_bound( actualKey );
+   if ( it != value_.map_->end()  &&  (*it).first == actualKey )
+      return (*it).second;
+
+   ObjectValues::value_type defaultValue( actualKey, null );
+   it = value_.map_->insert( it, defaultValue );
+   Value &value = (*it).second;
+   return value;
+#else
+   return value_.map_->resolveReference( key, isStatic );
+#endif
+}
+
+
+Value 
+Value::get( UInt index, 
+            const Value &defaultValue ) const
+{
+   const Value *value = &((*this)[index]);
+   return value == &null ? defaultValue : *value;
+}
+
+
+bool 
+Value::isValidIndex( UInt index ) const
+{
+   return index < size();
+}
+
+
+
+const Value &
+Value::operator[]( const char *key ) const
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
+   if ( type_ == nullValue )
+      return null;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString actualKey( key, CZString::noDuplication );
+   ObjectValues::const_iterator it = value_.map_->find( actualKey );
+   if ( it == value_.map_->end() )
+      return null;
+   return (*it).second;
+#else
+   const Value *value = value_.map_->find( key );
+   return value ? *value : null;
+#endif
+}
+
+
+Value &
+Value::operator[]( const std::string &key )
+{
+   return (*this)[ key.c_str() ];
+}
+
+
+const Value &
+Value::operator[]( const std::string &key ) const
+{
+   return (*this)[ key.c_str() ];
+}
+
+Value &
+Value::operator[]( const StaticString &key )
+{
+   return resolveReference( key, true );
+}
+
+
+# ifdef JSON_USE_CPPTL
+Value &
+Value::operator[]( const CppTL::ConstString &key )
+{
+   return (*this)[ key.c_str() ];
+}
+
+
+const Value &
+Value::operator[]( const CppTL::ConstString &key ) const
+{
+   return (*this)[ key.c_str() ];
+}
+# endif
+
+
+Value &
+Value::append( const Value &value )
+{
+   return (*this)[size()] = value;
+}
+
+
+Value 
+Value::get( const char *key, 
+            const Value &defaultValue ) const
+{
+   const Value *value = &((*this)[key]);
+   return value == &null ? defaultValue : *value;
+}
+
+
+Value 
+Value::get( const std::string &key,
+            const Value &defaultValue ) const
+{
+   return get( key.c_str(), defaultValue );
+}
+
+Value
+Value::removeMember( const char* key )
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
+   if ( type_ == nullValue )
+      return null;
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   CZString actualKey( key, CZString::noDuplication );
+   ObjectValues::iterator it = value_.map_->find( actualKey );
+   if ( it == value_.map_->end() )
+      return null;
+   Value old(it->second);
+   value_.map_->erase(it);
+   return old;
+#else
+   Value *value = value_.map_->find( key );
+   if (value){
+      Value old(*value);
+      value_.map_.remove( key );
+      return old;
+   } else {
+      return null;
+   }
+#endif
+}
+
+Value
+Value::removeMember( const std::string &key )
+{
+   return removeMember( key.c_str() );
+}
+
+# ifdef JSON_USE_CPPTL
+Value 
+Value::get( const CppTL::ConstString &key,
+            const Value &defaultValue ) const
+{
+   return get( key.c_str(), defaultValue );
+}
+# endif
+
+bool 
+Value::isMember( const char *key ) const
+{
+   const Value *value = &((*this)[key]);
+   return value != &null;
+}
+
+
+bool 
+Value::isMember( const std::string &key ) const
+{
+   return isMember( key.c_str() );
+}
+
+
+# ifdef JSON_USE_CPPTL
+bool 
+Value::isMember( const CppTL::ConstString &key ) const
+{
+   return isMember( key.c_str() );
+}
+#endif
+
+Value::Members 
+Value::getMemberNames() const
+{
+   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
+   if ( type_ == nullValue )
+       return Value::Members();
+   Members members;
+   members.reserve( value_.map_->size() );
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   ObjectValues::const_iterator it = value_.map_->begin();
+   ObjectValues::const_iterator itEnd = value_.map_->end();
+   for ( ; it != itEnd; ++it )
+      members.push_back( std::string( (*it).first.c_str() ) );
+#else
+   ValueInternalMap::IteratorState it;
+   ValueInternalMap::IteratorState itEnd;
+   value_.map_->makeBeginIterator( it );
+   value_.map_->makeEndIterator( itEnd );
+   for ( ; !ValueInternalMap::equals( it, itEnd ); ValueInternalMap::increment(it) )
+      members.push_back( std::string( ValueInternalMap::key( it ) ) );
+#endif
+   return members;
+}
+//
+//# ifdef JSON_USE_CPPTL
+//EnumMemberNames
+//Value::enumMemberNames() const
+//{
+//   if ( type_ == objectValue )
+//   {
+//      return CppTL::Enum::any(  CppTL::Enum::transform(
+//         CppTL::Enum::keys( *(value_.map_), CppTL::Type<const CZString &>() ),
+//         MemberNamesTransform() ) );
+//   }
+//   return EnumMemberNames();
+//}
+//
+//
+//EnumValues 
+//Value::enumValues() const
+//{
+//   if ( type_ == objectValue  ||  type_ == arrayValue )
+//      return CppTL::Enum::anyValues( *(value_.map_), 
+//                                     CppTL::Type<const Value &>() );
+//   return EnumValues();
+//}
+//
+//# endif
+
+
+bool
+Value::isNull() const
+{
+   return type_ == nullValue;
+}
+
+
+bool 
+Value::isBool() const
+{
+   return type_ == booleanValue;
+}
+
+
+bool 
+Value::isInt() const
+{
+   return type_ == intValue;
+}
+
+
+bool 
+Value::isUInt() const
+{
+   return type_ == uintValue;
+}
+
+
+bool 
+Value::isIntegral() const
+{
+   return type_ == intValue  
+          ||  type_ == uintValue  
+          ||  type_ == booleanValue;
+}
+
+
+bool 
+Value::isDouble() const
+{
+   return type_ == realValue;
+}
+
+
+bool 
+Value::isNumeric() const
+{
+   return isIntegral() || isDouble();
+}
+
+
+bool 
+Value::isString() const
+{
+   return type_ == stringValue;
+}
+
+
+bool 
+Value::isArray() const
+{
+   return type_ == nullValue  ||  type_ == arrayValue;
+}
+
+
+bool 
+Value::isObject() const
+{
+   return type_ == nullValue  ||  type_ == objectValue;
+}
+
+
+void 
+Value::setComment( const char *comment,
+                   CommentPlacement placement )
+{
+   if ( !comments_ )
+      comments_ = new CommentInfo[numberOfCommentPlacement];
+   comments_[placement].setComment( comment );
+}
+
+
+void 
+Value::setComment( const std::string &comment,
+                   CommentPlacement placement )
+{
+   setComment( comment.c_str(), placement );
+}
+
+
+bool 
+Value::hasComment( CommentPlacement placement ) const
+{
+   return comments_ != 0  &&  comments_[placement].comment_ != 0;
+}
+
+std::string 
+Value::getComment( CommentPlacement placement ) const
+{
+   if ( hasComment(placement) )
+      return comments_[placement].comment_;
+   return "";
+}
+
+
+std::string 
+Value::toStyledString() const
+{
+   StyledWriter writer;
+   return writer.write( *this );
+}
+
+
+Value::const_iterator 
+Value::begin() const
+{
+   switch ( type_ )
+   {
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+      if ( value_.array_ )
+      {
+         ValueInternalArray::IteratorState it;
+         value_.array_->makeBeginIterator( it );
+         return const_iterator( it );
+      }
+      break;
+   case objectValue:
+      if ( value_.map_ )
+      {
+         ValueInternalMap::IteratorState it;
+         value_.map_->makeBeginIterator( it );
+         return const_iterator( it );
+      }
+      break;
+#else
+   case arrayValue:
+   case objectValue:
+      if ( value_.map_ )
+         return const_iterator( value_.map_->begin() );
+      break;
+#endif
+   default:
+      break;
+   }
+   return const_iterator();
+}
+
+Value::const_iterator 
+Value::end() const
+{
+   switch ( type_ )
+   {
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+      if ( value_.array_ )
+      {
+         ValueInternalArray::IteratorState it;
+         value_.array_->makeEndIterator( it );
+         return const_iterator( it );
+      }
+      break;
+   case objectValue:
+      if ( value_.map_ )
+      {
+         ValueInternalMap::IteratorState it;
+         value_.map_->makeEndIterator( it );
+         return const_iterator( it );
+      }
+      break;
+#else
+   case arrayValue:
+   case objectValue:
+      if ( value_.map_ )
+         return const_iterator( value_.map_->end() );
+      break;
+#endif
+   default:
+      break;
+   }
+   return const_iterator();
+}
+
+
+Value::iterator 
+Value::begin()
+{
+   switch ( type_ )
+   {
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+      if ( value_.array_ )
+      {
+         ValueInternalArray::IteratorState it;
+         value_.array_->makeBeginIterator( it );
+         return iterator( it );
+      }
+      break;
+   case objectValue:
+      if ( value_.map_ )
+      {
+         ValueInternalMap::IteratorState it;
+         value_.map_->makeBeginIterator( it );
+         return iterator( it );
+      }
+      break;
+#else
+   case arrayValue:
+   case objectValue:
+      if ( value_.map_ )
+         return iterator( value_.map_->begin() );
+      break;
+#endif
+   default:
+      break;
+   }
+   return iterator();
+}
+
+Value::iterator 
+Value::end()
+{
+   switch ( type_ )
+   {
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   case arrayValue:
+      if ( value_.array_ )
+      {
+         ValueInternalArray::IteratorState it;
+         value_.array_->makeEndIterator( it );
+         return iterator( it );
+      }
+      break;
+   case objectValue:
+      if ( value_.map_ )
+      {
+         ValueInternalMap::IteratorState it;
+         value_.map_->makeEndIterator( it );
+         return iterator( it );
+      }
+      break;
+#else
+   case arrayValue:
+   case objectValue:
+      if ( value_.map_ )
+         return iterator( value_.map_->end() );
+      break;
+#endif
+   default:
+      break;
+   }
+   return iterator();
+}
+
+
+// class PathArgument
+// //////////////////////////////////////////////////////////////////
+
+PathArgument::PathArgument()
+   : kind_( kindNone )
+{
+}
+
+
+PathArgument::PathArgument( Value::UInt index )
+   : index_( index )
+   , kind_( kindIndex )
+{
+}
+
+
+PathArgument::PathArgument( const char *key )
+   : key_( key )
+   , kind_( kindKey )
+{
+}
+
+
+PathArgument::PathArgument( const std::string &key )
+   : key_( key.c_str() )
+   , kind_( kindKey )
+{
+}
+
+// class Path
+// //////////////////////////////////////////////////////////////////
+
+Path::Path( const std::string &path,
+            const PathArgument &a1,
+            const PathArgument &a2,
+            const PathArgument &a3,
+            const PathArgument &a4,
+            const PathArgument &a5 )
+{
+   InArgs in;
+   in.push_back( &a1 );
+   in.push_back( &a2 );
+   in.push_back( &a3 );
+   in.push_back( &a4 );
+   in.push_back( &a5 );
+   makePath( path, in );
+}
+
+
+void 
+Path::makePath( const std::string &path,
+                const InArgs &in )
+{
+   const char *current = path.c_str();
+   const char *end = current + path.length();
+   InArgs::const_iterator itInArg = in.begin();
+   while ( current != end )
+   {
+      if ( *current == '[' )
+      {
+         ++current;
+         if ( *current == '%' )
+            addPathInArg( path, in, itInArg, PathArgument::kindIndex );
+         else
+         {
+            Value::UInt index = 0;
+            for ( ; current != end && *current >= '0'  &&  *current <= '9'; ++current )
+               index = index * 10 + Value::UInt(*current - '0');
+            args_.push_back( index );
+         }
+         if ( current == end  ||  *current++ != ']' )
+            invalidPath( path, int(current - path.c_str()) );
+      }
+      else if ( *current == '%' )
+      {
+         addPathInArg( path, in, itInArg, PathArgument::kindKey );
+         ++current;
+      }
+      else if ( *current == '.' )
+      {
+         ++current;
+      }
+      else
+      {
+         const char *beginName = current;
+         while ( current != end  &&  !strchr( "[.", *current ) )
+            ++current;
+         args_.push_back( std::string( beginName, current ) );
+      }
+   }
+}
+
+
+void 
+Path::addPathInArg( const std::string &path, 
+                    const InArgs &in, 
+                    InArgs::const_iterator &itInArg, 
+                    PathArgument::Kind kind )
+{
+   if ( itInArg == in.end() )
+   {
+      // Error: missing argument %d
+   }
+   else if ( (*itInArg)->kind_ != kind )
+   {
+      // Error: bad argument type
+   }
+   else
+   {
+      args_.push_back( **itInArg );
+   }
+}
+
+
+void 
+Path::invalidPath( const std::string &path, 
+                   int location )
+{
+   // Error: invalid path.
+}
+
+
+const Value &
+Path::resolve( const Value &root ) const
+{
+   const Value *node = &root;
+   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
+   {
+      const PathArgument &arg = *it;
+      if ( arg.kind_ == PathArgument::kindIndex )
+      {
+         if ( !node->isArray()  ||  node->isValidIndex( arg.index_ ) )
+         {
+            // Error: unable to resolve path (array value expected at position...
+         }
+         node = &((*node)[arg.index_]);
+      }
+      else if ( arg.kind_ == PathArgument::kindKey )
+      {
+         if ( !node->isObject() )
+         {
+            // Error: unable to resolve path (object value expected at position...)
+         }
+         node = &((*node)[arg.key_]);
+         if ( node == &Value::null )
+         {
+            // Error: unable to resolve path (object has no member named '' at position...)
+         }
+      }
+   }
+   return *node;
+}
+
+
+Value 
+Path::resolve( const Value &root, 
+               const Value &defaultValue ) const
+{
+   const Value *node = &root;
+   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
+   {
+      const PathArgument &arg = *it;
+      if ( arg.kind_ == PathArgument::kindIndex )
+      {
+         if ( !node->isArray()  ||  node->isValidIndex( arg.index_ ) )
+            return defaultValue;
+         node = &((*node)[arg.index_]);
+      }
+      else if ( arg.kind_ == PathArgument::kindKey )
+      {
+         if ( !node->isObject() )
+            return defaultValue;
+         node = &((*node)[arg.key_]);
+         if ( node == &Value::null )
+            return defaultValue;
+      }
+   }
+   return *node;
+}
+
+
+Value &
+Path::make( Value &root ) const
+{
+   Value *node = &root;
+   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
+   {
+      const PathArgument &arg = *it;
+      if ( arg.kind_ == PathArgument::kindIndex )
+      {
+         if ( !node->isArray() )
+         {
+            // Error: node is not an array at position ...
+         }
+         node = &((*node)[arg.index_]);
+      }
+      else if ( arg.kind_ == PathArgument::kindKey )
+      {
+         if ( !node->isObject() )
+         {
+            // Error: node is not an object at position...
+         }
+         node = &((*node)[arg.key_]);
+      }
+   }
+   return *node;
+}
+
+
+} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json_valueiterator.inl
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json_valueiterator.inl b/test/plugins/cordova.echo/src/blackberry/public/json_valueiterator.inl
new file mode 100644
index 0000000..736e260
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json_valueiterator.inl
@@ -0,0 +1,292 @@
+// included by json_value.cpp
+// everything is within Json namespace
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueIteratorBase
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueIteratorBase::ValueIteratorBase()
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   : current_()
+   , isNull_( true )
+{
+}
+#else
+   : isArray_( true )
+   , isNull_( true )
+{
+   iterator_.array_ = ValueInternalArray::IteratorState();
+}
+#endif
+
+
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+ValueIteratorBase::ValueIteratorBase( const Value::ObjectValues::iterator &current )
+   : current_( current )
+   , isNull_( false )
+{
+}
+#else
+ValueIteratorBase::ValueIteratorBase( const ValueInternalArray::IteratorState &state )
+   : isArray_( true )
+{
+   iterator_.array_ = state;
+}
+
+
+ValueIteratorBase::ValueIteratorBase( const ValueInternalMap::IteratorState &state )
+   : isArray_( false )
+{
+   iterator_.map_ = state;
+}
+#endif
+
+Value &
+ValueIteratorBase::deref() const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   return current_->second;
+#else
+   if ( isArray_ )
+      return ValueInternalArray::dereference( iterator_.array_ );
+   return ValueInternalMap::value( iterator_.map_ );
+#endif
+}
+
+
+void 
+ValueIteratorBase::increment()
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   ++current_;
+#else
+   if ( isArray_ )
+      ValueInternalArray::increment( iterator_.array_ );
+   ValueInternalMap::increment( iterator_.map_ );
+#endif
+}
+
+
+void 
+ValueIteratorBase::decrement()
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   --current_;
+#else
+   if ( isArray_ )
+      ValueInternalArray::decrement( iterator_.array_ );
+   ValueInternalMap::decrement( iterator_.map_ );
+#endif
+}
+
+
+ValueIteratorBase::difference_type 
+ValueIteratorBase::computeDistance( const SelfType &other ) const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+# ifdef JSON_USE_CPPTL_SMALLMAP
+   return current_ - other.current_;
+# else
+   // Iterator for null value are initialized using the default
+   // constructor, which initialize current_ to the default
+   // std::map::iterator. As begin() and end() are two instance 
+   // of the default std::map::iterator, they can not be compared.
+   // To allow this, we handle this comparison specifically.
+   if ( isNull_  &&  other.isNull_ )
+   {
+      return 0;
+   }
+
+
+   // Usage of std::distance is not portable (does not compile with Sun Studio 12 RogueWave STL,
+   // which is the one used by default).
+   // Using a portable hand-made version for non random iterator instead:
+   //   return difference_type( std::distance( current_, other.current_ ) );
+   difference_type myDistance = 0;
+   for ( Value::ObjectValues::iterator it = current_; it != other.current_; ++it )
+   {
+      ++myDistance;
+   }
+   return myDistance;
+# endif
+#else
+   if ( isArray_ )
+      return ValueInternalArray::distance( iterator_.array_, other.iterator_.array_ );
+   return ValueInternalMap::distance( iterator_.map_, other.iterator_.map_ );
+#endif
+}
+
+
+bool 
+ValueIteratorBase::isEqual( const SelfType &other ) const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   if ( isNull_ )
+   {
+      return other.isNull_;
+   }
+   return current_ == other.current_;
+#else
+   if ( isArray_ )
+      return ValueInternalArray::equals( iterator_.array_, other.iterator_.array_ );
+   return ValueInternalMap::equals( iterator_.map_, other.iterator_.map_ );
+#endif
+}
+
+
+void 
+ValueIteratorBase::copy( const SelfType &other )
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   current_ = other.current_;
+#else
+   if ( isArray_ )
+      iterator_.array_ = other.iterator_.array_;
+   iterator_.map_ = other.iterator_.map_;
+#endif
+}
+
+
+Value 
+ValueIteratorBase::key() const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   const Value::CZString czstring = (*current_).first;
+   if ( czstring.c_str() )
+   {
+      if ( czstring.isStaticString() )
+         return Value( StaticString( czstring.c_str() ) );
+      return Value( czstring.c_str() );
+   }
+   return Value( czstring.index() );
+#else
+   if ( isArray_ )
+      return Value( ValueInternalArray::indexOf( iterator_.array_ ) );
+   bool isStatic;
+   const char *memberName = ValueInternalMap::key( iterator_.map_, isStatic );
+   if ( isStatic )
+      return Value( StaticString( memberName ) );
+   return Value( memberName );
+#endif
+}
+
+
+UInt 
+ValueIteratorBase::index() const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   const Value::CZString czstring = (*current_).first;
+   if ( !czstring.c_str() )
+      return czstring.index();
+   return Value::UInt( -1 );
+#else
+   if ( isArray_ )
+      return Value::UInt( ValueInternalArray::indexOf( iterator_.array_ ) );
+   return Value::UInt( -1 );
+#endif
+}
+
+
+const char *
+ValueIteratorBase::memberName() const
+{
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+   const char *name = (*current_).first.c_str();
+   return name ? name : "";
+#else
+   if ( !isArray_ )
+      return ValueInternalMap::key( iterator_.map_ );
+   return "";
+#endif
+}
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueConstIterator
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueConstIterator::ValueConstIterator()
+{
+}
+
+
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+ValueConstIterator::ValueConstIterator( const Value::ObjectValues::iterator &current )
+   : ValueIteratorBase( current )
+{
+}
+#else
+ValueConstIterator::ValueConstIterator( const ValueInternalArray::IteratorState &state )
+   : ValueIteratorBase( state )
+{
+}
+
+ValueConstIterator::ValueConstIterator( const ValueInternalMap::IteratorState &state )
+   : ValueIteratorBase( state )
+{
+}
+#endif
+
+ValueConstIterator &
+ValueConstIterator::operator =( const ValueIteratorBase &other )
+{
+   copy( other );
+   return *this;
+}
+
+
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// class ValueIterator
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+// //////////////////////////////////////////////////////////////////
+
+ValueIterator::ValueIterator()
+{
+}
+
+
+#ifndef JSON_VALUE_USE_INTERNAL_MAP
+ValueIterator::ValueIterator( const Value::ObjectValues::iterator &current )
+   : ValueIteratorBase( current )
+{
+}
+#else
+ValueIterator::ValueIterator( const ValueInternalArray::IteratorState &state )
+   : ValueIteratorBase( state )
+{
+}
+
+ValueIterator::ValueIterator( const ValueInternalMap::IteratorState &state )
+   : ValueIteratorBase( state )
+{
+}
+#endif
+
+ValueIterator::ValueIterator( const ValueConstIterator &other )
+   : ValueIteratorBase( other )
+{
+}
+
+ValueIterator::ValueIterator( const ValueIterator &other )
+   : ValueIteratorBase( other )
+{
+}
+
+ValueIterator &
+ValueIterator::operator =( const SelfType &other )
+{
+   copy( other );
+   return *this;
+}


[23/54] [abbrv] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-plugman

Posted by ti...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-plugman


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/8a00a0b9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/8a00a0b9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/8a00a0b9

Branch: refs/heads/future
Commit: 8a00a0b9402da19d0aedb0d6d02991f68d43dcac
Parents: 479d892 0a7b3e3
Author: Anis Kadri <an...@apache.org>
Authored: Tue Apr 2 20:07:54 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Tue Apr 2 20:07:54 2013 -0700

----------------------------------------------------------------------
 platforms/bb10.js                                  |  176 --
 platforms/blackberry.js                            |  176 ++
 plugman.js                                         |    4 +-
 test/bb10-install.js                               |  100 -
 test/bb10-uninstall.js                             |  111 -
 test/blackberry-install.js                         |  100 +
 test/blackberry-uninstall.js                       |  111 +
 test/plugins/DummyPlugin/plugin.xml                |    4 +-
 .../plugins/DummyPlugin/src/BlackBerry10/client.js |   19 -
 test/plugins/DummyPlugin/src/BlackBerry10/index.js |   19 -
 test/plugins/DummyPlugin/src/blackberry/client.js  |   19 +
 test/plugins/DummyPlugin/src/blackberry/index.js   |   19 +
 test/plugins/cordova.echo/.gitignore               |    1 +
 test/plugins/cordova.echo/plugin.xml               |   23 +-
 .../cordova.echo/src/BlackBerry10/client.js        |   53 -
 .../src/BlackBerry10/device/echoJnext.so           |  Bin 1291818 -> 0 bytes
 .../plugins/cordova.echo/src/BlackBerry10/index.js |   85 -
 .../cordova.echo/src/BlackBerry10/manifest.json    |    5 -
 .../src/BlackBerry10/public/json/autolink.h        |   38 -
 .../src/BlackBerry10/public/json/config.h          |   62 -
 .../src/BlackBerry10/public/json/features.h        |   61 -
 .../src/BlackBerry10/public/json/forwards.h        |   58 -
 .../src/BlackBerry10/public/json/json.h            |   29 -
 .../src/BlackBerry10/public/json/reader.h          |  215 --
 .../src/BlackBerry10/public/json/value.h           | 1088 ---------
 .../src/BlackBerry10/public/json/writer.h          |  193 --
 .../src/BlackBerry10/public/json_batchallocator.h  |  144 --
 .../src/BlackBerry10/public/json_internalarray.inl |  448 ----
 .../src/BlackBerry10/public/json_internalmap.inl   |  607 -----
 .../src/BlackBerry10/public/json_reader.cpp        |  913 --------
 .../src/BlackBerry10/public/json_value.cpp         | 1745 ---------------
 .../src/BlackBerry10/public/json_valueiterator.inl |  292 ---
 .../src/BlackBerry10/public/json_writer.cpp        |  848 -------
 .../src/BlackBerry10/public/plugin.cpp             |  339 ---
 .../cordova.echo/src/BlackBerry10/public/plugin.h  |   89 -
 .../src/BlackBerry10/public/tokenizer.cpp          |  241 --
 .../src/BlackBerry10/public/tokenizer.h            |   74 -
 .../src/BlackBerry10/simulator/echoJnext.so        |  Bin 231778 -> 0 bytes
 .../cordova.echo/src/BlackBerry10/src/echo.cpp     |  121 -
 .../cordova.echo/src/BlackBerry10/src/echo.hpp     |   45 -
 test/plugins/cordova.echo/src/blackberry/client.js |   53 +
 .../src/blackberry/device/echoJnext.so             |  Bin 0 -> 1291818 bytes
 test/plugins/cordova.echo/src/blackberry/index.js  |   85 +
 .../cordova.echo/src/blackberry/manifest.json      |    5 +
 .../src/blackberry/public/json/autolink.h          |   19 +
 .../src/blackberry/public/json/config.h            |   43 +
 .../src/blackberry/public/json/features.h          |   42 +
 .../src/blackberry/public/json/forwards.h          |   39 +
 .../cordova.echo/src/blackberry/public/json/json.h |   10 +
 .../src/blackberry/public/json/reader.h            |  196 ++
 .../src/blackberry/public/json/value.h             | 1069 +++++++++
 .../src/blackberry/public/json/writer.h            |  174 ++
 .../src/blackberry/public/json_batchallocator.h    |  125 +
 .../src/blackberry/public/json_internalarray.inl   |  448 ++++
 .../src/blackberry/public/json_internalmap.inl     |  607 +++++
 .../src/blackberry/public/json_reader.cpp          |  894 ++++++++
 .../src/blackberry/public/json_value.cpp           | 1726 ++++++++++++++
 .../src/blackberry/public/json_valueiterator.inl   |  292 +++
 .../src/blackberry/public/json_writer.cpp          |  829 +++++++
 .../cordova.echo/src/blackberry/public/plugin.cpp  |  320 +++
 .../cordova.echo/src/blackberry/public/plugin.h    |   70 +
 .../src/blackberry/public/tokenizer.cpp            |  222 ++
 .../cordova.echo/src/blackberry/public/tokenizer.h |   55 +
 .../src/blackberry/simulator/echoJnext.so          |  Bin 0 -> 231778 bytes
 .../cordova.echo/src/blackberry/src/echo.cpp       |  121 +
 .../cordova.echo/src/blackberry/src/echo.hpp       |   45 +
 test/plugins/cordova.echo/src/device/echoJnext.so  |  Bin 0 -> 1291818 bytes
 .../cordova.echo/src/simulator/echoJnext.so        |  Bin 0 -> 231778 bytes
 test/projects/BlackBerry10/www/config.xml          |   97 -
 test/projects/BlackBerry10/www/plugins.xml         |   35 -
 test/projects/blackberry/www/config.xml            |   97 +
 test/projects/blackberry/www/plugins.xml           |   35 +
 72 files changed, 8053 insertions(+), 8375 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/8a00a0b9/plugman.js
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/8a00a0b9/test/plugins/DummyPlugin/plugin.xml
----------------------------------------------------------------------


[54/54] [abbrv] git commit: Merging future and master

Posted by ti...@apache.org.
Merging future and master


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/73047c40
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/73047c40
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/73047c40

Branch: refs/heads/future
Commit: 73047c40acfe453d973dc106369461f020e0d9a7
Parents: d3c01ad bd69965
Author: Tim Kim <ti...@adobe.com>
Authored: Mon Apr 15 11:51:23 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Mon Apr 15 11:51:23 2013 -0700

----------------------------------------------------------------------
 README.md                                          |   23 +
 platforms/android.js                               |   60 +-
 platforms/bb10.js                                  |  152 --
 platforms/blackberry.js                            |  156 ++
 platforms/ios.js                                   |  173 +-
 plugman.js                                         |   67 +-
 test/android-one-install.js                        |   61 +-
 test/android-one-uninstall.js                      |    7 +-
 test/android-two-install.js                        |   36 +-
 test/bb10-install.js                               |  100 -
 test/bb10-uninstall.js                             |  111 -
 test/blackberry-install.js                         |  105 +
 test/blackberry-uninstall.js                       |  111 +
 test/config-changes.js                             |    2 +-
 test/ios-config-xml-install.js                     |  303 +++
 test/ios-config-xml-uninstall.js                   |  227 ++
 test/ios-install.js                                |  260 ---
 test/ios-plist-install.js                          |  237 ++
 test/ios-plist-uninstall.js                        |  219 ++
 test/ios-uninstall.js                              |  238 --
 test/plugins/ChildBrowser/plugin-old.xml           |   83 +
 test/plugins/ChildBrowser/plugin.xml               |   36 +-
 test/plugins/DummyPlugin/plugin.xml                |   17 +-
 .../plugins/DummyPlugin/src/BlackBerry10/client.js |   19 -
 test/plugins/DummyPlugin/src/BlackBerry10/index.js |   19 -
 test/plugins/DummyPlugin/src/blackberry/client.js  |   19 +
 test/plugins/DummyPlugin/src/blackberry/index.js   |   19 +
 test/plugins/FaultyPlugin/plugin.xml               |   73 +
 .../FaultyPlugin/src/android/FaultyPlugin.java     |   19 +
 test/plugins/FaultyPlugin/src/ios/FaultyPlugin.h   |   49 +
 test/plugins/FaultyPlugin/src/ios/FaultyPlugin.m   |   86 +
 test/plugins/PGSQLitePlugin                        |    1 -
 test/plugins/WebNotifications/plugin.xml           |    6 +-
 test/plugins/WeblessPlugin/plugin.xml              |   21 +-
 test/plugins/cordova.echo/.gitignore               |    1 +
 test/plugins/cordova.echo/plugin.xml               |   33 +-
 .../cordova.echo/src/BlackBerry10/client.js        |   53 -
 .../src/BlackBerry10/device/echoJnext.so           |  Bin 1291818 -> 0 bytes
 .../plugins/cordova.echo/src/BlackBerry10/index.js |   85 -
 .../cordova.echo/src/BlackBerry10/manifest.json    |    5 -
 .../src/BlackBerry10/public/json/autolink.h        |   38 -
 .../src/BlackBerry10/public/json/config.h          |   62 -
 .../src/BlackBerry10/public/json/features.h        |   61 -
 .../src/BlackBerry10/public/json/forwards.h        |   58 -
 .../src/BlackBerry10/public/json/json.h            |   29 -
 .../src/BlackBerry10/public/json/reader.h          |  215 --
 .../src/BlackBerry10/public/json/value.h           | 1088 ---------
 .../src/BlackBerry10/public/json/writer.h          |  193 --
 .../src/BlackBerry10/public/json_batchallocator.h  |  144 --
 .../src/BlackBerry10/public/json_internalarray.inl |  448 ----
 .../src/BlackBerry10/public/json_internalmap.inl   |  607 -----
 .../src/BlackBerry10/public/json_reader.cpp        |  913 --------
 .../src/BlackBerry10/public/json_value.cpp         | 1745 ---------------
 .../src/BlackBerry10/public/json_valueiterator.inl |  292 ---
 .../src/BlackBerry10/public/json_writer.cpp        |  848 -------
 .../src/BlackBerry10/public/plugin.cpp             |  339 ---
 .../cordova.echo/src/BlackBerry10/public/plugin.h  |   89 -
 .../src/BlackBerry10/public/tokenizer.cpp          |  241 --
 .../src/BlackBerry10/public/tokenizer.h            |   74 -
 .../src/BlackBerry10/simulator/echoJnext.so        |  Bin 231778 -> 0 bytes
 .../cordova.echo/src/BlackBerry10/src/echo.cpp     |  121 -
 .../cordova.echo/src/BlackBerry10/src/echo.hpp     |   45 -
 test/plugins/cordova.echo/src/blackberry/client.js |   53 +
 .../src/blackberry/device/echoJnext.so             |  Bin 0 -> 1291818 bytes
 test/plugins/cordova.echo/src/blackberry/index.js  |   85 +
 .../cordova.echo/src/blackberry/manifest.json      |    5 +
 .../src/blackberry/public/json/autolink.h          |   19 +
 .../src/blackberry/public/json/config.h            |   43 +
 .../src/blackberry/public/json/features.h          |   42 +
 .../src/blackberry/public/json/forwards.h          |   39 +
 .../cordova.echo/src/blackberry/public/json/json.h |   10 +
 .../src/blackberry/public/json/reader.h            |  196 ++
 .../src/blackberry/public/json/value.h             | 1069 +++++++++
 .../src/blackberry/public/json/writer.h            |  174 ++
 .../src/blackberry/public/json_batchallocator.h    |  125 +
 .../src/blackberry/public/json_internalarray.inl   |  448 ++++
 .../src/blackberry/public/json_internalmap.inl     |  607 +++++
 .../src/blackberry/public/json_reader.cpp          |  894 ++++++++
 .../src/blackberry/public/json_value.cpp           | 1726 ++++++++++++++
 .../src/blackberry/public/json_valueiterator.inl   |  292 +++
 .../src/blackberry/public/json_writer.cpp          |  829 +++++++
 .../cordova.echo/src/blackberry/public/plugin.cpp  |  320 +++
 .../cordova.echo/src/blackberry/public/plugin.h    |   70 +
 .../src/blackberry/public/tokenizer.cpp            |  222 ++
 .../cordova.echo/src/blackberry/public/tokenizer.h |   55 +
 .../src/blackberry/simulator/echoJnext.so          |  Bin 0 -> 231778 bytes
 .../cordova.echo/src/blackberry/src/echo.cpp       |  121 +
 .../cordova.echo/src/blackberry/src/echo.hpp       |   45 +
 test/plugins/cordova.echo/src/device/echoJnext.so  |  Bin 0 -> 1291818 bytes
 .../cordova.echo/src/simulator/echoJnext.so        |  Bin 0 -> 231778 bytes
 test/plugman.js                                    |  178 ++
 test/projects/BlackBerry10/www/config.xml          |   97 -
 test/projects/BlackBerry10/www/plugins.xml         |   35 -
 test/projects/FriendSting-Info.plist               |   78 +
 test/projects/android_one/AndroidManifest.xml      |    2 +
 test/projects/blackberry/www/config.xml            |   97 +
 test/projects/blackberry/www/plugins.xml           |   35 +
 test/projects/ios-config-xml/SampleApp-Info.plist  |   78 +
 .../ios-config-xml/SampleApp/SampleApp-Info.plist  |   78 +
 test/projects/ios-config-xml/SampleApp/config.xml  |    4 +-
 .../CordovaLib.xcodeproj/project.pbxproj           |  636 ++++++
 .../SampleApp.xcodeproj/project.orig.pbxproj       |  498 ++++
 .../ios-plist/SampleApp.xcodeproj/project.pbxproj  |  498 ++++
 test/projects/ios-plist/SampleApp/PhoneGap.plist   |   53 +
 .../ios-plist/SampleApp/SampleApp-Info.plist       |   80 +
 .../CordovaLib.xcodeproj/project.pbxproj           |  636 ------
 .../ios/SampleApp.xcodeproj/project.orig.pbxproj   |  498 ----
 .../ios/SampleApp.xcodeproj/project.pbxproj        |  498 ----
 test/projects/ios/SampleApp/PhoneGap.plist         |   53 -
 test/www-only.js                                   |   80 -
 util/plugin_loader.js                              |  179 +-
 util/search-and-replace.js                         |   37 +
 112 files changed, 12001 insertions(+), 10858 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/73047c40/README.md
----------------------------------------------------------------------
diff --cc README.md
index 789a35c,1e9fce9..02d4674
--- a/README.md
+++ b/README.md
@@@ -409,6 -431,6 +431,7 @@@ TODO: show how the foo plugin example f
  * Mike Reinstein
  * Anis Kadri
  * Braden Shepherdson
++* Tim Kim 
  
  ## Contributors
  

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/73047c40/platforms/blackberry.js
----------------------------------------------------------------------
diff --cc platforms/blackberry.js
index 0000000,b7096bf..cdd89ee
mode 000000,100644..100644
--- a/platforms/blackberry.js
+++ b/platforms/blackberry.js
@@@ -1,0 -1,156 +1,156 @@@
+ /*
+  *
+  * Copyright 2013 Anis Kadri
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *   http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing,
+  * software distributed under the License is distributed on an
+  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  * KIND, either express or implied.  See the License for the
+  * specific language governing permissions and limitations
+  * under the License.
+  *
+ */
+ 
+ var fs = require('fs')  // use existsSync in 0.6.x
+    , path = require('path')
+    , shell = require('shelljs')
+    , et = require('elementtree')
+    , getConfigChanges = require('../util/config-changes')
+    , sourceDir = 'src'
+    , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
+ 
+ 
+ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et) {
+     var plugin_id = plugin_et._root.attrib['id']
+       , version = plugin_et._root.attrib['version']
+       , external_hosts = []
+       , platformTag = plugin_et.find('./platform[@name="blackberry"]')
+ 
+     if (!platformTag) {
+         // Either this plugin doesn't support this platform, or it's a JS-only plugin.
+         // Either way, return now.
+         return;
+     }
+ 
+     var sourceFiles = platformTag.findall('./source-file')
+       , libFiles = platformTag.findall('./library-file')
+       , configChanges = getConfigChanges(platformTag);
+     // find which config-files we're interested in
+     Object.keys(configChanges).forEach(function (configFile) {
+         if (!fs.existsSync(path.resolve(project_dir, configFile))) {
+             delete configChanges[configFile];
+         }
+     });
+ 
+     // collision detection 
+     if(action.match(/force-/) == null) {
+       if(action == "install" && pluginInstalled(plugin_et, project_dir)) {
+           throw "Plugin "+plugin_id+" already installed"
+       } else if(action == "uninstall" && !pluginInstalled(plugin_et, project_dir)) {
+           throw "Plugin "+plugin_id+" not installed"
+       }
+     } else {
+       action = action.replace('force-', '');
+     }
+     
+     // move source files
+     sourceFiles.forEach(function (sourceFile) {
+         var srcDir = path.resolve(project_dir,
+                                 sourceFile.attrib['target-dir'])
+           , destFile = path.resolve(srcDir,
+                                 path.basename(sourceFile.attrib['src']));
+ 
+         if (action == 'install') {
+             shell.mkdir('-p', srcDir);
+             var srcFile = srcPath(plugin_dir, sourceFile.attrib['src']);
+             shell.cp(srcFile, destFile);
+         } else {
+             fs.unlinkSync(destFile);
+             // check if directory is empty
+             var curDir = srcDir;
+             while(curDir !== path.join(project_dir, 'src')) {
+                 if(fs.readdirSync(curDir).length == 0) {
+                     fs.rmdirSync(curDir);
+                     curDir = path.resolve(curDir, '..');
+                 } else {
+                     // directory not empty...do nothing
+                     break;
+                 }
+             }
+         }
+     })
+ 
+     // move library files
+     libFiles.forEach(function (libFile) {
+         var libDir = path.resolve(project_dir,
+                                 libFile.attrib['target-dir'])
+ 
+         if (action == 'install') {
+             shell.mkdir('-p', libDir);
 -            
++
+             var src = path.resolve(plugin_dir,
+                                         libFile.attrib['src']),
+                 dest = path.resolve(libDir,
+                                 path.basename(libFile.attrib['src']));
+             
+             shell.cp(src, dest);
+         } else {
+             var destFile = path.resolve(libDir,
+                             path.basename(libFile.attrib['src']));
+ 
+             fs.unlinkSync(destFile);
+             // check if directory is empty
+             var files = fs.readdirSync(libDir);
+             if(files.length == 0) {
+                 shell.rm('-rf', libDir);
+             }
+         }
+     })
+ 
+ 
+     // edit configuration files
+     Object.keys(configChanges).forEach(function (filename) {
+         var filepath = path.resolve(project_dir, filename),
+             xmlDoc = xml_helpers.parseElementtreeSync(filepath),
+             output;
+ 
+         configChanges[filename].forEach(function (configNode) {
+             var selector = configNode.attrib["parent"],
+                 children = configNode.findall('*');
+ 
+             if( action == 'install') {
+                 if (!xml_helpers.graftXML(xmlDoc, children, selector)) {
+                     throw new Error('failed to add children to ' + filename);
+                 }
+             } else {
+                 if (!xml_helpers.pruneXML(xmlDoc, children, selector)) {
+                     throw new Error('failed to remove children from' + filename);
+                 }
+             }
+         });
+ 
+         output = xmlDoc.write({indent: 4});
+         fs.writeFileSync(filepath, output);
+     });
+ }
+ 
+ 
+ function srcPath(pluginPath, filename) {
+     return path.resolve(pluginPath, filename);
+ }
+ 
+ function pluginInstalled(plugin_et, project_dir) {
+     var config_tag = plugin_et.find('./platform[@name="blackberry"]/config-file[@target="config.xml"]/feature');
+     if (!config_tag) {
+         return false;
+     }
+     var plugin_name = config_tag.attrib.id;
+     return (fs.readFileSync(path.resolve(project_dir, 'config.xml'), 'utf8')
+            .match(new RegExp(plugin_name, "g")) != null);
+ }

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/73047c40/plugman.js
----------------------------------------------------------------------
diff --cc plugman.js
index 6db4804,9010dfd..eea2549
--- a/plugman.js
+++ b/plugman.js
@@@ -31,10 -31,11 +31,10 @@@ var fs = require('fs'
    , platform_modules = {
          'android': require('./platforms/android'),
          'ios': require('./platforms/ios'),
-         'bb10': require('./platforms/bb10')
+         'blackberry': require('./platforms/blackberry')
      };
  
- var known_opts = { 'platform' : [ 'ios', 'android', 'bb10' ]
+ var known_opts = { 'platform' : [ 'ios', 'android', 'blackberry' ]
 -
              , 'project' : path
              , 'plugin' : [String, path, url]
              , 'remove' : Boolean


[04/54] [abbrv] renamed blackberry assets

Posted by ti...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json_writer.cpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json_writer.cpp b/test/plugins/cordova.echo/src/BlackBerry10/public/json_writer.cpp
deleted file mode 100644
index 7cac6fc..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json_writer.cpp
+++ /dev/null
@@ -1,848 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#include <json/writer.h>
-#include <utility>
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-
-#if _MSC_VER >= 1400 // VC++ 8.0
-#pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
-#endif
-
-namespace Json {
-
-static bool isControlCharacter(char ch)
-{
-   return ch > 0 && ch <= 0x1F;
-}
-
-static bool containsControlCharacter( const char* str )
-{
-   while ( *str ) 
-   {
-      if ( isControlCharacter( *(str++) ) )
-         return true;
-   }
-   return false;
-}
-static void uintToString( unsigned int value, 
-                          char *&current )
-{
-   *--current = 0;
-   do
-   {
-      *--current = (value % 10) + '0';
-      value /= 10;
-   }
-   while ( value != 0 );
-}
-
-std::string valueToString( Int value )
-{
-   char buffer[32];
-   char *current = buffer + sizeof(buffer);
-   bool isNegative = value < 0;
-   if ( isNegative )
-      value = -value;
-   uintToString( UInt(value), current );
-   if ( isNegative )
-      *--current = '-';
-   assert( current >= buffer );
-   return current;
-}
-
-
-std::string valueToString( UInt value )
-{
-   char buffer[32];
-   char *current = buffer + sizeof(buffer);
-   uintToString( value, current );
-   assert( current >= buffer );
-   return current;
-}
-
-std::string valueToString( double value )
-{
-   char buffer[32];
-#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning. 
-   sprintf_s(buffer, sizeof(buffer), "%#.16g", value); 
-#else	
-   sprintf(buffer, "%#.16g", value); 
-#endif
-   char* ch = buffer + strlen(buffer) - 1;
-   if (*ch != '0') return buffer; // nothing to truncate, so save time
-   while(ch > buffer && *ch == '0'){
-     --ch;
-   }
-   char* last_nonzero = ch;
-   while(ch >= buffer){
-     switch(*ch){
-     case '0':
-     case '1':
-     case '2':
-     case '3':
-     case '4':
-     case '5':
-     case '6':
-     case '7':
-     case '8':
-     case '9':
-       --ch;
-       continue;
-     case '.':
-       // Truncate zeroes to save bytes in output, but keep one.
-       *(last_nonzero+2) = '\0';
-       return buffer;
-     default:
-       return buffer;
-     }
-   }
-   return buffer;
-}
-
-
-std::string valueToString( bool value )
-{
-   return value ? "true" : "false";
-}
-
-std::string valueToQuotedString( const char *value )
-{
-   // Not sure how to handle unicode...
-   if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL && !containsControlCharacter( value ))
-      return std::string("\"") + value + "\"";
-   // We have to walk value and escape any special characters.
-   // Appending to std::string is not efficient, but this should be rare.
-   // (Note: forward slashes are *not* rare, but I am not escaping them.)
-   unsigned maxsize = strlen(value)*2 + 3; // allescaped+quotes+NULL
-   std::string result;
-   result.reserve(maxsize); // to avoid lots of mallocs
-   result += "\"";
-   for (const char* c=value; *c != 0; ++c)
-   {
-      switch(*c)
-      {
-         case '\"':
-            result += "\\\"";
-            break;
-         case '\\':
-            result += "\\\\";
-            break;
-         case '\b':
-            result += "\\b";
-            break;
-         case '\f':
-            result += "\\f";
-            break;
-         case '\n':
-            result += "\\n";
-            break;
-         case '\r':
-            result += "\\r";
-            break;
-         case '\t':
-            result += "\\t";
-            break;
-         //case '/':
-            // Even though \/ is considered a legal escape in JSON, a bare
-            // slash is also legal, so I see no reason to escape it.
-            // (I hope I am not misunderstanding something.
-            // blep notes: actually escaping \/ may be useful in javascript to avoid </ 
-            // sequence.
-            // Should add a flag to allow this compatibility mode and prevent this 
-            // sequence from occurring.
-         default:
-            if ( isControlCharacter( *c ) )
-            {
-               std::ostringstream oss;
-               oss << "\\u" << std::hex << std::uppercase << std::setfill('0') << std::setw(4) << static_cast<int>(*c);
-               result += oss.str();
-            }
-            else
-            {
-               result += *c;
-            }
-            break;
-      }
-   }
-   result += "\"";
-   return result;
-}
-
-// Class Writer
-// //////////////////////////////////////////////////////////////////
-Writer::~Writer()
-{
-}
-
-
-// Class FastWriter
-// //////////////////////////////////////////////////////////////////
-
-FastWriter::FastWriter()
-   : yamlCompatiblityEnabled_( false )
-{
-}
-
-
-void 
-FastWriter::enableYAMLCompatibility()
-{
-   yamlCompatiblityEnabled_ = true;
-}
-
-
-std::string 
-FastWriter::write( const Value &root )
-{
-   document_ = "";
-   writeValue( root );
-   document_ += "\n";
-   return document_;
-}
-
-
-void 
-FastWriter::writeValue( const Value &value )
-{
-   switch ( value.type() )
-   {
-   case nullValue:
-      document_ += "null";
-      break;
-   case intValue:
-      document_ += valueToString( value.asInt() );
-      break;
-   case uintValue:
-      document_ += valueToString( value.asUInt() );
-      break;
-   case realValue:
-      document_ += valueToString( value.asDouble() );
-      break;
-   case stringValue:
-      document_ += valueToQuotedString( value.asCString() );
-      break;
-   case booleanValue:
-      document_ += valueToString( value.asBool() );
-      break;
-   case arrayValue:
-      {
-         document_ += "[";
-         int size = value.size();
-         for ( int index =0; index < size; ++index )
-         {
-            if ( index > 0 )
-               document_ += ",";
-            writeValue( value[index] );
-         }
-         document_ += "]";
-      }
-      break;
-   case objectValue:
-      {
-         Value::Members members( value.getMemberNames() );
-         document_ += "{";
-         for ( Value::Members::iterator it = members.begin(); 
-               it != members.end(); 
-               ++it )
-         {
-            const std::string &name = *it;
-            if ( it != members.begin() )
-               document_ += ",";
-            document_ += valueToQuotedString( name.c_str() );
-            document_ += yamlCompatiblityEnabled_ ? ": " 
-                                                  : ":";
-            writeValue( value[name] );
-         }
-         document_ += "}";
-      }
-      break;
-   }
-}
-
-
-// Class StyledWriter
-// //////////////////////////////////////////////////////////////////
-
-StyledWriter::StyledWriter()
-   : rightMargin_( 74 )
-   , indentSize_( 3 )
-{
-}
-
-
-std::string 
-StyledWriter::write( const Value &root )
-{
-   document_ = "";
-   addChildValues_ = false;
-   indentString_ = "";
-   writeCommentBeforeValue( root );
-   writeValue( root );
-   writeCommentAfterValueOnSameLine( root );
-   document_ += "\n";
-   return document_;
-}
-
-
-void 
-StyledWriter::writeValue( const Value &value )
-{
-   switch ( value.type() )
-   {
-   case nullValue:
-      pushValue( "null" );
-      break;
-   case intValue:
-      pushValue( valueToString( value.asInt() ) );
-      break;
-   case uintValue:
-      pushValue( valueToString( value.asUInt() ) );
-      break;
-   case realValue:
-      pushValue( valueToString( value.asDouble() ) );
-      break;
-   case stringValue:
-      pushValue( valueToQuotedString( value.asCString() ) );
-      break;
-   case booleanValue:
-      pushValue( valueToString( value.asBool() ) );
-      break;
-   case arrayValue:
-      writeArrayValue( value);
-      break;
-   case objectValue:
-      {
-         Value::Members members( value.getMemberNames() );
-         if ( members.empty() )
-            pushValue( "{}" );
-         else
-         {
-            writeWithIndent( "{" );
-            indent();
-            Value::Members::iterator it = members.begin();
-            while ( true )
-            {
-               const std::string &name = *it;
-               const Value &childValue = value[name];
-               writeCommentBeforeValue( childValue );
-               writeWithIndent( valueToQuotedString( name.c_str() ) );
-               document_ += " : ";
-               writeValue( childValue );
-               if ( ++it == members.end() )
-               {
-                  writeCommentAfterValueOnSameLine( childValue );
-                  break;
-               }
-               document_ += ",";
-               writeCommentAfterValueOnSameLine( childValue );
-            }
-            unindent();
-            writeWithIndent( "}" );
-         }
-      }
-      break;
-   }
-}
-
-
-void 
-StyledWriter::writeArrayValue( const Value &value )
-{
-   unsigned size = value.size();
-   if ( size == 0 )
-      pushValue( "[]" );
-   else
-   {
-      bool isArrayMultiLine = isMultineArray( value );
-      if ( isArrayMultiLine )
-      {
-         writeWithIndent( "[" );
-         indent();
-         bool hasChildValue = !childValues_.empty();
-         unsigned index =0;
-         while ( true )
-         {
-            const Value &childValue = value[index];
-            writeCommentBeforeValue( childValue );
-            if ( hasChildValue )
-               writeWithIndent( childValues_[index] );
-            else
-            {
-               writeIndent();
-               writeValue( childValue );
-            }
-            if ( ++index == size )
-            {
-               writeCommentAfterValueOnSameLine( childValue );
-               break;
-            }
-            document_ += ",";
-            writeCommentAfterValueOnSameLine( childValue );
-         }
-         unindent();
-         writeWithIndent( "]" );
-      }
-      else // output on a single line
-      {
-         assert( childValues_.size() == size );
-         document_ += "[ ";
-         for ( unsigned index =0; index < size; ++index )
-         {
-            if ( index > 0 )
-               document_ += ", ";
-            document_ += childValues_[index];
-         }
-         document_ += " ]";
-      }
-   }
-}
-
-
-bool 
-StyledWriter::isMultineArray( const Value &value )
-{
-   int size = value.size();
-   bool isMultiLine = size*3 >= rightMargin_ ;
-   childValues_.clear();
-   for ( int index =0; index < size  &&  !isMultiLine; ++index )
-   {
-      const Value &childValue = value[index];
-      isMultiLine = isMultiLine  ||
-                     ( (childValue.isArray()  ||  childValue.isObject())  &&  
-                        childValue.size() > 0 );
-   }
-   if ( !isMultiLine ) // check if line length > max line length
-   {
-      childValues_.reserve( size );
-      addChildValues_ = true;
-      int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
-      for ( int index =0; index < size  &&  !isMultiLine; ++index )
-      {
-         writeValue( value[index] );
-         lineLength += int( childValues_[index].length() );
-         isMultiLine = isMultiLine  &&  hasCommentForValue( value[index] );
-      }
-      addChildValues_ = false;
-      isMultiLine = isMultiLine  ||  lineLength >= rightMargin_;
-   }
-   return isMultiLine;
-}
-
-
-void 
-StyledWriter::pushValue( const std::string &value )
-{
-   if ( addChildValues_ )
-      childValues_.push_back( value );
-   else
-      document_ += value;
-}
-
-
-void 
-StyledWriter::writeIndent()
-{
-   if ( !document_.empty() )
-   {
-      char last = document_[document_.length()-1];
-      if ( last == ' ' )     // already indented
-         return;
-      if ( last != '\n' )    // Comments may add new-line
-         document_ += '\n';
-   }
-   document_ += indentString_;
-}
-
-
-void 
-StyledWriter::writeWithIndent( const std::string &value )
-{
-   writeIndent();
-   document_ += value;
-}
-
-
-void 
-StyledWriter::indent()
-{
-   indentString_ += std::string( indentSize_, ' ' );
-}
-
-
-void 
-StyledWriter::unindent()
-{
-   assert( int(indentString_.size()) >= indentSize_ );
-   indentString_.resize( indentString_.size() - indentSize_ );
-}
-
-
-void 
-StyledWriter::writeCommentBeforeValue( const Value &root )
-{
-   if ( !root.hasComment( commentBefore ) )
-      return;
-   document_ += normalizeEOL( root.getComment( commentBefore ) );
-   document_ += "\n";
-}
-
-
-void 
-StyledWriter::writeCommentAfterValueOnSameLine( const Value &root )
-{
-   if ( root.hasComment( commentAfterOnSameLine ) )
-      document_ += " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
-
-   if ( root.hasComment( commentAfter ) )
-   {
-      document_ += "\n";
-      document_ += normalizeEOL( root.getComment( commentAfter ) );
-      document_ += "\n";
-   }
-}
-
-
-bool 
-StyledWriter::hasCommentForValue( const Value &value )
-{
-   return value.hasComment( commentBefore )
-          ||  value.hasComment( commentAfterOnSameLine )
-          ||  value.hasComment( commentAfter );
-}
-
-
-std::string 
-StyledWriter::normalizeEOL( const std::string &text )
-{
-   std::string normalized;
-   normalized.reserve( text.length() );
-   const char *begin = text.c_str();
-   const char *end = begin + text.length();
-   const char *current = begin;
-   while ( current != end )
-   {
-      char c = *current++;
-      if ( c == '\r' ) // mac or dos EOL
-      {
-         if ( *current == '\n' ) // convert dos EOL
-            ++current;
-         normalized += '\n';
-      }
-      else // handle unix EOL & other char
-         normalized += c;
-   }
-   return normalized;
-}
-
-
-// Class StyledStreamWriter
-// //////////////////////////////////////////////////////////////////
-
-StyledStreamWriter::StyledStreamWriter( std::string indentation )
-   : document_(NULL)
-   , rightMargin_( 74 )
-   , indentation_( indentation )
-{
-}
-
-
-void
-StyledStreamWriter::write( std::ostream &out, const Value &root )
-{
-   document_ = &out;
-   addChildValues_ = false;
-   indentString_ = "";
-   writeCommentBeforeValue( root );
-   writeValue( root );
-   writeCommentAfterValueOnSameLine( root );
-   *document_ << "\n";
-   document_ = NULL; // Forget the stream, for safety.
-}
-
-
-void 
-StyledStreamWriter::writeValue( const Value &value )
-{
-   switch ( value.type() )
-   {
-   case nullValue:
-      pushValue( "null" );
-      break;
-   case intValue:
-      pushValue( valueToString( value.asInt() ) );
-      break;
-   case uintValue:
-      pushValue( valueToString( value.asUInt() ) );
-      break;
-   case realValue:
-      pushValue( valueToString( value.asDouble() ) );
-      break;
-   case stringValue:
-      pushValue( valueToQuotedString( value.asCString() ) );
-      break;
-   case booleanValue:
-      pushValue( valueToString( value.asBool() ) );
-      break;
-   case arrayValue:
-      writeArrayValue( value);
-      break;
-   case objectValue:
-      {
-         Value::Members members( value.getMemberNames() );
-         if ( members.empty() )
-            pushValue( "{}" );
-         else
-         {
-            writeWithIndent( "{" );
-            indent();
-            Value::Members::iterator it = members.begin();
-            while ( true )
-            {
-               const std::string &name = *it;
-               const Value &childValue = value[name];
-               writeCommentBeforeValue( childValue );
-               writeWithIndent( valueToQuotedString( name.c_str() ) );
-               *document_ << " : ";
-               writeValue( childValue );
-               if ( ++it == members.end() )
-               {
-                  writeCommentAfterValueOnSameLine( childValue );
-                  break;
-               }
-               *document_ << ",";
-               writeCommentAfterValueOnSameLine( childValue );
-            }
-            unindent();
-            writeWithIndent( "}" );
-         }
-      }
-      break;
-   }
-}
-
-
-void 
-StyledStreamWriter::writeArrayValue( const Value &value )
-{
-   unsigned size = value.size();
-   if ( size == 0 )
-      pushValue( "[]" );
-   else
-   {
-      bool isArrayMultiLine = isMultineArray( value );
-      if ( isArrayMultiLine )
-      {
-         writeWithIndent( "[" );
-         indent();
-         bool hasChildValue = !childValues_.empty();
-         unsigned index =0;
-         while ( true )
-         {
-            const Value &childValue = value[index];
-            writeCommentBeforeValue( childValue );
-            if ( hasChildValue )
-               writeWithIndent( childValues_[index] );
-            else
-            {
-	       writeIndent();
-               writeValue( childValue );
-            }
-            if ( ++index == size )
-            {
-               writeCommentAfterValueOnSameLine( childValue );
-               break;
-            }
-            *document_ << ",";
-            writeCommentAfterValueOnSameLine( childValue );
-         }
-         unindent();
-         writeWithIndent( "]" );
-      }
-      else // output on a single line
-      {
-         assert( childValues_.size() == size );
-         *document_ << "[ ";
-         for ( unsigned index =0; index < size; ++index )
-         {
-            if ( index > 0 )
-               *document_ << ", ";
-            *document_ << childValues_[index];
-         }
-         *document_ << " ]";
-      }
-   }
-}
-
-
-bool 
-StyledStreamWriter::isMultineArray( const Value &value )
-{
-   int size = value.size();
-   bool isMultiLine = size*3 >= rightMargin_ ;
-   childValues_.clear();
-   for ( int index =0; index < size  &&  !isMultiLine; ++index )
-   {
-      const Value &childValue = value[index];
-      isMultiLine = isMultiLine  ||
-                     ( (childValue.isArray()  ||  childValue.isObject())  &&  
-                        childValue.size() > 0 );
-   }
-   if ( !isMultiLine ) // check if line length > max line length
-   {
-      childValues_.reserve( size );
-      addChildValues_ = true;
-      int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]'
-      for ( int index =0; index < size  &&  !isMultiLine; ++index )
-      {
-         writeValue( value[index] );
-         lineLength += int( childValues_[index].length() );
-         isMultiLine = isMultiLine  &&  hasCommentForValue( value[index] );
-      }
-      addChildValues_ = false;
-      isMultiLine = isMultiLine  ||  lineLength >= rightMargin_;
-   }
-   return isMultiLine;
-}
-
-
-void 
-StyledStreamWriter::pushValue( const std::string &value )
-{
-   if ( addChildValues_ )
-      childValues_.push_back( value );
-   else
-      *document_ << value;
-}
-
-
-void 
-StyledStreamWriter::writeIndent()
-{
-  /*
-    Some comments in this method would have been nice. ;-)
-
-   if ( !document_.empty() )
-   {
-      char last = document_[document_.length()-1];
-      if ( last == ' ' )     // already indented
-         return;
-      if ( last != '\n' )    // Comments may add new-line
-         *document_ << '\n';
-   }
-  */
-   *document_ << '\n' << indentString_;
-}
-
-
-void 
-StyledStreamWriter::writeWithIndent( const std::string &value )
-{
-   writeIndent();
-   *document_ << value;
-}
-
-
-void 
-StyledStreamWriter::indent()
-{
-   indentString_ += indentation_;
-}
-
-
-void 
-StyledStreamWriter::unindent()
-{
-   assert( indentString_.size() >= indentation_.size() );
-   indentString_.resize( indentString_.size() - indentation_.size() );
-}
-
-
-void 
-StyledStreamWriter::writeCommentBeforeValue( const Value &root )
-{
-   if ( !root.hasComment( commentBefore ) )
-      return;
-   *document_ << normalizeEOL( root.getComment( commentBefore ) );
-   *document_ << "\n";
-}
-
-
-void 
-StyledStreamWriter::writeCommentAfterValueOnSameLine( const Value &root )
-{
-   if ( root.hasComment( commentAfterOnSameLine ) )
-      *document_ << " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) );
-
-   if ( root.hasComment( commentAfter ) )
-   {
-      *document_ << "\n";
-      *document_ << normalizeEOL( root.getComment( commentAfter ) );
-      *document_ << "\n";
-   }
-}
-
-
-bool 
-StyledStreamWriter::hasCommentForValue( const Value &value )
-{
-   return value.hasComment( commentBefore )
-          ||  value.hasComment( commentAfterOnSameLine )
-          ||  value.hasComment( commentAfter );
-}
-
-
-std::string 
-StyledStreamWriter::normalizeEOL( const std::string &text )
-{
-   std::string normalized;
-   normalized.reserve( text.length() );
-   const char *begin = text.c_str();
-   const char *end = begin + text.length();
-   const char *current = begin;
-   while ( current != end )
-   {
-      char c = *current++;
-      if ( c == '\r' ) // mac or dos EOL
-      {
-         if ( *current == '\n' ) // convert dos EOL
-            ++current;
-         normalized += '\n';
-      }
-      else // handle unix EOL & other char
-         normalized += c;
-   }
-   return normalized;
-}
-
-
-std::ostream& operator<<( std::ostream &sout, const Value &root )
-{
-   Json::StyledStreamWriter writer;
-   writer.write(sout, root);
-   return sout;
-}
-
-
-} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/plugin.cpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/plugin.cpp b/test/plugins/cordova.echo/src/BlackBerry10/public/plugin.cpp
deleted file mode 100644
index 9d986ad..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/plugin.cpp
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#include "plugin.h"
-#include "tokenizer.h"
-
-#ifdef _WINDOWS
-#include <windows.h>
-BOOL APIENTRY DllMain( HANDLE hModule,
-                       DWORD ul_reason_for_call,
-                       LPVOID lpReserved )
-{
-    return TRUE;
-}
-#else
-#include <errno.h>
-#include <string.h>
-
-extern int errno;
-#endif
-
-SendPluginEv SendPluginEvent;
-
-string g_GetSysErrMsg( void )
-{
-    string strError = "Unknown";
-    // Problem loading
-#ifdef _WINDOWS
-    int nErrorCode = GetLastError();
-    LPTSTR s;
-    if ( ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
-    NULL, nErrorCode, 0, ( LPTSTR ) &s, 0, NULL ) )
-    {
-        strError = s;
-    }
-    else
-    {
-        char szBuf[ 20 ];
-        _snprintf_s( szBuf, _countof(szBuf), 19, "%d", nErrorCode );
-        strError = szBuf;
-    }
-#else
-    char szError[80];
-    if ( strerror_r( errno, szError, sizeof(szError)  ) )
-    {
-        strError = "no description found";
-    }
-    else
-    {
-        strError = szError;
-    }
-#endif
-    return strError;
-}
-
-void g_sleep( unsigned int mseconds )
-{
-#ifdef _WINDOWS
-    Sleep( mseconds );
-#else
-    usleep( mseconds * 1000 );
-#endif
-}
-
-string& g_trim( string& str )
-{
-    // Whitespace characters
-    char whspc[] = " \t\r\n\v\f";
-
-    // Whack off first part
-    size_t pos = str.find_first_not_of( whspc );
-
-    if ( pos != string::npos )
-        str.replace( 0, pos, "" );
-
-    // Whack off trailing stuff
-    pos = str.find_last_not_of( whspc );
-
-    if ( pos != string::npos )
-        str.replace( pos + 1, str.length() - pos, "" );
-
-    return str;
-}
-
-void g_tokenize( const string& str, const string& delimiters, vector<string>& tokens )
-{
-    tokenize( str, tokens, delimiters );
-}
-
-char* SetEventFunc( SendPluginEv funcPtr )
-{
-    static char * szObjList = onGetObjList();
-    SendPluginEvent = funcPtr;
-    return szObjList;
-}
-
-
-const int nMAXSIZE = 512;
-char* g_pszRetVal = NULL;
-
-//-----------------------------------------------------------
-// Map from an object Id to an object instance
-//-----------------------------------------------------------
-typedef std::map<string, JSExt*> StringToJExt_T;
-
-//-----------------------------------------------------------
-// Map from a browser context to an id mapping
-//-----------------------------------------------------------
-typedef std::map<void*, StringToJExt_T*> VoidToMap_T;
-
-VoidToMap_T g_context2Map;
-
-class GlobalSharedModule
-{
-
-public:
-    GlobalSharedModule( void )
-    {
-        g_pszRetVal = new char[ nMAXSIZE ];
-    }
-
-    ~GlobalSharedModule()
-    {
-        delete [] g_pszRetVal;
-
-        VoidToMap_T::iterator posMaps;
-
-        for ( posMaps = g_context2Map.begin(); posMaps != g_context2Map.end(); ++posMaps )
-        {
-            StringToJExt_T& id2Obj = *posMaps->second;
-            StringToJExt_T::iterator posMap;
-
-            for ( posMap = id2Obj.begin(); posMap != id2Obj.end(); ++posMap )
-            {
-                JSExt* pJSExt = posMap->second;
-
-                if ( pJSExt->CanDelete() )
-                {
-                    delete pJSExt;
-                }
-            }
-
-            id2Obj.erase( id2Obj.begin(), id2Obj.end() );
-        }
-
-        g_context2Map.erase( g_context2Map.begin(), g_context2Map.end() );
-    }
-};
-
-GlobalSharedModule g_sharedModule;
-
-char* g_str2global( const string& strRetVal )
-{
-    int nLen = strRetVal.size();
-
-    if ( nLen >= nMAXSIZE )
-    {
-        delete [] g_pszRetVal;
-        g_pszRetVal = new char[ nLen + 1 ];
-    }
-
-    else
-    {
-        // To minimaize the number of memory reallocations, the assumption
-        // is that in most times this will be the case
-        delete [] g_pszRetVal;
-        g_pszRetVal = new char[ nMAXSIZE ];
-    }
-
-    strcpy( g_pszRetVal, strRetVal.c_str() );
-    return g_pszRetVal;
-}
-
-bool g_unregisterObject( const string& strObjId, void* pContext )
-{
-    // Called by the plugin extension implementation
-    // if the extension handles the deletion of its object
-
-    StringToJExt_T * pID2Obj = NULL;
-
-    VoidToMap_T::iterator iter = g_context2Map.find( pContext );
-
-    if ( iter != g_context2Map.end() )
-    {
-        pID2Obj = iter->second;
-    }
-    else
-    {
-        return false;
-    }
-
-    StringToJExt_T& mapID2Obj = *pID2Obj;
-
-    StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
-
-    if ( r == mapID2Obj.end() )
-    {
-        return false;
-    }
-
-    mapID2Obj.erase( strObjId );
-    return true;
-}
-
-char* InvokeFunction( const char* szCommand, void* pContext )
-{
-    StringToJExt_T * pID2Obj = NULL;
-
-    VoidToMap_T::iterator iter = g_context2Map.find( pContext );
-
-    if ( iter != g_context2Map.end() )
-    {
-        pID2Obj = iter->second;
-    }
-    else
-    {
-        pID2Obj = new StringToJExt_T;
-        g_context2Map[ pContext ] = pID2Obj;
-    }
-
-    StringToJExt_T& mapID2Obj = *pID2Obj;
-
-    string strFullCommand = szCommand;
-    vector<string> arParams;
-    g_tokenize( strFullCommand, " ", arParams );
-    string strCommand = arParams[ 0 ];
-    string strRetVal = szERROR;
-
-    if ( strCommand == szCREATE )
-    {
-        string strClassName = arParams[ 1 ];
-        string strObjId = arParams[ 2 ];
-
-        StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
-
-        if ( r != mapID2Obj.end() )
-        {
-            strRetVal += strObjId;
-            strRetVal += " :Object already exists.";
-            return g_str2global( strRetVal );
-        }
-
-        JSExt* pJSExt = onCreateObject( strClassName, strObjId );
-
-        if ( pJSExt == NULL )
-        {
-            strRetVal += strObjId;
-            strRetVal += " :Unknown object type ";
-            strRetVal += strClassName;
-            return g_str2global( strRetVal );
-        }
-
-        pJSExt->m_pContext = pContext;
-        mapID2Obj[ strObjId ] = pJSExt;
-
-        strRetVal = szOK;
-        strRetVal += strObjId;
-        return g_str2global( strRetVal );
-    }
-    else
-    if ( strCommand == szINVOKE )
-    {
-        string strObjId = arParams[ 1 ];
-        string strMethod = arParams[ 2 ];
-
-        StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
-
-        if ( r == mapID2Obj.end() )
-        {
-            strRetVal += strObjId;
-            strRetVal += " :No object found for id.";
-            return g_str2global( strRetVal );
-        }
-
-        JSExt* pJSExt = r->second;
-
-        size_t nLoc = strFullCommand.find( strObjId );
-
-        if ( nLoc == string::npos )
-        {
-            strRetVal += strObjId;
-            strRetVal += " :Internal InvokeMethod error.";
-            return g_str2global( strRetVal );
-        }
-
-        if ( strMethod == szDISPOSE )
-        {
-            StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
-
-            if ( r == mapID2Obj.end() )
-            {
-                strRetVal = szERROR;
-                strRetVal += strObjId;
-                return g_str2global( strRetVal );
-            }
-
-            JSExt * pJSExt = mapID2Obj[ strObjId ];
-
-            if ( pJSExt->CanDelete() )
-            {
-                delete pJSExt;
-            }
-
-            mapID2Obj.erase( strObjId );
-            strRetVal = szOK;
-            strRetVal += strObjId;
-            return g_str2global( strRetVal );
-        }
-
-        size_t nSuffixLoc = nLoc + strObjId.size();
-        string strInvoke = strFullCommand.substr( nSuffixLoc );
-        strInvoke = g_trim( strInvoke );
-        strRetVal = pJSExt->InvokeMethod( strInvoke );
-        return g_str2global( strRetVal );
-    }
-
-    strRetVal += " :Unknown command ";
-    strRetVal += strCommand;
-    return g_str2global( strRetVal );
-}
-
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/plugin.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/plugin.h b/test/plugins/cordova.echo/src/BlackBerry10/public/plugin.h
deleted file mode 100644
index d56690e..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/plugin.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#ifndef _PLUGIN_H
-#define _PLUGIN_H
-
-#include <map>
-#include <string>
-#include <vector>
-#include <unistd.h>
-//#include "tokenizer.h"
-
-using namespace std;
-
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-//%% Functions exported by this DLL
-//%% Should always be only SetEventFunc and InvokeFunction
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-// g++ requires extern "C" otherwise the names of SetEventFunc and InvokeFunction
-// are mangled C++ style. MS Visual Studio doesn't seem to care though.
-extern "C"
-{
-    typedef void (*SendPluginEv)( const char* szEvent, void* pContext );
-    char* SetEventFunc(SendPluginEv funcPtr);
-    char* InvokeFunction( const char* szCommand, void* pContext );
-}
-
-// JNEXT Framework function of the form:
-// typedef void (*SendPluginEv)( const char* szEvent );
-// used to notify JavaScript of an asynchronous event
-extern SendPluginEv SendPluginEvent;
-
-/////////////////////////////////////////////////////////////////////////
-// Constants and methods common to all JNEXT extensions types
-/////////////////////////////////////////////////////////////////////////
-#define szERROR         "Error "
-#define szOK            "Ok "
-
-#define szDISPOSE       "Dispose"
-#define szINVOKE        "InvokeMethod"
-#define szCREATE        "CreateObj"
-
-/////////////////////////////////////////////////////////////////////////
-// Utility functions
-/////////////////////////////////////////////////////////////////////////
-string& g_trim( string& str );
-void g_tokenize(const string& str,const string& delimiters, vector<string>& tokens);
-char* g_str2static( const string& strRetVal );
-void g_sleep( unsigned int mseconds );
-bool g_unregisterObject( const string& strObjId, void* pContext );
-
-
-/////////////////////////////////////////////////////////////////////////
-// Abstract extension object
-/////////////////////////////////////////////////////////////////////////
-class JSExt
-{
-public:
-    virtual ~JSExt() {};
-    virtual string InvokeMethod( const string& strCommand ) = 0;
-    virtual bool CanDelete( void ) = 0;
-    virtual void TryDelete( void ) {}
-public:
-    void* m_pContext;
-};
-
-/////////////////////////////////////////////////////////////////////////
-// Callback functions to be implemented by the plugin implementation
-/////////////////////////////////////////////////////////////////////////
-extern char* onGetObjList( void );
-extern JSExt* onCreateObject( const string& strClassName, const string& strObjId );
-
-#endif

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/tokenizer.cpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/tokenizer.cpp b/test/plugins/cordova.echo/src/BlackBerry10/public/tokenizer.cpp
deleted file mode 100644
index f55f511..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/tokenizer.cpp
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-/************************************************************************
-The zlib/libpng License
-
-Copyright (c) 2006 Joerg Wiedenmann
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from
-the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented;
-you must not claim that you wrote the original software.
-If you use this software in a product, an acknowledgment
-in the product documentation would be appreciated but is
-not required.
-
-2. Altered source versions must be plainly marked as such,
-and must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source distribution.
-
-***********************************************************************/
-
-/********************************************************************
-	created:	2006-01-28
-	filename: 	tokenizer.cpp
-	author:		J�rg Wiedenmann
-	
-	purpose:	A tokenizer function which provides a very
-				customizable way of breaking up strings.
-
-	history:	2006-01-28, Original version
-				2006-03-04, Fixed a small parsing bug, thanks Elias.
-*********************************************************************/
-
-#include "tokenizer.h"
-
-using namespace std;
-
-void tokenize ( const string& str, vector<string>& result,
-			   const string& delimiters, const string& delimiters_preserve,
-			   const string& quote, const string& esc )
-{
-	// clear the vector
-	if ( false == result.empty() )
-	{
-		result.clear();
-	}
-
-	string::size_type pos = 0; // the current position (char) in the string
-	char ch = 0; // buffer for the current character
-	char delimiter = 0;	// the buffer for the delimiter char which
-							// will be added to the tokens if the delimiter
-							// is preserved
-	char current_quote = 0; // the char of the current open quote
-	bool quoted = false; // indicator if there is an open quote
-	string token;  // string buffer for the token
-	bool token_complete = false; // indicates if the current token is
-								 // read to be added to the result vector
-	string::size_type len = str.length();  // length of the input-string
-
-	// for every char in the input-string
-	while ( len > pos )
-	{
-		// get the character of the string and reset the delimiter buffer
-		ch = str.at(pos);
-		delimiter = 0;
-
-		// assume ch isn't a delimiter
-		bool add_char = true;
-
-		// check ...
-
-		// ... if the delimiter is an escaped character
-		bool escaped = false; // indicates if the next char is protected
-		if ( false == esc.empty() ) // check if esc-chars are  provided
-		{
-			if ( string::npos != esc.find_first_of(ch) )
-			{
-				// get the escaped char
-				++pos;
-				if ( pos < len ) // if there are more chars left
-				{
-					// get the next one
-					ch = str.at(pos);
-
-					// add the escaped character to the token
-					add_char = true;
-				}
-				else // cannot get any more characters
-				{
-					// don't add the esc-char
-					add_char = false;
-				}
-
-				// ignore the remaining delimiter checks
-				escaped = true;
-			}
-		}
-
-		// ... if the delimiter is a quote
-		if ( false == quote.empty() && false == escaped )
-		{
-			// if quote chars are provided and the char isn't protected
-			if ( string::npos != quote.find_first_of(ch) )
-			{
-				// if not quoted, set state to open quote and set
-				// the quote character
-				if ( false == quoted )
-				{
-					quoted = true;
-					current_quote = ch;
-
-					// don't add the quote-char to the token
-					add_char = false;
-				}
-				else // if quote is open already
-				{
-					// check if it is the matching character to close it
-					if ( current_quote == ch )
-					{
-						// close quote and reset the quote character
-						quoted = false;
-						current_quote = 0;
-
-						// don't add the quote-char to the token
-						add_char = false;
-					}
-				} // else
-			}
-		}
-
-		// ... if the delimiter isn't preserved
-		if ( false == delimiters.empty() && false == escaped &&
-			 false == quoted )
-		{
-			// if a delimiter is provided and the char isn't protected by
-			// quote or escape char
-			if ( string::npos != delimiters.find_first_of(ch) )
-			{
-				// if ch is a delimiter and the token string isn't empty
-				// the token is complete
-				if ( false == token.empty() ) // BUGFIX: 2006-03-04
-				{
-					token_complete = true;
-				}
-
-				// don't add the delimiter to the token
-				add_char = false;
-			}
-		}
-
-		// ... if the delimiter is preserved - add it as a token
-		bool add_delimiter = false;
-		if ( false == delimiters_preserve.empty() && false == escaped &&
-			 false == quoted )
-		{
-			// if a delimiter which will be preserved is provided and the
-			// char isn't protected by quote or escape char
-			if ( string::npos != delimiters_preserve.find_first_of(ch) )
-			{
-				// if ch is a delimiter and the token string isn't empty
-				// the token is complete
-				if ( false == token.empty() ) // BUGFIX: 2006-03-04
-				{
-					token_complete = true;
-				}
-
-				// don't add the delimiter to the token
-				add_char = false;
-
-				// add the delimiter
-				delimiter = ch;
-				add_delimiter = true;
-			}
-		}
-
-
-		// add the character to the token
-		if ( true == add_char )
-		{
-			// add the current char
-			token.push_back( ch );
-		}
-
-		// add the token if it is complete
-		if ( true == token_complete && false == token.empty() )
-		{
-			// add the token string
-			result.push_back( token );
-
-			// clear the contents
-			token.clear();
-
-			// build the next token
-			token_complete = false;
-		}
-
-		// add the delimiter
-		if ( true == add_delimiter )
-		{
-			// the next token is the delimiter
-			string delim_token;
-			delim_token.push_back( delimiter );
-			result.push_back( delim_token );
-
-			// REMOVED: 2006-03-04, Bugfix
-		}
-
-		// repeat for the next character
-		++pos;
-	} // while
-
-	// add the final token
-	if ( false == token.empty() )
-	{
-		result.push_back( token );
-	}
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/tokenizer.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/tokenizer.h b/test/plugins/cordova.echo/src/BlackBerry10/public/tokenizer.h
deleted file mode 100644
index 27fa1ce..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/tokenizer.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-/************************************************************************
-The zlib/libpng License
-
-Copyright (c) 2006 Joerg Wiedenmann
-
-This software is provided 'as-is', without any express or implied warranty.
-In no event will the authors be held liable for any damages arising from
-the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
-1. The origin of this software must not be misrepresented;
-	you must not claim that you wrote the original software.
-	If you use this software in a product, an acknowledgment
-	in the product documentation would be appreciated but is
-	not required.
-
-2. Altered source versions must be plainly marked as such,
-	and must not be misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source distribution.
-
-***********************************************************************/
-
-/********************************************************************
-	created:	2006-01-28
-	filename: 	tokenizer.cpp
-	author:		J�rg Wiedenmann
-
-	purpose:	A tokenizer function which provides a very
-				customizable way of breaking up strings.
-*********************************************************************/
-
-#include <vector>
-#include <string>
-using namespace std;
-
-// Function to break up a string into tokens
-//
-// Parameters:
-//-----------
-// str = the input string that will be tokenized
-// result = the tokens for str
-// delimiters = the delimiter characters
-// delimiters preserve = same as above, but the delimiter characters
-//		will be put into the result as a token
-// quote = characters to protect the enclosed characters
-// esc = characters to protect a single character
-//
-
-void tokenize ( const string& str, vector<string>& result,
-			const string& delimiters, const string& delimiters_preserve = "",
-			const string& quote = "\"", const string& esc = "\\" );

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/simulator/echoJnext.so
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/simulator/echoJnext.so b/test/plugins/cordova.echo/src/BlackBerry10/simulator/echoJnext.so
deleted file mode 100644
index 2b3c5f5..0000000
Binary files a/test/plugins/cordova.echo/src/BlackBerry10/simulator/echoJnext.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/src/echo.cpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/src/echo.cpp b/test/plugins/cordova.echo/src/BlackBerry10/src/echo.cpp
deleted file mode 100644
index 0d5cc2f..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/src/echo.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-
-#include <../public/json/reader.h>
-#include <string>
-#include <sstream>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "echo.hpp"
-
-using namespace std;
-
-/**
- * Default constructor.
- */
-Echo::Echo(const std::string& id) : m_id(id) {
-}
-
-/**
- * Memory destructor.
- */
-Echo::~Echo() {
-}
-
-/**
- * This method returns the list of objects implemented by this native
- * extension.
- */
-char* onGetObjList() {
-    static char name[] = "Echo";
-    return name;
-}
-
-/**
- * This method is used by JNext to instantiate the Memory object when
- * an object is created on the JavaScript server side.
- */
-JSExt* onCreateObject(const string& className, const string& id) {
-    if (className == "Echo") {
-        return new Echo(id);
-    }
-
-    return NULL;
-}
-
-/**
- * Method used by JNext to determine if the object can be deleted.
- */
-bool Echo::CanDelete() {
-    return true;
-}
-
-/**
- * It will be called from JNext JavaScript side with passed string.
- * This method implements the interface for the JavaScript to native binding
- * for invoking native code. This method is triggered when JNext.invoke is
- * called on the JavaScript side with this native objects id.
- */
-string Echo::InvokeMethod(const string& command) {
-    int index = command.find_first_of(" ");
-    std::string method = command.substr(0, index);
-    
-    // read in arguments
-    Json::Value obj;
-    if (static_cast<int>(command.length()) > index && index != -1) {
-        std::string jsonObject = command.substr(index + 1, command.length());
-        Json::Reader reader;
-
-        bool parse = reader.parse(jsonObject, obj);
-        if (!parse) {
-            fprintf(stderr, "%s", "error parsing\n");
-            return "Cannot parse JSON object";
-        }
-    }    
-    
-    // Determine which function should be executed
-    if (method == "doEcho") {
-        std::string message = obj["message"].asString();
-        if(message.length() > 0) {
-            return doEcho(message);
-        }else{
-             return doEcho("Nothing to echo.");
-        }
-    }else{
-        return doEcho("Unsupported Method");
-    }
-}
-
-/**
- * Method that sends off Event message
- */
-string Echo::doEcho(const std::string& message) {
-    std::string eventString = m_id;
-    eventString.append(" ");
-    eventString.append("cordova.echo.callback");
-    eventString.append(" ");
-    eventString.append(message);
-    SendPluginEvent(eventString.c_str(), m_pContext);
-    return eventString;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/src/echo.hpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/src/echo.hpp b/test/plugins/cordova.echo/src/BlackBerry10/src/echo.hpp
deleted file mode 100644
index 408be69..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/src/echo.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#ifndef ECHO_HPP_
-#define ECHO_HPP_
-
-#include <string>
-#include <pthread.h>
-#include "../public/plugin.h"
-
-class Echo: public JSExt {
-
-public:
-    explicit Echo(const std::string& id);
-    virtual ~Echo();
-
-// Interfaces of JSExt
-    virtual bool CanDelete();
-    virtual std::string InvokeMethod(const std::string& command);
-
-private:
-    std::string doEcho(const std::string& message);
-
-    std::string m_id;
-};
-
-#endif /* ECHO_HPP_ */

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/client.js
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/client.js b/test/plugins/cordova.echo/src/blackberry/client.js
new file mode 100644
index 0000000..4e7a1b3
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/client.js
@@ -0,0 +1,53 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var _self = {},
+    _ID = require("./manifest.json").namespace,
+    win = null,
+    fail = null;
+
+function handleCallback(result) {
+    if (result) {
+        if(win){
+            win(result);
+        }
+    } else {
+        if(fail){
+            fail(result);
+        }
+    }
+    win = null;
+    fail = null;
+}
+
+_self.doEcho = function (args, theWin, theFail) {
+    var data = { "message" : args.message || "" };
+    
+    win = theWin;
+    fail = theFail;
+    
+    window.webworks.event.add(_ID, "echoCallback", handleCallback);
+    
+    return window.webworks.execSync(_ID, "doEcho", data);
+};
+
+
+module.exports = _self;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/device/echoJnext.so
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/device/echoJnext.so b/test/plugins/cordova.echo/src/blackberry/device/echoJnext.so
new file mode 100755
index 0000000..169714a
Binary files /dev/null and b/test/plugins/cordova.echo/src/blackberry/device/echoJnext.so differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/index.js
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/index.js b/test/plugins/cordova.echo/src/blackberry/index.js
new file mode 100644
index 0000000..0759a20
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/index.js
@@ -0,0 +1,85 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var echoJNext,
+    _event = require("../../lib/event"),
+    winCallback = null,
+    failCallback = null;
+    
+module.exports = {   
+    doEcho: function (success, fail, args) {
+        var invokeData = { "message" : JSON.parse(decodeURIComponent(args.message)) };
+        try {
+            success(echoJNext.getEchoJNext(invokeData));
+        } catch (e) {
+            fail(-1, e);
+        }
+    }
+};
+
+///////////////////////////////////////////////////////////////////
+// JavaScript wrapper for JNEXT plugin
+///////////////////////////////////////////////////////////////////
+
+JNEXT.EchoJNext = function ()
+{   
+    var _self = this;
+
+    _self.getEchoJNext = function (args) {
+        return JNEXT.invoke(_self._id, "doEcho " + JSON.stringify(args));
+    };
+
+    _self.getId = function () {
+        return _self._id;
+    };
+
+    _self.init = function () {
+        if (!JNEXT.require("echoJnext")) {
+            return false;
+        }
+
+        _self._id = JNEXT.createObject("echoJnext.Echo");
+
+        if (!_self._id || _self._id === "") {
+            return false;
+        }
+
+        JNEXT.registerEvents(_self);
+    };
+
+    _self.onEvent = function (strData) {
+        var arData = strData.split(" "),
+            strEventId = arData[0],
+            args = arData[1],
+            info = {};
+            
+        if (strEventId === "cordova.echo.callback") {
+            _event.trigger("echoCallback", args);
+        }
+                  
+    };
+    
+    _self._id = "";
+    
+    _self.init();
+};
+
+echoJNext = new JNEXT.EchoJNext();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/manifest.json
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/manifest.json b/test/plugins/cordova.echo/src/blackberry/manifest.json
new file mode 100644
index 0000000..d14e79e
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/manifest.json
@@ -0,0 +1,5 @@
+{
+    "global": false,
+    "namespace": "cordova.echo",
+    "dependencies": []
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json/autolink.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json/autolink.h b/test/plugins/cordova.echo/src/blackberry/public/json/autolink.h
new file mode 100644
index 0000000..37c9258
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json/autolink.h
@@ -0,0 +1,19 @@
+#ifndef JSON_AUTOLINK_H_INCLUDED
+# define JSON_AUTOLINK_H_INCLUDED
+
+# include "config.h"
+
+# ifdef JSON_IN_CPPTL
+#  include <cpptl/cpptl_autolink.h>
+# endif
+
+# if !defined(JSON_NO_AUTOLINK)  &&  !defined(JSON_DLL_BUILD)  &&  !defined(JSON_IN_CPPTL)
+#  define CPPTL_AUTOLINK_NAME "json"
+#  undef CPPTL_AUTOLINK_DLL
+#  ifdef JSON_DLL
+#   define CPPTL_AUTOLINK_DLL
+#  endif
+#  include "autolink.h"
+# endif
+
+#endif // JSON_AUTOLINK_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json/config.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json/config.h b/test/plugins/cordova.echo/src/blackberry/public/json/config.h
new file mode 100644
index 0000000..5d334cb
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json/config.h
@@ -0,0 +1,43 @@
+#ifndef JSON_CONFIG_H_INCLUDED
+# define JSON_CONFIG_H_INCLUDED
+
+/// If defined, indicates that json library is embedded in CppTL library.
+//# define JSON_IN_CPPTL 1
+
+/// If defined, indicates that json may leverage CppTL library
+//#  define JSON_USE_CPPTL 1
+/// If defined, indicates that cpptl vector based map should be used instead of std::map
+/// as Value container.
+//#  define JSON_USE_CPPTL_SMALLMAP 1
+/// If defined, indicates that Json specific container should be used
+/// (hash table & simple deque container with customizable allocator).
+/// THIS FEATURE IS STILL EXPERIMENTAL!
+//#  define JSON_VALUE_USE_INTERNAL_MAP 1
+/// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
+/// The memory pools allocator used optimization (initializing Value and ValueInternalLink
+/// as if it was a POD) that may cause some validation tool to report errors.
+/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
+//#  define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
+
+/// If defined, indicates that Json use exception to report invalid type manipulation
+/// instead of C assert macro.
+# define JSON_USE_EXCEPTION 1
+
+# ifdef JSON_IN_CPPTL
+#  include <cpptl/config.h>
+#  ifndef JSON_USE_CPPTL
+#   define JSON_USE_CPPTL 1
+#  endif
+# endif
+
+# ifdef JSON_IN_CPPTL
+#  define JSON_API CPPTL_API
+# elif defined(JSON_DLL_BUILD)
+#  define JSON_API __declspec(dllexport)
+# elif defined(JSON_DLL)
+#  define JSON_API __declspec(dllimport)
+# else
+#  define JSON_API
+# endif
+
+#endif // JSON_CONFIG_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json/features.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json/features.h b/test/plugins/cordova.echo/src/blackberry/public/json/features.h
new file mode 100644
index 0000000..5a9adec
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json/features.h
@@ -0,0 +1,42 @@
+#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
+# define CPPTL_JSON_FEATURES_H_INCLUDED
+
+# include "forwards.h"
+
+namespace Json {
+
+   /** \brief Configuration passed to reader and writer.
+    * This configuration object can be used to force the Reader or Writer
+    * to behave in a standard conforming way.
+    */
+   class JSON_API Features
+   {
+   public:
+      /** \brief A configuration that allows all features and assumes all strings are UTF-8.
+       * - C & C++ comments are allowed
+       * - Root object can be any JSON value
+       * - Assumes Value strings are encoded in UTF-8
+       */
+      static Features all();
+
+      /** \brief A configuration that is strictly compatible with the JSON specification.
+       * - Comments are forbidden.
+       * - Root object must be either an array or an object value.
+       * - Assumes Value strings are encoded in UTF-8
+       */
+      static Features strictMode();
+
+      /** \brief Initialize the configuration like JsonConfig::allFeatures;
+       */
+      Features();
+
+      /// \c true if comments are allowed. Default: \c true.
+      bool allowComments_;
+
+      /// \c true if root must be either an array or an object value. Default: \c false.
+      bool strictRoot_;
+   };
+
+} // namespace Json
+
+#endif // CPPTL_JSON_FEATURES_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json/forwards.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json/forwards.h b/test/plugins/cordova.echo/src/blackberry/public/json/forwards.h
new file mode 100644
index 0000000..d0ce830
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json/forwards.h
@@ -0,0 +1,39 @@
+#ifndef JSON_FORWARDS_H_INCLUDED
+# define JSON_FORWARDS_H_INCLUDED
+
+# include "config.h"
+
+namespace Json {
+
+   // writer.h
+   class FastWriter;
+   class StyledWriter;
+
+   // reader.h
+   class Reader;
+
+   // features.h
+   class Features;
+
+   // value.h
+   typedef int Int;
+   typedef unsigned int UInt;
+   class StaticString;
+   class Path;
+   class PathArgument;
+   class Value;
+   class ValueIteratorBase;
+   class ValueIterator;
+   class ValueConstIterator;
+#ifdef JSON_VALUE_USE_INTERNAL_MAP
+   class ValueAllocator;
+   class ValueMapAllocator;
+   class ValueInternalLink;
+   class ValueInternalArray;
+   class ValueInternalMap;
+#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
+
+} // namespace Json
+
+
+#endif // JSON_FORWARDS_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json/json.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json/json.h b/test/plugins/cordova.echo/src/blackberry/public/json/json.h
new file mode 100644
index 0000000..c71ed65
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json/json.h
@@ -0,0 +1,10 @@
+#ifndef JSON_JSON_H_INCLUDED
+# define JSON_JSON_H_INCLUDED
+
+# include "autolink.h"
+# include "value.h"
+# include "reader.h"
+# include "writer.h"
+# include "features.h"
+
+#endif // JSON_JSON_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/blackberry/public/json/reader.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/blackberry/public/json/reader.h b/test/plugins/cordova.echo/src/blackberry/public/json/reader.h
new file mode 100644
index 0000000..ee1d6a2
--- /dev/null
+++ b/test/plugins/cordova.echo/src/blackberry/public/json/reader.h
@@ -0,0 +1,196 @@
+#ifndef CPPTL_JSON_READER_H_INCLUDED
+# define CPPTL_JSON_READER_H_INCLUDED
+
+# include "features.h"
+# include "value.h"
+# include <deque>
+# include <stack>
+# include <string>
+# include <iostream>
+
+namespace Json {
+
+   /** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a Value.
+    *
+    */
+   class JSON_API Reader
+   {
+   public:
+      typedef char Char;
+      typedef const Char *Location;
+
+      /** \brief Constructs a Reader allowing all features
+       * for parsing.
+       */
+      Reader();
+
+      /** \brief Constructs a Reader allowing the specified feature set
+       * for parsing.
+       */
+      Reader( const Features &features );
+
+      /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
+       * \param document UTF-8 encoded string containing the document to read.
+       * \param root [out] Contains the root value of the document if it was
+       *             successfully parsed.
+       * \param collectComments \c true to collect comment and allow writing them back during
+       *                        serialization, \c false to discard comments.
+       *                        This parameter is ignored if Features::allowComments_
+       *                        is \c false.
+       * \return \c true if the document was successfully parsed, \c false if an error occurred.
+       */
+      bool parse( const std::string &document, 
+                  Value &root,
+                  bool collectComments = true );
+
+      /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
+       * \param document UTF-8 encoded string containing the document to read.
+       * \param root [out] Contains the root value of the document if it was
+       *             successfully parsed.
+       * \param collectComments \c true to collect comment and allow writing them back during
+       *                        serialization, \c false to discard comments.
+       *                        This parameter is ignored if Features::allowComments_
+       *                        is \c false.
+       * \return \c true if the document was successfully parsed, \c false if an error occurred.
+       */
+      bool parse( const char *beginDoc, const char *endDoc, 
+                  Value &root,
+                  bool collectComments = true );
+
+      /// \brief Parse from input stream.
+      /// \see Json::operator>>(std::istream&, Json::Value&).
+      bool parse( std::istream &is,
+                  Value &root,
+                  bool collectComments = true );
+
+      /** \brief Returns a user friendly string that list errors in the parsed document.
+       * \return Formatted error message with the list of errors with their location in 
+       *         the parsed document. An empty string is returned if no error occurred
+       *         during parsing.
+       */
+      std::string getFormatedErrorMessages() const;
+
+   private:
+      enum TokenType
+      {
+         tokenEndOfStream = 0,
+         tokenObjectBegin,
+         tokenObjectEnd,
+         tokenArrayBegin,
+         tokenArrayEnd,
+         tokenString,
+         tokenNumber,
+         tokenTrue,
+         tokenFalse,
+         tokenNull,
+         tokenArraySeparator,
+         tokenMemberSeparator,
+         tokenComment,
+         tokenError
+      };
+
+      class Token
+      {
+      public:
+         TokenType type_;
+         Location start_;
+         Location end_;
+      };
+
+      class ErrorInfo
+      {
+      public:
+         Token token_;
+         std::string message_;
+         Location extra_;
+      };
+
+      typedef std::deque<ErrorInfo> Errors;
+
+      bool expectToken( TokenType type, Token &token, const char *message );
+      bool readToken( Token &token );
+      void skipSpaces();
+      bool match( Location pattern, 
+                  int patternLength );
+      bool readComment();
+      bool readCStyleComment();
+      bool readCppStyleComment();
+      bool readString();
+      void readNumber();
+      bool readValue();
+      bool readObject( Token &token );
+      bool readArray( Token &token );
+      bool decodeNumber( Token &token );
+      bool decodeString( Token &token );
+      bool decodeString( Token &token, std::string &decoded );
+      bool decodeDouble( Token &token );
+      bool decodeUnicodeCodePoint( Token &token, 
+                                   Location &current, 
+                                   Location end, 
+                                   unsigned int &unicode );
+      bool decodeUnicodeEscapeSequence( Token &token, 
+                                        Location &current, 
+                                        Location end, 
+                                        unsigned int &unicode );
+      bool addError( const std::string &message, 
+                     Token &token,
+                     Location extra = 0 );
+      bool recoverFromError( TokenType skipUntilToken );
+      bool addErrorAndRecover( const std::string &message, 
+                               Token &token,
+                               TokenType skipUntilToken );
+      void skipUntilSpace();
+      Value &currentValue();
+      Char getNextChar();
+      void getLocationLineAndColumn( Location location,
+                                     int &line,
+                                     int &column ) const;
+      std::string getLocationLineAndColumn( Location location ) const;
+      void addComment( Location begin, 
+                       Location end, 
+                       CommentPlacement placement );
+      void skipCommentTokens( Token &token );
+   
+      typedef std::stack<Value *> Nodes;
+      Nodes nodes_;
+      Errors errors_;
+      std::string document_;
+      Location begin_;
+      Location end_;
+      Location current_;
+      Location lastValueEnd_;
+      Value *lastValue_;
+      std::string commentsBefore_;
+      Features features_;
+      bool collectComments_;
+   };
+
+   /** \brief Read from 'sin' into 'root'.
+
+    Always keep comments from the input JSON.
+
+    This can be used to read a file into a particular sub-object.
+    For example:
+    \code
+    Json::Value root;
+    cin >> root["dir"]["file"];
+    cout << root;
+    \endcode
+    Result:
+    \verbatim
+    {
+	"dir": {
+	    "file": {
+		// The input stream JSON would be nested here.
+	    }
+	}
+    }
+    \endverbatim
+    \throw std::exception on parse error.
+    \see Json::operator<<()
+   */
+   std::istream& operator>>( std::istream&, Value& );
+
+} // namespace Json
+
+#endif // CPPTL_JSON_READER_H_INCLUDED


[20/54] [abbrv] git commit: updating force-install for ios-config-xml

Posted by ti...@apache.org.
updating force-install for ios-config-xml


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/9f83ba25
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/9f83ba25
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/9f83ba25

Branch: refs/heads/future
Commit: 9f83ba25f413992c108dfe2a4383b55aec35f2ba
Parents: c2c528e
Author: Anis Kadri <an...@apache.org>
Authored: Tue Apr 2 20:03:47 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Tue Apr 2 20:03:47 2013 -0700

----------------------------------------------------------------------
 test/ios-config-xml-install.js |   21 ++++++---------------
 1 files changed, 6 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9f83ba25/test/ios-config-xml-install.js
----------------------------------------------------------------------
diff --git a/test/ios-config-xml-install.js b/test/ios-config-xml-install.js
index fde9de3..78d02a6 100644
--- a/test/ios-config-xml-install.js
+++ b/test/ios-config-xml-install.js
@@ -33,6 +33,7 @@ var fs = require('fs')
 
   //, assetsDir = path.resolve(config.projectPath, 'www')
   , srcDir = path.resolve(test_project_dir, 'SampleApp/Plugins')
+  , wwwDir = path.resolve(test_project_dir, 'www')
   , resDir = path.resolve(test_project_dir, 'SampleApp/Resources');
 
 exports.setUp = function(callback) {
@@ -74,6 +75,7 @@ exports['should move the js file'] = function (test) {
     ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
     var jsPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www', 'childbrowser.js');
     test.ok(fs.existsSync(jsPath));
+    test.ok(fs.statSync(jsPath).isFile());
     test.done();
 }
 
@@ -239,23 +241,12 @@ exports['should not install a plugin that is already installed'] = function (tes
 
 exports['should skip collision check when installation is forced'] = function (test) {
     ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    // deleting files because only presence in config.xml determines installation
+    shell.rm('-rf', srcDir + '/*');
+    shell.rm('-rf', resDir + '/*');
+    shell.rm('-rf', wwwDir + '/*');
     test.doesNotThrow(function(){ios.handlePlugin('force-install', test_project_dir, test_plugin_dir, plugin_et); }, 
                 /already installed/
                );
     test.done();
 }
-
-//exports['should revert changes when an error occurs'] = function (test) {
-//    var faulty_plugin_dir = path.join(test_dir, 'plugins', 'FaultyPlugin')
-//    var faulty_xml_path = path.join(test_dir, 'plugins', 'FaultyPlugin', 'plugin.xml')
-//    var faulty_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(faulty_xml_path, 'utf-8')));
-//    
-//    var project_dir = path.join(test_dir, 'projects', 'ios-new-config-xml')
-//    
-//    ios.handlePlugin('install', project_dir, faulty_plugin_dir, faulty_plugin_et, { APP_ID: 12345 });
-//
-//    test.throws(function(){ios.handlePlugin('install', project_dir, test_plugin_dir, plugin_et); }, 
-//                /already installed/
-//               );
-//    test.done();
-//}


[10/54] [abbrv] git commit: deleting old ios project

Posted by ti...@apache.org.
deleting old ios project


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/22833745
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/22833745
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/22833745

Branch: refs/heads/future
Commit: 22833745d7d0425de50f9e20db2dc7ac25c2d6b6
Parents: 64da57b
Author: Anis Kadri <an...@apache.org>
Authored: Mon Apr 1 15:23:42 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Apr 1 15:23:42 2013 -0700

----------------------------------------------------------------------
 .../CordovaLib.xcodeproj/project.pbxproj           |  636 ---------------
 .../ios/SampleApp.xcodeproj/project.orig.pbxproj   |  498 -----------
 .../ios/SampleApp.xcodeproj/project.pbxproj        |  498 -----------
 test/projects/ios/SampleApp/PhoneGap.plist         |   53 --
 test/projects/ios/SampleApp/SampleApp-Info.plist   |   80 --
 5 files changed, 0 insertions(+), 1765 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/22833745/test/projects/ios/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/test/projects/ios/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/test/projects/ios/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
deleted file mode 100644
index 5d0d461..0000000
--- a/test/projects/ios/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,636 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */; };
-		1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F3C04CC12BC247D004F9E10 /* CDVContact.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F3C04CD12BC247D004F9E10 /* CDVContact.m */; };
-		1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F584B991385A28900ED25E8 /* CDVCapture.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F584B9A1385A28900ED25E8 /* CDVCapture.m */; };
-		1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F92F49E1314023E0046367C /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F92F49F1314023E0046367C /* CDVPluginResult.m */; };
-		301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 301F2F2914F3C9CA003FE9FC /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 302965BB13A94E9D007046C5 /* CDVDebug.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3034979A1513D56A0090E688 /* CDVLocalStorage.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3034979B1513D56A0090E688 /* CDVLocalStorage.m */; };
-		30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */; };
-		307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 307A8F9C1385A2EC00E43782 /* CDVConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 307A8F9D1385A2EC00E43782 /* CDVConnection.m */; };
-		30A90B9114588697006178D3 /* JSONKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 30A90B8F14588697006178D3 /* JSONKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30A90B9314588697006178D3 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A90B9014588697006178D3 /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
-		30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B39EBC13D0268B0009682A /* CDVSplashScreen.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B39EBD13D0268B0009682A /* CDVSplashScreen.m */; };
-		30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C5F1DD15AF9E950052A00D /* CDVDevice.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C5F1DE15AF9E950052A00D /* CDVDevice.m */; };
-		30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C6847E1406CB38004C1A8E /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C6847F1406CB38004C1A8E /* CDVWhitelist.m */; };
-		30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C684921407044A004C1A8E /* CDVURLProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C684931407044A004C1A8E /* CDVURLProtocol.m */; };
-		30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E33AF013A7E24B00594D64 /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E33AF113A7E24B00594D64 /* CDVPlugin.m */; };
-		30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */; };
-		30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E76876B156A90EE00EB6FA3 /* CDVLogger.m */; };
-		3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E76876C156A90EE00EB6FA3 /* CDVLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43614B65FD800F0E735 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43714B65FD800F0E735 /* CDVViewController.m */; };
-		8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43814B65FD800F0E735 /* CDVCordovaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43914B65FD800F0E735 /* CDVCordovaView.m */; };
-		8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD261090FBE7009987E8 /* CDVCamera.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD271090FBE7009987E8 /* CDVCamera.m */; };
-		8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */; };
-		8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2A1090FBE7009987E8 /* CDVContacts.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2B1090FBE7009987E8 /* CDVContacts.m */; };
-		8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */; };
-		8887FD701090FBE7009987E8 /* CDVFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD301090FBE7009987E8 /* CDVFile.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD711090FBE7009987E8 /* CDVFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD311090FBE7009987E8 /* CDVFile.m */; };
-		8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */; };
-		8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD461090FBE7009987E8 /* CDVLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD471090FBE7009987E8 /* CDVLocation.m */; };
-		8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD4E1090FBE7009987E8 /* CDVNotification.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD4F1090FBE7009987E8 /* CDVNotification.m */; };
-		8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD501090FBE7009987E8 /* NSData+Base64.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD511090FBE7009987E8 /* NSData+Base64.m */; };
-		8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD5E1090FBE7009987E8 /* CDVReachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD5F1090FBE7009987E8 /* CDVReachability.m */; };
-		8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD601090FBE7009987E8 /* CDVSound.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD611090FBE7009987E8 /* CDVSound.m */; };
-		88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */; };
-		9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */; };
-		9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */; };
-		C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */ = {isa = PBXBuildFile; fileRef = C937A4541337599E002C4C79 /* CDVFileTransfer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */ = {isa = PBXBuildFile; fileRef = C937A4551337599E002C4C79 /* CDVFileTransfer.m */; };
-		EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */; };
-		EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */; };
-		EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */; };
-		EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */; };
-		EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */ = {isa = PBXBuildFile; fileRef = EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */; };
-		EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */ = {isa = PBXBuildFile; fileRef = EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */; };
-		EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */ = {isa = PBXBuildFile; fileRef = EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVBattery.h; path = Classes/CDVBattery.h; sourceTree = "<group>"; };
-		1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVBattery.m; path = Classes/CDVBattery.m; sourceTree = "<group>"; };
-		1F3C04CC12BC247D004F9E10 /* CDVContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContact.h; path = Classes/CDVContact.h; sourceTree = "<group>"; };
-		1F3C04CD12BC247D004F9E10 /* CDVContact.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContact.m; path = Classes/CDVContact.m; sourceTree = "<group>"; };
-		1F584B991385A28900ED25E8 /* CDVCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCapture.h; path = Classes/CDVCapture.h; sourceTree = "<group>"; };
-		1F584B9A1385A28900ED25E8 /* CDVCapture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCapture.m; path = Classes/CDVCapture.m; sourceTree = "<group>"; };
-		1F92F49E1314023E0046367C /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPluginResult.h; path = Classes/CDVPluginResult.h; sourceTree = "<group>"; };
-		1F92F49F1314023E0046367C /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPluginResult.m; path = Classes/CDVPluginResult.m; sourceTree = "<group>"; };
-		301F2F2914F3C9CA003FE9FC /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDV.h; path = Classes/CDV.h; sourceTree = "<group>"; };
-		302965BB13A94E9D007046C5 /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebug.h; path = Classes/CDVDebug.h; sourceTree = "<group>"; };
-		30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
-		3034979A1513D56A0090E688 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocalStorage.h; path = Classes/CDVLocalStorage.h; sourceTree = "<group>"; };
-		3034979B1513D56A0090E688 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocalStorage.m; path = Classes/CDVLocalStorage.m; sourceTree = "<group>"; };
-		30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAvailability.h; path = Classes/CDVAvailability.h; sourceTree = "<group>"; };
-		3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIDevice+Extensions.h"; path = "Classes/UIDevice+Extensions.h"; sourceTree = "<group>"; };
-		3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIDevice+Extensions.m"; path = "Classes/UIDevice+Extensions.m"; sourceTree = "<group>"; };
-		307A8F9C1385A2EC00E43782 /* CDVConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVConnection.h; path = Classes/CDVConnection.h; sourceTree = "<group>"; };
-		307A8F9D1385A2EC00E43782 /* CDVConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVConnection.m; path = Classes/CDVConnection.m; sourceTree = "<group>"; };
-		30A90B8F14588697006178D3 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = "<group>"; };
-		30A90B9014588697006178D3 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = "<group>"; };
-		30B39EBC13D0268B0009682A /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = Classes/CDVSplashScreen.h; sourceTree = "<group>"; };
-		30B39EBD13D0268B0009682A /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = Classes/CDVSplashScreen.m; sourceTree = "<group>"; };
-		30C5F1DD15AF9E950052A00D /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDevice.h; path = Classes/CDVDevice.h; sourceTree = "<group>"; };
-		30C5F1DE15AF9E950052A00D /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDevice.m; path = Classes/CDVDevice.m; sourceTree = "<group>"; };
-		30C6847E1406CB38004C1A8E /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVWhitelist.h; path = Classes/CDVWhitelist.h; sourceTree = "<group>"; };
-		30C6847F1406CB38004C1A8E /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVWhitelist.m; path = Classes/CDVWhitelist.m; sourceTree = "<group>"; };
-		30C684921407044A004C1A8E /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVURLProtocol.h; path = Classes/CDVURLProtocol.h; sourceTree = "<group>"; };
-		30C684931407044A004C1A8E /* CDVURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVURLProtocol.m; path = Classes/CDVURLProtocol.m; sourceTree = "<group>"; };
-		30E33AF013A7E24B00594D64 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPlugin.h; path = Classes/CDVPlugin.h; sourceTree = "<group>"; };
-		30E33AF113A7E24B00594D64 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPlugin.m; path = Classes/CDVPlugin.m; sourceTree = "<group>"; };
-		30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+QueueAdditions.h"; path = "Classes/NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
-		30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+QueueAdditions.m"; path = "Classes/NSMutableArray+QueueAdditions.m"; sourceTree = "<group>"; };
-		30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegate.h; path = Classes/CDVCommandDelegate.h; sourceTree = "<group>"; };
-		3E76876B156A90EE00EB6FA3 /* CDVLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLogger.m; path = Classes/CDVLogger.m; sourceTree = "<group>"; };
-		3E76876C156A90EE00EB6FA3 /* CDVLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLogger.h; path = Classes/CDVLogger.h; sourceTree = "<group>"; };
-		686357AA141002F100DF4CF2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		686357AC141002F100DF4CF2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		686357AE141002F100DF4CF2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		686357CF14100ADB00DF4CF2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		686357D014100ADE00DF4CF2 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		686357D214100AE700DF4CF2 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		686357D414100AF200DF4CF2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		686357DC14100B1600DF4CF2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		68A32D7414103017006B237C /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		8852C43614B65FD800F0E735 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
-		8852C43714B65FD800F0E735 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
-		8852C43814B65FD800F0E735 /* CDVCordovaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCordovaView.h; path = Classes/CDVCordovaView.h; sourceTree = "<group>"; };
-		8852C43914B65FD800F0E735 /* CDVCordovaView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCordovaView.m; path = Classes/CDVCordovaView.m; sourceTree = "<group>"; };
-		8887FD261090FBE7009987E8 /* CDVCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCamera.h; path = Classes/CDVCamera.h; sourceTree = "<group>"; };
-		8887FD271090FBE7009987E8 /* CDVCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCamera.m; path = Classes/CDVCamera.m; sourceTree = "<group>"; };
-		8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Extensions.h"; path = "Classes/NSDictionary+Extensions.h"; sourceTree = "<group>"; };
-		8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+Extensions.m"; path = "Classes/NSDictionary+Extensions.m"; sourceTree = "<group>"; };
-		8887FD2A1090FBE7009987E8 /* CDVContacts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContacts.h; path = Classes/CDVContacts.h; sourceTree = "<group>"; };
-		8887FD2B1090FBE7009987E8 /* CDVContacts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContacts.m; path = Classes/CDVContacts.m; sourceTree = "<group>"; };
-		8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebugConsole.h; path = Classes/CDVDebugConsole.h; sourceTree = "<group>"; };
-		8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDebugConsole.m; path = Classes/CDVDebugConsole.m; sourceTree = "<group>"; };
-		8887FD301090FBE7009987E8 /* CDVFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFile.h; path = Classes/CDVFile.h; sourceTree = "<group>"; };
-		8887FD311090FBE7009987E8 /* CDVFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFile.m; path = Classes/CDVFile.m; sourceTree = "<group>"; };
-		8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVInvokedUrlCommand.h; path = Classes/CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
-		8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVInvokedUrlCommand.m; path = Classes/CDVInvokedUrlCommand.m; sourceTree = "<group>"; };
-		8887FD461090FBE7009987E8 /* CDVLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocation.h; path = Classes/CDVLocation.h; sourceTree = "<group>"; };
-		8887FD471090FBE7009987E8 /* CDVLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocation.m; path = Classes/CDVLocation.m; sourceTree = "<group>"; };
-		8887FD4E1090FBE7009987E8 /* CDVNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVNotification.h; path = Classes/CDVNotification.h; sourceTree = "<group>"; };
-		8887FD4F1090FBE7009987E8 /* CDVNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVNotification.m; path = Classes/CDVNotification.m; sourceTree = "<group>"; };
-		8887FD501090FBE7009987E8 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+Base64.h"; path = "Classes/NSData+Base64.h"; sourceTree = "<group>"; };
-		8887FD511090FBE7009987E8 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+Base64.m"; path = "Classes/NSData+Base64.m"; sourceTree = "<group>"; };
-		8887FD5E1090FBE7009987E8 /* CDVReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVReachability.h; path = Classes/CDVReachability.h; sourceTree = "<group>"; };
-		8887FD5F1090FBE7009987E8 /* CDVReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVReachability.m; path = Classes/CDVReachability.m; sourceTree = "<group>"; };
-		8887FD601090FBE7009987E8 /* CDVSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSound.h; path = Classes/CDVSound.h; sourceTree = "<group>"; };
-		8887FD611090FBE7009987E8 /* CDVSound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSound.m; path = Classes/CDVSound.m; sourceTree = "<group>"; };
-		88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAccelerometer.h; path = Classes/CDVAccelerometer.h; sourceTree = "<group>"; };
-		88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVAccelerometer.m; path = Classes/CDVAccelerometer.m; sourceTree = "<group>"; };
-		9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVGlobalization.h; path = Classes/CDVGlobalization.h; sourceTree = "<group>"; };
-		9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVGlobalization.m; path = Classes/CDVGlobalization.m; sourceTree = "<group>"; };
-		AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CordovaLib_Prefix.pch; sourceTree = SOURCE_ROOT; };
-		C937A4541337599E002C4C79 /* CDVFileTransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFileTransfer.h; path = Classes/CDVFileTransfer.h; sourceTree = "<group>"; };
-		C937A4551337599E002C4C79 /* CDVFileTransfer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFileTransfer.m; path = Classes/CDVFileTransfer.m; sourceTree = "<group>"; };
-		EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandQueue.h; path = Classes/CDVCommandQueue.h; sourceTree = "<group>"; };
-		EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandQueue.m; path = Classes/CDVCommandQueue.m; sourceTree = "<group>"; };
-		EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegateImpl.h; path = Classes/CDVCommandDelegateImpl.h; sourceTree = "<group>"; };
-		EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandDelegateImpl.m; path = Classes/CDVCommandDelegateImpl.m; sourceTree = "<group>"; };
-		EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVEcho.h; path = Classes/CDVEcho.h; sourceTree = "<group>"; };
-		EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVEcho.m; path = Classes/CDVEcho.m; sourceTree = "<group>"; };
-		EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSArray+Comparisons.h"; path = "Classes/NSArray+Comparisons.h"; sourceTree = "<group>"; };
-		EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSArray+Comparisons.m"; path = "Classes/NSArray+Comparisons.m"; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		D2AAC07C0554694100DB518D /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		034768DFFF38A50411DB9C8B /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				68A32D7114102E1C006B237C /* libCordova.a */,
-			);
-			name = Products;
-			sourceTree = CORDOVALIB;
-		};
-		0867D691FE84028FC02AAC07 /* CordovaLib */ = {
-			isa = PBXGroup;
-			children = (
-				8887FD101090FB43009987E8 /* Classes */,
-				32C88DFF0371C24200C91783 /* Other Sources */,
-				0867D69AFE84028FC02AAC07 /* Frameworks */,
-				034768DFFF38A50411DB9C8B /* Products */,
-				30325A0B136B343700982B63 /* VERSION */,
-			);
-			name = CordovaLib;
-			sourceTree = "<group>";
-		};
-		0867D69AFE84028FC02AAC07 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				68A32D7414103017006B237C /* AddressBook.framework */,
-				686357DC14100B1600DF4CF2 /* CoreMedia.framework */,
-				686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */,
-				686357CF14100ADB00DF4CF2 /* AVFoundation.framework */,
-				686357D014100ADE00DF4CF2 /* CoreLocation.framework */,
-				686357D214100AE700DF4CF2 /* MobileCoreServices.framework */,
-				686357D414100AF200DF4CF2 /* SystemConfiguration.framework */,
-				686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */,
-				686357AA141002F100DF4CF2 /* UIKit.framework */,
-				686357AC141002F100DF4CF2 /* Foundation.framework */,
-				686357AE141002F100DF4CF2 /* CoreGraphics.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		3054098714B77FF3009841CA /* Cleaver */ = {
-			isa = PBXGroup;
-			children = (
-				8852C43614B65FD800F0E735 /* CDVViewController.h */,
-				8852C43714B65FD800F0E735 /* CDVViewController.m */,
-				8852C43814B65FD800F0E735 /* CDVCordovaView.h */,
-				8852C43914B65FD800F0E735 /* CDVCordovaView.m */,
-				EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */,
-				EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */,
-			);
-			name = Cleaver;
-			sourceTree = "<group>";
-		};
-		32C88DFF0371C24200C91783 /* Other Sources */ = {
-			isa = PBXGroup;
-			children = (
-				AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */,
-			);
-			name = "Other Sources";
-			sourceTree = "<group>";
-		};
-		888700D710922F56009987E8 /* Commands */ = {
-			isa = PBXGroup;
-			children = (
-				30C5F1DD15AF9E950052A00D /* CDVDevice.h */,
-				30C5F1DE15AF9E950052A00D /* CDVDevice.m */,
-				301F2F2914F3C9CA003FE9FC /* CDV.h */,
-				3034979A1513D56A0090E688 /* CDVLocalStorage.h */,
-				3034979B1513D56A0090E688 /* CDVLocalStorage.m */,
-				30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */,
-				30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */,
-				EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */,
-				EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */,
-				30C684921407044A004C1A8E /* CDVURLProtocol.h */,
-				30C684931407044A004C1A8E /* CDVURLProtocol.m */,
-				30C6847E1406CB38004C1A8E /* CDVWhitelist.h */,
-				30C6847F1406CB38004C1A8E /* CDVWhitelist.m */,
-				1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */,
-				1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */,
-				30B39EBC13D0268B0009682A /* CDVSplashScreen.h */,
-				30B39EBD13D0268B0009682A /* CDVSplashScreen.m */,
-				30E33AF013A7E24B00594D64 /* CDVPlugin.h */,
-				30E33AF113A7E24B00594D64 /* CDVPlugin.m */,
-				307A8F9C1385A2EC00E43782 /* CDVConnection.h */,
-				307A8F9D1385A2EC00E43782 /* CDVConnection.m */,
-				1F92F49E1314023E0046367C /* CDVPluginResult.h */,
-				1F92F49F1314023E0046367C /* CDVPluginResult.m */,
-				88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */,
-				88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */,
-				8887FD261090FBE7009987E8 /* CDVCamera.h */,
-				8887FD271090FBE7009987E8 /* CDVCamera.m */,
-				1F584B991385A28900ED25E8 /* CDVCapture.h */,
-				1F584B9A1385A28900ED25E8 /* CDVCapture.m */,
-				1F3C04CC12BC247D004F9E10 /* CDVContact.h */,
-				1F3C04CD12BC247D004F9E10 /* CDVContact.m */,
-				8887FD2A1090FBE7009987E8 /* CDVContacts.h */,
-				8887FD2B1090FBE7009987E8 /* CDVContacts.m */,
-				8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */,
-				8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */,
-				EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */,
-				EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */,
-				8887FD301090FBE7009987E8 /* CDVFile.h */,
-				8887FD311090FBE7009987E8 /* CDVFile.m */,
-				8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */,
-				8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */,
-				C937A4541337599E002C4C79 /* CDVFileTransfer.h */,
-				C937A4551337599E002C4C79 /* CDVFileTransfer.m */,
-				8887FD461090FBE7009987E8 /* CDVLocation.h */,
-				8887FD471090FBE7009987E8 /* CDVLocation.m */,
-				8887FD4E1090FBE7009987E8 /* CDVNotification.h */,
-				8887FD4F1090FBE7009987E8 /* CDVNotification.m */,
-				8887FD5E1090FBE7009987E8 /* CDVReachability.h */,
-				8887FD5F1090FBE7009987E8 /* CDVReachability.m */,
-				8887FD601090FBE7009987E8 /* CDVSound.h */,
-				8887FD611090FBE7009987E8 /* CDVSound.m */,
-				3E76876B156A90EE00EB6FA3 /* CDVLogger.m */,
-				3E76876C156A90EE00EB6FA3 /* CDVLogger.h */,
-				9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */,
-				9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */,
-			);
-			name = Commands;
-			sourceTree = "<group>";
-		};
-		888700D910923009009987E8 /* Util */ = {
-			isa = PBXGroup;
-			children = (
-				3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */,
-				3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */,
-				EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */,
-				EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */,
-				8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */,
-				8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */,
-				302965BB13A94E9D007046C5 /* CDVDebug.h */,
-				30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */,
-				30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */,
-				8887FD501090FBE7009987E8 /* NSData+Base64.h */,
-				8887FD511090FBE7009987E8 /* NSData+Base64.m */,
-			);
-			name = Util;
-			sourceTree = "<group>";
-		};
-		8887FD101090FB43009987E8 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				3054098714B77FF3009841CA /* Cleaver */,
-				888700D710922F56009987E8 /* Commands */,
-				8887FD361090FBE7009987E8 /* JSON */,
-				888700D910923009009987E8 /* Util */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		8887FD361090FBE7009987E8 /* JSON */ = {
-			isa = PBXGroup;
-			children = (
-				30A90B8F14588697006178D3 /* JSONKit.h */,
-				30A90B9014588697006178D3 /* JSONKit.m */,
-			);
-			name = JSON;
-			path = Classes/JSON;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		D2AAC07A0554694100DB518D /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */,
-				8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */,
-				8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */,
-				8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */,
-				8887FD701090FBE7009987E8 /* CDVFile.h in Headers */,
-				8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */,
-				8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */,
-				8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */,
-				8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */,
-				8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */,
-				8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */,
-				88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */,
-				1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */,
-				1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */,
-				C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */,
-				307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */,
-				1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */,
-				30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */,
-				302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */,
-				30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */,
-				30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */,
-				1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */,
-				30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */,
-				30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */,
-				30A90B9114588697006178D3 /* JSONKit.h in Headers */,
-				8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */,
-				8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */,
-				30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */,
-				301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */,
-				30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */,
-				3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */,
-				3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */,
-				3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */,
-				EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */,
-				30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */,
-				EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */,
-				EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */,
-				EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */,
-				9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
-		D2AAC07D0554694100DB518D /* CordovaLib */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */;
-			buildPhases = (
-				D2AAC07A0554694100DB518D /* Headers */,
-				D2AAC07B0554694100DB518D /* Sources */,
-				D2AAC07C0554694100DB518D /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = CordovaLib;
-			productName = CordovaLib;
-			productReference = 68A32D7114102E1C006B237C /* libCordova.a */;
-			productType = "com.apple.product-type.library.static";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		0867D690FE84028FC02AAC07 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0430;
-			};
-			buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 1;
-			knownRegions = (
-				English,
-				Japanese,
-				French,
-				German,
-				en,
-			);
-			mainGroup = 0867D691FE84028FC02AAC07 /* CordovaLib */;
-			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				D2AAC07D0554694100DB518D /* CordovaLib */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
-		D2AAC07B0554694100DB518D /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */,
-				8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */,
-				8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */,
-				8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */,
-				8887FD711090FBE7009987E8 /* CDVFile.m in Sources */,
-				8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */,
-				8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */,
-				8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */,
-				8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */,
-				8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */,
-				8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */,
-				88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */,
-				1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */,
-				1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */,
-				C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */,
-				307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */,
-				1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */,
-				30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */,
-				30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */,
-				30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */,
-				1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */,
-				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,
-				30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,
-				30A90B9314588697006178D3 /* JSONKit.m in Sources */,
-				8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */,
-				8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */,
-				3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */,
-				3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */,
-				3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */,
-				EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */,
-				30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */,
-				EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */,
-				EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */,
-				EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */,
-				9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
-		1DEB921F08733DC00010E9CD /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				COPY_PHASE_STRIP = NO;
-				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				PRODUCT_NAME = Cordova;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SKIP_INSTALL = YES;
-			};
-			name = Debug;
-		};
-		1DEB922008733DC00010E9CD /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				INSTALL_PATH = /usr/local/lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				PRODUCT_NAME = Cordova;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SKIP_INSTALL = YES;
-			};
-			name = Release;
-		};
-		1DEB922308733DC00010E9CD /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				ONLY_ACTIVE_ARCH = NO;
-				OTHER_CFLAGS = "-DDEBUG";
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				USER_HEADER_SEARCH_PATHS = "";
-				VALID_ARCHS = "i386 armv6 armv7 armv7s";
-			};
-			name = Debug;
-		};
-		1DEB922408733DC00010E9CD /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"ARCHS[sdk=iphoneos*]" = (
-					armv6,
-					armv7,
-				);
-				"ARCHS[sdk=iphoneos6.*]" = (
-					armv7,
-					armv7s,
-				);
-				"ARCHS[sdk=iphonesimulator*]" = i386;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_PREPROCESSOR_DEFINITIONS = "";
-				GCC_THUMB_SUPPORT = NO;
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
-				ONLY_ACTIVE_ARCH = NO;
-				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
-				SDKROOT = iphoneos;
-				SKIP_INSTALL = YES;
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALID_ARCHS = "i386 armv6 armv7 armv7s";
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB921F08733DC00010E9CD /* Debug */,
-				1DEB922008733DC00010E9CD /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB922308733DC00010E9CD /* Debug */,
-				1DEB922408733DC00010E9CD /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/22833745/test/projects/ios/SampleApp.xcodeproj/project.orig.pbxproj
----------------------------------------------------------------------
diff --git a/test/projects/ios/SampleApp.xcodeproj/project.orig.pbxproj b/test/projects/ios/SampleApp.xcodeproj/project.orig.pbxproj
deleted file mode 100644
index a4d87f9..0000000
--- a/test/projects/ios/SampleApp.xcodeproj/project.orig.pbxproj
+++ /dev/null
@@ -1,498 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
-		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
-		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
-		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
-		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
-		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
-		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
-		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
-		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
-		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
-		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
-		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
-		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
-		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
-		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
-		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
-		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
-		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
-		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
-		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
-		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
-		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
-		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
-		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
-		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
-		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
-		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
-		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
-		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
-		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
-		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
-		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
-		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
-		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
-		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
-		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
-		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
-		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
-		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
-		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
-		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
-		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
-		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
-		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
-				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
-				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
-				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
-				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
-				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
-				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
-				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
-				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
-				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
-				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
-				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
-				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
-				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		571A462D14DB0A1A007FEAC7 = {
-			isa = PBXGroup;
-			children = (
-				577FC36514DB0B620082BA7B /* www */,
-				571A465914DB0A1B007FEAC7 /* ChildApp */,
-				571A463E14DB0A1B007FEAC7 /* Frameworks */,
-				571A463C14DB0A1B007FEAC7 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		571A463C14DB0A1B007FEAC7 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
-				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
-				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
-				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
-				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
-				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
-				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
-				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
-				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
-				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
-				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
-				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
-				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXGroup;
-			children = (
-				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
-				571A466414DB0A1B007FEAC7 /* Resources */,
-				571A467D14DB0A1B007FEAC7 /* Classes */,
-				571A468614DB0A1B007FEAC7 /* Plugins */,
-				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
-			);
-			path = ChildApp;
-			sourceTree = "<group>";
-		};
-		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
-				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
-				571A465F14DB0A1B007FEAC7 /* main.m */,
-				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
-				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
-				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-		571A466414DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
-				571A466514DB0A1B007FEAC7 /* en.lproj */,
-				571A466914DB0A1B007FEAC7 /* es.lproj */,
-				571A466D14DB0A1B007FEAC7 /* icons */,
-				571A467414DB0A1B007FEAC7 /* splash */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = en.lproj;
-			sourceTree = "<group>";
-		};
-		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = es.lproj;
-			sourceTree = "<group>";
-		};
-		571A466D14DB0A1B007FEAC7 /* icons */ = {
-			isa = PBXGroup;
-			children = (
-				571A466E14DB0A1B007FEAC7 /* icon.png */,
-				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
-				571A467214DB0A1B007FEAC7 /* icon-72.png */,
-			);
-			name = icons;
-			sourceTree = "<group>";
-		};
-		571A467414DB0A1B007FEAC7 /* splash */ = {
-			isa = PBXGroup;
-			children = (
-				571A467514DB0A1B007FEAC7 /* Default.png */,
-				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
-			);
-			name = splash;
-			sourceTree = "<group>";
-		};
-		571A467D14DB0A1B007FEAC7 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
-				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
-				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
-				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		571A468614DB0A1B007FEAC7 /* Plugins */ = {
-			isa = PBXGroup;
-			children = (
-				571A468714DB0A1B007FEAC7 /* README */,
-			);
-			name = Plugins;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
-			buildPhases = (
-				571A463414DB0A1B007FEAC7 /* Sources */,
-				571A463514DB0A1B007FEAC7 /* Frameworks */,
-				571A463614DB0A1B007FEAC7 /* Resources */,
-				571A463714DB0A1B007FEAC7 /* Sources */,
-				571A463814DB0A1B007FEAC7 /* Frameworks */,
-				571A463914DB0A1B007FEAC7 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = ChildApp;
-			productName = ChildApp;
-			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		571A462F14DB0A1A007FEAC7 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0420;
-			};
-			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-				es,
-			);
-			mainGroup = 571A462D14DB0A1A007FEAC7;
-			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				571A463A14DB0A1B007FEAC7 /* ChildApp */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		571A463614DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
-				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
-				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
-				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
-				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
-				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
-				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
-				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
-				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
-				577FC36614DB0B620082BA7B /* www in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/bash;
-			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		571A463414DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
-				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
-				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463714DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A465D14DB0A1B007FEAC7 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466714DB0A1B007FEAC7 /* en */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466B14DB0A1B007FEAC7 /* es */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		571A468814DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-			};
-			name = Debug;
-		};
-		571A468914DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-		571A468B14DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		571A468C14DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALIDATE_PRODUCT = YES;
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468814DB0A1B007FEAC7 /* Debug */,
-				571A468914DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468B14DB0A1B007FEAC7 /* Debug */,
-				571A468C14DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
-}


[48/54] [abbrv] git commit: fixed blacberry install tests

Posted by ti...@apache.org.
fixed blacberry install tests


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/30a7493f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/30a7493f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/30a7493f

Branch: refs/heads/future
Commit: 30a7493ff1c68a33282c7ae787d098bc2d3e2670
Parents: 140d63d
Author: Tim Kim <ti...@adobe.com>
Authored: Fri Apr 12 14:10:14 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Fri Apr 12 14:10:14 2013 -0700

----------------------------------------------------------------------
 test/blackberry-install.js           |    7 ++++++-
 test/plugins/cordova.echo/plugin.xml |   10 +++++-----
 2 files changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/30a7493f/test/blackberry-install.js
----------------------------------------------------------------------
diff --git a/test/blackberry-install.js b/test/blackberry-install.js
index 1356738..c4a82c4 100644
--- a/test/blackberry-install.js
+++ b/test/blackberry-install.js
@@ -23,6 +23,7 @@ var fs = require('fs')
   , et = require('elementtree')
   , osenv = require('osenv')
   , blackberry = require(path.join(__dirname, '..', 'platforms', 'blackberry'))
+  , plugin_loader = require('../util/plugin_loader')
   , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
   , test_project_dir = path.join(test_dir, 'projects', 'blackberry', 'www')
   , test_plugin_dir = path.join(test_dir, 'plugins', 'cordova.echo')
@@ -65,6 +66,9 @@ exports['should move the source files'] = function (test) {
 }
 
 exports['should move the js file'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'blackberry', 'www');
+    
     // setting up a DummyPlugin
     var dummy_plugin_dir = path.join(test_dir, 'plugins', 'DummyPlugin')
     var dummy_xml_path = path.join(test_dir, 'plugins', 'DummyPlugin', 'plugin.xml')
@@ -72,7 +76,8 @@ exports['should move the js file'] = function (test) {
 
     // run the platform-specific function
     blackberry.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
-
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'blackberry');
+    
     var jsPath = path.join(test_project_dir, 'dummyplugin.js');
     test.ok(fs.existsSync(jsPath));
     test.done();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/30a7493f/test/plugins/cordova.echo/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/plugin.xml b/test/plugins/cordova.echo/plugin.xml
index f9fa664..8468ec1 100644
--- a/test/plugins/cordova.echo/plugin.xml
+++ b/test/plugins/cordova.echo/plugin.xml
@@ -15,10 +15,10 @@
             <feature id="cordova.echo" required="true" version="1.0.0.0"/>
         </config-file>
         
-        <source-file src="client.js" target-dir="ext-qnx/cordova.echo" />
-        <source-file src="index.js" target-dir="ext-qnx/cordova.echo" />
-        <source-file src="manifest.json" target-dir="ext-qnx/cordova.echo" />
-        <source-file src="device/echoJnext.so" target-dir="ext-qnx/cordova.echo/device" />
-        <source-file src="simulator/echoJnext.so" target-dir="ext-qnx/cordova.echo/simulator" />
+        <source-file src="src/blackberry/client.js" target-dir="ext-qnx/cordova.echo" />
+        <source-file src="src/blackberry/index.js" target-dir="ext-qnx/cordova.echo" />
+        <source-file src="src/blackberry/manifest.json" target-dir="ext-qnx/cordova.echo" />
+        <source-file src="src/blackberry/device/echoJnext.so" target-dir="ext-qnx/cordova.echo/device" />
+        <source-file src="src/blackberry/simulator/echoJnext.so" target-dir="ext-qnx/cordova.echo/simulator" />
     </platform>
 </plugin>
\ No newline at end of file


[53/54] [abbrv] git commit: Added plugin loader to plugman test

Posted by ti...@apache.org.
Added plugin loader to plugman test


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/bd699650
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/bd699650
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/bd699650

Branch: refs/heads/future
Commit: bd699650b794e811fa598a342e5e91932e6d7218
Parents: 3738b46
Author: Tim Kim <ti...@adobe.com>
Authored: Mon Apr 15 11:33:13 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Mon Apr 15 11:33:13 2013 -0700

----------------------------------------------------------------------
 test/plugman.js |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/bd699650/test/plugman.js
----------------------------------------------------------------------
diff --git a/test/plugman.js b/test/plugman.js
index 3497a8c..19bfc1f 100644
--- a/test/plugman.js
+++ b/test/plugman.js
@@ -22,6 +22,7 @@ var fs = require('fs')
   , osenv = require('osenv')
   , shell = require('shelljs')
   , util = require('util')
+  , plugin_loader = require('../util/plugin_loader')
   , plugman_exe = path.join(__dirname, '..', 'plugman.js')
   , test_dir = path.join(osenv.tmpdir(), 'test_plugman');
 


[33/54] [abbrv] git commit: No tags for JS-only plugins.

Posted by ti...@apache.org.
No <platform> tags for JS-only plugins.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/af2a9013
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/af2a9013
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/af2a9013

Branch: refs/heads/future
Commit: af2a90138878bb51ae09783861fda3ea3089b2f2
Parents: b649373
Author: Braden Shepherdson <br...@gmail.com>
Authored: Tue Mar 26 16:40:59 2013 -0400
Committer: Tim Kim <ti...@adobe.com>
Committed: Tue Apr 9 13:44:01 2013 -0700

----------------------------------------------------------------------
 platforms/android.js    |   46 ++++++++++++-----------------------------
 platforms/blackberry.js |   35 +++++++------------------------
 platforms/ios.js        |   42 ++++---------------------------------
 platforms/www.js        |   43 ---------------------------------------
 plugman.js              |    6 ++--
 5 files changed, 30 insertions(+), 142 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/af2a9013/platforms/android.js
----------------------------------------------------------------------
diff --git a/platforms/android.js b/platforms/android.js
index 323ff28..41ac491 100644
--- a/platforms/android.js
+++ b/platforms/android.js
@@ -22,22 +22,28 @@ var fs = require('fs')  // use existsSync in 0.6.x
    , util = require('util')
    , shell = require('shelljs')
    , et = require('elementtree')
-   , getConfigChanges = require('../util/config-changes')
-   , searchAndReplace = require('../util/search-and-replace')
-   , xml_helpers = require('../util/xml-helpers')
+   , getConfigChanges = require(path.join(__dirname, '..', 'util', 'config-changes')
+   , searchAndReplace = require(path.join(__dirname, '..', 'util', 'search-and-replace')
+   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
    , assetsDir = 'assets/www'
    , sourceDir = 'src';
 
-
 exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, variables) {
     var plugin_id = plugin_et._root.attrib['id']
       , version = plugin_et._root.attrib['version']
       , external_hosts = []
       , i = 0
-      // look for assets in the plugin 
-      , assets = plugin_et.findall('./asset')
-      , platformTag = plugin_et.find('./platform[@name="android"]')
-      , sourceFiles = platformTag.findall('./source-file')
+      , PACKAGE_NAME = androidPackageName(project_dir)
+
+
+    var platformTag = plugin_et.find('./platform[@name="android"]');
+    if (!platformTag) {
+        // Either this plugin doesn't support this platform, or it's a JS-only plugin.
+        // Either way, return now.
+        return;
+    }
+
+    var sourceFiles = platformTag.findall('./source-file')
       , libFiles = platformTag.findall('./library-file')
       , configChanges = getConfigChanges(platformTag);
 
@@ -79,30 +85,6 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
         }
     });
 
-    // move asset files
-    assets.forEach(function (asset) {
-        var srcPath = path.resolve(
-                        plugin_dir,
-                        asset.attrib['src']);
-
-        var targetPath = path.resolve(
-                            project_dir,
-                            assetsDir,
-                            asset.attrib['target']);
-
-        var stats = fs.statSync(srcPath);
-        if (action == 'install') {
-            if(stats.isDirectory()) {
-                shell.mkdir('-p', targetPath);
-                shell.cp('-R', srcPath, path.join(project_dir, assetsDir));
-            } else {
-                shell.cp(srcPath, targetPath);
-            }
-        } else {
-            shell.rm('-rf', targetPath);
-        }
-    });
-
     // move source files
     sourceFiles.forEach(function (sourceFile) {
         var srcDir = path.resolve(project_dir,

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/af2a9013/platforms/blackberry.js
----------------------------------------------------------------------
diff --git a/platforms/blackberry.js b/platforms/blackberry.js
index c927181..8e3cb5a 100644
--- a/platforms/blackberry.js
+++ b/platforms/blackberry.js
@@ -30,14 +30,17 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et) {
     var plugin_id = plugin_et._root.attrib['id']
       , version = plugin_et._root.attrib['version']
       , external_hosts = []
-
-      // look for assets in the plugin 
-      , assets = plugin_et.findall('./asset')
       , platformTag = plugin_et.find('./platform[@name="blackberry"]')
-      , sourceFiles = platformTag.findall('./source-file')
+
+    if (!platformTag) {
+        // Either this plugin doesn't support this platform, or it's a JS-only plugin.
+        // Either way, return now.
+        return;
+    }
+
+    var sourceFiles = platformTag.findall('./source-file')
       , libFiles = platformTag.findall('./library-file')
       , configChanges = getConfigChanges(platformTag);
-      
     // find which config-files we're interested in
     Object.keys(configChanges).forEach(function (configFile) {
         if (!fs.existsSync(path.resolve(project_dir, configFile))) {
@@ -56,28 +59,6 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et) {
       action = action.replace('force-', '');
     }
     
-    // move asset files
-    assets.forEach(function (asset) {
-        var srcPath = path.resolve(
-                        plugin_dir,
-                        asset.attrib['src']);
-
-        var targetPath = path.resolve(
-                            project_dir,
-                            asset.attrib['target']);
-        var stats = fs.statSync(srcPath);
-        if (action == 'install') {
-            if(stats.isDirectory()) {
-                shell.mkdir('-p', targetPath);
-                shell.cp('-R', srcPath, project_dir);
-            } else {
-                shell.cp(srcPath, targetPath);
-            }
-        } else {
-            shell.rm('-rf', targetPath);
-        }
-    });
-
     // move source files
     sourceFiles.forEach(function (sourceFile) {
         var srcDir = path.resolve(project_dir,

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/af2a9013/platforms/ios.js
----------------------------------------------------------------------
diff --git a/platforms/ios.js b/platforms/ios.js
index 6473936..5431787 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -25,16 +25,16 @@ var path = require('path')
   , plist = require('plist')
   , bplist = require('bplist-parser')
   , shell = require('shelljs')
-  , xml_helpers = require('../util/xml-helpers')
-  , searchAndReplace = require('../util/search-and-replace')
-  , getConfigChanges = require('../util/config-changes')
-  , assetsDir = 'www';    // relative path to project's web assets
-
+  , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'))
+  , searchAndReplace = require(path.join(__dirname, '..', 'util', 'search-and-replace')
+  , getConfigChanges = require(path.join(__dirname, '..', 'util', 'config-changes'));
+  
 exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, variables) {
     var plugin_id = plugin_et._root.attrib['id']
       , version = plugin_et._root.attrib['version']
       , i = 0
       , matched;
+
     variables = variables || {}
 
     // grab and parse pbxproj
@@ -80,38 +80,6 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
     } else {
       action = action.replace('force-', '');
     }
-    
-    var assets = plugin_et.findall('./asset'),
-        platformTag = plugin_et.find('./platform[@name="ios"]'),
-        sourceFiles = platformTag.findall('./source-file'),
-        headerFiles = platformTag.findall('./header-file'),
-        resourceFiles = platformTag.findall('./resource-file'),
-        frameworks = platformTag.findall('./framework');
-
-    // move asset files into www
-    assets && assets.forEach(function (asset) {
-        var srcPath = path.resolve(
-                        plugin_dir, asset.attrib['src']);
-
-        var targetPath = path.resolve(
-                            project_dir,
-                            assetsDir, asset.attrib['target']);
-        if (action == 'install') {
-            var stat = fs.statSync(srcPath);
-            if(stat.isDirectory()) {
-              shell.mkdir('-p', targetPath);
-              checkLastCommand();
-              shell.cp('-r', srcPath, targetPath);
-              checkLastCommand();
-            } else {
-              shell.cp(srcPath, targetPath);
-            }
-            checkLastCommand();
-        } else {
-            shell.rm('-rf', targetPath);
-            checkLastCommand();
-        }
-    });
 
     // move native files (source/header/resource)
     sourceFiles && sourceFiles.forEach(function (sourceFile) {

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/af2a9013/platforms/www.js
----------------------------------------------------------------------
diff --git a/platforms/www.js b/platforms/www.js
deleted file mode 100644
index 1b5b001..0000000
--- a/platforms/www.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var path = require('path')
-  , fs = require('fs')
-  , shell = require('shelljs');
-
-exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et) {    
-    var assets = plugin_et.findall('./asset')
-      , i = 0;
-   
-    // move asset files into www
-    assets.forEach(function (asset) {
-        var srcPath = path.resolve(
-                        plugin_dir, asset.attrib['src']);
-
-        var targetPath = path.resolve(
-                            project_dir, asset.attrib['target']);
-
-        var st = fs.statSync(srcPath);    
-        if (st.isDirectory()) {
-            shell.cp('-R', srcPath, project_dir);
-        } else {
-            shell.cp(srcPath, targetPath);
-        }
-    });
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/af2a9013/plugman.js
----------------------------------------------------------------------
diff --git a/plugman.js b/plugman.js
index f129247..fa2e33b 100755
--- a/plugman.js
+++ b/plugman.js
@@ -31,11 +31,11 @@ var fs = require('fs')
   , platform_modules = {
         'android': require('./platforms/android'),
         'ios': require('./platforms/ios'),
-        'blackberry': require('./platforms/blackberry'),
-        'www': require('./platforms/www')
+        'blackberry': require('./platforms/blackberry')
     };
 
-var known_opts = { 'platform' : [ 'ios', 'android', 'blackberry' ,'www' ]
+var known_opts = { 'platform' : [ 'ios', 'android', 'blackberry' ]
+
             , 'project' : path
             , 'plugin' : [String, path, url]
             , 'remove' : Boolean


[14/54] [abbrv] adding old iOS project with support for {PhoneGap, Cordova}.plist

Posted by ti...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/8d5d7a84/test/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/test/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj b/test/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..a4d87f9
--- /dev/null
+++ b/test/projects/ios-plist/SampleApp.xcodeproj/project.pbxproj
@@ -0,0 +1,498 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
+		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
+		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
+		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
+		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
+		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
+		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
+		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
+		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
+		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
+		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
+		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
+		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
+		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
+		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
+		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
+		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
+		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
+		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
+		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
+		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
+		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
+		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
+		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
+		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
+		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
+		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
+		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
+		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
+		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
+		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
+		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
+		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
+		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
+		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
+		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
+		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
+		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
+		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
+		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
+		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
+		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
+		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
+		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
+		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
+		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
+		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
+		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
+		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
+		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
+		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
+				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
+				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
+				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
+				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
+				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
+				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
+				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
+				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
+				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
+				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
+				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
+				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
+				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		571A462D14DB0A1A007FEAC7 = {
+			isa = PBXGroup;
+			children = (
+				577FC36514DB0B620082BA7B /* www */,
+				571A465914DB0A1B007FEAC7 /* ChildApp */,
+				571A463E14DB0A1B007FEAC7 /* Frameworks */,
+				571A463C14DB0A1B007FEAC7 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		571A463C14DB0A1B007FEAC7 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
+				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
+				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
+				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
+				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
+				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
+				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
+				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
+				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
+				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
+				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
+				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
+				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
+			isa = PBXGroup;
+			children = (
+				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
+				571A466414DB0A1B007FEAC7 /* Resources */,
+				571A467D14DB0A1B007FEAC7 /* Classes */,
+				571A468614DB0A1B007FEAC7 /* Plugins */,
+				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
+			);
+			path = ChildApp;
+			sourceTree = "<group>";
+		};
+		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
+				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
+				571A465F14DB0A1B007FEAC7 /* main.m */,
+				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
+				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
+				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		571A466414DB0A1B007FEAC7 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
+				571A466514DB0A1B007FEAC7 /* en.lproj */,
+				571A466914DB0A1B007FEAC7 /* es.lproj */,
+				571A466D14DB0A1B007FEAC7 /* icons */,
+				571A467414DB0A1B007FEAC7 /* splash */,
+			);
+			name = Resources;
+			sourceTree = "<group>";
+		};
+		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
+			isa = PBXGroup;
+			children = (
+				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
+			);
+			name = en.lproj;
+			sourceTree = "<group>";
+		};
+		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
+			isa = PBXGroup;
+			children = (
+				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
+			);
+			name = es.lproj;
+			sourceTree = "<group>";
+		};
+		571A466D14DB0A1B007FEAC7 /* icons */ = {
+			isa = PBXGroup;
+			children = (
+				571A466E14DB0A1B007FEAC7 /* icon.png */,
+				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
+				571A467214DB0A1B007FEAC7 /* icon-72.png */,
+			);
+			name = icons;
+			sourceTree = "<group>";
+		};
+		571A467414DB0A1B007FEAC7 /* splash */ = {
+			isa = PBXGroup;
+			children = (
+				571A467514DB0A1B007FEAC7 /* Default.png */,
+				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
+			);
+			name = splash;
+			sourceTree = "<group>";
+		};
+		571A467D14DB0A1B007FEAC7 /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
+				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
+				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
+				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
+			);
+			name = Classes;
+			sourceTree = "<group>";
+		};
+		571A468614DB0A1B007FEAC7 /* Plugins */ = {
+			isa = PBXGroup;
+			children = (
+				571A468714DB0A1B007FEAC7 /* README */,
+			);
+			name = Plugins;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
+			buildPhases = (
+				571A463414DB0A1B007FEAC7 /* Sources */,
+				571A463514DB0A1B007FEAC7 /* Frameworks */,
+				571A463614DB0A1B007FEAC7 /* Resources */,
+				571A463714DB0A1B007FEAC7 /* Sources */,
+				571A463814DB0A1B007FEAC7 /* Frameworks */,
+				571A463914DB0A1B007FEAC7 /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = ChildApp;
+			productName = ChildApp;
+			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		571A462F14DB0A1A007FEAC7 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0420;
+			};
+			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				es,
+			);
+			mainGroup = 571A462D14DB0A1A007FEAC7;
+			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				571A463A14DB0A1B007FEAC7 /* ChildApp */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		571A463614DB0A1B007FEAC7 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
+				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
+				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
+				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
+				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
+				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
+				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
+				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
+				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
+				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
+				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
+				577FC36614DB0B620082BA7B /* www in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/bash;
+			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		571A463414DB0A1B007FEAC7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
+				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
+				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		571A463714DB0A1B007FEAC7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A465D14DB0A1B007FEAC7 /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A466714DB0A1B007FEAC7 /* en */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
+		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A466B14DB0A1B007FEAC7 /* es */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		571A468814DB0A1B007FEAC7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+				SDKROOT = iphoneos;
+			};
+			name = Debug;
+		};
+		571A468914DB0A1B007FEAC7 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+				SDKROOT = iphoneos;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		571A468B14DB0A1B007FEAC7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = YES;
+				COPY_PHASE_STRIP = NO;
+				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
+				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
+				OTHER_LDFLAGS = (
+					"-weak_framework",
+					UIKit,
+					"-weak_framework",
+					AVFoundation,
+					"-weak_framework",
+					CoreMedia,
+					"-weak_library",
+					/usr/lib/libSystem.B.dylib,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		571A468C14DB0A1B007FEAC7 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = YES;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
+				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
+				OTHER_LDFLAGS = (
+					"-weak_framework",
+					UIKit,
+					"-weak_framework",
+					AVFoundation,
+					"-weak_framework",
+					CoreMedia,
+					"-weak_library",
+					/usr/lib/libSystem.B.dylib,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				571A468814DB0A1B007FEAC7 /* Debug */,
+				571A468914DB0A1B007FEAC7 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				571A468B14DB0A1B007FEAC7 /* Debug */,
+				571A468C14DB0A1B007FEAC7 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/8d5d7a84/test/projects/ios-plist/SampleApp/PhoneGap.plist
----------------------------------------------------------------------
diff --git a/test/projects/ios-plist/SampleApp/PhoneGap.plist b/test/projects/ios-plist/SampleApp/PhoneGap.plist
new file mode 100644
index 0000000..5ffe25e
--- /dev/null
+++ b/test/projects/ios-plist/SampleApp/PhoneGap.plist
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>TopActivityIndicator</key>
+	<string>gray</string>
+	<key>EnableLocation</key>
+	<false/>
+	<key>EnableViewportScale</key>
+	<false/>
+	<key>AutoHideSplashScreen</key>
+	<true/>
+	<key>ShowSplashScreenSpinner</key>
+	<true/>
+	<key>MediaPlaybackRequiresUserAction</key>
+	<false/>
+	<key>AllowInlineMediaPlayback</key>
+	<false/>
+	<key>OpenAllWhitelistURLsInWebView</key>
+	<false/>
+	<key>ExternalHosts</key>
+	<array/>
+	<key>Plugins</key>
+	<dict>
+		<key>com.phonegap.accelerometer</key>
+		<string>PGAccelerometer</string>
+		<key>com.phonegap.camera</key>
+		<string>PGCamera</string>
+		<key>com.phonegap.connection</key>
+		<string>PGConnection</string>
+		<key>com.phonegap.contacts</key>
+		<string>PGContacts</string>
+		<key>com.phonegap.debugconsole</key>
+		<string>PGDebugConsole</string>
+		<key>com.phonegap.file</key>
+		<string>PGFile</string>
+		<key>com.phonegap.filetransfer</key>
+		<string>PGFileTransfer</string>
+		<key>com.phonegap.geolocation</key>
+		<string>PGLocation</string>
+		<key>com.phonegap.notification</key>
+		<string>PGNotification</string>
+		<key>com.phonegap.media</key>
+		<string>PGSound</string>
+		<key>com.phonegap.mediacapture</key>
+		<string>PGCapture</string>
+		<key>com.phonegap.splashscreen</key>
+		<string>PGSplashScreen</string>
+		<key>com.phonegap.battery</key>
+		<string>PGBattery</string>
+	</dict>
+</dict>
+</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/8d5d7a84/test/projects/ios-plist/SampleApp/SampleApp-Info.plist
----------------------------------------------------------------------
diff --git a/test/projects/ios-plist/SampleApp/SampleApp-Info.plist b/test/projects/ios-plist/SampleApp/SampleApp-Info.plist
new file mode 100644
index 0000000..08b9ee3
--- /dev/null
+++ b/test/projects/ios-plist/SampleApp/SampleApp-Info.plist
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+-->
+<plist version="1.0">
+<dict>
+	<key>CFBundleIcons</key>
+	<dict>
+		<key>CFBundlePrimaryIcon</key>
+		<dict>
+			<key>CFBundleIconFiles</key>
+			<array>
+                <string>icon.png</string>
+                <string>icon@2x.png</string>
+                <string>icon-72.png</string>
+                <string>icon-72@2x.png</string>
+			</array>
+			<key>UIPrerenderedIcon</key>
+			<false/>
+		</dict>
+	</dict>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+	</array>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleDisplayName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIconFile</key>
+	<string>icon.png</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.example.friendstring</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>NSMainNibFile</key>
+	<string></string>
+	<key>NSMainNibFile~ipad</key>
+	<string></string>
+	<key>AppId</key>
+	<string>$APP_ID</string>
+</dict>
+</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/8d5d7a84/test/projects/ios-plist/www/.gitkeep
----------------------------------------------------------------------
diff --git a/test/projects/ios-plist/www/.gitkeep b/test/projects/ios-plist/www/.gitkeep
new file mode 100644
index 0000000..e69de29


[36/54] [abbrv] git commit: Made sure to check for directory

Posted by ti...@apache.org.
Made sure to check for directory


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/b256b9fb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/b256b9fb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/b256b9fb

Branch: refs/heads/future
Commit: b256b9fb43c9f899d7d7906f8a0b80ed10beab63
Parents: 570f922
Author: Tim Kim <ti...@adobe.com>
Authored: Thu Apr 4 15:09:36 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Tue Apr 9 14:01:02 2013 -0700

----------------------------------------------------------------------
 util/plugin_loader.js |  189 ++++++++++++++++++++++----------------------
 1 files changed, 96 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b256b9fb/util/plugin_loader.js
----------------------------------------------------------------------
diff --git a/util/plugin_loader.js b/util/plugin_loader.js
index b14a640..5ea6f93 100644
--- a/util/plugin_loader.js
+++ b/util/plugin_loader.js
@@ -45,103 +45,106 @@ exports.handlePrepare = function(projectRoot, plugins_dir, wwwDir, platform) {
     // This array holds all the metadata for each module and ends up in cordova_plugins.json
     var moduleObjects = [];
 
+    //console.log('plugins_dir ' + fs.readdirSync(plugins_dir));
     plugins && plugins.forEach(function(plugin) {
         var pluginDir = path.join(plugins_dir, plugin);
-        var xml = new et.ElementTree(et.XML(fs.readFileSync(path.join(pluginDir, 'plugin.xml'), 'utf-8')));
-
-        var plugin_id = xml.getroot().attrib.id;
-
-        // Copy all the <asset>s into the platform's www/
-        var assets = xml.findall('./asset');
-        assets && assets.forEach(function(asset) {
-            var target = asset.attrib.target;
-           
-            var lastSlash = target.lastIndexOf('/');
-            var dirname  = lastSlash < 0 ? ''     : target.substring(0, lastSlash);
-            var basename = lastSlash < 0 ? target : target.substring(lastSlash + 1);
-
-            var targetDir = path.join(wwwDir, dirname);
-             
-            shell.mkdir('-p', targetDir);
-
-            var srcFile = path.join(pluginDir, asset.attrib.src);
-            var targetFile = path.join(targetDir, basename);
-
-            var cpOptions = '-f';
-            
-            if(fs.statSync(srcFile).isDirectory()){
-                shell.mkdir('-p',targetFile);
-                srcFile = srcFile+'/*';
-                cpOptions = '-Rf';
-            }
-
-            shell.cp(cpOptions, [srcFile], targetFile);
-            
-        });
-
-        // And then add the plugins dir to the platform's www.
-        var platformPluginsDir = path.join(wwwDir, 'plugins');
-        shell.mkdir('-p', platformPluginsDir);
-
-        var generalModules = xml.findall('./js-module');
-        var platformTag = xml.find(util.format('./platform[@name="%s"]', platform));
-
-        generalModules = generalModules || [];
-        var platformModules = platformTag ? platformTag.findall('./js-module') : [];
-        var allModules = generalModules.concat(platformModules);
-
-        allModules.forEach(function(module) {
-            // Copy the plugin's files into the www directory.
-            var dirname = module.attrib.src;
-            var lastSlash = dirname.lastIndexOf('/');
-            if (lastSlash >= 0) {
-                dirname = dirname.substring(0, lastSlash);
-            } else {
-                dirname = ''; // Just the file, no subdir.
-            }
-
-            var dir = path.join(platformPluginsDir, plugin_id, dirname);
-            shell.mkdir('-p', dir);
-
-            // Read in the file, prepend the cordova.define, and write it back out.
-            var moduleName = plugin_id + '.';
-            if (module.attrib.name) {
-                moduleName += module.attrib.name;
-            } else {
-                var result = module.attrib.src.match(/([^\/]+)\.js/);
-                moduleName += result[1];
-            }
-
-            var scriptContent = fs.readFileSync(path.join(pluginDir, module.attrib.src), 'utf-8');
-            scriptContent = 'cordova.define("' + moduleName + '", function(require, exports, module) {' + scriptContent + '});\n';
-            fs.writeFileSync(path.join(platformPluginsDir, plugin_id, module.attrib.src), scriptContent, 'utf-8');
-
-            // Prepare the object for cordova_plugins.json.
-            var obj = {
-                file: path.join('plugins', plugin_id, module.attrib.src),
-                id: moduleName
-            };
-
-            // Loop over the children of the js-module tag, collecting clobbers, merges and runs.
-            module.getchildren().forEach(function(child) {
-                if (child.tag.toLowerCase() == 'clobbers') {
-                    if (!obj.clobbers) {
-                        obj.clobbers = [];
-                    }
-                    obj.clobbers.push(child.attrib.target);
-                } else if (child.tag.toLowerCase() == 'merges') {
-                    if (!obj.merges) {
-                        obj.merges = [];
-                    }
-                    obj.merges.push(child.attrib.target);
-                } else if (child.tag.toLowerCase() == 'runs') {
-                    obj.runs = true;
+        if(fs.statSync(pluginDir).isDirectory()){
+            var xml = new et.ElementTree(et.XML(fs.readFileSync(path.join(pluginDir, 'plugin.xml'), 'utf-8')));
+    
+            var plugin_id = xml.getroot().attrib.id;
+    
+            // Copy all the <asset>s into the platform's www/
+            var assets = xml.findall('./asset');
+            assets && assets.forEach(function(asset) {
+                var target = asset.attrib.target;
+               
+                var lastSlash = target.lastIndexOf('/');
+                var dirname  = lastSlash < 0 ? ''     : target.substring(0, lastSlash);
+                var basename = lastSlash < 0 ? target : target.substring(lastSlash + 1);
+    
+                var targetDir = path.join(wwwDir, dirname);
+                 
+                shell.mkdir('-p', targetDir);
+    
+                var srcFile = path.join(pluginDir, asset.attrib.src);
+                var targetFile = path.join(targetDir, basename);
+    
+                var cpOptions = '-f';
+                
+                if(fs.statSync(srcFile).isDirectory()){
+                    shell.mkdir('-p',targetFile);
+                    srcFile = srcFile+'/*';
+                    cpOptions = '-Rf';
                 }
+    
+                shell.cp(cpOptions, [srcFile], targetFile);
+                
             });
-
-            // Add it to the list of module objects bound for cordova_plugins.json
-            moduleObjects.push(obj);
-        });
+    
+            // And then add the plugins dir to the platform's www.
+            var platformPluginsDir = path.join(wwwDir, 'plugins');
+            shell.mkdir('-p', platformPluginsDir);
+    
+            var generalModules = xml.findall('./js-module');
+            var platformTag = xml.find(util.format('./platform[@name="%s"]', platform));
+    
+            generalModules = generalModules || [];
+            var platformModules = platformTag ? platformTag.findall('./js-module') : [];
+            var allModules = generalModules.concat(platformModules);
+    
+            allModules.forEach(function(module) {
+                // Copy the plugin's files into the www directory.
+                var dirname = module.attrib.src;
+                var lastSlash = dirname.lastIndexOf('/');
+                if (lastSlash >= 0) {
+                    dirname = dirname.substring(0, lastSlash);
+                } else {
+                    dirname = ''; // Just the file, no subdir.
+                }
+    
+                var dir = path.join(platformPluginsDir, plugin_id, dirname);
+                shell.mkdir('-p', dir);
+    
+                // Read in the file, prepend the cordova.define, and write it back out.
+                var moduleName = plugin_id + '.';
+                if (module.attrib.name) {
+                    moduleName += module.attrib.name;
+                } else {
+                    var result = module.attrib.src.match(/([^\/]+)\.js/);
+                    moduleName += result[1];
+                }
+    
+                var scriptContent = fs.readFileSync(path.join(pluginDir, module.attrib.src), 'utf-8');
+                scriptContent = 'cordova.define("' + moduleName + '", function(require, exports, module) {' + scriptContent + '});\n';
+                fs.writeFileSync(path.join(platformPluginsDir, plugin_id, module.attrib.src), scriptContent, 'utf-8');
+    
+                // Prepare the object for cordova_plugins.json.
+                var obj = {
+                    file: path.join('plugins', plugin_id, module.attrib.src),
+                    id: moduleName
+                };
+    
+                // Loop over the children of the js-module tag, collecting clobbers, merges and runs.
+                module.getchildren().forEach(function(child) {
+                    if (child.tag.toLowerCase() == 'clobbers') {
+                        if (!obj.clobbers) {
+                            obj.clobbers = [];
+                        }
+                        obj.clobbers.push(child.attrib.target);
+                    } else if (child.tag.toLowerCase() == 'merges') {
+                        if (!obj.merges) {
+                            obj.merges = [];
+                        }
+                        obj.merges.push(child.attrib.target);
+                    } else if (child.tag.toLowerCase() == 'runs') {
+                        obj.runs = true;
+                    }
+                });
+    
+                // Add it to the list of module objects bound for cordova_plugins.json
+                moduleObjects.push(obj);
+            });
+        }
     });
 
     // Write out moduleObjects as JSON to cordova_plugins.json


[49/54] [abbrv] git commit: fixed DummyPlugin's plugin.xml file for installing blackberry

Posted by ti...@apache.org.
fixed DummyPlugin's plugin.xml file for installing blackberry


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/51a4de23
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/51a4de23
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/51a4de23

Branch: refs/heads/future
Commit: 51a4de23d370af56391651431db8c62ab004b1ad
Parents: 30a7493
Author: Tim Kim <ti...@adobe.com>
Authored: Fri Apr 12 14:16:50 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Fri Apr 12 14:16:50 2013 -0700

----------------------------------------------------------------------
 test/plugins/DummyPlugin/plugin.xml |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/51a4de23/test/plugins/DummyPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/DummyPlugin/plugin.xml b/test/plugins/DummyPlugin/plugin.xml
index c61ba16..3f55586 100644
--- a/test/plugins/DummyPlugin/plugin.xml
+++ b/test/plugins/DummyPlugin/plugin.xml
@@ -63,9 +63,9 @@
             <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
         </config-file>
 
-        <source-file src="client.js" target-dir="ext-qnx/cordova.echo" />
-        <source-file src="index.js" target-dir="ext-qnx/cordova.echo" />
-        <source-file src="manifest.json" target-dir="ext-qnx/cordova.echo" />
+        <source-file src="src/blackberry/client.js" target-dir="ext-qnx/cordova.echo" />
+        <source-file src="src/blackberry/index.js" target-dir="ext-qnx/cordova.echo" />
+        <source-file src="src/blackberry/manifest.json" target-dir="ext-qnx/cordova.echo" />
     </platform>
 
         


[25/54] [abbrv] git commit: updating README.rd

Posted by ti...@apache.org.
updating README.rd


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/9a5045cb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/9a5045cb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/9a5045cb

Branch: refs/heads/future
Commit: 9a5045cb092104af87eee20e92717d838d123203
Parents: 1209441
Author: Anis Kadri <an...@apache.org>
Authored: Thu Apr 4 14:50:16 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Thu Apr 4 14:50:16 2013 -0700

----------------------------------------------------------------------
 README.md |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9a5045cb/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 8955f18..fe0a08b 100644
--- a/README.md
+++ b/README.md
@@ -321,6 +321,20 @@ plugman identifies the framework through the `src` attribute and attempts to add
 
 The optional `weak` attribute is a boolean denoting whether the framework should be weakly-linked. Default is `false`.
 
+### &lt;info&gt;
+
+The tool will provide additionnal information to users. This is useful when you require some extra steps that can't be easily automated or are out of the scope of plugman.
+
+Examples:
+
+<info>
+You need to install **Google Play Services** from the `Android Extras` section using the Android SDK manager (run `android`).
+
+You need to add the following line to your `local.properties`
+    
+android.library.reference.1=PATH_TO_ANDROID_SDK/sdk/extras/google/google_play_services/libproject/google-play-services_lib
+</info>
+
 ## Variables
 
 In certain cases, a plugin may need to make configuration changes dependent on


[34/54] [abbrv] git commit: Updated README with tags, other updates, TODO

Posted by ti...@apache.org.
Updated README with <js-module> tags, other updates, TODO


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/a490dcce
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/a490dcce
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/a490dcce

Branch: refs/heads/future
Commit: a490dcce8b2de19fb11ac3c29052d721b0e8b123
Parents: af2a901
Author: Braden Shepherdson <br...@gmail.com>
Authored: Tue Mar 26 17:59:21 2013 -0400
Committer: Tim Kim <ti...@adobe.com>
Committed: Tue Apr 9 13:44:02 2013 -0700

----------------------------------------------------------------------
 README.md |  134 +++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 103 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/a490dcce/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index fe0a08b..7554906 100644
--- a/README.md
+++ b/README.md
@@ -1,61 +1,80 @@
-plugman
-===================
+# plugman
 
 A command line tool to distribute and package plugins for use with Apache Cordova, nee PhoneGap.
 
-This document defines tool usage and the plugin format specification. This is not an official document of the Apache Cordova project.
+This document defines tool usage and the plugin format specification.
 
 
 ## Design Goals
-* facilitate programmatic installation and manipulation of plugins
-* detail the dependencies and components of individual plugins
-* allow code reuse between different target platforms
+
+* Facilitate programmatic installation and manipulation of plugins
+* Detail the dependencies and components of individual plugins
+* Allow code reuse between different target platforms
 
 
 ## Usage
 
-Adding plugins:
+Fetch a plugin:
 
-    plugman --platform PLATFORM --project PROJECT-PATH --plugin PLUGIN-PATH|PLUGIN-GIT-URL|PLUGIN-NAME
+    plugman --fetch --plugin <directory|git-url|name> [--plugins_dir <directory>]
 
-Example:
+Install an already fetched plugin:
 
-    plugman --platform android --project . --plugin ~/plugins/ChildBrowser
+    plugman --platform <ios|android|bb10> --project <directory> --plugin <name> [--plugins_dir <directory>]
 
-Removing plugins:
- 
-    plugman --platform PLATFORM --project PROJECT-PATH --plugin PLUGIN-PATH|PLUGIN-GIT-URL|PLUGIN-NAME --remove
+Uninstall a plugin:
 
-Example:
+    plugman --remove --platform <ios|android|bb10> --project <directory> --plugin <name> [--plugins_dir <directory>]
 
-    plugman --platform android --project . --plugin ~/plugins/ChildBrowser --remove
+Delete the local copy of a plugin:
+
+    plugman --remove --plugin <name> [--plugins_dir <directory>]
+
+List plugins:
+
+    plugman --list [--plugins_dir <directory>]
+
+Prepare project:
+
+    plugman --prepare --platform <ios|android|bb10> --project <directory> --www <directory> [--plugins_dir <directory>]
+
+`--plugins_dir` defaults to `<project>/cordova/plugins`, but can be any directory containing a subdirectory for each fetched plugin
+
+Note that `--fetch` and `--remove` deal with the local cache of the plugin's files and don't care about platforms, while `--install` and `--uninstall` require specifying the target platform and the location of the project, and actually do that copying of the native code.
+
+Javascript code (see the section below on loading plugin Javascript) and `www` assets are loaded during `--prepare`.
 
-Listing plugins:
- 
-    plugman --list
 
-    
 ### Supported Platforms
+
 * iOS
 * Android
+* BB10?
 
-### Supported Plugins
-Andrew Lunny's tamed plugins for ChildBrowser and PGSQLite will work but need to be massaged into the right format. 
+### Example Plugins
 
+The plugins found [https://github.com/MobileChromeApps/chrome-cordova/plugins](here) are maintained actively by a contributor to plugman, and should serve as good examples.
 
 ## Development
 
-    git clone https://github.com/imhotep/plugman.git
-    cd plugman
+Basic installation:
+
+    git clone https://git-wip-us.apache.org/repos/asf/cordova-plugman.git
+    cd cordova-plugman
     npm install -g
-   
 
+Linking the global executable to the git repo:
+
+    git clone https://git-wip-us.apache.org/repos/asf/cordova-plugman.git
+    cd cordova-plugman
+    npm install
+    sudo npm link
 
 ## Plugin Directory Structure
 
 A plugin is typically a combination of some web/www code, and some native code.
 However, plugins may have only one of these things - a plugin could be a single
-JavaScript, or some native code with no corresponding JavaScript.
+JavaScript file, or some native code with no corresponding JavaScript.
 
 Here is a sample plugin named foo with android and ios platforms support, and 2 www assets.
 
@@ -63,7 +82,7 @@ Here is a sample plugin named foo with android and ios platforms support, and 2
 foo-plugin/
 |- plugin.xml     # xml-based manifest
 |- src/           # native source for each platform
-|  |- android/ 
+|  |- android/
 |  |  `- Foo.java
 |  `- ios/
 |     |- CDVFoo.h
@@ -71,8 +90,40 @@ foo-plugin/
 |- README.md
 `- www/
    |- foo.js
-   `- foo.png 
-```   
+   `- foo.png
+```
+
+This structure is suggested, but not required.
+
+
+## Plugin Javascript Code Installation
+
+A typical plugin includes one or more Javascript files. Rather than have the user of your plugin add `<script>` tags for your Javascript to their HTML file(s) manually, you should use `<js-module>` tags for your Javascript files.
+
+### `<js-module>` tags
+
+`<asset>` tags are a dumb copy: copy a file from the plugin subdirectory to `www`.
+
+In contrast, `<js-module>` tags are much more sophisticated. They look like this:
+
+    <js-module src="socket.js" name="Socket">
+        <clobbers target="chrome.socket" />
+    </js-module>
+
+For each file with a `<js-module>` tag, the `plugman --prepare` call will copy the file to `www/plugins/my.plugin.id/path/to/myfile.js`. Further, it will add an entry for this plugin to `www/cordova_plugins.json`. At load time, code in `cordova.js` will use an XHR to read this file, inject a `<script>` tag for each Javascript file, and add a mapping to clobber or merge as appropriate (see below).
+
+DO NOT wrap the file with `cordova.define`; this will be added automatically. Your module will be wrapped in a closure, and will have `module`, `exports` and `require` in scope, as normal for AMD modules.
+
+Details for the `<js-module>` tag:
+
+* The `src` points to a file in the plugin directory.
+* The `name` gives the last part of the module name. It can generally be whatever you like, and it only matters if you want to use `cordova.require` to import other parts of your plugins in your Javascript code. The module name for a `<js-module>` is your plugin's `id` followed by the value of `name`. For the example above, with an `id` of `chrome.socket`, the module name is `chrome.socket.Socket`.
+* Inside the `<js-module>` tag there are three legal sub-tags:
+    * `<clobbers target="some.value" />` indicates that the `module.exports` will be inserted into the `window` object as `window.some.value`. You can have as many `<clobbers>` as you like.
+    * `<merges target="some.value" />` indicates that your module should be merged with any existing value at `window.some.value`. If any key already exists, you module's version overrides the original. You can have as many `<merges>` as you like.
+    * `<runs />` means that your code should be `cordova.require`d, but not installed on the `window` object anywhere. This is useful for initializing the module, attaching event handlers or otherwise. You can only have 0 or 1 `<runs />` tags. Note that including a `<runs />` with `<clobbers />` or `<merges />` is redundant, since they also `cordova.require` your module.
+    * An empty `<js-module>` will still be loaded and can be `cordova.require`d in other modules.
+
 
 ## plugin.xml Manifest Format
 
@@ -98,7 +149,7 @@ following attributes:
 #### xmlns (required)
 
 The plugin namespace - `http://www.phonegap.com/ns/plugins/1.0`. If the document
-contains XML from other namespaces - for example, tags to be added ot the
+contains XML from other namespaces - for example, tags to be added to the
 AndroidManifest.xml file - those namespaces should also be included in the
 top-level element.
 
@@ -113,8 +164,6 @@ style regular expression:
 
     ^\d+[.]\d+[.]\d+$
 
-### Child elements
-
 ### &lt;engines&gt; element
 
 The child elements of the `<engines>` element specify versions of
@@ -187,12 +236,15 @@ present, and then copy the file `new-foo.js` as `foo.js` into that directory.
 If a file exists at the target location, tools based on this specification
 should stop the installation process and notify the user of the conflict.
 
+
 ### &lt;platform&gt;
 
 Platform tags identify platforms that have associated native code. Tools using
 this specification can identify supported platforms and install the code into
 Cordova projects.
 
+Plugins without `<platform>` tags are assumed to be JS-only, and therefore installable on any and all platforms.
+
 A sample platform tag:
 
     <platform name="android">
@@ -211,6 +263,7 @@ Platform names should be all-lowercase. Platform names, as arbitrarily chosen,
 are listed:
 
 * android
+* bb10
 * ios
 
 
@@ -383,6 +436,7 @@ TODO: show how the foo plugin example from above will have its files placed in a
 * Fil Maj
 * Mike Reinstein
 * Anis Kadri
+* Braden Shepherdson
 
 ## Contributors
 
@@ -392,3 +446,21 @@ Michael Brooks
 ## License
 
 Apache
+
+## TODO
+
+These apply to plugman as well as cordova-cli. Keep the two in step, they both have `future` branches.
+
+These are in rough order of priority, most urgent at the top.
+
+* Remove expectation that source, header and resource files are found relative to `src/<platform>`. The `src` parameter should be relative to `plugin.xml` like the others.
+* Fix all the tests, including the www-only tests, which expect the old `www` platform that has been removed. Note that most of the tests will need some rewiring because of the separation of `--fetch` and `--install`.
+* Add tests for the `cordova_plugins.json` creation and copying of plugin Javascript files into `www/plugins/my.plugin/**`.
+* Make sure (I think it's already so) that `--uninstall` uses the local cache to uninstall a plugin, rather than fetching another. This avoids problems with the list of files changing upstream.
+* Add `cordova plugin add ../path/to/my/plugin --link` (and similarly for `plugman --fetch`), that symlinks the plugin rather than copying, so that it updates in real time on every `prepare`. This may have problems with native code until we can make that part of a `prepare` as well.
+* Make sure that when a new platform is `cordova platform add`ed that it gets all the currently loaded plugins installed.
+* Implement a `cordova watch` a la `grunt watch` that will re-run `cordova prepare` every time the installed plugins change (including those installed with `--link`). This is definitely a stretch goal, but it would be awesome.
+
+
+I (Braden) am willing to do all of these, and my employer has the will to allocate me to them for as long as they take.
+


[08/54] [abbrv] git commit: adding force action, handling configuration errors and correcting indentation

Posted by ti...@apache.org.
adding force action, handling configuration errors and correcting indentation


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/64da57b4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/64da57b4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/64da57b4

Branch: refs/heads/future
Commit: 64da57b4d50cb1d335942c4dc2d8212f484fef72
Parents: 16f3b24
Author: Anis Kadri <an...@apache.org>
Authored: Mon Apr 1 15:22:23 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Apr 1 15:22:23 2013 -0700

----------------------------------------------------------------------
 platforms/ios.js |  100 +++++++++++++++++++++++++++---------------------
 1 files changed, 56 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/64da57b4/platforms/ios.js
----------------------------------------------------------------------
diff --git a/platforms/ios.js b/platforms/ios.js
index 42d51a5..2f221c3 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -72,10 +72,14 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
     var projectPListPath = project_plists[0];
     
     // collision detection 
-    if(action == "install" && pluginInstalled(plugin_et, config_file)) {
-        throw "Plugin "+plugin_id+" already installed"
-    } else if(action == "uninstall" && !pluginInstalled(plugin_et, config_file)) {
-        throw "Plugin "+plugin_id+" not installed"
+    if(action.match(/force-/) == null) {
+      if(action == "install" && pluginInstalled(plugin_et, config_file)) {
+          throw "Plugin "+plugin_id+" already installed"
+      } else if(action == "uninstall" && !pluginInstalled(plugin_et, config_file)) {
+          throw "Plugin "+plugin_id+" not installed"
+      }
+    } else {
+      action = action.replace('force-', '');
     }
     
     var assets = plugin_et.findall('./asset'),
@@ -165,7 +169,7 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
             weak = framework.attrib['weak'];
 
         if (action == 'install') {
-			var opt = { weak: (weak && weak.toLowerCase() == 'true') };
+            var opt = { weak: (weak && weak.toLowerCase() == 'true') };
             xcodeproj.addFramework(src, opt);
         } else {
             xcodeproj.removeFramework(src);
@@ -176,7 +180,15 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
     fs.writeFileSync(pbxPath, xcodeproj.writeSync());
 
     // add plugin and whitelisted hosts
-    updateConfig(action, config_file, plugin_et);
+    try {
+      updateConfig(action, config_file, plugin_et);
+    } catch(e) {
+      throw {
+        name: "ConfigurationError",
+        level: "ERROR",
+        message: "Error updating configuration: "+e.message,
+      }
+    }
     
     if (action == 'install') {
         variables['PACKAGE_NAME'] = plist.parseFileSync(projectPListPath).CFBundleIdentifier;
@@ -269,19 +281,19 @@ function updateConfigXml(action, config_path, plugin_et) {
     var hosts = plugin_et.findall('./access'),
         platformTag = plugin_et.find('./platform[@name="ios"]'), // FIXME: can probably do better than this
         plistEle = platformTag.find('./plugins-plist'), // use this for older that have plugins-plist
-		configChanges = getConfigChanges(platformTag),
-	    base_config_path = path.basename(config_path);
+        configChanges = getConfigChanges(platformTag),
+        base_config_path = path.basename(config_path);
 
     // edit configuration files
     var xmlDoc = xml_helpers.parseElementtreeSync(config_path),
         output,
-		pListOnly = plistEle;
-
-	if (configChanges[path.basename(config_path)]) {	
-		configChanges[path.basename(config_path)].forEach(function (val) {
-			if (val.find("plugin")) pListOnly = false;
-		});
-	}
+		    pListOnly = plistEle;
+    
+    if (configChanges[path.basename(config_path)]) {	
+      configChanges[path.basename(config_path)].forEach(function (val) {
+        if (val.find("plugin")) pListOnly = false;
+      });
+    }
 
     if (pListOnly) {
         // if the plugin supports the old plugins-plist element only
@@ -299,35 +311,35 @@ function updateConfigXml(action, config_path, plugin_et) {
         }
     }
 
-	// add whitelist hosts
-	root = et.Element("config-file");
-	root.attrib['parent'] = '.'
-    hosts.forEach(function (tag) {
-		root.append(tag);
-	});
-
-	if (root.len()) {
-		(configChanges[path.basename(config_path)]) ?
-        	configChanges[path.basename(config_path)].push(root) :
-        	configChanges[path.basename(config_path)] = [root];
-	}
-
-	if (configChanges[path.basename(config_path)]) {
-
-	    configChanges[base_config_path].forEach(function (configNode) {
-	        var selector = configNode.attrib["parent"],
-	            children = configNode.findall('*');
-	        if( action == 'install') {
-	            if (!xml_helpers.graftXML(xmlDoc, children, selector)) {
-	                throw new Error('failed to add children to ' + selector + ' in ' + config_path);
-	            }
-	        } else {
-	            if (!xml_helpers.pruneXML(xmlDoc, children, selector)) {
-	                throw new Error('failed to remove children from ', selector + ' in ' + config_path);
-	            }
-	        }
-		});
-	}
+    // add whitelist hosts
+    root = et.Element("config-file");
+    root.attrib['parent'] = '.'
+      hosts.forEach(function (tag) {
+      root.append(tag);
+    });
+
+    if (root.len()) {
+      (configChanges[path.basename(config_path)]) ?
+            configChanges[path.basename(config_path)].push(root) :
+            configChanges[path.basename(config_path)] = [root];
+    }
+
+    if (configChanges[path.basename(config_path)]) {
+
+        configChanges[base_config_path].forEach(function (configNode) {
+            var selector = configNode.attrib["parent"],
+                children = configNode.findall('*');
+            if( action == 'install') {
+                if (!xml_helpers.graftXML(xmlDoc, children, selector)) {
+                    throw new Error('failed to add children to ' + selector + ' in ' + config_path);
+                }
+            } else {
+                if (!xml_helpers.pruneXML(xmlDoc, children, selector)) {
+                    throw new Error('failed to remove children from ' + selector + ' in ' + config_path);
+                }
+            }
+      });
+    }
 
     output = xmlDoc.write({indent: 4});
     fs.writeFileSync(config_path, output);


[45/54] [abbrv] git commit: added in variable support back in

Posted by ti...@apache.org.
added in variable support back in


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/9383c7b0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/9383c7b0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/9383c7b0

Branch: refs/heads/future
Commit: 9383c7b046724440cf30c1737343a054fca38d99
Parents: b23eeb1
Author: Tim Kim <ti...@adobe.com>
Authored: Fri Apr 12 13:42:21 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Fri Apr 12 13:42:21 2013 -0700

----------------------------------------------------------------------
 platforms/ios.js |    1 -
 plugman.js       |    6 ++----
 2 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9383c7b0/platforms/ios.js
----------------------------------------------------------------------
diff --git a/platforms/ios.js b/platforms/ios.js
index a39ddd4..99769a0 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -165,7 +165,6 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
             weak = framework.attrib['weak'];
         if (action == 'install') {
             var opt = { weak: (weak && weak.toLowerCase() == 'true') };
-            console.log(src + ' ' + opt.weak);
             xcodeproj.addFramework(src, opt);
         } else {
             xcodeproj.removeFramework(src);

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9383c7b0/plugman.js
----------------------------------------------------------------------
diff --git a/plugman.js b/plugman.js
index fa2e33b..9010dfd 100755
--- a/plugman.js
+++ b/plugman.js
@@ -191,8 +191,7 @@ function removePlugin(name) {
     console.log('Plugin ' + cli_opts.plugin + ' deleted.');
 }
 
-// function handlePlugin(action, platform, project_dir, plugin_dir, cli_variables) 
-function handlePlugin(action, platform, project_dir, name) {
+function handlePlugin(action, platform, project_dir, name, cli_variables) {
     var plugin_xml_path, async;
 
     // Check that the plugin has already been fetched.
@@ -207,8 +206,7 @@ function handlePlugin(action, platform, project_dir, name) {
         async = true;
         plugins.getPluginInfo(plugin_dir,
             function(plugin_info) {
-                execAction(action, platform, project_dir, plugins.clonePluginGitRepo(plugin_info.url), plugins_dir);
-                //execAction(action, platform, project_dir, plugins.clonePluginGitRepo(plugin_info.url), cli_variables);
+                execAction(action, platform, project_dir, plugins.clonePluginGitRepo(plugin_info.url), plugins_dir, cli_variables);
             },
             function(e) {
                 throw new Error(action + ' failed. "' + plugin_xml_path + '" not found');


[17/54] [abbrv] git commit: reverting changes on action failures and other minor modifications

Posted by ti...@apache.org.
reverting changes on action failures and other minor modifications


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/51a1f112
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/51a1f112
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/51a1f112

Branch: refs/heads/future
Commit: 51a1f1120d41c47d058efbcf72a3d4980d8dc9df
Parents: 2aeef83
Author: Anis Kadri <an...@apache.org>
Authored: Mon Apr 1 17:02:52 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Apr 1 17:02:52 2013 -0700

----------------------------------------------------------------------
 plugman.js |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/51a1f112/plugman.js
----------------------------------------------------------------------
diff --git a/plugman.js b/plugman.js
index b81cedf..c95c612 100755
--- a/plugman.js
+++ b/plugman.js
@@ -84,10 +84,11 @@ else {
 
 function printUsage() {
     platforms = known_opts.platform.join('|');
-    console.log('Usage\n---------');
-    console.log('Add a plugin:\n\t' + package.name + ' --platform <'+ platforms +'> --project <directory> --variable <preference_name>="<substituion>" --plugin <directory|git-url|name>\n');
-    console.log('Remove a plugin:\n\t' + package.name + ' --remove --platform <'+ platforms +'> --project <directory> --plugin <directory|git-url|name>\n');
-    console.log('List plugins:\n\t' + package.name + ' --list\n');
+    console.error('Usage\n---------');
+    console.error('Add a plugin:\n\t' + package.name + ' --platform <'+ platforms +'> --project <directory> --variable <preference_name>="<substituion>" --plugin <directory|git-url|name>\n');
+    console.error('Remove a plugin:\n\t' + package.name + ' --remove --platform <'+ platforms +'> --project <directory> --plugin <directory|git-url|name>\n');
+    console.error('List plugins:\n\t' + package.name + ' --list\n');
+    process.exit(1);
 }
 
 function execAction(action, platform, project_dir, plugin_dir, cli_variables) {
@@ -108,15 +109,24 @@ function execAction(action, platform, project_dir, plugin_dir, cli_variables) {
                 filtered_variables[key] = cli_variables[key]
         })
         if (missing_vars.length > 0) {
-            console.log('Variable missing: ' + missing_vars.join(", "));
+            console.error('Variable missing: ' + missing_vars.join(", "));
             return;
         }
     }
     
     // run the platform-specific function
-    platform_modules[platform].handlePlugin(action, project_dir, plugin_dir, plugin_et, filtered_variables);
-    
-    console.log('plugin ' + action + 'ed');
+    try {
+      platform_modules[platform].handlePlugin(action, project_dir, plugin_dir, plugin_et, filtered_variables);
+      console.log('plugin ' + action + 'ed');
+    } catch(e) {
+        var revert = (action == "install" ? "force-uninstall" : "force-install" );
+        console.error("An error occurred for action", action, ":", e.message, "\nTrying to revert changes...");
+        try {
+          platform_modules[platform].handlePlugin(revert, project_dir, plugin_dir, plugin_et, filtered_variables);
+        } catch(e) {
+          console.log("Changes might have not been reverted: "+e.message);
+        }
+    }
 }
 
 function handlePlugin(action, platform, project_dir, plugin_dir, cli_variables) {


[12/54] [abbrv] git commit: updating plugins manifest files to support config.xml

Posted by ti...@apache.org.
updating plugins manifest files to support config.xml


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/b490a094
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/b490a094
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/b490a094

Branch: refs/heads/future
Commit: b490a0947cc557bcc9b72e542cbdc368ce2ba72e
Parents: 19bea13
Author: Anis Kadri <an...@apache.org>
Authored: Mon Apr 1 15:26:21 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Apr 1 15:26:21 2013 -0700

----------------------------------------------------------------------
 test/plugins/ChildBrowser/plugin-old.xml |   83 +++++++++++++++++++++++++
 test/plugins/ChildBrowser/plugin.xml     |   11 +++-
 test/plugins/DummyPlugin/plugin.xml      |    7 ++
 test/plugins/WebNotifications/plugin.xml |    2 +-
 test/plugins/WeblessPlugin/plugin.xml    |    7 ++
 5 files changed, 106 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b490a094/test/plugins/ChildBrowser/plugin-old.xml
----------------------------------------------------------------------
diff --git a/test/plugins/ChildBrowser/plugin-old.xml b/test/plugins/ChildBrowser/plugin-old.xml
new file mode 100644
index 0000000..a3d7643
--- /dev/null
+++ b/test/plugins/ChildBrowser/plugin-old.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="com.phonegap.plugins.childbrowser"
+    version="0.6.0">
+
+    <name>Child Browser</name>
+
+    <asset src="www/childbrowser.js" target="childbrowser.js" />
+    <asset src="www/childbrowser" target="childbrowser" />
+
+    <access origin="build.phonegap.com" />
+    <access origin="$APP_ID.s3.amazonaws.com" />
+
+    <!-- android -->
+    <platform name="android">
+        <config-file target="AndroidManifest.xml" parent="/manifest/application">
+            <activity android:name="com.phonegap.plugins.childBrowser.ChildBrowser"
+                      android:label="@string/app_name">
+                <intent-filter>
+                </intent-filter>
+            </activity>
+        </config-file>
+
+        <!-- CDV < 2.0 -->
+        <config-file target="res/xml/plugins.xml" parent="/plugins">
+            <plugin name="ChildBrowser"
+                value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
+        </config-file>
+
+        <!-- CDV 2.0+ (for now) -->
+        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
+            <plugin name="ChildBrowser"
+                value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
+        </config-file>
+
+        <source-file src="ChildBrowser.java"
+                target-dir="src/com/phonegap/plugins/childBrowser" />
+    </platform>
+
+    <!-- ios -->
+    <platform name="ios">
+        <plugins-plist key="com.phonegap.plugins.childbrowser"
+            string="ChildBrowserCommand" />
+
+        <resource-file src="ChildBrowser.bundle" />
+        <resource-file src="ChildBrowserViewController.xib" />
+
+        <header-file src="ChildBrowserCommand.h" />
+        <header-file src="ChildBrowserViewController.h" />
+        <header-file src="preserveDirs/PreserveDirsTest.h" preserve-dirs="true" />
+        <header-file src="TargetDirTest.h" target-dir="targetDir"/>
+
+        <source-file src="ChildBrowserCommand.m" />
+        <source-file src="ChildBrowserViewController.m" />
+        <source-file src="preserveDirs/PreserveDirsTest.m" preserve-dirs="true" />
+        <header-file src="TargetDirTest.m" target-dir="targetDir"/>
+
+        <!-- framework for testing (not actual dependency of ChildBrowser -->
+        <framework src="libsqlite3.dylib" />
+        <framework src="social.framework" weak="true" />
+        <framework src="music.framework" weak="rabbit" />
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b490a094/test/plugins/ChildBrowser/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/ChildBrowser/plugin.xml b/test/plugins/ChildBrowser/plugin.xml
index afd4d0b..37ed744 100644
--- a/test/plugins/ChildBrowser/plugin.xml
+++ b/test/plugins/ChildBrowser/plugin.xml
@@ -28,9 +28,9 @@
     <asset src="www/childbrowser.js" target="childbrowser.js" />
     <asset src="www/childbrowser" target="childbrowser" />
 
-	  <access origin="build.phonegap.com" />
-	  <access origin="$APP_ID.s3.amazonaws.com" />
-	
+    <access origin="build.phonegap.com" />
+    <access origin="$APP_ID.s3.amazonaws.com" />
+
     <!-- android -->
     <platform name="android">
         <config-file target="AndroidManifest.xml" parent="/manifest/application">
@@ -62,6 +62,11 @@
         <plugins-plist key="com.phonegap.plugins.childbrowser"
             string="ChildBrowserCommand" />
 
+        <config-file target="config.xml" parent="/widget/plugins">
+            <plugin name="ChildBrowser"
+                value="ChildBrowserCommand" />
+        </config-file>
+
         <resource-file src="ChildBrowser.bundle" />
         <resource-file src="ChildBrowserViewController.xib" />
 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b490a094/test/plugins/DummyPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/DummyPlugin/plugin.xml b/test/plugins/DummyPlugin/plugin.xml
index 7ca1982..01fd83b 100644
--- a/test/plugins/DummyPlugin/plugin.xml
+++ b/test/plugins/DummyPlugin/plugin.xml
@@ -71,8 +71,15 @@
         
     <!-- ios -->
     <platform name="ios">
+        <!-- CDV < 2.4 -->
         <plugins-plist key="com.phonegap.plugins.dummyplugin"
             string="DummyPluginCommand" />
+        
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="/widget/plugins">
+            <plugin name="DummyPlugin"
+                value="DummyPluginCommand"/>
+        </config-file>
 
         <resource-file src="DummyPlugin.bundle" />
         <resource-file src="DummyPluginViewController.xib" />

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b490a094/test/plugins/WebNotifications/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/WebNotifications/plugin.xml b/test/plugins/WebNotifications/plugin.xml
index 844d09c..788173b 100644
--- a/test/plugins/WebNotifications/plugin.xml
+++ b/test/plugins/WebNotifications/plugin.xml
@@ -32,7 +32,7 @@
 	
     <!-- ios -->
     <platform name="ios">
-        <config-file target="config.xml" parent="/cordova/plugins">
+        <config-file target="config.xml" parent="/widget/plugins">
             <plugin name="WebNotifications"
                 value="WebNotifications"/>
         </config-file>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b490a094/test/plugins/WeblessPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/WeblessPlugin/plugin.xml b/test/plugins/WeblessPlugin/plugin.xml
index 72eb3d8..d0f3bd9 100644
--- a/test/plugins/WeblessPlugin/plugin.xml
+++ b/test/plugins/WeblessPlugin/plugin.xml
@@ -56,8 +56,15 @@
 
     <!-- ios -->
     <platform name="ios">
+        <!-- CDV < 2.4 -->
         <plugins-plist key="com.phonegap.plugins.weblessplugin"
             string="WeblessPluginCommand" />
+        <!-- CDV 2.4 had a /cordova/plugins instead of /widget/plugins so ignored! -->
+        <!-- CDV 2.5+ -->
+        <config-file target="config.xml" parent="/widget/plugins">
+            <plugin name="WeblessPlugin"
+                value="WeblessPluginCommand"/>
+        </config-file>
 
         <resource-file src="WeblessPlugin.bundle" />
         <resource-file src="WeblessPluginViewController.xib" />


[41/54] [abbrv] git commit: trying to get ios tests work

Posted by ti...@apache.org.
trying to get ios tests work


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/2b1f1ada
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/2b1f1ada
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/2b1f1ada

Branch: refs/heads/future
Commit: 2b1f1ada80921c56ce13c0db8944f0e2b1c0358e
Parents: db66171
Author: Tim Kim <ti...@adobe.com>
Authored: Mon Apr 8 16:10:56 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Tue Apr 9 14:27:45 2013 -0700

----------------------------------------------------------------------
 platforms/ios.js               |    1 +
 test/android-one-uninstall.js  |    8 ++++++--
 test/ios-config-xml-install.js |   23 +++++++++++++++++++----
 3 files changed, 26 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/2b1f1ada/platforms/ios.js
----------------------------------------------------------------------
diff --git a/platforms/ios.js b/platforms/ios.js
index c7077fb..8227830 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -132,6 +132,7 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
         if (action == 'install') {
             xcodeproj.addResourceFile(path.join('Resources', path.basename(src)));
             var st = fs.statSync(srcFile);
+            shell.mkdir('-p', resourcesDir);
             if (st.isDirectory()) {
                 shell.cp('-R', srcFile, resourcesDir);
                 checkLastCommand();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/2b1f1ada/test/android-one-uninstall.js
----------------------------------------------------------------------
diff --git a/test/android-one-uninstall.js b/test/android-one-uninstall.js
index a1e48b8..927d54a 100644
--- a/test/android-one-uninstall.js
+++ b/test/android-one-uninstall.js
@@ -27,7 +27,7 @@ var fs = require('fs')
   , shell = require('shelljs')
   , et = require('elementtree')
   , android = require(path.join(__dirname, '..', 'platforms', 'android'))
-
+  , plugin_loader = require('../util/plugin_loader')
   , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
   , test_project_dir = path.join(test_dir, 'projects', 'android_one')
   , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
@@ -58,11 +58,15 @@ exports.tearDown = function(callback) {
 }
 
 exports['should remove the js file'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'android_one', 'assets', 'www');
     var jsPath = path.join(test_dir, 'projects', 'android_one', 'assets', 'www', 'childbrowser.js');
 
     android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android');
     android.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
-
+    
+    console.log(fs.readdirSync(wwwPath));
     test.ok(!fs.existsSync(jsPath));
     test.done();
 }

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/2b1f1ada/test/ios-config-xml-install.js
----------------------------------------------------------------------
diff --git a/test/ios-config-xml-install.js b/test/ios-config-xml-install.js
index 78d02a6..68ec169 100644
--- a/test/ios-config-xml-install.js
+++ b/test/ios-config-xml-install.js
@@ -24,7 +24,7 @@ var fs = require('fs')
   , shell = require('shelljs')
   , et = require('elementtree')
   , ios = require(path.join(__dirname, '..', 'platforms', 'ios'))
-
+  , plugin_loader = require('../util/plugin_loader')
   , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
   , test_project_dir = path.join(test_dir, 'projects', 'ios-config-xml')
   , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
@@ -59,21 +59,35 @@ exports.tearDown = function(callback) {
 }
 
 exports['should install webless plugin'] = function (test) {
-    
     // setting up a DummyPlugin
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios', 'www');
     var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WeblessPlugin')
     var dummy_xml_path = path.join(test_dir, 'plugins', 'WeblessPlugin', 'plugin.xml')
     var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+    
+// out var/folders/k5/p44x4yn122s_gk2s0p0c7rm00000gn/T/test_plugman/projects/ios/SampleApp/Plugins/
 
-    ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et, { APP_ID: 12345 });
+// test project dir var/folders/k5/p44x4yn122s_gk2s0p0c7rm00000gn/T/test_plugman/projects/ios
 
+    ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et, { APP_ID: 12345 });
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+    
+    var huh =  path.join(test_project_dir, 'SampleApp');
+    console.log(huh);
+    console.log('contents ' + fs.readdirSync(huh));
+    
     test.done();
 }
 
 exports['should move the js file'] = function (test) {
     // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    var wwwPath = path.join(test_dir, 'projects', 'ios', 'www');
     var jsPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www', 'childbrowser.js');
+    
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+    
     test.ok(fs.existsSync(jsPath));
     test.ok(fs.statSync(jsPath).isFile());
     test.done();
@@ -250,3 +264,4 @@ exports['should skip collision check when installation is forced'] = function (t
                );
     test.done();
 }
+


[44/54] [abbrv] git commit: fixed up some more ios tests

Posted by ti...@apache.org.
fixed up some more ios tests


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/b23eeb17
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/b23eeb17
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/b23eeb17

Branch: refs/heads/future
Commit: b23eeb17ad4132da367f63aa5774b05e398f45ca
Parents: e777979
Author: Tim Kim <ti...@adobe.com>
Authored: Wed Apr 10 14:40:37 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Wed Apr 10 14:40:37 2013 -0700

----------------------------------------------------------------------
 platforms/ios.js                         |    2 +-
 test/android-one-uninstall.js            |    1 -
 test/ios-config-xml-install.js           |   71 ++++++++++++++++++++-----
 test/plugins/ChildBrowser/plugin-old.xml |   24 ++++----
 test/plugins/WebNotifications/plugin.xml |    4 +-
 5 files changed, 72 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b23eeb17/platforms/ios.js
----------------------------------------------------------------------
diff --git a/platforms/ios.js b/platforms/ios.js
index dad76d4..a39ddd4 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -163,9 +163,9 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
     frameworks && frameworks.forEach(function (framework) {
         var src = framework.attrib['src'],
             weak = framework.attrib['weak'];
-
         if (action == 'install') {
             var opt = { weak: (weak && weak.toLowerCase() == 'true') };
+            console.log(src + ' ' + opt.weak);
             xcodeproj.addFramework(src, opt);
         } else {
             xcodeproj.removeFramework(src);

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b23eeb17/test/android-one-uninstall.js
----------------------------------------------------------------------
diff --git a/test/android-one-uninstall.js b/test/android-one-uninstall.js
index 927d54a..6cd557d 100644
--- a/test/android-one-uninstall.js
+++ b/test/android-one-uninstall.js
@@ -66,7 +66,6 @@ exports['should remove the js file'] = function (test) {
     plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android');
     android.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
     
-    console.log(fs.readdirSync(wwwPath));
     test.ok(!fs.existsSync(jsPath));
     test.done();
 }

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b23eeb17/test/ios-config-xml-install.js
----------------------------------------------------------------------
diff --git a/test/ios-config-xml-install.js b/test/ios-config-xml-install.js
index 2a65268..215c68b 100644
--- a/test/ios-config-xml-install.js
+++ b/test/ios-config-xml-install.js
@@ -73,11 +73,11 @@ exports['should install webless plugin'] = function (test) {
 }
 
 exports['should move the js file'] = function (test) {
-    // run the platform-specific function
     var pluginsPath = path.join(test_dir, 'plugins');
-    var wwwPath = path.join(test_dir, 'projects', 'ios', 'www');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www');
     var jsPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www', 'childbrowser.js');
     
+    // run the platform-specific function
     ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
     plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
     
@@ -87,39 +87,58 @@ exports['should move the js file'] = function (test) {
 }
 
 exports['should move the source files'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www');
+    var preserveDirPath = path.join(srcDir, 'src', 'ios');
+    
     // run the platform-specific function
     ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+    
     test.ok(fs.existsSync(srcDir + '/ChildBrowserCommand.m'))
     test.ok(fs.existsSync(srcDir + '/ChildBrowserViewController.m'))
-    test.ok(fs.existsSync(srcDir + '/preserveDirs/PreserveDirsTest.m'))
+    test.ok(fs.existsSync(preserveDirPath + '/preserveDirs/PreserveDirsTest.m'))
     test.ok(fs.existsSync(srcDir + '/targetDir/TargetDirTest.m'))
     test.done();
 }
 
 exports['should move the header files'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www');
+    var preserveDirPath = path.join(srcDir, 'src', 'ios');
 
+    // run the platform-specific function    
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+    
     test.ok(fs.statSync(srcDir + '/ChildBrowserCommand.h'));
     test.ok(fs.statSync(srcDir + '/ChildBrowserViewController.h'));
-    test.ok(fs.statSync(srcDir + '/preserveDirs/PreserveDirsTest.h'));
+    test.ok(fs.statSync(preserveDirPath + '/preserveDirs/PreserveDirsTest.h'));
     test.ok(fs.statSync(srcDir + '/targetDir/TargetDirTest.h'));
     test.done();
 }
 
+
 exports['should move the xib file'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www');
 
+    // run the platform-specific function    
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+    
     test.ok(fs.statSync(resDir + '/ChildBrowserViewController.xib'));
     test.done();
 }
 
 exports['should move the bundle'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www');
+    
     // run the platform-specific function
     ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+    
     var bundle = fs.statSync(resDir + '/ChildBrowser.bundle');
 
     test.ok(bundle.isDirectory());
@@ -128,6 +147,8 @@ exports['should move the bundle'] = function (test) {
 
 exports['should edit config.xml'] = function (test) {
     // setting up WebNotification (with config.xml) 
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www');
     var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WebNotifications')
     var dummy_xml_path = path.join(test_dir, 'plugins', 'WebNotifications', 'plugin.xml')
     
@@ -136,7 +157,8 @@ exports['should edit config.xml'] = function (test) {
 
     // run the platform-specific function
     ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
-    
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+        
     var configXmlPath = path.join(test_project_dir, 'SampleApp', 'config.xml');
     var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
         pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
@@ -152,6 +174,8 @@ exports['should edit config.xml'] = function (test) {
 
 exports['should edit config.xml even when using old <plugins-plist> approach'] = function (test) {
     // setting up PGSQLitePlugin (with config.xml) 
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www');
     var dummy_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
     var dummy_xml_path = path.join(dummy_plugin_dir, 'plugin-old.xml')
     
@@ -160,6 +184,7 @@ exports['should edit config.xml even when using old <plugins-plist> approach'] =
 
     // run the platform-specific function
     ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et, { APP_ID: 12345 });
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
     
     var configXmlPath = path.join(test_project_dir, 'SampleApp', 'config.xml');
     var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
@@ -176,9 +201,13 @@ exports['should edit config.xml even when using old <plugins-plist> approach'] =
 }
 
 exports['should edit the pbxproj file'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www');
+    
     // run the platform-specific function
     ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+    
     var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj';
 
     obj = xcode.project(projPath).parseSync();
@@ -191,8 +220,13 @@ exports['should edit the pbxproj file'] = function (test) {
 }
 
 exports['should add the framework references to the pbxproj file'] = function (test) {
-    // run the platform-specific function
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www');
+    
+    // run the platform-specific function    
     ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+    
     var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj',
         projContents = fs.readFileSync(projPath, 'utf8'),
         projLines = projContents.split("\n"),
@@ -211,8 +245,16 @@ exports['should add the framework references to the pbxproj file'] = function (t
 }
 
 exports['should add the framework references with weak option to the pbxproj file'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www');
+    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
+    var dummy_xml_path = path.join(test_dir, 'plugins', 'ChildBrowser', 'plugin.xml')
+    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+    
     // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et, { APP_ID: 12345 });
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+
     var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj',
         projContents = fs.readFileSync(projPath, 'utf8'),
         projLines = projContents.split("\n"),
@@ -234,6 +276,7 @@ exports['should add the framework references with weak option to the pbxproj fil
     
     test.equal(non_weak_references.length, 4);
     test.ok(non_weak_references[0].indexOf(weak_linked) == -1);
+    
     test.done();
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b23eeb17/test/plugins/ChildBrowser/plugin-old.xml
----------------------------------------------------------------------
diff --git a/test/plugins/ChildBrowser/plugin-old.xml b/test/plugins/ChildBrowser/plugin-old.xml
index a3d7643..67a3a50 100644
--- a/test/plugins/ChildBrowser/plugin-old.xml
+++ b/test/plugins/ChildBrowser/plugin-old.xml
@@ -62,18 +62,18 @@
         <plugins-plist key="com.phonegap.plugins.childbrowser"
             string="ChildBrowserCommand" />
 
-        <resource-file src="ChildBrowser.bundle" />
-        <resource-file src="ChildBrowserViewController.xib" />
-
-        <header-file src="ChildBrowserCommand.h" />
-        <header-file src="ChildBrowserViewController.h" />
-        <header-file src="preserveDirs/PreserveDirsTest.h" preserve-dirs="true" />
-        <header-file src="TargetDirTest.h" target-dir="targetDir"/>
-
-        <source-file src="ChildBrowserCommand.m" />
-        <source-file src="ChildBrowserViewController.m" />
-        <source-file src="preserveDirs/PreserveDirsTest.m" preserve-dirs="true" />
-        <header-file src="TargetDirTest.m" target-dir="targetDir"/>
+        <resource-file src="src/ios/ChildBrowser.bundle" />
+        <resource-file src="src/ios/ChildBrowserViewController.xib" />
+
+        <header-file src="src/ios/ChildBrowserCommand.h" />
+        <header-file src="src/ios/ChildBrowserViewController.h" />
+        <header-file src="src/ios/preserveDirs/PreserveDirsTest.h" preserve-dirs="true" />
+        <header-file src="src/ios/TargetDirTest.h" target-dir="targetDir"/>
+
+        <source-file src="src/ios/ChildBrowserCommand.m" />
+        <source-file src="src/ios/ChildBrowserViewController.m" />
+        <source-file src="src/ios/preserveDirs/PreserveDirsTest.m" preserve-dirs="true" />
+        <header-file src="src/ios/TargetDirTest.m" target-dir="targetDir"/>
 
         <!-- framework for testing (not actual dependency of ChildBrowser -->
         <framework src="libsqlite3.dylib" />

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/b23eeb17/test/plugins/WebNotifications/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/WebNotifications/plugin.xml b/test/plugins/WebNotifications/plugin.xml
index 788173b..d6528a0 100644
--- a/test/plugins/WebNotifications/plugin.xml
+++ b/test/plugins/WebNotifications/plugin.xml
@@ -37,9 +37,9 @@
                 value="WebNotifications"/>
         </config-file>
 
-        <header-file src="WebNotifications.h" />
+        <header-file src="src/ios/WebNotifications.h" />
 
-        <source-file src="WebNotifications.m" />
+        <source-file src="src/ios/WebNotifications.m" />
 
     </platform>
 </plugin>


[21/54] [abbrv] git commit: updating force-install for ios-plist

Posted by ti...@apache.org.
updating force-install for ios-plist


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/a2fbc04f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/a2fbc04f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/a2fbc04f

Branch: refs/heads/future
Commit: a2fbc04f45a9e9e5853817b5dc81e9ce5ab8977b
Parents: 9f83ba2
Author: Anis Kadri <an...@apache.org>
Authored: Tue Apr 2 20:04:44 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Tue Apr 2 20:04:44 2013 -0700

----------------------------------------------------------------------
 test/ios-plist-install.js |   21 ++++++---------------
 1 files changed, 6 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/a2fbc04f/test/ios-plist-install.js
----------------------------------------------------------------------
diff --git a/test/ios-plist-install.js b/test/ios-plist-install.js
index 0c524d5..12e0791 100644
--- a/test/ios-plist-install.js
+++ b/test/ios-plist-install.js
@@ -34,6 +34,7 @@ var fs = require('fs')
 
   //, assetsDir = path.resolve(config.projectPath, 'www')
   , srcDir = path.resolve(test_project_dir, 'SampleApp/Plugins')
+  , wwwDir = path.resolve(test_project_dir, 'www')
   , resDir = path.resolve(test_project_dir, 'SampleApp/Resources');
 
 exports.setUp = function(callback) {
@@ -76,6 +77,7 @@ exports['should move the js file'] = function (test) {
 
     var jsPath = path.join(test_dir, 'projects', 'ios-plist', 'www', 'childbrowser.js');
     test.ok(fs.existsSync(jsPath));
+    test.ok(fs.statSync(jsPath).isFile());
     test.done();
 }
 
@@ -210,23 +212,12 @@ exports['should not install a plugin that is already installed'] = function (tes
 
 exports['should skip collision check when installation is forced'] = function (test) {
     ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    // deleting files because only presence in config.xml determines installation
+    shell.rm('-rf', srcDir + '/*');
+    shell.rm('-rf', resDir + '/*');
+    shell.rm('-rf', wwwDir + '/*');
     test.doesNotThrow(function(){ios.handlePlugin('force-install', test_project_dir, test_plugin_dir, plugin_et); }, 
                 /already installed/
                );
     test.done();
 }
-
-//exports['should revert changes when an error occurs'] = function (test) {
-//    var faulty_plugin_dir = path.join(test_dir, 'plugins', 'FaultyPlugin')
-//    var faulty_xml_path = path.join(test_dir, 'plugins', 'FaultyPlugin', 'plugin.xml')
-//    var faulty_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(faulty_xml_path, 'utf-8')));
-//    
-//    var project_dir = path.join(test_dir, 'projects', 'ios-new-config-xml')
-//    
-//    ios.handlePlugin('install', project_dir, faulty_plugin_dir, faulty_plugin_et, { APP_ID: 12345 });
-//
-//    test.throws(function(){ios.handlePlugin('install', project_dir, test_plugin_dir, plugin_et); }, 
-//                /already installed/
-//               );
-//    test.done();
-//}


[05/54] [abbrv] renamed blackberry assets

Posted by ti...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json_reader.cpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json_reader.cpp b/test/plugins/cordova.echo/src/BlackBerry10/public/json_reader.cpp
deleted file mode 100644
index e5f1749..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json_reader.cpp
+++ /dev/null
@@ -1,913 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#include <json/reader.h>
-#include <json/value.h>
-#include <utility>
-#include <cstdio>
-#include <cassert>
-#include <cstring>
-#include <iostream>
-#include <stdexcept>
-
-#if _MSC_VER >= 1400 // VC++ 8.0
-#pragma warning( disable : 4996 )   // disable warning about strdup being deprecated.
-#endif
-
-namespace Json {
-
-// QNX is strict about declaring C symbols in the std namespace.
-#ifdef __QNXNTO__
-using std::memcpy;
-using std::sprintf;
-using std::sscanf;
-#endif
-
-// Implementation of class Features
-// ////////////////////////////////
-
-Features::Features()
-   : allowComments_( true )
-   , strictRoot_( false )
-{
-}
-
-
-Features 
-Features::all()
-{
-   return Features();
-}
-
-
-Features 
-Features::strictMode()
-{
-   Features features;
-   features.allowComments_ = false;
-   features.strictRoot_ = true;
-   return features;
-}
-
-// Implementation of class Reader
-// ////////////////////////////////
-
-
-static inline bool 
-in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4 )
-{
-   return c == c1  ||  c == c2  ||  c == c3  ||  c == c4;
-}
-
-static inline bool 
-in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4, Reader::Char c5 )
-{
-   return c == c1  ||  c == c2  ||  c == c3  ||  c == c4  ||  c == c5;
-}
-
-
-static bool 
-containsNewLine( Reader::Location begin, 
-                 Reader::Location end )
-{
-   for ( ;begin < end; ++begin )
-      if ( *begin == '\n'  ||  *begin == '\r' )
-         return true;
-   return false;
-}
-
-static std::string codePointToUTF8(unsigned int cp)
-{
-   std::string result;
-   
-   // based on description from http://en.wikipedia.org/wiki/UTF-8
-
-   if (cp <= 0x7f) 
-   {
-      result.resize(1);
-      result[0] = static_cast<char>(cp);
-   } 
-   else if (cp <= 0x7FF) 
-   {
-      result.resize(2);
-      result[1] = static_cast<char>(0x80 | (0x3f & cp));
-      result[0] = static_cast<char>(0xC0 | (0x1f & (cp >> 6)));
-   } 
-   else if (cp <= 0xFFFF) 
-   {
-      result.resize(3);
-      result[2] = static_cast<char>(0x80 | (0x3f & cp));
-      result[1] = 0x80 | static_cast<char>((0x3f & (cp >> 6)));
-      result[0] = 0xE0 | static_cast<char>((0xf & (cp >> 12)));
-   }
-   else if (cp <= 0x10FFFF) 
-   {
-      result.resize(4);
-      result[3] = static_cast<char>(0x80 | (0x3f & cp));
-      result[2] = static_cast<char>(0x80 | (0x3f & (cp >> 6)));
-      result[1] = static_cast<char>(0x80 | (0x3f & (cp >> 12)));
-      result[0] = static_cast<char>(0xF0 | (0x7 & (cp >> 18)));
-   }
-
-   return result;
-}
-
-
-// Class Reader
-// //////////////////////////////////////////////////////////////////
-
-Reader::Reader()
-   : features_( Features::all() )
-{
-}
-
-
-Reader::Reader( const Features &features )
-   : features_( features )
-{
-}
-
-
-bool
-Reader::parse( const std::string &document, 
-               Value &root,
-               bool collectComments )
-{
-   document_ = document;
-   const char *begin = document_.c_str();
-   const char *end = begin + document_.length();
-   return parse( begin, end, root, collectComments );
-}
-
-
-bool
-Reader::parse( std::istream& sin,
-               Value &root,
-               bool collectComments )
-{
-   //std::istream_iterator<char> begin(sin);
-   //std::istream_iterator<char> end;
-   // Those would allow streamed input from a file, if parse() were a
-   // template function.
-
-   // Since std::string is reference-counted, this at least does not
-   // create an extra copy.
-   std::string doc;
-   std::getline(sin, doc, (char)EOF);
-   return parse( doc, root, collectComments );
-}
-
-bool 
-Reader::parse( const char *beginDoc, const char *endDoc, 
-               Value &root,
-               bool collectComments )
-{
-   if ( !features_.allowComments_ )
-   {
-      collectComments = false;
-   }
-
-   begin_ = beginDoc;
-   end_ = endDoc;
-   collectComments_ = collectComments;
-   current_ = begin_;
-   lastValueEnd_ = 0;
-   lastValue_ = 0;
-   commentsBefore_ = "";
-   errors_.clear();
-   while ( !nodes_.empty() )
-      nodes_.pop();
-   nodes_.push( &root );
-   
-   bool successful = readValue();
-   Token token;
-   skipCommentTokens( token );
-   if ( collectComments_  &&  !commentsBefore_.empty() )
-      root.setComment( commentsBefore_, commentAfter );
-   if ( features_.strictRoot_ )
-   {
-      if ( !root.isArray()  &&  !root.isObject() )
-      {
-         // Set error location to start of doc, ideally should be first token found in doc
-         token.type_ = tokenError;
-         token.start_ = beginDoc;
-         token.end_ = endDoc;
-         addError( "A valid JSON document must be either an array or an object value.",
-                   token );
-         return false;
-      }
-   }
-   return successful;
-}
-
-
-bool
-Reader::readValue()
-{
-   Token token;
-   skipCommentTokens( token );
-   bool successful = true;
-
-   if ( collectComments_  &&  !commentsBefore_.empty() )
-   {
-      currentValue().setComment( commentsBefore_, commentBefore );
-      commentsBefore_ = "";
-   }
-
-
-   switch ( token.type_ )
-   {
-   case tokenObjectBegin:
-      successful = readObject( token );
-      break;
-   case tokenArrayBegin:
-      successful = readArray( token );
-      break;
-   case tokenNumber:
-      successful = decodeNumber( token );
-      break;
-   case tokenString:
-      successful = decodeString( token );
-      break;
-   case tokenTrue:
-      currentValue() = true;
-      break;
-   case tokenFalse:
-      currentValue() = false;
-      break;
-   case tokenNull:
-      currentValue() = Value();
-      break;
-   default:
-      return addError( "Syntax error: value, object or array expected.", token );
-   }
-
-   if ( collectComments_ )
-   {
-      lastValueEnd_ = current_;
-      lastValue_ = &currentValue();
-   }
-
-   return successful;
-}
-
-
-void 
-Reader::skipCommentTokens( Token &token )
-{
-   if ( features_.allowComments_ )
-   {
-      do
-      {
-         readToken( token );
-      }
-      while ( token.type_ == tokenComment );
-   }
-   else
-   {
-      readToken( token );
-   }
-}
-
-
-bool 
-Reader::expectToken( TokenType type, Token &token, const char *message )
-{
-   readToken( token );
-   if ( token.type_ != type )
-      return addError( message, token );
-   return true;
-}
-
-
-bool 
-Reader::readToken( Token &token )
-{
-   skipSpaces();
-   token.start_ = current_;
-   Char c = getNextChar();
-   bool ok = true;
-   switch ( c )
-   {
-   case '{':
-      token.type_ = tokenObjectBegin;
-      break;
-   case '}':
-      token.type_ = tokenObjectEnd;
-      break;
-   case '[':
-      token.type_ = tokenArrayBegin;
-      break;
-   case ']':
-      token.type_ = tokenArrayEnd;
-      break;
-   case '"':
-      token.type_ = tokenString;
-      ok = readString();
-      break;
-   case '/':
-      token.type_ = tokenComment;
-      ok = readComment();
-      break;
-   case '0':
-   case '1':
-   case '2':
-   case '3':
-   case '4':
-   case '5':
-   case '6':
-   case '7':
-   case '8':
-   case '9':
-   case '-':
-      token.type_ = tokenNumber;
-      readNumber();
-      break;
-   case 't':
-      token.type_ = tokenTrue;
-      ok = match( "rue", 3 );
-      break;
-   case 'f':
-      token.type_ = tokenFalse;
-      ok = match( "alse", 4 );
-      break;
-   case 'n':
-      token.type_ = tokenNull;
-      ok = match( "ull", 3 );
-      break;
-   case ',':
-      token.type_ = tokenArraySeparator;
-      break;
-   case ':':
-      token.type_ = tokenMemberSeparator;
-      break;
-   case 0:
-      token.type_ = tokenEndOfStream;
-      break;
-   default:
-      ok = false;
-      break;
-   }
-   if ( !ok )
-      token.type_ = tokenError;
-   token.end_ = current_;
-   return true;
-}
-
-
-void 
-Reader::skipSpaces()
-{
-   while ( current_ != end_ )
-   {
-      Char c = *current_;
-      if ( c == ' '  ||  c == '\t'  ||  c == '\r'  ||  c == '\n' )
-         ++current_;
-      else
-         break;
-   }
-}
-
-
-bool 
-Reader::match( Location pattern, 
-               int patternLength )
-{
-   if ( end_ - current_ < patternLength )
-      return false;
-   int index = patternLength;
-   while ( index-- )
-      if ( current_[index] != pattern[index] )
-         return false;
-   current_ += patternLength;
-   return true;
-}
-
-
-bool
-Reader::readComment()
-{
-   Location commentBegin = current_ - 1;
-   Char c = getNextChar();
-   bool successful = false;
-   if ( c == '*' )
-      successful = readCStyleComment();
-   else if ( c == '/' )
-      successful = readCppStyleComment();
-   if ( !successful )
-      return false;
-
-   if ( collectComments_ )
-   {
-      CommentPlacement placement = commentBefore;
-      if ( lastValueEnd_  &&  !containsNewLine( lastValueEnd_, commentBegin ) )
-      {
-         if ( c != '*'  ||  !containsNewLine( commentBegin, current_ ) )
-            placement = commentAfterOnSameLine;
-      }
-
-      addComment( commentBegin, current_, placement );
-   }
-   return true;
-}
-
-
-void 
-Reader::addComment( Location begin, 
-                    Location end, 
-                    CommentPlacement placement )
-{
-   assert( collectComments_ );
-   if ( placement == commentAfterOnSameLine )
-   {
-      assert( lastValue_ != 0 );
-      lastValue_->setComment( std::string( begin, end ), placement );
-   }
-   else
-   {
-      if ( !commentsBefore_.empty() )
-         commentsBefore_ += "\n";
-      commentsBefore_ += std::string( begin, end );
-   }
-}
-
-
-bool 
-Reader::readCStyleComment()
-{
-   while ( current_ != end_ )
-   {
-      Char c = getNextChar();
-      if ( c == '*'  &&  *current_ == '/' )
-         break;
-   }
-   return getNextChar() == '/';
-}
-
-
-bool 
-Reader::readCppStyleComment()
-{
-   while ( current_ != end_ )
-   {
-      Char c = getNextChar();
-      if (  c == '\r'  ||  c == '\n' )
-         break;
-   }
-   return true;
-}
-
-
-void 
-Reader::readNumber()
-{
-   while ( current_ != end_ )
-   {
-      if ( !(*current_ >= '0'  &&  *current_ <= '9')  &&
-           !in( *current_, '.', 'e', 'E', '+', '-' ) )
-         break;
-      ++current_;
-   }
-}
-
-bool
-Reader::readString()
-{
-   Char c = 0;
-   while ( current_ != end_ )
-   {
-      c = getNextChar();
-      if ( c == '\\' )
-         getNextChar();
-      else if ( c == '"' )
-         break;
-   }
-   return c == '"';
-}
-
-
-bool 
-Reader::readObject( Token &tokenStart )
-{
-   Token tokenName;
-   Token something = tokenStart;
-   std::string name;
-   currentValue() = Value( objectValue );
-   while ( readToken( tokenName ) )
-   {
-      bool initialTokenOk = true;
-      while ( tokenName.type_ == tokenComment  &&  initialTokenOk )
-         initialTokenOk = readToken( tokenName );
-      if  ( !initialTokenOk )
-         break;
-      if ( tokenName.type_ == tokenObjectEnd  &&  name.empty() )  // empty object
-         return true;
-      if ( tokenName.type_ != tokenString )
-         break;
-      
-      name = "";
-      if ( !decodeString( tokenName, name ) )
-         return recoverFromError( tokenObjectEnd );
-
-      Token colon;
-      if ( !readToken( colon ) ||  colon.type_ != tokenMemberSeparator )
-      {
-         return addErrorAndRecover( "Missing ':' after object member name", 
-                                    colon, 
-                                    tokenObjectEnd );
-      }
-      Value &value = currentValue()[ name ];
-      nodes_.push( &value );
-      bool ok = readValue();
-      nodes_.pop();
-      if ( !ok ) // error already set
-         return recoverFromError( tokenObjectEnd );
-
-      Token comma;
-      if ( !readToken( comma )
-            ||  ( comma.type_ != tokenObjectEnd  &&  
-                  comma.type_ != tokenArraySeparator &&
-		  comma.type_ != tokenComment ) )
-      {
-         return addErrorAndRecover( "Missing ',' or '}' in object declaration", 
-                                    comma, 
-                                    tokenObjectEnd );
-      }
-      bool finalizeTokenOk = true;
-      while ( comma.type_ == tokenComment &&
-              finalizeTokenOk )
-         finalizeTokenOk = readToken( comma );
-      if ( comma.type_ == tokenObjectEnd )
-         return true;
-   }
-   return addErrorAndRecover( "Missing '}' or object member name", 
-                              tokenName, 
-                              tokenObjectEnd );
-}
-
-
-bool 
-Reader::readArray( Token &tokenStart )
-{
-   Token something = tokenStart;
-   currentValue() = Value( arrayValue );
-   skipSpaces();
-   if ( *current_ == ']' ) // empty array
-   {
-      Token endArray;
-      readToken( endArray );
-      return true;
-   }
-   int index = 0;
-   while ( true )
-   {
-      Value &value = currentValue()[ index++ ];
-      nodes_.push( &value );
-      bool ok = readValue();
-      nodes_.pop();
-      if ( !ok ) // error already set
-         return recoverFromError( tokenArrayEnd );
-
-      Token token;
-      // Accept Comment after last item in the array.
-      ok = readToken( token );
-      while ( token.type_ == tokenComment  &&  ok )
-      {
-         ok = readToken( token );
-      }
-      bool badTokenType = ( token.type_ == tokenArraySeparator  &&  
-                            token.type_ == tokenArrayEnd );
-      if ( !ok  ||  badTokenType )
-      {
-         return addErrorAndRecover( "Missing ',' or ']' in array declaration", 
-                                    token, 
-                                    tokenArrayEnd );
-      }
-      if ( token.type_ == tokenArrayEnd )
-         break;
-   }
-   return true;
-}
-
-
-bool 
-Reader::decodeNumber( Token &token )
-{
-   bool isDouble = false;
-   for ( Location inspect = token.start_; inspect != token.end_; ++inspect )
-   {
-      isDouble = isDouble  
-                 ||  in( *inspect, '.', 'e', 'E', '+' )  
-                 ||  ( *inspect == '-'  &&  inspect != token.start_ );
-   }
-   if ( isDouble )
-      return decodeDouble( token );
-   Location current = token.start_;
-   bool isNegative = *current == '-';
-   if ( isNegative )
-      ++current;
-   Value::UInt threshold = (isNegative ? Value::UInt(-Value::minInt) 
-                                       : Value::maxUInt) / 10;
-   Value::UInt value = 0;
-   while ( current < token.end_ )
-   {
-      Char c = *current++;
-      if ( c < '0'  ||  c > '9' )
-         return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
-      if ( value >= threshold )
-         return decodeDouble( token );
-      value = value * 10 + Value::UInt(c - '0');
-   }
-   if ( isNegative )
-      currentValue() = -Value::Int( value );
-   else if ( value <= Value::UInt(Value::maxInt) )
-      currentValue() = Value::Int( value );
-   else
-      currentValue() = value;
-   return true;
-}
-
-
-bool 
-Reader::decodeDouble( Token &token )
-{
-   double value = 0;
-   const int bufferSize = 32;
-   int count;
-   int length = int(token.end_ - token.start_);
-   if ( length <= bufferSize )
-   {
-      Char buffer[bufferSize];
-      memcpy( buffer, token.start_, length );
-      buffer[length] = 0;
-      count = sscanf( buffer, "%lf", &value );
-   }
-   else
-   {
-      std::string buffer( token.start_, token.end_ );
-      count = sscanf( buffer.c_str(), "%lf", &value );
-   }
-
-   if ( count != 1 )
-      return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token );
-   currentValue() = value;
-   return true;
-}
-
-
-bool 
-Reader::decodeString( Token &token )
-{
-   std::string decoded;
-   if ( !decodeString( token, decoded ) )
-      return false;
-   currentValue() = decoded;
-   return true;
-}
-
-
-bool 
-Reader::decodeString( Token &token, std::string &decoded )
-{
-   decoded.reserve( token.end_ - token.start_ - 2 );
-   Location current = token.start_ + 1; // skip '"'
-   Location end = token.end_ - 1;      // do not include '"'
-   while ( current != end )
-   {
-      Char c = *current++;
-      if ( c == '"' )
-         break;
-      else if ( c == '\\' )
-      {
-         if ( current == end )
-            return addError( "Empty escape sequence in string", token, current );
-         Char escape = *current++;
-         switch ( escape )
-         {
-         case '"': decoded += '"'; break;
-         case '/': decoded += '/'; break;
-         case '\\': decoded += '\\'; break;
-         case 'b': decoded += '\b'; break;
-         case 'f': decoded += '\f'; break;
-         case 'n': decoded += '\n'; break;
-         case 'r': decoded += '\r'; break;
-         case 't': decoded += '\t'; break;
-         case 'u':
-            {
-               unsigned int unicode;
-               if ( !decodeUnicodeCodePoint( token, current, end, unicode ) )
-                  return false;
-               decoded += codePointToUTF8(unicode);
-            }
-            break;
-         default:
-            return addError( "Bad escape sequence in string", token, current );
-         }
-      }
-      else
-      {
-         decoded += c;
-      }
-   }
-   return true;
-}
-
-bool
-Reader::decodeUnicodeCodePoint( Token &token, 
-                                     Location &current, 
-                                     Location end, 
-                                     unsigned int &unicode )
-{
-
-   if ( !decodeUnicodeEscapeSequence( token, current, end, unicode ) )
-      return false;
-   if (unicode >= 0xD800 && unicode <= 0xDBFF)
-   {
-      // surrogate pairs
-      if (end - current < 6)
-         return addError( "additional six characters expected to parse unicode surrogate pair.", token, current );
-      unsigned int surrogatePair;
-      if (*(current++) == '\\' && *(current++)== 'u')
-      {
-         if (decodeUnicodeEscapeSequence( token, current, end, surrogatePair ))
-         {
-            unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF);
-         } 
-         else
-            return false;
-      } 
-      else
-         return addError( "expecting another \\u token to begin the second half of a unicode surrogate pair", token, current );
-   }
-   return true;
-}
-
-bool 
-Reader::decodeUnicodeEscapeSequence( Token &token, 
-                                     Location &current, 
-                                     Location end, 
-                                     unsigned int &unicode )
-{
-   if ( end - current < 4 )
-      return addError( "Bad unicode escape sequence in string: four digits expected.", token, current );
-   unicode = 0;
-   for ( int index =0; index < 4; ++index )
-   {
-      Char c = *current++;
-      unicode *= 16;
-      if ( c >= '0'  &&  c <= '9' )
-         unicode += c - '0';
-      else if ( c >= 'a'  &&  c <= 'f' )
-         unicode += c - 'a' + 10;
-      else if ( c >= 'A'  &&  c <= 'F' )
-         unicode += c - 'A' + 10;
-      else
-         return addError( "Bad unicode escape sequence in string: hexadecimal digit expected.", token, current );
-   }
-   return true;
-}
-
-
-bool 
-Reader::addError( const std::string &message, 
-                  Token &token,
-                  Location extra )
-{
-   ErrorInfo info;
-   info.token_ = token;
-   info.message_ = message;
-   info.extra_ = extra;
-   errors_.push_back( info );
-   return false;
-}
-
-
-bool 
-Reader::recoverFromError( TokenType skipUntilToken )
-{
-   int errorCount = int(errors_.size());
-   Token skip;
-   while ( true )
-   {
-      if ( !readToken(skip) )
-         errors_.resize( errorCount ); // discard errors caused by recovery
-      if ( skip.type_ == skipUntilToken  ||  skip.type_ == tokenEndOfStream )
-         break;
-   }
-   errors_.resize( errorCount );
-   return false;
-}
-
-
-bool 
-Reader::addErrorAndRecover( const std::string &message, 
-                            Token &token,
-                            TokenType skipUntilToken )
-{
-   addError( message, token );
-   return recoverFromError( skipUntilToken );
-}
-
-
-Value &
-Reader::currentValue()
-{
-   return *(nodes_.top());
-}
-
-
-Reader::Char 
-Reader::getNextChar()
-{
-   if ( current_ == end_ )
-      return 0;
-   return *current_++;
-}
-
-
-void 
-Reader::getLocationLineAndColumn( Location location,
-                                  int &line,
-                                  int &column ) const
-{
-   Location current = begin_;
-   Location lastLineStart = current;
-   line = 0;
-   while ( current < location  &&  current != end_ )
-   {
-      Char c = *current++;
-      if ( c == '\r' )
-      {
-         if ( *current == '\n' )
-            ++current;
-         lastLineStart = current;
-         ++line;
-      }
-      else if ( c == '\n' )
-      {
-         lastLineStart = current;
-         ++line;
-      }
-   }
-   // column & line start at 1
-   column = int(location - lastLineStart) + 1;
-   ++line;
-}
-
-
-std::string
-Reader::getLocationLineAndColumn( Location location ) const
-{
-   int line, column;
-   getLocationLineAndColumn( location, line, column );
-   char buffer[18+16+16+1];
-   sprintf( buffer, "Line %d, Column %d", line, column );
-   return buffer;
-}
-
-
-std::string 
-Reader::getFormatedErrorMessages() const
-{
-   std::string formattedMessage;
-   for ( Errors::const_iterator itError = errors_.begin();
-         itError != errors_.end();
-         ++itError )
-   {
-      const ErrorInfo &error = *itError;
-      formattedMessage += "* " + getLocationLineAndColumn( error.token_.start_ ) + "\n";
-      formattedMessage += "  " + error.message_ + "\n";
-      if ( error.extra_ )
-         formattedMessage += "See " + getLocationLineAndColumn( error.extra_ ) + " for detail.\n";
-   }
-   return formattedMessage;
-}
-
-
-std::istream& operator>>( std::istream &sin, Value &root )
-{
-    Json::Reader reader;
-    bool ok = reader.parse(sin, root, true);
-    //JSON_ASSERT( ok );
-    if (!ok) throw std::runtime_error(reader.getFormatedErrorMessages());
-    return sin;
-}
-
-
-} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json_value.cpp
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json_value.cpp b/test/plugins/cordova.echo/src/BlackBerry10/public/json_value.cpp
deleted file mode 100644
index a25e4b9..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json_value.cpp
+++ /dev/null
@@ -1,1745 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#include <iostream>
-#include <json/value.h>
-#include <json/writer.h>
-#include <utility>
-#include <stdexcept>
-#include <cstring>
-#include <cassert>
-#ifdef JSON_USE_CPPTL
-# include <cpptl/conststring.h>
-#endif
-#include <cstddef>    // size_t
-#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-# include "json_batchallocator.h"
-#endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-
-#define JSON_ASSERT_UNREACHABLE assert( false )
-#define JSON_ASSERT( condition ) assert( condition );  // @todo <= change this into an exception throw
-#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) throw std::runtime_error( message );
-
-namespace Json {
-
-// QNX is strict about declaring C symbols in the std namespace.
-#ifdef __QNXNTO__
-using std::memcpy;
-using std::strchr;
-using std::strcmp;
-using std::strlen;
-#endif
-
-const Value Value::null;
-const Int Value::minInt = Int( ~(UInt(-1)/2) );
-const Int Value::maxInt = Int( UInt(-1)/2 );
-const UInt Value::maxUInt = UInt(-1);
-
-// A "safe" implementation of strdup. Allow null pointer to be passed. 
-// Also avoid warning on msvc80.
-//
-//inline char *safeStringDup( const char *czstring )
-//{
-//   if ( czstring )
-//   {
-//      const size_t length = (unsigned int)( strlen(czstring) + 1 );
-//      char *newString = static_cast<char *>( malloc( length ) );
-//      memcpy( newString, czstring, length );
-//      return newString;
-//   }
-//   return 0;
-//}
-//
-//inline char *safeStringDup( const std::string &str )
-//{
-//   if ( !str.empty() )
-//   {
-//      const size_t length = str.length();
-//      char *newString = static_cast<char *>( malloc( length + 1 ) );
-//      memcpy( newString, str.c_str(), length );
-//      newString[length] = 0;
-//      return newString;
-//   }
-//   return 0;
-//}
-
-ValueAllocator::~ValueAllocator()
-{
-}
-
-class DefaultValueAllocator : public ValueAllocator
-{
-public:
-   virtual ~DefaultValueAllocator()
-   {
-   }
-
-   virtual char *makeMemberName( const char *memberName )
-   {
-      return duplicateStringValue( memberName );
-   }
-
-   virtual void releaseMemberName( char *memberName )
-   {
-      releaseStringValue( memberName );
-   }
-
-   virtual char *duplicateStringValue( const char *value, 
-                                       unsigned int length = unknown )
-   {
-      //@todo invesgate this old optimization
-      //if ( !value  ||  value[0] == 0 )
-      //   return 0;
-
-      if ( length == unknown )
-         length = (unsigned int)strlen(value);
-      char *newString = static_cast<char *>( malloc( length + 1 ) );
-      memcpy( newString, value, length );
-      newString[length] = 0;
-      return newString;
-   }
-
-   virtual void releaseStringValue( char *value )
-   {
-      if ( value )
-         free( value );
-   }
-};
-
-static ValueAllocator *&valueAllocator()
-{
-   static DefaultValueAllocator defaultAllocator;
-   static ValueAllocator *valueAllocator = &defaultAllocator;
-   return valueAllocator;
-}
-
-static struct DummyValueAllocatorInitializer {
-   DummyValueAllocatorInitializer() 
-   {
-      valueAllocator();      // ensure valueAllocator() statics are initialized before main().
-   }
-} dummyValueAllocatorInitializer;
-
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// ValueInternals...
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-# include "json_internalarray.inl"
-# include "json_internalmap.inl"
-#endif // JSON_VALUE_USE_INTERNAL_MAP
-
-# include "json_valueiterator.inl"
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class Value::CommentInfo
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-
-Value::CommentInfo::CommentInfo()
-   : comment_( 0 )
-{
-}
-
-Value::CommentInfo::~CommentInfo()
-{
-   if ( comment_ )
-      valueAllocator()->releaseStringValue( comment_ );
-}
-
-
-void 
-Value::CommentInfo::setComment( const char *text )
-{
-   if ( comment_ )
-      valueAllocator()->releaseStringValue( comment_ );
-   JSON_ASSERT( text );
-   JSON_ASSERT_MESSAGE( text[0]=='\0' || text[0]=='/', "Comments must start with /");
-   // It seems that /**/ style comments are acceptable as well.
-   comment_ = valueAllocator()->duplicateStringValue( text );
-}
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class Value::CZString
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-# ifndef JSON_VALUE_USE_INTERNAL_MAP
-
-// Notes: index_ indicates if the string was allocated when
-// a string is stored.
-
-Value::CZString::CZString( int index )
-   : cstr_( 0 )
-   , index_( index )
-{
-}
-
-Value::CZString::CZString( const char *cstr, DuplicationPolicy allocate )
-   : cstr_( allocate == duplicate ? valueAllocator()->makeMemberName(cstr) 
-                                  : cstr )
-   , index_( allocate )
-{
-}
-
-Value::CZString::CZString( const CZString &other )
-: cstr_( other.index_ != noDuplication &&  other.cstr_ != 0
-                ?  valueAllocator()->makeMemberName( other.cstr_ )
-                : other.cstr_ )
-   , index_( other.cstr_ ? (other.index_ == noDuplication ? noDuplication : duplicate)
-                         : other.index_ )
-{
-}
-
-Value::CZString::~CZString()
-{
-   if ( cstr_  &&  index_ == duplicate )
-      valueAllocator()->releaseMemberName( const_cast<char *>( cstr_ ) );
-}
-
-void 
-Value::CZString::swap( CZString &other )
-{
-   std::swap( cstr_, other.cstr_ );
-   std::swap( index_, other.index_ );
-}
-
-Value::CZString &
-Value::CZString::operator =( const CZString &other )
-{
-   CZString temp( other );
-   swap( temp );
-   return *this;
-}
-
-bool 
-Value::CZString::operator<( const CZString &other ) const 
-{
-   if ( cstr_ )
-      return strcmp( cstr_, other.cstr_ ) < 0;
-   return index_ < other.index_;
-}
-
-bool 
-Value::CZString::operator==( const CZString &other ) const 
-{
-   if ( cstr_ )
-      return strcmp( cstr_, other.cstr_ ) == 0;
-   return index_ == other.index_;
-}
-
-
-int 
-Value::CZString::index() const
-{
-   return index_;
-}
-
-
-const char *
-Value::CZString::c_str() const
-{
-   return cstr_;
-}
-
-bool 
-Value::CZString::isStaticString() const
-{
-   return index_ == noDuplication;
-}
-
-#endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class Value::Value
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-/*! \internal Default constructor initialization must be equivalent to:
- * memset( this, 0, sizeof(Value) )
- * This optimization is used in ValueInternalMap fast allocator.
- */
-Value::Value( ValueType type )
-   : type_( type )
-   , allocated_( 0 )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   switch ( type )
-   {
-   case nullValue:
-      break;
-   case intValue:
-   case uintValue:
-      value_.int_ = 0;
-      break;
-   case realValue:
-      value_.real_ = 0.0;
-      break;
-   case stringValue:
-      value_.string_ = 0;
-      break;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      value_.map_ = new ObjectValues();
-      break;
-#else
-   case arrayValue:
-      value_.array_ = arrayAllocator()->newArray();
-      break;
-   case objectValue:
-      value_.map_ = mapAllocator()->newMap();
-      break;
-#endif
-   case booleanValue:
-      value_.bool_ = false;
-      break;
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-}
-
-
-Value::Value( Int value )
-   : type_( intValue )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.int_ = value;
-}
-
-
-Value::Value( UInt value )
-   : type_( uintValue )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.uint_ = value;
-}
-
-Value::Value( double value )
-   : type_( realValue )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.real_ = value;
-}
-
-Value::Value( const char *value )
-   : type_( stringValue )
-   , allocated_( true )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = valueAllocator()->duplicateStringValue( value );
-}
-
-
-Value::Value( const char *beginValue, 
-              const char *endValue )
-   : type_( stringValue )
-   , allocated_( true )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = valueAllocator()->duplicateStringValue( beginValue, 
-                                                            UInt(endValue - beginValue) );
-}
-
-
-Value::Value( const std::string &value )
-   : type_( stringValue )
-   , allocated_( true )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = valueAllocator()->duplicateStringValue( value.c_str(), 
-                                                            (unsigned int)value.length() );
-
-}
-
-Value::Value( const StaticString &value )
-   : type_( stringValue )
-   , allocated_( false )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = const_cast<char *>( value.c_str() );
-}
-
-
-# ifdef JSON_USE_CPPTL
-Value::Value( const CppTL::ConstString &value )
-   : type_( stringValue )
-   , allocated_( true )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.string_ = valueAllocator()->duplicateStringValue( value, value.length() );
-}
-# endif
-
-Value::Value( bool value )
-   : type_( booleanValue )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   value_.bool_ = value;
-}
-
-
-Value::Value( const Value &other )
-   : type_( other.type_ )
-   , comments_( 0 )
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-   , itemIsUsed_( 0 )
-#endif
-{
-   switch ( type_ )
-   {
-   case nullValue:
-   case intValue:
-   case uintValue:
-   case realValue:
-   case booleanValue:
-      value_ = other.value_;
-      break;
-   case stringValue:
-      if ( other.value_.string_ )
-      {
-         value_.string_ = valueAllocator()->duplicateStringValue( other.value_.string_ );
-         allocated_ = true;
-      }
-      else
-         value_.string_ = 0;
-      break;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      value_.map_ = new ObjectValues( *other.value_.map_ );
-      break;
-#else
-   case arrayValue:
-      value_.array_ = arrayAllocator()->newArrayCopy( *other.value_.array_ );
-      break;
-   case objectValue:
-      value_.map_ = mapAllocator()->newMapCopy( *other.value_.map_ );
-      break;
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   if ( other.comments_ )
-   {
-      comments_ = new CommentInfo[numberOfCommentPlacement];
-      for ( int comment =0; comment < numberOfCommentPlacement; ++comment )
-      {
-         const CommentInfo &otherComment = other.comments_[comment];
-         if ( otherComment.comment_ )
-            comments_[comment].setComment( otherComment.comment_ );
-      }
-   }
-}
-
-
-Value::~Value()
-{
-   switch ( type_ )
-   {
-   case nullValue:
-   case intValue:
-   case uintValue:
-   case realValue:
-   case booleanValue:
-      break;
-   case stringValue:
-      if ( allocated_ )
-         valueAllocator()->releaseStringValue( value_.string_ );
-      break;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      delete value_.map_;
-      break;
-#else
-   case arrayValue:
-      arrayAllocator()->destructArray( value_.array_ );
-      break;
-   case objectValue:
-      mapAllocator()->destructMap( value_.map_ );
-      break;
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-
-   if ( comments_ )
-      delete[] comments_;
-}
-
-Value &
-Value::operator=( const Value &other )
-{
-   Value temp( other );
-   swap( temp );
-   return *this;
-}
-
-void 
-Value::swap( Value &other )
-{
-   ValueType temp = type_;
-   type_ = other.type_;
-   other.type_ = temp;
-   std::swap( value_, other.value_ );
-   int temp2 = allocated_;
-   allocated_ = other.allocated_;
-   other.allocated_ = temp2;
-}
-
-ValueType 
-Value::type() const
-{
-   return type_;
-}
-
-
-int 
-Value::compare( const Value &other )
-{
-   /*
-   int typeDelta = other.type_ - type_;
-   switch ( type_ )
-   {
-   case nullValue:
-
-      return other.type_ == type_;
-   case intValue:
-      if ( other.type_.isNumeric()
-   case uintValue:
-   case realValue:
-   case booleanValue:
-      break;
-   case stringValue,
-      break;
-   case arrayValue:
-      delete value_.array_;
-      break;
-   case objectValue:
-      delete value_.map_;
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   */
-   return 0;  // unreachable
-}
-
-bool 
-Value::operator <( const Value &other ) const
-{
-   int typeDelta = type_ - other.type_;
-   if ( typeDelta )
-      return typeDelta < 0 ? true : false;
-   switch ( type_ )
-   {
-   case nullValue:
-      return false;
-   case intValue:
-      return value_.int_ < other.value_.int_;
-   case uintValue:
-      return value_.uint_ < other.value_.uint_;
-   case realValue:
-      return value_.real_ < other.value_.real_;
-   case booleanValue:
-      return value_.bool_ < other.value_.bool_;
-   case stringValue:
-      return ( value_.string_ == 0  &&  other.value_.string_ )
-             || ( other.value_.string_  
-                  &&  value_.string_  
-                  && strcmp( value_.string_, other.value_.string_ ) < 0 );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      {
-         int delta = int( value_.map_->size() - other.value_.map_->size() );
-         if ( delta )
-            return delta < 0;
-         return (*value_.map_) < (*other.value_.map_);
-      }
-#else
-   case arrayValue:
-      return value_.array_->compare( *(other.value_.array_) ) < 0;
-   case objectValue:
-      return value_.map_->compare( *(other.value_.map_) ) < 0;
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0;  // unreachable
-}
-
-bool 
-Value::operator <=( const Value &other ) const
-{
-   return !(other > *this);
-}
-
-bool 
-Value::operator >=( const Value &other ) const
-{
-   return !(*this < other);
-}
-
-bool 
-Value::operator >( const Value &other ) const
-{
-   return other < *this;
-}
-
-bool 
-Value::operator ==( const Value &other ) const
-{
-   //if ( type_ != other.type_ )
-   // GCC 2.95.3 says:
-   // attempt to take address of bit-field structure member `Json::Value::type_'
-   // Beats me, but a temp solves the problem.
-   int temp = other.type_;
-   if ( type_ != temp )
-      return false;
-   switch ( type_ )
-   {
-   case nullValue:
-      return true;
-   case intValue:
-      return value_.int_ == other.value_.int_;
-   case uintValue:
-      return value_.uint_ == other.value_.uint_;
-   case realValue:
-      return value_.real_ == other.value_.real_;
-   case booleanValue:
-      return value_.bool_ == other.value_.bool_;
-   case stringValue:
-      return ( value_.string_ == other.value_.string_ )
-             || ( other.value_.string_  
-                  &&  value_.string_  
-                  && strcmp( value_.string_, other.value_.string_ ) == 0 );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      return value_.map_->size() == other.value_.map_->size()
-             && (*value_.map_) == (*other.value_.map_);
-#else
-   case arrayValue:
-      return value_.array_->compare( *(other.value_.array_) ) == 0;
-   case objectValue:
-      return value_.map_->compare( *(other.value_.map_) ) == 0;
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0;  // unreachable
-}
-
-bool 
-Value::operator !=( const Value &other ) const
-{
-   return !( *this == other );
-}
-
-const char *
-Value::asCString() const
-{
-   JSON_ASSERT( type_ == stringValue );
-   return value_.string_;
-}
-
-
-std::string 
-Value::asString() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return "";
-   case stringValue:
-      return value_.string_ ? value_.string_ : "";
-   case booleanValue:
-      return value_.bool_ ? "true" : "false";
-   case intValue:
-   case uintValue:
-   case realValue:
-   case arrayValue:
-   case objectValue:
-      JSON_ASSERT_MESSAGE( false, "Type is not convertible to string" );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return ""; // unreachable
-}
-
-# ifdef JSON_USE_CPPTL
-CppTL::ConstString 
-Value::asConstString() const
-{
-   return CppTL::ConstString( asString().c_str() );
-}
-# endif
-
-Value::Int 
-Value::asInt() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return 0;
-   case intValue:
-      return value_.int_;
-   case uintValue:
-      JSON_ASSERT_MESSAGE( value_.uint_ < (unsigned)maxInt, "integer out of signed integer range" );
-      return value_.uint_;
-   case realValue:
-      JSON_ASSERT_MESSAGE( value_.real_ >= minInt  &&  value_.real_ <= maxInt, "Real out of signed integer range" );
-      return Int( value_.real_ );
-   case booleanValue:
-      return value_.bool_ ? 1 : 0;
-   case stringValue:
-   case arrayValue:
-   case objectValue:
-      JSON_ASSERT_MESSAGE( false, "Type is not convertible to int" );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0; // unreachable;
-}
-
-Value::UInt 
-Value::asUInt() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return 0;
-   case intValue:
-      JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to unsigned integer" );
-      return value_.int_;
-   case uintValue:
-      return value_.uint_;
-   case realValue:
-      JSON_ASSERT_MESSAGE( value_.real_ >= 0  &&  value_.real_ <= maxUInt,  "Real out of unsigned integer range" );
-      return UInt( value_.real_ );
-   case booleanValue:
-      return value_.bool_ ? 1 : 0;
-   case stringValue:
-   case arrayValue:
-   case objectValue:
-      JSON_ASSERT_MESSAGE( false, "Type is not convertible to uint" );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0; // unreachable;
-}
-
-double 
-Value::asDouble() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return 0.0;
-   case intValue:
-      return value_.int_;
-   case uintValue:
-      return value_.uint_;
-   case realValue:
-      return value_.real_;
-   case booleanValue:
-      return value_.bool_ ? 1.0 : 0.0;
-   case stringValue:
-   case arrayValue:
-   case objectValue:
-      JSON_ASSERT_MESSAGE( false, "Type is not convertible to double" );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0; // unreachable;
-}
-
-bool 
-Value::asBool() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return false;
-   case intValue:
-   case uintValue:
-      return value_.int_ != 0;
-   case realValue:
-      return value_.real_ != 0.0;
-   case booleanValue:
-      return value_.bool_;
-   case stringValue:
-      return value_.string_  &&  value_.string_[0] != 0;
-   case arrayValue:
-   case objectValue:
-      return value_.map_->size() != 0;
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return false; // unreachable;
-}
-
-
-bool 
-Value::isConvertibleTo( ValueType other ) const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-      return true;
-   case intValue:
-      return ( other == nullValue  &&  value_.int_ == 0 )
-             || other == intValue
-             || ( other == uintValue  && value_.int_ >= 0 )
-             || other == realValue
-             || other == stringValue
-             || other == booleanValue;
-   case uintValue:
-      return ( other == nullValue  &&  value_.uint_ == 0 )
-             || ( other == intValue  && value_.uint_ <= (unsigned)maxInt )
-             || other == uintValue
-             || other == realValue
-             || other == stringValue
-             || other == booleanValue;
-   case realValue:
-      return ( other == nullValue  &&  value_.real_ == 0.0 )
-             || ( other == intValue  &&  value_.real_ >= minInt  &&  value_.real_ <= maxInt )
-             || ( other == uintValue  &&  value_.real_ >= 0  &&  value_.real_ <= maxUInt )
-             || other == realValue
-             || other == stringValue
-             || other == booleanValue;
-   case booleanValue:
-      return ( other == nullValue  &&  value_.bool_ == false )
-             || other == intValue
-             || other == uintValue
-             || other == realValue
-             || other == stringValue
-             || other == booleanValue;
-   case stringValue:
-      return other == stringValue
-             || ( other == nullValue  &&  (!value_.string_  ||  value_.string_[0] == 0) );
-   case arrayValue:
-      return other == arrayValue
-             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
-   case objectValue:
-      return other == objectValue
-             ||  ( other == nullValue  &&  value_.map_->size() == 0 );
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return false; // unreachable;
-}
-
-
-/// Number of values in array or object
-Value::UInt 
-Value::size() const
-{
-   switch ( type_ )
-   {
-   case nullValue:
-   case intValue:
-   case uintValue:
-   case realValue:
-   case booleanValue:
-   case stringValue:
-      return 0;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:  // size of the array is highest index + 1
-      if ( !value_.map_->empty() )
-      {
-         ObjectValues::const_iterator itLast = value_.map_->end();
-         --itLast;
-         return (*itLast).first.index()+1;
-      }
-      return 0;
-   case objectValue:
-      return Int( value_.map_->size() );
-#else
-   case arrayValue:
-      return Int( value_.array_->size() );
-   case objectValue:
-      return Int( value_.map_->size() );
-#endif
-   default:
-      JSON_ASSERT_UNREACHABLE;
-   }
-   return 0; // unreachable;
-}
-
-
-bool 
-Value::empty() const
-{
-   if ( isNull() || isArray() || isObject() )
-      return size() == 0u;
-   else
-      return false;
-}
-
-
-bool
-Value::operator!() const
-{
-   return isNull();
-}
-
-
-void 
-Value::clear()
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue  || type_ == objectValue );
-
-   switch ( type_ )
-   {
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-   case objectValue:
-      value_.map_->clear();
-      break;
-#else
-   case arrayValue:
-      value_.array_->clear();
-      break;
-   case objectValue:
-      value_.map_->clear();
-      break;
-#endif
-   default:
-      break;
-   }
-}
-
-void 
-Value::resize( UInt newSize )
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
-   if ( type_ == nullValue )
-      *this = Value( arrayValue );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   UInt oldSize = size();
-   if ( newSize == 0 )
-      clear();
-   else if ( newSize > oldSize )
-      (*this)[ newSize - 1 ];
-   else
-   {
-      for ( UInt index = newSize; index < oldSize; ++index )
-         value_.map_->erase( index );
-      assert( size() == newSize );
-   }
-#else
-   value_.array_->resize( newSize );
-#endif
-}
-
-
-Value &
-Value::operator[]( UInt index )
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
-   if ( type_ == nullValue )
-      *this = Value( arrayValue );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString key( index );
-   ObjectValues::iterator it = value_.map_->lower_bound( key );
-   if ( it != value_.map_->end()  &&  (*it).first == key )
-      return (*it).second;
-
-   ObjectValues::value_type defaultValue( key, null );
-   it = value_.map_->insert( it, defaultValue );
-   return (*it).second;
-#else
-   return value_.array_->resolveReference( index );
-#endif
-}
-
-
-const Value &
-Value::operator[]( UInt index ) const
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == arrayValue );
-   if ( type_ == nullValue )
-      return null;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString key( index );
-   ObjectValues::const_iterator it = value_.map_->find( key );
-   if ( it == value_.map_->end() )
-      return null;
-   return (*it).second;
-#else
-   Value *value = value_.array_->find( index );
-   return value ? *value : null;
-#endif
-}
-
-
-Value &
-Value::operator[]( const char *key )
-{
-   return resolveReference( key, false );
-}
-
-
-Value &
-Value::resolveReference( const char *key, 
-                         bool isStatic )
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
-   if ( type_ == nullValue )
-      *this = Value( objectValue );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString actualKey( key, isStatic ? CZString::noDuplication 
-                                     : CZString::duplicateOnCopy );
-   ObjectValues::iterator it = value_.map_->lower_bound( actualKey );
-   if ( it != value_.map_->end()  &&  (*it).first == actualKey )
-      return (*it).second;
-
-   ObjectValues::value_type defaultValue( actualKey, null );
-   it = value_.map_->insert( it, defaultValue );
-   Value &value = (*it).second;
-   return value;
-#else
-   return value_.map_->resolveReference( key, isStatic );
-#endif
-}
-
-
-Value 
-Value::get( UInt index, 
-            const Value &defaultValue ) const
-{
-   const Value *value = &((*this)[index]);
-   return value == &null ? defaultValue : *value;
-}
-
-
-bool 
-Value::isValidIndex( UInt index ) const
-{
-   return index < size();
-}
-
-
-
-const Value &
-Value::operator[]( const char *key ) const
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
-   if ( type_ == nullValue )
-      return null;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString actualKey( key, CZString::noDuplication );
-   ObjectValues::const_iterator it = value_.map_->find( actualKey );
-   if ( it == value_.map_->end() )
-      return null;
-   return (*it).second;
-#else
-   const Value *value = value_.map_->find( key );
-   return value ? *value : null;
-#endif
-}
-
-
-Value &
-Value::operator[]( const std::string &key )
-{
-   return (*this)[ key.c_str() ];
-}
-
-
-const Value &
-Value::operator[]( const std::string &key ) const
-{
-   return (*this)[ key.c_str() ];
-}
-
-Value &
-Value::operator[]( const StaticString &key )
-{
-   return resolveReference( key, true );
-}
-
-
-# ifdef JSON_USE_CPPTL
-Value &
-Value::operator[]( const CppTL::ConstString &key )
-{
-   return (*this)[ key.c_str() ];
-}
-
-
-const Value &
-Value::operator[]( const CppTL::ConstString &key ) const
-{
-   return (*this)[ key.c_str() ];
-}
-# endif
-
-
-Value &
-Value::append( const Value &value )
-{
-   return (*this)[size()] = value;
-}
-
-
-Value 
-Value::get( const char *key, 
-            const Value &defaultValue ) const
-{
-   const Value *value = &((*this)[key]);
-   return value == &null ? defaultValue : *value;
-}
-
-
-Value 
-Value::get( const std::string &key,
-            const Value &defaultValue ) const
-{
-   return get( key.c_str(), defaultValue );
-}
-
-Value
-Value::removeMember( const char* key )
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
-   if ( type_ == nullValue )
-      return null;
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   CZString actualKey( key, CZString::noDuplication );
-   ObjectValues::iterator it = value_.map_->find( actualKey );
-   if ( it == value_.map_->end() )
-      return null;
-   Value old(it->second);
-   value_.map_->erase(it);
-   return old;
-#else
-   Value *value = value_.map_->find( key );
-   if (value){
-      Value old(*value);
-      value_.map_.remove( key );
-      return old;
-   } else {
-      return null;
-   }
-#endif
-}
-
-Value
-Value::removeMember( const std::string &key )
-{
-   return removeMember( key.c_str() );
-}
-
-# ifdef JSON_USE_CPPTL
-Value 
-Value::get( const CppTL::ConstString &key,
-            const Value &defaultValue ) const
-{
-   return get( key.c_str(), defaultValue );
-}
-# endif
-
-bool 
-Value::isMember( const char *key ) const
-{
-   const Value *value = &((*this)[key]);
-   return value != &null;
-}
-
-
-bool 
-Value::isMember( const std::string &key ) const
-{
-   return isMember( key.c_str() );
-}
-
-
-# ifdef JSON_USE_CPPTL
-bool 
-Value::isMember( const CppTL::ConstString &key ) const
-{
-   return isMember( key.c_str() );
-}
-#endif
-
-Value::Members 
-Value::getMemberNames() const
-{
-   JSON_ASSERT( type_ == nullValue  ||  type_ == objectValue );
-   if ( type_ == nullValue )
-       return Value::Members();
-   Members members;
-   members.reserve( value_.map_->size() );
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   ObjectValues::const_iterator it = value_.map_->begin();
-   ObjectValues::const_iterator itEnd = value_.map_->end();
-   for ( ; it != itEnd; ++it )
-      members.push_back( std::string( (*it).first.c_str() ) );
-#else
-   ValueInternalMap::IteratorState it;
-   ValueInternalMap::IteratorState itEnd;
-   value_.map_->makeBeginIterator( it );
-   value_.map_->makeEndIterator( itEnd );
-   for ( ; !ValueInternalMap::equals( it, itEnd ); ValueInternalMap::increment(it) )
-      members.push_back( std::string( ValueInternalMap::key( it ) ) );
-#endif
-   return members;
-}
-//
-//# ifdef JSON_USE_CPPTL
-//EnumMemberNames
-//Value::enumMemberNames() const
-//{
-//   if ( type_ == objectValue )
-//   {
-//      return CppTL::Enum::any(  CppTL::Enum::transform(
-//         CppTL::Enum::keys( *(value_.map_), CppTL::Type<const CZString &>() ),
-//         MemberNamesTransform() ) );
-//   }
-//   return EnumMemberNames();
-//}
-//
-//
-//EnumValues 
-//Value::enumValues() const
-//{
-//   if ( type_ == objectValue  ||  type_ == arrayValue )
-//      return CppTL::Enum::anyValues( *(value_.map_), 
-//                                     CppTL::Type<const Value &>() );
-//   return EnumValues();
-//}
-//
-//# endif
-
-
-bool
-Value::isNull() const
-{
-   return type_ == nullValue;
-}
-
-
-bool 
-Value::isBool() const
-{
-   return type_ == booleanValue;
-}
-
-
-bool 
-Value::isInt() const
-{
-   return type_ == intValue;
-}
-
-
-bool 
-Value::isUInt() const
-{
-   return type_ == uintValue;
-}
-
-
-bool 
-Value::isIntegral() const
-{
-   return type_ == intValue  
-          ||  type_ == uintValue  
-          ||  type_ == booleanValue;
-}
-
-
-bool 
-Value::isDouble() const
-{
-   return type_ == realValue;
-}
-
-
-bool 
-Value::isNumeric() const
-{
-   return isIntegral() || isDouble();
-}
-
-
-bool 
-Value::isString() const
-{
-   return type_ == stringValue;
-}
-
-
-bool 
-Value::isArray() const
-{
-   return type_ == nullValue  ||  type_ == arrayValue;
-}
-
-
-bool 
-Value::isObject() const
-{
-   return type_ == nullValue  ||  type_ == objectValue;
-}
-
-
-void 
-Value::setComment( const char *comment,
-                   CommentPlacement placement )
-{
-   if ( !comments_ )
-      comments_ = new CommentInfo[numberOfCommentPlacement];
-   comments_[placement].setComment( comment );
-}
-
-
-void 
-Value::setComment( const std::string &comment,
-                   CommentPlacement placement )
-{
-   setComment( comment.c_str(), placement );
-}
-
-
-bool 
-Value::hasComment( CommentPlacement placement ) const
-{
-   return comments_ != 0  &&  comments_[placement].comment_ != 0;
-}
-
-std::string 
-Value::getComment( CommentPlacement placement ) const
-{
-   if ( hasComment(placement) )
-      return comments_[placement].comment_;
-   return "";
-}
-
-
-std::string 
-Value::toStyledString() const
-{
-   StyledWriter writer;
-   return writer.write( *this );
-}
-
-
-Value::const_iterator 
-Value::begin() const
-{
-   switch ( type_ )
-   {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-      if ( value_.array_ )
-      {
-         ValueInternalArray::IteratorState it;
-         value_.array_->makeBeginIterator( it );
-         return const_iterator( it );
-      }
-      break;
-   case objectValue:
-      if ( value_.map_ )
-      {
-         ValueInternalMap::IteratorState it;
-         value_.map_->makeBeginIterator( it );
-         return const_iterator( it );
-      }
-      break;
-#else
-   case arrayValue:
-   case objectValue:
-      if ( value_.map_ )
-         return const_iterator( value_.map_->begin() );
-      break;
-#endif
-   default:
-      break;
-   }
-   return const_iterator();
-}
-
-Value::const_iterator 
-Value::end() const
-{
-   switch ( type_ )
-   {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-      if ( value_.array_ )
-      {
-         ValueInternalArray::IteratorState it;
-         value_.array_->makeEndIterator( it );
-         return const_iterator( it );
-      }
-      break;
-   case objectValue:
-      if ( value_.map_ )
-      {
-         ValueInternalMap::IteratorState it;
-         value_.map_->makeEndIterator( it );
-         return const_iterator( it );
-      }
-      break;
-#else
-   case arrayValue:
-   case objectValue:
-      if ( value_.map_ )
-         return const_iterator( value_.map_->end() );
-      break;
-#endif
-   default:
-      break;
-   }
-   return const_iterator();
-}
-
-
-Value::iterator 
-Value::begin()
-{
-   switch ( type_ )
-   {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-      if ( value_.array_ )
-      {
-         ValueInternalArray::IteratorState it;
-         value_.array_->makeBeginIterator( it );
-         return iterator( it );
-      }
-      break;
-   case objectValue:
-      if ( value_.map_ )
-      {
-         ValueInternalMap::IteratorState it;
-         value_.map_->makeBeginIterator( it );
-         return iterator( it );
-      }
-      break;
-#else
-   case arrayValue:
-   case objectValue:
-      if ( value_.map_ )
-         return iterator( value_.map_->begin() );
-      break;
-#endif
-   default:
-      break;
-   }
-   return iterator();
-}
-
-Value::iterator 
-Value::end()
-{
-   switch ( type_ )
-   {
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   case arrayValue:
-      if ( value_.array_ )
-      {
-         ValueInternalArray::IteratorState it;
-         value_.array_->makeEndIterator( it );
-         return iterator( it );
-      }
-      break;
-   case objectValue:
-      if ( value_.map_ )
-      {
-         ValueInternalMap::IteratorState it;
-         value_.map_->makeEndIterator( it );
-         return iterator( it );
-      }
-      break;
-#else
-   case arrayValue:
-   case objectValue:
-      if ( value_.map_ )
-         return iterator( value_.map_->end() );
-      break;
-#endif
-   default:
-      break;
-   }
-   return iterator();
-}
-
-
-// class PathArgument
-// //////////////////////////////////////////////////////////////////
-
-PathArgument::PathArgument()
-   : kind_( kindNone )
-{
-}
-
-
-PathArgument::PathArgument( Value::UInt index )
-   : index_( index )
-   , kind_( kindIndex )
-{
-}
-
-
-PathArgument::PathArgument( const char *key )
-   : key_( key )
-   , kind_( kindKey )
-{
-}
-
-
-PathArgument::PathArgument( const std::string &key )
-   : key_( key.c_str() )
-   , kind_( kindKey )
-{
-}
-
-// class Path
-// //////////////////////////////////////////////////////////////////
-
-Path::Path( const std::string &path,
-            const PathArgument &a1,
-            const PathArgument &a2,
-            const PathArgument &a3,
-            const PathArgument &a4,
-            const PathArgument &a5 )
-{
-   InArgs in;
-   in.push_back( &a1 );
-   in.push_back( &a2 );
-   in.push_back( &a3 );
-   in.push_back( &a4 );
-   in.push_back( &a5 );
-   makePath( path, in );
-}
-
-
-void 
-Path::makePath( const std::string &path,
-                const InArgs &in )
-{
-   const char *current = path.c_str();
-   const char *end = current + path.length();
-   InArgs::const_iterator itInArg = in.begin();
-   while ( current != end )
-   {
-      if ( *current == '[' )
-      {
-         ++current;
-         if ( *current == '%' )
-            addPathInArg( path, in, itInArg, PathArgument::kindIndex );
-         else
-         {
-            Value::UInt index = 0;
-            for ( ; current != end && *current >= '0'  &&  *current <= '9'; ++current )
-               index = index * 10 + Value::UInt(*current - '0');
-            args_.push_back( index );
-         }
-         if ( current == end  ||  *current++ != ']' )
-            invalidPath( path, int(current - path.c_str()) );
-      }
-      else if ( *current == '%' )
-      {
-         addPathInArg( path, in, itInArg, PathArgument::kindKey );
-         ++current;
-      }
-      else if ( *current == '.' )
-      {
-         ++current;
-      }
-      else
-      {
-         const char *beginName = current;
-         while ( current != end  &&  !strchr( "[.", *current ) )
-            ++current;
-         args_.push_back( std::string( beginName, current ) );
-      }
-   }
-}
-
-
-void 
-Path::addPathInArg( const std::string &path, 
-                    const InArgs &in, 
-                    InArgs::const_iterator &itInArg, 
-                    PathArgument::Kind kind )
-{
-   if ( itInArg == in.end() )
-   {
-      // Error: missing argument %d
-   }
-   else if ( (*itInArg)->kind_ != kind )
-   {
-      // Error: bad argument type
-   }
-   else
-   {
-      args_.push_back( **itInArg );
-   }
-}
-
-
-void 
-Path::invalidPath( const std::string &path, 
-                   int location )
-{
-   // Error: invalid path.
-}
-
-
-const Value &
-Path::resolve( const Value &root ) const
-{
-   const Value *node = &root;
-   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
-   {
-      const PathArgument &arg = *it;
-      if ( arg.kind_ == PathArgument::kindIndex )
-      {
-         if ( !node->isArray()  ||  node->isValidIndex( arg.index_ ) )
-         {
-            // Error: unable to resolve path (array value expected at position...
-         }
-         node = &((*node)[arg.index_]);
-      }
-      else if ( arg.kind_ == PathArgument::kindKey )
-      {
-         if ( !node->isObject() )
-         {
-            // Error: unable to resolve path (object value expected at position...)
-         }
-         node = &((*node)[arg.key_]);
-         if ( node == &Value::null )
-         {
-            // Error: unable to resolve path (object has no member named '' at position...)
-         }
-      }
-   }
-   return *node;
-}
-
-
-Value 
-Path::resolve( const Value &root, 
-               const Value &defaultValue ) const
-{
-   const Value *node = &root;
-   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
-   {
-      const PathArgument &arg = *it;
-      if ( arg.kind_ == PathArgument::kindIndex )
-      {
-         if ( !node->isArray()  ||  node->isValidIndex( arg.index_ ) )
-            return defaultValue;
-         node = &((*node)[arg.index_]);
-      }
-      else if ( arg.kind_ == PathArgument::kindKey )
-      {
-         if ( !node->isObject() )
-            return defaultValue;
-         node = &((*node)[arg.key_]);
-         if ( node == &Value::null )
-            return defaultValue;
-      }
-   }
-   return *node;
-}
-
-
-Value &
-Path::make( Value &root ) const
-{
-   Value *node = &root;
-   for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it )
-   {
-      const PathArgument &arg = *it;
-      if ( arg.kind_ == PathArgument::kindIndex )
-      {
-         if ( !node->isArray() )
-         {
-            // Error: node is not an array at position ...
-         }
-         node = &((*node)[arg.index_]);
-      }
-      else if ( arg.kind_ == PathArgument::kindKey )
-      {
-         if ( !node->isObject() )
-         {
-            // Error: node is not an object at position...
-         }
-         node = &((*node)[arg.key_]);
-      }
-   }
-   return *node;
-}
-
-
-} // namespace Json

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json_valueiterator.inl
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json_valueiterator.inl b/test/plugins/cordova.echo/src/BlackBerry10/public/json_valueiterator.inl
deleted file mode 100644
index 736e260..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json_valueiterator.inl
+++ /dev/null
@@ -1,292 +0,0 @@
-// included by json_value.cpp
-// everything is within Json namespace
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueIteratorBase
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueIteratorBase::ValueIteratorBase()
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   : current_()
-   , isNull_( true )
-{
-}
-#else
-   : isArray_( true )
-   , isNull_( true )
-{
-   iterator_.array_ = ValueInternalArray::IteratorState();
-}
-#endif
-
-
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-ValueIteratorBase::ValueIteratorBase( const Value::ObjectValues::iterator &current )
-   : current_( current )
-   , isNull_( false )
-{
-}
-#else
-ValueIteratorBase::ValueIteratorBase( const ValueInternalArray::IteratorState &state )
-   : isArray_( true )
-{
-   iterator_.array_ = state;
-}
-
-
-ValueIteratorBase::ValueIteratorBase( const ValueInternalMap::IteratorState &state )
-   : isArray_( false )
-{
-   iterator_.map_ = state;
-}
-#endif
-
-Value &
-ValueIteratorBase::deref() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   return current_->second;
-#else
-   if ( isArray_ )
-      return ValueInternalArray::dereference( iterator_.array_ );
-   return ValueInternalMap::value( iterator_.map_ );
-#endif
-}
-
-
-void 
-ValueIteratorBase::increment()
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   ++current_;
-#else
-   if ( isArray_ )
-      ValueInternalArray::increment( iterator_.array_ );
-   ValueInternalMap::increment( iterator_.map_ );
-#endif
-}
-
-
-void 
-ValueIteratorBase::decrement()
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   --current_;
-#else
-   if ( isArray_ )
-      ValueInternalArray::decrement( iterator_.array_ );
-   ValueInternalMap::decrement( iterator_.map_ );
-#endif
-}
-
-
-ValueIteratorBase::difference_type 
-ValueIteratorBase::computeDistance( const SelfType &other ) const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-# ifdef JSON_USE_CPPTL_SMALLMAP
-   return current_ - other.current_;
-# else
-   // Iterator for null value are initialized using the default
-   // constructor, which initialize current_ to the default
-   // std::map::iterator. As begin() and end() are two instance 
-   // of the default std::map::iterator, they can not be compared.
-   // To allow this, we handle this comparison specifically.
-   if ( isNull_  &&  other.isNull_ )
-   {
-      return 0;
-   }
-
-
-   // Usage of std::distance is not portable (does not compile with Sun Studio 12 RogueWave STL,
-   // which is the one used by default).
-   // Using a portable hand-made version for non random iterator instead:
-   //   return difference_type( std::distance( current_, other.current_ ) );
-   difference_type myDistance = 0;
-   for ( Value::ObjectValues::iterator it = current_; it != other.current_; ++it )
-   {
-      ++myDistance;
-   }
-   return myDistance;
-# endif
-#else
-   if ( isArray_ )
-      return ValueInternalArray::distance( iterator_.array_, other.iterator_.array_ );
-   return ValueInternalMap::distance( iterator_.map_, other.iterator_.map_ );
-#endif
-}
-
-
-bool 
-ValueIteratorBase::isEqual( const SelfType &other ) const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   if ( isNull_ )
-   {
-      return other.isNull_;
-   }
-   return current_ == other.current_;
-#else
-   if ( isArray_ )
-      return ValueInternalArray::equals( iterator_.array_, other.iterator_.array_ );
-   return ValueInternalMap::equals( iterator_.map_, other.iterator_.map_ );
-#endif
-}
-
-
-void 
-ValueIteratorBase::copy( const SelfType &other )
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   current_ = other.current_;
-#else
-   if ( isArray_ )
-      iterator_.array_ = other.iterator_.array_;
-   iterator_.map_ = other.iterator_.map_;
-#endif
-}
-
-
-Value 
-ValueIteratorBase::key() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   const Value::CZString czstring = (*current_).first;
-   if ( czstring.c_str() )
-   {
-      if ( czstring.isStaticString() )
-         return Value( StaticString( czstring.c_str() ) );
-      return Value( czstring.c_str() );
-   }
-   return Value( czstring.index() );
-#else
-   if ( isArray_ )
-      return Value( ValueInternalArray::indexOf( iterator_.array_ ) );
-   bool isStatic;
-   const char *memberName = ValueInternalMap::key( iterator_.map_, isStatic );
-   if ( isStatic )
-      return Value( StaticString( memberName ) );
-   return Value( memberName );
-#endif
-}
-
-
-UInt 
-ValueIteratorBase::index() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   const Value::CZString czstring = (*current_).first;
-   if ( !czstring.c_str() )
-      return czstring.index();
-   return Value::UInt( -1 );
-#else
-   if ( isArray_ )
-      return Value::UInt( ValueInternalArray::indexOf( iterator_.array_ ) );
-   return Value::UInt( -1 );
-#endif
-}
-
-
-const char *
-ValueIteratorBase::memberName() const
-{
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-   const char *name = (*current_).first.c_str();
-   return name ? name : "";
-#else
-   if ( !isArray_ )
-      return ValueInternalMap::key( iterator_.map_ );
-   return "";
-#endif
-}
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueConstIterator
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueConstIterator::ValueConstIterator()
-{
-}
-
-
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-ValueConstIterator::ValueConstIterator( const Value::ObjectValues::iterator &current )
-   : ValueIteratorBase( current )
-{
-}
-#else
-ValueConstIterator::ValueConstIterator( const ValueInternalArray::IteratorState &state )
-   : ValueIteratorBase( state )
-{
-}
-
-ValueConstIterator::ValueConstIterator( const ValueInternalMap::IteratorState &state )
-   : ValueIteratorBase( state )
-{
-}
-#endif
-
-ValueConstIterator &
-ValueConstIterator::operator =( const ValueIteratorBase &other )
-{
-   copy( other );
-   return *this;
-}
-
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueIterator
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueIterator::ValueIterator()
-{
-}
-
-
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-ValueIterator::ValueIterator( const Value::ObjectValues::iterator &current )
-   : ValueIteratorBase( current )
-{
-}
-#else
-ValueIterator::ValueIterator( const ValueInternalArray::IteratorState &state )
-   : ValueIteratorBase( state )
-{
-}
-
-ValueIterator::ValueIterator( const ValueInternalMap::IteratorState &state )
-   : ValueIteratorBase( state )
-{
-}
-#endif
-
-ValueIterator::ValueIterator( const ValueConstIterator &other )
-   : ValueIteratorBase( other )
-{
-}
-
-ValueIterator::ValueIterator( const ValueIterator &other )
-   : ValueIteratorBase( other )
-{
-}
-
-ValueIterator &
-ValueIterator::operator =( const SelfType &other )
-{
-   copy( other );
-   return *this;
-}


[35/54] [abbrv] git commit: updated futures README with some minor tweaks to the spec and kept track of outstanding issues in JIRA

Posted by ti...@apache.org.
updated futures README with some minor tweaks to the spec and kept track of outstanding issues in JIRA


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/65bc2623
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/65bc2623
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/65bc2623

Branch: refs/heads/future
Commit: 65bc262357f6a53351c4a60f5f49cbb705d8f82f
Parents: a490dcc
Author: Fil Maj <ma...@gmail.com>
Authored: Tue Mar 26 17:17:06 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Tue Apr 9 13:44:02 2013 -0700

----------------------------------------------------------------------
 README.md |   91 ++++++++++++++++++++++++++------------------------------
 1 files changed, 42 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/65bc2623/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 7554906..1e9fce9 100644
--- a/README.md
+++ b/README.md
@@ -95,36 +95,6 @@ foo-plugin/
 
 This structure is suggested, but not required.
 
-
-## Plugin Javascript Code Installation
-
-A typical plugin includes one or more Javascript files. Rather than have the user of your plugin add `<script>` tags for your Javascript to their HTML file(s) manually, you should use `<js-module>` tags for your Javascript files.
-
-### `<js-module>` tags
-
-`<asset>` tags are a dumb copy: copy a file from the plugin subdirectory to `www`.
-
-In contrast, `<js-module>` tags are much more sophisticated. They look like this:
-
-    <js-module src="socket.js" name="Socket">
-        <clobbers target="chrome.socket" />
-    </js-module>
-
-For each file with a `<js-module>` tag, the `plugman --prepare` call will copy the file to `www/plugins/my.plugin.id/path/to/myfile.js`. Further, it will add an entry for this plugin to `www/cordova_plugins.json`. At load time, code in `cordova.js` will use an XHR to read this file, inject a `<script>` tag for each Javascript file, and add a mapping to clobber or merge as appropriate (see below).
-
-DO NOT wrap the file with `cordova.define`; this will be added automatically. Your module will be wrapped in a closure, and will have `module`, `exports` and `require` in scope, as normal for AMD modules.
-
-Details for the `<js-module>` tag:
-
-* The `src` points to a file in the plugin directory.
-* The `name` gives the last part of the module name. It can generally be whatever you like, and it only matters if you want to use `cordova.require` to import other parts of your plugins in your Javascript code. The module name for a `<js-module>` is your plugin's `id` followed by the value of `name`. For the example above, with an `id` of `chrome.socket`, the module name is `chrome.socket.Socket`.
-* Inside the `<js-module>` tag there are three legal sub-tags:
-    * `<clobbers target="some.value" />` indicates that the `module.exports` will be inserted into the `window` object as `window.some.value`. You can have as many `<clobbers>` as you like.
-    * `<merges target="some.value" />` indicates that your module should be merged with any existing value at `window.some.value`. If any key already exists, you module's version overrides the original. You can have as many `<merges>` as you like.
-    * `<runs />` means that your code should be `cordova.require`d, but not installed on the `window` object anywhere. This is useful for initializing the module, attaching event handlers or otherwise. You can only have 0 or 1 `<runs />` tags. Note that including a `<runs />` with `<clobbers />` or `<merges />` is redundant, since they also `cordova.require` your module.
-    * An empty `<js-module>` will still be loaded and can be `cordova.require`d in other modules.
-
-
 ## plugin.xml Manifest Format
 
 The `plugin.xml` file is an XML document in the plugins namespace -
@@ -164,7 +134,7 @@ style regular expression:
 
     ^\d+[.]\d+[.]\d+$
 
-### &lt;engines&gt; element
+### &lt;engines&gt; and &lt;engine&gt; elements
 
 The child elements of the `<engines>` element specify versions of
 Apache Cordova-based frameworks that this plugin supports. An example:
@@ -192,7 +162,7 @@ maintenance when the underlying platform is updated. A minimum of `>`, `>=`,
 
 plugman will abort plugin installation if the target project does not meet the engine constraints.
 
-
+If no `<engine>` tags are specified, plugman will attempt to install into the specified cordova project directory blindly.
 
 ### &lt;name&gt; element
 
@@ -201,8 +171,7 @@ the name of the plugin. An example:
 
     <name>Foo</name>
 
-This element does not yet handle localization.
-
+This element does not (yet) handle localization.
 
 ### &lt;asset&gt; element
 
@@ -233,8 +202,33 @@ Assets can be targeted to subdirectories - for instance:
 would create the `js/experimental` directory in the `www` directory, if not
 present, and then copy the file `new-foo.js` as `foo.js` into that directory.
 
-If a file exists at the target location, tools based on this specification
-should stop the installation process and notify the user of the conflict.
+If a file exists at the target location, plugman will stop the installation process and notify the user of the conflict.
+
+### `&lt;js-module&gt;` element 
+
+A typical plugin includes one or more Javascript files. Rather than have the user of your plugin add `<script>` tags for your Javascript to their HTML file(s) manually, you should use `<js-module>` tags for your Javascript files.
+
+`<asset>` tags are a dumb copy: copy a file from the plugin subdirectory to `www`.
+
+In contrast, `<js-module>` tags are much more sophisticated. They look like this:
+
+    <js-module src="socket.js" name="Socket">
+        <clobbers target="chrome.socket" />
+    </js-module>
+
+For each file with a `<js-module>` tag, the `plugman --prepare` call will copy the file to `www/plugins/my.plugin.id/path/to/myfile.js`. Further, it will add an entry for this plugin to `www/cordova_plugins.json`. At load time, code in `cordova.js` will use an XHR to read this file, inject a `<script>` tag for each Javascript file, and add a mapping to clobber or merge as appropriate (see below).
+
+DO NOT wrap the file with `cordova.define`; this will be added automatically. Your module will be wrapped in a closure, and will have `module`, `exports` and `require` in scope, as normal for AMD modules.
+
+Details for the `<js-module>` tag:
+
+* The `src` points to a file in the plugin directory.
+* The `name` gives the last part of the module name. It can generally be whatever you like, and it only matters if you want to use `cordova.require` to import other parts of your plugins in your Javascript code. The module name for a `<js-module>` is your plugin's `id` followed by the value of `name`. For the example above, with an `id` of `chrome.socket`, the module name is `chrome.socket.Socket`.
+* Inside the `<js-module>` tag there are three legal sub-tags:
+    * `<clobbers target="some.value" />` indicates that the `module.exports` will be inserted into the `window` object as `window.some.value`. You can have as many `<clobbers>` as you like.
+    * `<merges target="some.value" />` indicates that your module should be merged with any existing value at `window.some.value`. If any key already exists, you module's version overrides the original. You can have as many `<merges>` as you like.
+    * `<runs />` means that your code should be `cordova.require`d, but not installed on the `window` object anywhere. This is useful for initializing the module, attaching event handlers or otherwise. You can only have 0 or 1 `<runs />` tags. Note that including a `<runs />` with `<clobbers />` or `<merges />` is redundant, since they also `cordova.require` your module.
+    * An empty `<js-module>` will still be loaded and can be `cordova.require`d in other modules.
 
 
 ### &lt;platform&gt;
@@ -278,8 +272,7 @@ into a project. A couple of examples:
     <!-- ios -->
     <source-file src="CDVFoo.m" />
 
-As with assets, if a `source-file` would overwrite an existing file, tools
-should notify the user and stop, like, right away.
+As with assets, if a `source-file` would overwrite an existing file, plugman will notify the user and stop, like, right away.
 
 #### src (required)
 
@@ -328,7 +321,7 @@ the config file.
 
 ### &lt;plugins-plist&gt;
 
-This is OUTDATED. Only applies to Cordova 2.2.0 and below). Use &lt;config-file&gt; tag (same as Android) for newer versions of Cordova.
+This is OUTDATED. Only applies to cordova-ios 2.2.0 and below. Use &lt;config-file&gt; tag (same as Android) for newer versions of Cordova.
 
 Example:
 
@@ -428,6 +421,7 @@ the `CFBundleIdentifier` on iOS or the `package` attribute of the top-level
 `manifest` element in an `AndroidManifest.xml` file.
 
 ## Project Directory Structure
+
 TODO: show how the foo plugin example from above will have its files placed in a cordova project after running plugman
 
 ## Authors
@@ -440,8 +434,7 @@ TODO: show how the foo plugin example from above will have its files placed in a
 
 ## Contributors
 
-Michael Brooks
-
+* Michael Brooks
 
 ## License
 
@@ -453,14 +446,14 @@ These apply to plugman as well as cordova-cli. Keep the two in step, they both h
 
 These are in rough order of priority, most urgent at the top.
 
-* Remove expectation that source, header and resource files are found relative to `src/<platform>`. The `src` parameter should be relative to `plugin.xml` like the others.
-* Fix all the tests, including the www-only tests, which expect the old `www` platform that has been removed. Note that most of the tests will need some rewiring because of the separation of `--fetch` and `--install`.
-* Add tests for the `cordova_plugins.json` creation and copying of plugin Javascript files into `www/plugins/my.plugin/**`.
-* Make sure (I think it's already so) that `--uninstall` uses the local cache to uninstall a plugin, rather than fetching another. This avoids problems with the list of files changing upstream.
-* Add `cordova plugin add ../path/to/my/plugin --link` (and similarly for `plugman --fetch`), that symlinks the plugin rather than copying, so that it updates in real time on every `prepare`. This may have problems with native code until we can make that part of a `prepare` as well.
-* Make sure that when a new platform is `cordova platform add`ed that it gets all the currently loaded plugins installed.
-* Implement a `cordova watch` a la `grunt watch` that will re-run `cordova prepare` every time the installed plugins change (including those installed with `--link`). This is definitely a stretch goal, but it would be awesome.
-
+* Remove expectation that source, header and resource files are found relative to `src/<platform>`. The `src` parameter should be relative to `plugin.xml` like the others. [CB-2813](http://issues.corodva.io/2813). Assigned to Braden.
+* Fix all the tests, including the www-only tests, which expect the old `www` platform that has been removed. Note that most of the tests will need some rewiring because of the separation of `--fetch` and `--install`. [CB-2814](http://issues.cordova.io/2814). Assigned to Fil.
+* Add tests for the `cordova_plugins.json` creation and copying of plugin Javascript files into `www/plugins/my.plugin/**`. [CB-2815](http://issues.cordova.io/2815). Assigned to Braden.
+* Make sure (I think it's already so) that `--uninstall` uses the local cache to uninstall a plugin, rather than fetching another. This avoids problems with the list of files changing upstream. [CB-2816](http://issues.cordova.io). Assigned to Fil.
+* Add `cordova plugin add ../path/to/my/plugin --link` (and similarly for `plugman --fetch`), that symlinks the plugin rather than copying, so that it updates in real time on every `prepare`. This may have problems with native code until we can make that part of a `prepare` as well. [CB-2817](http://issues.cordova.io/2817). Assigned to Braden.
+* Make sure that when a new platform is `cordova platform add`ed that it gets all the currently loaded plugins installed. [CB-2818](http://issues.cordova.io/2818). Assigned to Fil.
+* Implement a `cordova watch` a la `grunt watch` that will re-run `cordova prepare` every time the installed plugins change (including those installed with `--link`). This is definitely a stretch goal, but it would be awesome. Not assigned but tracked at [CB-2819](http://issues.cordova.io/2819).
 
 I (Braden) am willing to do all of these, and my employer has the will to allocate me to them for as long as they take.
 
+Fil, Anis, and Tim are all available resources for cordova-plugman and cordova-cli work! USE US, BRADEN!


[09/54] [abbrv] deleting old ios project

Posted by ti...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/22833745/test/projects/ios/SampleApp.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/test/projects/ios/SampleApp.xcodeproj/project.pbxproj b/test/projects/ios/SampleApp.xcodeproj/project.pbxproj
deleted file mode 100644
index a4d87f9..0000000
--- a/test/projects/ios/SampleApp.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,498 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
-		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
-		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
-		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
-		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
-		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
-		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
-		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
-		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
-		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
-		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
-		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
-		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
-		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
-		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
-		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
-		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
-		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
-		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
-		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
-		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
-		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
-		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
-		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
-		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
-		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
-		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
-		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
-		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
-		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
-		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
-		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
-		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
-		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
-		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
-		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
-		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
-		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
-		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
-		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
-		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
-		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
-		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
-		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
-		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
-		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
-		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
-		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
-		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
-		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
-		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
-		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
-				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
-				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
-				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
-				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
-				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
-				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
-				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
-				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
-				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
-				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
-				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
-				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
-				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		571A462D14DB0A1A007FEAC7 = {
-			isa = PBXGroup;
-			children = (
-				577FC36514DB0B620082BA7B /* www */,
-				571A465914DB0A1B007FEAC7 /* ChildApp */,
-				571A463E14DB0A1B007FEAC7 /* Frameworks */,
-				571A463C14DB0A1B007FEAC7 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		571A463C14DB0A1B007FEAC7 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
-				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
-				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
-				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
-				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
-				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
-				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
-				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
-				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
-				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
-				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
-				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
-				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXGroup;
-			children = (
-				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
-				571A466414DB0A1B007FEAC7 /* Resources */,
-				571A467D14DB0A1B007FEAC7 /* Classes */,
-				571A468614DB0A1B007FEAC7 /* Plugins */,
-				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
-			);
-			path = ChildApp;
-			sourceTree = "<group>";
-		};
-		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
-			isa = PBXGroup;
-			children = (
-				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
-				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
-				571A465F14DB0A1B007FEAC7 /* main.m */,
-				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
-				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
-				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
-			);
-			name = "Supporting Files";
-			sourceTree = "<group>";
-		};
-		571A466414DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
-				571A466514DB0A1B007FEAC7 /* en.lproj */,
-				571A466914DB0A1B007FEAC7 /* es.lproj */,
-				571A466D14DB0A1B007FEAC7 /* icons */,
-				571A467414DB0A1B007FEAC7 /* splash */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = en.lproj;
-			sourceTree = "<group>";
-		};
-		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
-			isa = PBXGroup;
-			children = (
-				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
-			);
-			name = es.lproj;
-			sourceTree = "<group>";
-		};
-		571A466D14DB0A1B007FEAC7 /* icons */ = {
-			isa = PBXGroup;
-			children = (
-				571A466E14DB0A1B007FEAC7 /* icon.png */,
-				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
-				571A467214DB0A1B007FEAC7 /* icon-72.png */,
-			);
-			name = icons;
-			sourceTree = "<group>";
-		};
-		571A467414DB0A1B007FEAC7 /* splash */ = {
-			isa = PBXGroup;
-			children = (
-				571A467514DB0A1B007FEAC7 /* Default.png */,
-				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
-			);
-			name = splash;
-			sourceTree = "<group>";
-		};
-		571A467D14DB0A1B007FEAC7 /* Classes */ = {
-			isa = PBXGroup;
-			children = (
-				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
-				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
-				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
-				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
-			);
-			name = Classes;
-			sourceTree = "<group>";
-		};
-		571A468614DB0A1B007FEAC7 /* Plugins */ = {
-			isa = PBXGroup;
-			children = (
-				571A468714DB0A1B007FEAC7 /* README */,
-			);
-			name = Plugins;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
-			buildPhases = (
-				571A463414DB0A1B007FEAC7 /* Sources */,
-				571A463514DB0A1B007FEAC7 /* Frameworks */,
-				571A463614DB0A1B007FEAC7 /* Resources */,
-				571A463714DB0A1B007FEAC7 /* Sources */,
-				571A463814DB0A1B007FEAC7 /* Frameworks */,
-				571A463914DB0A1B007FEAC7 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = ChildApp;
-			productName = ChildApp;
-			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		571A462F14DB0A1A007FEAC7 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0420;
-			};
-			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-				es,
-			);
-			mainGroup = 571A462D14DB0A1A007FEAC7;
-			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				571A463A14DB0A1B007FEAC7 /* ChildApp */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		571A463614DB0A1B007FEAC7 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
-				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
-				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
-				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
-				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
-				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
-				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
-				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
-				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
-				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
-				577FC36614DB0B620082BA7B /* www in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/bash;
-			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		571A463414DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
-				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
-				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		571A463714DB0A1B007FEAC7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A465D14DB0A1B007FEAC7 /* en */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466714DB0A1B007FEAC7 /* en */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				571A466B14DB0A1B007FEAC7 /* es */,
-			);
-			name = Localizable.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		571A468814DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-			};
-			name = Debug;
-		};
-		571A468914DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				CLANG_ENABLE_OBJC_ARC = YES;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				COPY_PHASE_STRIP = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_VERSION = com.apple.compilers.llvmgcc42;
-				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
-				SDKROOT = iphoneos;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-		571A468B14DB0A1B007FEAC7 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = NO;
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				WRAPPER_EXTENSION = app;
-			};
-			name = Debug;
-		};
-		571A468C14DB0A1B007FEAC7 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
-				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
-				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
-				OTHER_LDFLAGS = (
-					"-weak_framework",
-					UIKit,
-					"-weak_framework",
-					AVFoundation,
-					"-weak_framework",
-					CoreMedia,
-					"-weak_library",
-					/usr/lib/libSystem.B.dylib,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				TARGETED_DEVICE_FAMILY = "1,2";
-				VALIDATE_PRODUCT = YES;
-				WRAPPER_EXTENSION = app;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468814DB0A1B007FEAC7 /* Debug */,
-				571A468914DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				571A468B14DB0A1B007FEAC7 /* Debug */,
-				571A468C14DB0A1B007FEAC7 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/22833745/test/projects/ios/SampleApp/PhoneGap.plist
----------------------------------------------------------------------
diff --git a/test/projects/ios/SampleApp/PhoneGap.plist b/test/projects/ios/SampleApp/PhoneGap.plist
deleted file mode 100644
index 5ffe25e..0000000
--- a/test/projects/ios/SampleApp/PhoneGap.plist
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>TopActivityIndicator</key>
-	<string>gray</string>
-	<key>EnableLocation</key>
-	<false/>
-	<key>EnableViewportScale</key>
-	<false/>
-	<key>AutoHideSplashScreen</key>
-	<true/>
-	<key>ShowSplashScreenSpinner</key>
-	<true/>
-	<key>MediaPlaybackRequiresUserAction</key>
-	<false/>
-	<key>AllowInlineMediaPlayback</key>
-	<false/>
-	<key>OpenAllWhitelistURLsInWebView</key>
-	<false/>
-	<key>ExternalHosts</key>
-	<array/>
-	<key>Plugins</key>
-	<dict>
-		<key>com.phonegap.accelerometer</key>
-		<string>PGAccelerometer</string>
-		<key>com.phonegap.camera</key>
-		<string>PGCamera</string>
-		<key>com.phonegap.connection</key>
-		<string>PGConnection</string>
-		<key>com.phonegap.contacts</key>
-		<string>PGContacts</string>
-		<key>com.phonegap.debugconsole</key>
-		<string>PGDebugConsole</string>
-		<key>com.phonegap.file</key>
-		<string>PGFile</string>
-		<key>com.phonegap.filetransfer</key>
-		<string>PGFileTransfer</string>
-		<key>com.phonegap.geolocation</key>
-		<string>PGLocation</string>
-		<key>com.phonegap.notification</key>
-		<string>PGNotification</string>
-		<key>com.phonegap.media</key>
-		<string>PGSound</string>
-		<key>com.phonegap.mediacapture</key>
-		<string>PGCapture</string>
-		<key>com.phonegap.splashscreen</key>
-		<string>PGSplashScreen</string>
-		<key>com.phonegap.battery</key>
-		<string>PGBattery</string>
-	</dict>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/22833745/test/projects/ios/SampleApp/SampleApp-Info.plist
----------------------------------------------------------------------
diff --git a/test/projects/ios/SampleApp/SampleApp-Info.plist b/test/projects/ios/SampleApp/SampleApp-Info.plist
deleted file mode 100644
index 08b9ee3..0000000
--- a/test/projects/ios/SampleApp/SampleApp-Info.plist
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<!--
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-# http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
--->
-<plist version="1.0">
-<dict>
-	<key>CFBundleIcons</key>
-	<dict>
-		<key>CFBundlePrimaryIcon</key>
-		<dict>
-			<key>CFBundleIconFiles</key>
-			<array>
-                <string>icon.png</string>
-                <string>icon@2x.png</string>
-                <string>icon-72.png</string>
-                <string>icon-72@2x.png</string>
-			</array>
-			<key>UIPrerenderedIcon</key>
-			<false/>
-		</dict>
-	</dict>
-	<key>UISupportedInterfaceOrientations~ipad</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationPortraitUpsideDown</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
-	</array>
-	<key>UISupportedInterfaceOrientations</key>
-	<array>
-		<string>UIInterfaceOrientationPortrait</string>
-	</array>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleDisplayName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string>icon.png</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.example.friendstring</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-	<key>LSRequiresIPhoneOS</key>
-	<true/>
-	<key>NSMainNibFile</key>
-	<string></string>
-	<key>NSMainNibFile~ipad</key>
-	<string></string>
-	<key>AppId</key>
-	<string>$APP_ID</string>
-</dict>
-</plist>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/22833745/test/projects/ios/www/.gitkeep
----------------------------------------------------------------------
diff --git a/test/projects/ios/www/.gitkeep b/test/projects/ios/www/.gitkeep
deleted file mode 100644
index e69de29..0000000


[16/54] [abbrv] git commit: checking error in shell commands

Posted by ti...@apache.org.
checking error in shell commands


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/2aeef83c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/2aeef83c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/2aeef83c

Branch: refs/heads/future
Commit: 2aeef83c62034d9d156614ba4ccbf1b763b08044
Parents: 8d5d7a8
Author: Anis Kadri <an...@apache.org>
Authored: Mon Apr 1 17:02:00 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Apr 1 17:02:00 2013 -0700

----------------------------------------------------------------------
 platforms/ios.js |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/2aeef83c/platforms/ios.js
----------------------------------------------------------------------
diff --git a/platforms/ios.js b/platforms/ios.js
index 2f221c3..edddbeb 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -35,7 +35,6 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
       , version = plugin_et._root.attrib['version']
       , i = 0
       , matched;
-
     variables = variables || {}
 
     // grab and parse pbxproj
@@ -100,11 +99,14 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
         var stat = fs.statSync(srcPath);
         if(stat.isDirectory()) {
             shell.mkdir('-p', targetPath);
+            checkLastCommand();
         }
         if (action == 'install') {
             shell.cp('-r', srcPath, targetPath);
+            checkLastCommand();
         } else {
             shell.rm('-rf', targetPath);
+            checkLastCommand();
         }
     });
 
@@ -118,12 +120,15 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
         if (action == 'install') {
             xcodeproj.addSourceFile('Plugins/' + path.relative(pluginsDir, destFile));
             shell.mkdir('-p', targetDir);
+            checkLastCommand();
             shell.cp(srcFile, destFile);
+            checkLastCommand();
         } else {
             xcodeproj.removeSourceFile('Plugins/' + path.basename(src));   
             if(fs.existsSync(destFile))
                 fs.unlinkSync(destFile);
             shell.rm('-rf', targetDir);    
+            checkLastCommand();
         }
     });
 
@@ -136,12 +141,15 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
         if (action == 'install') {     
             xcodeproj.addHeaderFile('Plugins/' + path.relative(pluginsDir, destFile));
             shell.mkdir('-p', targetDir);
+            checkLastCommand();
             shell.cp(srcFile, destFile);
+            checkLastCommand();
         } else {
             xcodeproj.removeHeaderFile('Plugins/' + path.basename(src));
             if(fs.existsSync(destFile))
                 fs.unlinkSync(destFile);
             shell.rm('-rf', targetDir);
+            checkLastCommand();
         }
     });
 
@@ -155,12 +163,15 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
             var st = fs.statSync(srcFile);
             if (st.isDirectory()) {
                 shell.cp('-R', srcFile, resourcesDir);
+                checkLastCommand();
             } else {
                 shell.cp(srcFile, destFile);
+                checkLastCommand();
             }
         } else {
             xcodeproj.removeResourceFile('Resources/' + path.basename(src));
             shell.rm('-rf', destFile);
+            checkLastCommand();
         }
     });
 
@@ -353,3 +364,7 @@ function updateConfig(action, config_path, plugin_et) {
         updatePlistFile(action, config_path, plugin_et);
     }
 }
+
+function checkLastCommand() {
+    if(shell.error() != null) throw {name: "ShellError", message: shell.error()};
+}


[07/54] [abbrv] git commit: renamed blackberry assets

Posted by ti...@apache.org.
renamed blackberry assets


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/0a7b3e3d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/0a7b3e3d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/0a7b3e3d

Branch: refs/heads/future
Commit: 0a7b3e3da6cac91437226c6ee27407a6e06456d3
Parents: 16f3b24
Author: Tim Kim <ti...@adobe.com>
Authored: Wed Mar 27 16:29:21 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Wed Mar 27 16:31:04 2013 -0700

----------------------------------------------------------------------
 platforms/bb10.js                                  |  176 --
 platforms/blackberry.js                            |  176 ++
 plugman.js                                         |    4 +-
 test/bb10-install.js                               |  100 -
 test/bb10-uninstall.js                             |  111 -
 test/blackberry-install.js                         |  100 +
 test/blackberry-uninstall.js                       |  111 +
 test/plugins/DummyPlugin/plugin.xml                |    4 +-
 .../plugins/DummyPlugin/src/BlackBerry10/client.js |   19 -
 test/plugins/DummyPlugin/src/BlackBerry10/index.js |   19 -
 test/plugins/DummyPlugin/src/blackberry/client.js  |   19 +
 test/plugins/DummyPlugin/src/blackberry/index.js   |   19 +
 test/plugins/cordova.echo/.gitignore               |    1 +
 test/plugins/cordova.echo/plugin.xml               |   23 +-
 .../cordova.echo/src/BlackBerry10/client.js        |   53 -
 .../src/BlackBerry10/device/echoJnext.so           |  Bin 1291818 -> 0 bytes
 .../plugins/cordova.echo/src/BlackBerry10/index.js |   85 -
 .../cordova.echo/src/BlackBerry10/manifest.json    |    5 -
 .../src/BlackBerry10/public/json/autolink.h        |   38 -
 .../src/BlackBerry10/public/json/config.h          |   62 -
 .../src/BlackBerry10/public/json/features.h        |   61 -
 .../src/BlackBerry10/public/json/forwards.h        |   58 -
 .../src/BlackBerry10/public/json/json.h            |   29 -
 .../src/BlackBerry10/public/json/reader.h          |  215 --
 .../src/BlackBerry10/public/json/value.h           | 1088 ---------
 .../src/BlackBerry10/public/json/writer.h          |  193 --
 .../src/BlackBerry10/public/json_batchallocator.h  |  144 --
 .../src/BlackBerry10/public/json_internalarray.inl |  448 ----
 .../src/BlackBerry10/public/json_internalmap.inl   |  607 -----
 .../src/BlackBerry10/public/json_reader.cpp        |  913 --------
 .../src/BlackBerry10/public/json_value.cpp         | 1745 ---------------
 .../src/BlackBerry10/public/json_valueiterator.inl |  292 ---
 .../src/BlackBerry10/public/json_writer.cpp        |  848 -------
 .../src/BlackBerry10/public/plugin.cpp             |  339 ---
 .../cordova.echo/src/BlackBerry10/public/plugin.h  |   89 -
 .../src/BlackBerry10/public/tokenizer.cpp          |  241 --
 .../src/BlackBerry10/public/tokenizer.h            |   74 -
 .../src/BlackBerry10/simulator/echoJnext.so        |  Bin 231778 -> 0 bytes
 .../cordova.echo/src/BlackBerry10/src/echo.cpp     |  121 -
 .../cordova.echo/src/BlackBerry10/src/echo.hpp     |   45 -
 test/plugins/cordova.echo/src/blackberry/client.js |   53 +
 .../src/blackberry/device/echoJnext.so             |  Bin 0 -> 1291818 bytes
 test/plugins/cordova.echo/src/blackberry/index.js  |   85 +
 .../cordova.echo/src/blackberry/manifest.json      |    5 +
 .../src/blackberry/public/json/autolink.h          |   19 +
 .../src/blackberry/public/json/config.h            |   43 +
 .../src/blackberry/public/json/features.h          |   42 +
 .../src/blackberry/public/json/forwards.h          |   39 +
 .../cordova.echo/src/blackberry/public/json/json.h |   10 +
 .../src/blackberry/public/json/reader.h            |  196 ++
 .../src/blackberry/public/json/value.h             | 1069 +++++++++
 .../src/blackberry/public/json/writer.h            |  174 ++
 .../src/blackberry/public/json_batchallocator.h    |  125 +
 .../src/blackberry/public/json_internalarray.inl   |  448 ++++
 .../src/blackberry/public/json_internalmap.inl     |  607 +++++
 .../src/blackberry/public/json_reader.cpp          |  894 ++++++++
 .../src/blackberry/public/json_value.cpp           | 1726 ++++++++++++++
 .../src/blackberry/public/json_valueiterator.inl   |  292 +++
 .../src/blackberry/public/json_writer.cpp          |  829 +++++++
 .../cordova.echo/src/blackberry/public/plugin.cpp  |  320 +++
 .../cordova.echo/src/blackberry/public/plugin.h    |   70 +
 .../src/blackberry/public/tokenizer.cpp            |  222 ++
 .../cordova.echo/src/blackberry/public/tokenizer.h |   55 +
 .../src/blackberry/simulator/echoJnext.so          |  Bin 0 -> 231778 bytes
 .../cordova.echo/src/blackberry/src/echo.cpp       |  121 +
 .../cordova.echo/src/blackberry/src/echo.hpp       |   45 +
 test/plugins/cordova.echo/src/device/echoJnext.so  |  Bin 0 -> 1291818 bytes
 .../cordova.echo/src/simulator/echoJnext.so        |  Bin 0 -> 231778 bytes
 test/projects/BlackBerry10/www/config.xml          |   97 -
 test/projects/BlackBerry10/www/plugins.xml         |   35 -
 test/projects/blackberry/www/config.xml            |   97 +
 test/projects/blackberry/www/plugins.xml           |   35 +
 72 files changed, 8053 insertions(+), 8375 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/platforms/bb10.js
----------------------------------------------------------------------
diff --git a/platforms/bb10.js b/platforms/bb10.js
deleted file mode 100644
index 5d3f649..0000000
--- a/platforms/bb10.js
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var fs = require('fs')  // use existsSync in 0.6.x
-   , path = require('path')
-   , shell = require('shelljs')
-   , et = require('elementtree')
-   , getConfigChanges = require('../util/config-changes')
-   , sourceDir = 'src'
-   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
-
-
-exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et) {
-    var plugin_id = plugin_et._root.attrib['id']
-      , version = plugin_et._root.attrib['version']
-      , external_hosts = []
-
-      // look for assets in the plugin 
-      , assets = plugin_et.findall('./asset')
-      , platformTag = plugin_et.find('./platform[@name="BlackBerry10"]')
-      , sourceFiles = platformTag.findall('./source-file')
-      , libFiles = platformTag.findall('./library-file')
-      , configChanges = getConfigChanges(platformTag);
-      
-    // find which config-files we're interested in
-    Object.keys(configChanges).forEach(function (configFile) {
-        if (!fs.existsSync(path.resolve(project_dir, configFile))) {
-            delete configChanges[configFile];
-        }
-    });
-
-    // collision detection 
-    if(action == "install" && pluginInstalled(plugin_et, project_dir)) {
-        throw "Plugin "+plugin_id+" already installed"
-    } else if(action == "uninstall" && !pluginInstalled(plugin_et, project_dir)) {
-        throw "Plugin "+plugin_id+" not installed"
-    }
-    
-    // move asset files
-    assets.forEach(function (asset) {
-        var srcPath = path.resolve(
-                        plugin_dir,
-                        asset.attrib['src']);
-
-        var targetPath = path.resolve(
-                            project_dir,
-                            asset.attrib['target']);
-        var stats = fs.statSync(srcPath);
-        if (action == 'install') {
-            if(stats.isDirectory()) {
-                shell.mkdir('-p', targetPath);
-                shell.cp('-R', srcPath, project_dir);
-            } else {
-                shell.cp(srcPath, targetPath);
-            }
-        } else {
-            shell.rm('-rf', targetPath);
-        }
-    });
-
-    // move source files
-    sourceFiles.forEach(function (sourceFile) {
-        var srcDir = path.resolve(project_dir,
-                                sourceFile.attrib['target-dir'])
-          , destFile = path.resolve(srcDir,
-                                path.basename(sourceFile.attrib['src']));
-
-        if (action == 'install') {
-            shell.mkdir('-p', srcDir);
-            var srcFile = srcPath(plugin_dir, sourceFile.attrib['src']);
-            shell.cp(srcFile, destFile);
-        } else {
-            fs.unlinkSync(destFile);
-            // check if directory is empty
-            var curDir = srcDir;
-            while(curDir !== project_dir + '/src') {
-                if(fs.readdirSync(curDir).length == 0) {
-                    fs.rmdirSync(curDir);
-                    curDir = path.resolve(curDir + '/..');
-                } else {
-                    // directory not empty...do nothing
-                    break;
-                }
-            }
-        }
-    })
-
-    // move library files
-    libFiles.forEach(function (libFile) {
-        var libDir = path.resolve(project_dir,
-                                libFile.attrib['target-dir'])
-
-        if (action == 'install') {
-            shell.mkdir('-p', libDir);
-            var src = path.resolve(plugin_dir, 'src/BlackBerry10',
-                                        libFile.attrib['src']),
-                dest = path.resolve(libDir,
-                                path.basename(libFile.attrib['src']));
-            
-            shell.cp(src, dest);
-        } else {
-            var destFile = path.resolve(libDir,
-                            path.basename(libFile.attrib['src']));
-
-            fs.unlinkSync(destFile);
-            // check if directory is empty
-            var files = fs.readdirSync(libDir);
-            if(files.length == 0) {
-                shell.rm('-rf', libDir);
-            }
-        }
-    })
-
-
-    // edit configuration files
-    Object.keys(configChanges).forEach(function (filename) {
-        var filepath = path.resolve(project_dir, filename),
-            xmlDoc = xml_helpers.parseElementtreeSync(filepath),
-            output;
-
-        configChanges[filename].forEach(function (configNode) {
-            var selector = configNode.attrib["parent"],
-                children = configNode.findall('*');
-
-            if( action == 'install') {
-                if (!xml_helpers.graftXML(xmlDoc, children, selector)) {
-                    throw new Error('failed to add children to ' + filename);
-                }
-            } else {
-                if (!xml_helpers.pruneXML(xmlDoc, children, selector)) {
-                    throw new Error('failed to remove children from' + filename);
-                }
-            }
-        });
-
-        output = xmlDoc.write({indent: 4});
-        fs.writeFileSync(filepath, output);
-    });
-}
-
-
-function srcPath(pluginPath, filename) {
-    var prefix = /^src\/BlackBerry10/;
-
-    if (prefix.test(filename)) {
-        return path.resolve(pluginPath, filename);
-    } else {
-        return path.resolve(pluginPath, 'src/BlackBerry10', filename);
-    }
-}
-
-function pluginInstalled(plugin_et, project_dir) {
-    var config_tag = plugin_et.find('./platform[@name="BlackBerry10"]/config-file[@target="config.xml"]/feature');
-    if (!config_tag) {
-        return false;
-    }
-    var plugin_name = config_tag.attrib.id;
-    return (fs.readFileSync(path.resolve(project_dir, 'config.xml'), 'utf8')
-           .match(new RegExp(plugin_name, "g")) != null);
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/platforms/blackberry.js
----------------------------------------------------------------------
diff --git a/platforms/blackberry.js b/platforms/blackberry.js
new file mode 100644
index 0000000..718e9ff
--- /dev/null
+++ b/platforms/blackberry.js
@@ -0,0 +1,176 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var fs = require('fs')  // use existsSync in 0.6.x
+   , path = require('path')
+   , shell = require('shelljs')
+   , et = require('elementtree')
+   , getConfigChanges = require('../util/config-changes')
+   , sourceDir = 'src'
+   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
+
+
+exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et) {
+    var plugin_id = plugin_et._root.attrib['id']
+      , version = plugin_et._root.attrib['version']
+      , external_hosts = []
+
+      // look for assets in the plugin 
+      , assets = plugin_et.findall('./asset')
+      , platformTag = plugin_et.find('./platform[@name="blackberry"]')
+      , sourceFiles = platformTag.findall('./source-file')
+      , libFiles = platformTag.findall('./library-file')
+      , configChanges = getConfigChanges(platformTag);
+      
+    // find which config-files we're interested in
+    Object.keys(configChanges).forEach(function (configFile) {
+        if (!fs.existsSync(path.resolve(project_dir, configFile))) {
+            delete configChanges[configFile];
+        }
+    });
+
+    // collision detection 
+    if(action == "install" && pluginInstalled(plugin_et, project_dir)) {
+        throw "Plugin "+plugin_id+" already installed"
+    } else if(action == "uninstall" && !pluginInstalled(plugin_et, project_dir)) {
+        throw "Plugin "+plugin_id+" not installed"
+    }
+    
+    // move asset files
+    assets.forEach(function (asset) {
+        var srcPath = path.resolve(
+                        plugin_dir,
+                        asset.attrib['src']);
+
+        var targetPath = path.resolve(
+                            project_dir,
+                            asset.attrib['target']);
+        var stats = fs.statSync(srcPath);
+        if (action == 'install') {
+            if(stats.isDirectory()) {
+                shell.mkdir('-p', targetPath);
+                shell.cp('-R', srcPath, project_dir);
+            } else {
+                shell.cp(srcPath, targetPath);
+            }
+        } else {
+            shell.rm('-rf', targetPath);
+        }
+    });
+
+    // move source files
+    sourceFiles.forEach(function (sourceFile) {
+        var srcDir = path.resolve(project_dir,
+                                sourceFile.attrib['target-dir'])
+          , destFile = path.resolve(srcDir,
+                                path.basename(sourceFile.attrib['src']));
+
+        if (action == 'install') {
+            shell.mkdir('-p', srcDir);
+            var srcFile = srcPath(plugin_dir, sourceFile.attrib['src']);
+            shell.cp(srcFile, destFile);
+        } else {
+            fs.unlinkSync(destFile);
+            // check if directory is empty
+            var curDir = srcDir;
+            while(curDir !== project_dir + '/src') {
+                if(fs.readdirSync(curDir).length == 0) {
+                    fs.rmdirSync(curDir);
+                    curDir = path.resolve(curDir + '/..');
+                } else {
+                    // directory not empty...do nothing
+                    break;
+                }
+            }
+        }
+    })
+
+    // move library files
+    libFiles.forEach(function (libFile) {
+        var libDir = path.resolve(project_dir,
+                                libFile.attrib['target-dir'])
+
+        if (action == 'install') {
+            shell.mkdir('-p', libDir);
+            var src = path.resolve(plugin_dir, 'src/blackberry',
+                                        libFile.attrib['src']),
+                dest = path.resolve(libDir,
+                                path.basename(libFile.attrib['src']));
+            
+            shell.cp(src, dest);
+        } else {
+            var destFile = path.resolve(libDir,
+                            path.basename(libFile.attrib['src']));
+
+            fs.unlinkSync(destFile);
+            // check if directory is empty
+            var files = fs.readdirSync(libDir);
+            if(files.length == 0) {
+                shell.rm('-rf', libDir);
+            }
+        }
+    })
+
+
+    // edit configuration files
+    Object.keys(configChanges).forEach(function (filename) {
+        var filepath = path.resolve(project_dir, filename),
+            xmlDoc = xml_helpers.parseElementtreeSync(filepath),
+            output;
+
+        configChanges[filename].forEach(function (configNode) {
+            var selector = configNode.attrib["parent"],
+                children = configNode.findall('*');
+
+            if( action == 'install') {
+                if (!xml_helpers.graftXML(xmlDoc, children, selector)) {
+                    throw new Error('failed to add children to ' + filename);
+                }
+            } else {
+                if (!xml_helpers.pruneXML(xmlDoc, children, selector)) {
+                    throw new Error('failed to remove children from' + filename);
+                }
+            }
+        });
+
+        output = xmlDoc.write({indent: 4});
+        fs.writeFileSync(filepath, output);
+    });
+}
+
+
+function srcPath(pluginPath, filename) {
+    var prefix = /^src\/blackberry/;
+
+    if (prefix.test(filename)) {
+        return path.resolve(pluginPath, filename);
+    } else {
+        return path.resolve(pluginPath, 'src/blackberry', filename);
+    }
+}
+
+function pluginInstalled(plugin_et, project_dir) {
+    var config_tag = plugin_et.find('./platform[@name="blackberry"]/config-file[@target="config.xml"]/feature');
+    if (!config_tag) {
+        return false;
+    }
+    var plugin_name = config_tag.attrib.id;
+    return (fs.readFileSync(path.resolve(project_dir, 'config.xml'), 'utf8')
+           .match(new RegExp(plugin_name, "g")) != null);
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/plugman.js
----------------------------------------------------------------------
diff --git a/plugman.js b/plugman.js
index b81cedf..a90cc18 100755
--- a/plugman.js
+++ b/plugman.js
@@ -29,11 +29,11 @@ var fs = require('fs')
   , platform_modules = {
         'android': require('./platforms/android'),
         'ios': require('./platforms/ios'),
-        'bb10': require('./platforms/bb10'),
+        'blackberry': require('./platforms/blackberry'),
         'www': require('./platforms/www')
     };
 
-var known_opts = { 'platform' : [ 'ios', 'android', 'bb10' ,'www' ]
+var known_opts = { 'platform' : [ 'ios', 'android', 'blackberry' ,'www' ]
             , 'project' : path
             , 'plugin' : [String, path, url]
             , 'remove' : Boolean

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/bb10-install.js
----------------------------------------------------------------------
diff --git a/test/bb10-install.js b/test/bb10-install.js
deleted file mode 100644
index 96ec4e6..0000000
--- a/test/bb10-install.js
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var fs = require('fs')
-  , path = require('path')
-  , shell = require('shelljs')
-  , et = require('elementtree')
-  , osenv = require('osenv')
-  , bb10 = require(path.join(__dirname, '..', 'platforms', 'bb10'))
-  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
-  , test_project_dir = path.join(test_dir, 'projects', 'BlackBerry10', 'www')
-  , test_plugin_dir = path.join(test_dir, 'plugins', 'cordova.echo')
-  , xml_path     = path.join(test_dir, 'plugins', 'cordova.echo', 'plugin.xml')
-  , xml_text, plugin_et
-  , srcDir = path.resolve(test_project_dir, 'ext-qnx/cordova.echo');
-  
-exports.setUp = function(callback) {
-    shell.mkdir('-p', test_dir);
-    
-    // copy the bb10 test project to a temp directory
-    shell.cp('-r', path.join(__dirname, 'projects'), test_dir);
-
-    // copy the bb10 test plugin to a temp directory
-    shell.cp('-r', path.join(__dirname, 'plugins'), test_dir);
-
-    // parse the plugin.xml into an elementtree object
-    xml_text   = fs.readFileSync(xml_path, 'utf-8')
-    plugin_et  = new et.ElementTree(et.XML(xml_text));
-
-    callback();
-}
-
-exports.tearDown = function(callback) {
-    // remove the temp files (projects and plugins)
-    shell.rm('-rf', test_dir);
-    callback();
-}
-
-exports['should move the source files'] = function (test) {
-    // run the platform-specific function
-    bb10.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-
-    test.ok(fs.existsSync(srcDir + '/client.js'));
-    test.ok(fs.existsSync(srcDir + '/index.js'));
-    test.ok(fs.existsSync(srcDir + '/manifest.json'));
-    test.ok(fs.existsSync(srcDir + '/device/echoJnext.so'));
-    test.ok(fs.existsSync(srcDir + '/simulator/echoJnext.so'));
-    test.done();
-}
-
-exports['should move the js file'] = function (test) {
-    // setting up a DummyPlugin
-    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'DummyPlugin')
-    var dummy_xml_path = path.join(test_dir, 'plugins', 'DummyPlugin', 'plugin.xml')
-    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
-
-    // run the platform-specific function
-    bb10.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
-
-    var jsPath = path.join(test_project_dir, 'dummyplugin.js');
-    test.ok(fs.existsSync(jsPath));
-    test.done();
-}
-
-exports['should edit config.xml'] = function (test) {
-    bb10.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-    
-    var configXmlPath = path.join(test_project_dir, 'config.xml');
-    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
-        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
-        expected = 'feature[@id="cordova.echo"]';
-    test.ok(pluginsDoc.find(expected));
-
-    test.done();
-}
-
-exports['should not install a plugin that is already installed'] = function (test) {
-    bb10.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-
-    test.throws(function(){bb10.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et); }, 
-                /already installed/
-               );
-    test.done();
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/bb10-uninstall.js
----------------------------------------------------------------------
diff --git a/test/bb10-uninstall.js b/test/bb10-uninstall.js
deleted file mode 100644
index 4a096be..0000000
--- a/test/bb10-uninstall.js
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var fs = require('fs')
-  , path = require('path')
-  , shell = require('shelljs')
-  , et = require('elementtree')
-  , osenv = require('osenv')
-  , bb10 = require(path.join(__dirname, '..', 'platforms', 'bb10'))
-  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
-  , test_project_dir = path.join(test_dir, 'projects', 'BlackBerry10', 'www')
-  , test_plugin_dir = path.join(test_dir, 'plugins', 'cordova.echo')
-  , xml_path     = path.join(test_dir, 'plugins', 'cordova.echo', 'plugin.xml')
-  , xml_text, plugin_et
-  , srcDir = path.resolve(test_project_dir, 'ext-qnx/cordova.echo');
-  
-exports.setUp = function(callback) {
-    shell.mkdir('-p', test_dir);
-    
-    // copy the bb10 test project to a temp directory
-    shell.cp('-r', path.join(__dirname, 'projects'), test_dir);
-
-    // copy the bb10 test plugin to a temp directory
-    shell.cp('-r', path.join(__dirname, 'plugins'), test_dir);
-
-    // parse the plugin.xml into an elementtree object
-    xml_text   = fs.readFileSync(xml_path, 'utf-8')
-    plugin_et  = new et.ElementTree(et.XML(xml_text));
-
-    callback();
-}
-
-exports.tearDown = function(callback) {
-    // remove the temp files (projects and plugins)
-    shell.rm('-rf', test_dir);
-    callback();
-}
-
-exports['should remove cordova echo plugin'] = function (test) {
-    // run the platform-specific function
-    bb10.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-    bb10.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
-
-    test.done();
-}
-
-
-exports['should remove the js file'] = function (test) {
-
-    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'DummyPlugin')
-    var dummy_xml_path = path.join(test_dir, 'plugins', 'DummyPlugin', 'plugin.xml')
-    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
-
-    bb10.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
-    bb10.handlePlugin('uninstall', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
-    var jsPath = path.join(test_dir, 'projects', 'bb10', 'www', 'dummyplugin.js');
-    test.ok(!fs.existsSync(jsPath))
-    test.done();
-}
-
-
-exports['should remove the source files'] = function (test) {
-    // run the platform-specific function
-    bb10.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-    bb10.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
-
-    test.ok(!fs.existsSync(srcDir + '/index.js'))
-    test.ok(!fs.existsSync(srcDir + '/client.js'))
-    test.ok(!fs.existsSync(srcDir + '/manifest.json'))
-    test.ok(!fs.existsSync(srcDir + '/device/echoJnext.so'))
-    test.ok(!fs.existsSync(srcDir + '/simulator/echoJnext.so'))
-    test.done();
-}
-
-exports['should edit config.xml'] = function (test) {   
-    // run the platform-specific function
-    bb10.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-    
-    bb10.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
-    
-    var configXmlPath = path.join(test_project_dir, 'config.xml');
-    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
-        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
-        expected = 'feature[@id="cordova.echo"]';
-    test.ok(!pluginsDoc.find(expected));
-    
-    test.done();
-}
-
-exports['should not uninstall a plugin that is not installed'] = function (test) {
-    test.throws(function(){bb10.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et); }, 
-                /not installed/
-               );
-    test.done();
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/blackberry-install.js
----------------------------------------------------------------------
diff --git a/test/blackberry-install.js b/test/blackberry-install.js
new file mode 100644
index 0000000..1356738
--- /dev/null
+++ b/test/blackberry-install.js
@@ -0,0 +1,100 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var fs = require('fs')
+  , path = require('path')
+  , shell = require('shelljs')
+  , et = require('elementtree')
+  , osenv = require('osenv')
+  , blackberry = require(path.join(__dirname, '..', 'platforms', 'blackberry'))
+  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
+  , test_project_dir = path.join(test_dir, 'projects', 'blackberry', 'www')
+  , test_plugin_dir = path.join(test_dir, 'plugins', 'cordova.echo')
+  , xml_path     = path.join(test_dir, 'plugins', 'cordova.echo', 'plugin.xml')
+  , xml_text, plugin_et
+  , srcDir = path.resolve(test_project_dir, 'ext-qnx/cordova.echo');
+  
+exports.setUp = function(callback) {
+    shell.mkdir('-p', test_dir);
+    
+    // copy the blackberry test project to a temp directory
+    shell.cp('-r', path.join(__dirname, 'projects'), test_dir);
+
+    // copy the blackberry test plugin to a temp directory
+    shell.cp('-r', path.join(__dirname, 'plugins'), test_dir);
+
+    // parse the plugin.xml into an elementtree object
+    xml_text   = fs.readFileSync(xml_path, 'utf-8')
+    plugin_et  = new et.ElementTree(et.XML(xml_text));
+
+    callback();
+}
+
+exports.tearDown = function(callback) {
+    // remove the temp files (projects and plugins)
+    shell.rm('-rf', test_dir);
+    callback();
+}
+
+exports['should move the source files'] = function (test) {
+    // run the platform-specific function
+    blackberry.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+
+    test.ok(fs.existsSync(srcDir + '/client.js'));
+    test.ok(fs.existsSync(srcDir + '/index.js'));
+    test.ok(fs.existsSync(srcDir + '/manifest.json'));
+    test.ok(fs.existsSync(srcDir + '/device/echoJnext.so'));
+    test.ok(fs.existsSync(srcDir + '/simulator/echoJnext.so'));
+    test.done();
+}
+
+exports['should move the js file'] = function (test) {
+    // setting up a DummyPlugin
+    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'DummyPlugin')
+    var dummy_xml_path = path.join(test_dir, 'plugins', 'DummyPlugin', 'plugin.xml')
+    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+
+    // run the platform-specific function
+    blackberry.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
+
+    var jsPath = path.join(test_project_dir, 'dummyplugin.js');
+    test.ok(fs.existsSync(jsPath));
+    test.done();
+}
+
+exports['should edit config.xml'] = function (test) {
+    blackberry.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    
+    var configXmlPath = path.join(test_project_dir, 'config.xml');
+    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
+        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
+        expected = 'feature[@id="cordova.echo"]';
+    test.ok(pluginsDoc.find(expected));
+
+    test.done();
+}
+
+exports['should not install a plugin that is already installed'] = function (test) {
+    blackberry.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+
+    test.throws(function(){blackberry.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et); }, 
+                /already installed/
+               );
+    test.done();
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/blackberry-uninstall.js
----------------------------------------------------------------------
diff --git a/test/blackberry-uninstall.js b/test/blackberry-uninstall.js
new file mode 100644
index 0000000..01c246b
--- /dev/null
+++ b/test/blackberry-uninstall.js
@@ -0,0 +1,111 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var fs = require('fs')
+  , path = require('path')
+  , shell = require('shelljs')
+  , et = require('elementtree')
+  , osenv = require('osenv')
+  , blackberry = require(path.join(__dirname, '..', 'platforms', 'blackberry'))
+  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
+  , test_project_dir = path.join(test_dir, 'projects', 'blackberry', 'www')
+  , test_plugin_dir = path.join(test_dir, 'plugins', 'cordova.echo')
+  , xml_path     = path.join(test_dir, 'plugins', 'cordova.echo', 'plugin.xml')
+  , xml_text, plugin_et
+  , srcDir = path.resolve(test_project_dir, 'ext-qnx/cordova.echo');
+  
+exports.setUp = function(callback) {
+    shell.mkdir('-p', test_dir);
+    
+    // copy the blackberry test project to a temp directory
+    shell.cp('-r', path.join(__dirname, 'projects'), test_dir);
+
+    // copy the blackberry test plugin to a temp directory
+    shell.cp('-r', path.join(__dirname, 'plugins'), test_dir);
+
+    // parse the plugin.xml into an elementtree object
+    xml_text   = fs.readFileSync(xml_path, 'utf-8')
+    plugin_et  = new et.ElementTree(et.XML(xml_text));
+
+    callback();
+}
+
+exports.tearDown = function(callback) {
+    // remove the temp files (projects and plugins)
+    shell.rm('-rf', test_dir);
+    callback();
+}
+
+exports['should remove cordova echo plugin'] = function (test) {
+    // run the platform-specific function
+    blackberry.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    blackberry.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    test.done();
+}
+
+
+exports['should remove the js file'] = function (test) {
+
+    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'DummyPlugin')
+    var dummy_xml_path = path.join(test_dir, 'plugins', 'DummyPlugin', 'plugin.xml')
+    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+
+    blackberry.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
+    blackberry.handlePlugin('uninstall', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
+    var jsPath = path.join(test_dir, 'projects', 'blackberry', 'www', 'dummyplugin.js');
+    test.ok(!fs.existsSync(jsPath))
+    test.done();
+}
+
+
+exports['should remove the source files'] = function (test) {
+    // run the platform-specific function
+    blackberry.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    blackberry.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    test.ok(!fs.existsSync(srcDir + '/index.js'))
+    test.ok(!fs.existsSync(srcDir + '/client.js'))
+    test.ok(!fs.existsSync(srcDir + '/manifest.json'))
+    test.ok(!fs.existsSync(srcDir + '/device/echoJnext.so'))
+    test.ok(!fs.existsSync(srcDir + '/simulator/echoJnext.so'))
+    test.done();
+}
+
+exports['should edit config.xml'] = function (test) {   
+    // run the platform-specific function
+    blackberry.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    
+    blackberry.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+    
+    var configXmlPath = path.join(test_project_dir, 'config.xml');
+    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
+        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
+        expected = 'feature[@id="cordova.echo"]';
+    test.ok(!pluginsDoc.find(expected));
+    
+    test.done();
+}
+
+exports['should not uninstall a plugin that is not installed'] = function (test) {
+    test.throws(function(){blackberry.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et); }, 
+                /not installed/
+               );
+    test.done();
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/DummyPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/DummyPlugin/plugin.xml b/test/plugins/DummyPlugin/plugin.xml
index 7ca1982..3dbd5bd 100644
--- a/test/plugins/DummyPlugin/plugin.xml
+++ b/test/plugins/DummyPlugin/plugin.xml
@@ -57,8 +57,8 @@
                 target-dir="src/com/phonegap/plugins/dummyplugin" />
     </platform>
 
-    <!-- BlackBerry10 -->
-    <platform name="BlackBerry10">
+    <!-- blackberry -->
+    <platform name="blackberry">
         <config-file target="config.xml" parent="/widget">
             <feature id="dummyPlugin" required="true" version="1.0.0.0"/>
         </config-file>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/DummyPlugin/src/BlackBerry10/client.js
----------------------------------------------------------------------
diff --git a/test/plugins/DummyPlugin/src/BlackBerry10/client.js b/test/plugins/DummyPlugin/src/BlackBerry10/client.js
deleted file mode 100644
index 5263b0c..0000000
--- a/test/plugins/DummyPlugin/src/BlackBerry10/client.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/DummyPlugin/src/BlackBerry10/index.js
----------------------------------------------------------------------
diff --git a/test/plugins/DummyPlugin/src/BlackBerry10/index.js b/test/plugins/DummyPlugin/src/BlackBerry10/index.js
deleted file mode 100644
index 5263b0c..0000000
--- a/test/plugins/DummyPlugin/src/BlackBerry10/index.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/DummyPlugin/src/BlackBerry10/manifest.json
----------------------------------------------------------------------
diff --git a/test/plugins/DummyPlugin/src/BlackBerry10/manifest.json b/test/plugins/DummyPlugin/src/BlackBerry10/manifest.json
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/DummyPlugin/src/blackberry/client.js
----------------------------------------------------------------------
diff --git a/test/plugins/DummyPlugin/src/blackberry/client.js b/test/plugins/DummyPlugin/src/blackberry/client.js
new file mode 100644
index 0000000..5263b0c
--- /dev/null
+++ b/test/plugins/DummyPlugin/src/blackberry/client.js
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/DummyPlugin/src/blackberry/index.js
----------------------------------------------------------------------
diff --git a/test/plugins/DummyPlugin/src/blackberry/index.js b/test/plugins/DummyPlugin/src/blackberry/index.js
new file mode 100644
index 0000000..5263b0c
--- /dev/null
+++ b/test/plugins/DummyPlugin/src/blackberry/index.js
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/DummyPlugin/src/blackberry/manifest.json
----------------------------------------------------------------------
diff --git a/test/plugins/DummyPlugin/src/blackberry/manifest.json b/test/plugins/DummyPlugin/src/blackberry/manifest.json
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/.gitignore
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/.gitignore b/test/plugins/cordova.echo/.gitignore
new file mode 100644
index 0000000..e43b0f9
--- /dev/null
+++ b/test/plugins/cordova.echo/.gitignore
@@ -0,0 +1 @@
+.DS_Store

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/plugin.xml b/test/plugins/cordova.echo/plugin.xml
index 5d0e097..f9fa664 100644
--- a/test/plugins/cordova.echo/plugin.xml
+++ b/test/plugins/cordova.echo/plugin.xml
@@ -1,23 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright 2013 Anis Kadri
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
 <plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
     id="com.cordova.echo"
     version="1.0.0">
@@ -29,7 +10,7 @@
     <name>cordova echo</name>
 
     
-    <platform name="BlackBerry10">    
+    <platform name="blackberry">    
         <config-file target="config.xml" parent="/widget">
             <feature id="cordova.echo" required="true" version="1.0.0.0"/>
         </config-file>
@@ -40,4 +21,4 @@
         <source-file src="device/echoJnext.so" target-dir="ext-qnx/cordova.echo/device" />
         <source-file src="simulator/echoJnext.so" target-dir="ext-qnx/cordova.echo/simulator" />
     </platform>
-</plugin>
+</plugin>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/client.js
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/client.js b/test/plugins/cordova.echo/src/BlackBerry10/client.js
deleted file mode 100644
index 4e7a1b3..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/client.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var _self = {},
-    _ID = require("./manifest.json").namespace,
-    win = null,
-    fail = null;
-
-function handleCallback(result) {
-    if (result) {
-        if(win){
-            win(result);
-        }
-    } else {
-        if(fail){
-            fail(result);
-        }
-    }
-    win = null;
-    fail = null;
-}
-
-_self.doEcho = function (args, theWin, theFail) {
-    var data = { "message" : args.message || "" };
-    
-    win = theWin;
-    fail = theFail;
-    
-    window.webworks.event.add(_ID, "echoCallback", handleCallback);
-    
-    return window.webworks.execSync(_ID, "doEcho", data);
-};
-
-
-module.exports = _self;

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/device/echoJnext.so
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/device/echoJnext.so b/test/plugins/cordova.echo/src/BlackBerry10/device/echoJnext.so
deleted file mode 100755
index 169714a..0000000
Binary files a/test/plugins/cordova.echo/src/BlackBerry10/device/echoJnext.so and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/index.js
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/index.js b/test/plugins/cordova.echo/src/BlackBerry10/index.js
deleted file mode 100644
index 0759a20..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/index.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var echoJNext,
-    _event = require("../../lib/event"),
-    winCallback = null,
-    failCallback = null;
-    
-module.exports = {   
-    doEcho: function (success, fail, args) {
-        var invokeData = { "message" : JSON.parse(decodeURIComponent(args.message)) };
-        try {
-            success(echoJNext.getEchoJNext(invokeData));
-        } catch (e) {
-            fail(-1, e);
-        }
-    }
-};
-
-///////////////////////////////////////////////////////////////////
-// JavaScript wrapper for JNEXT plugin
-///////////////////////////////////////////////////////////////////
-
-JNEXT.EchoJNext = function ()
-{   
-    var _self = this;
-
-    _self.getEchoJNext = function (args) {
-        return JNEXT.invoke(_self._id, "doEcho " + JSON.stringify(args));
-    };
-
-    _self.getId = function () {
-        return _self._id;
-    };
-
-    _self.init = function () {
-        if (!JNEXT.require("echoJnext")) {
-            return false;
-        }
-
-        _self._id = JNEXT.createObject("echoJnext.Echo");
-
-        if (!_self._id || _self._id === "") {
-            return false;
-        }
-
-        JNEXT.registerEvents(_self);
-    };
-
-    _self.onEvent = function (strData) {
-        var arData = strData.split(" "),
-            strEventId = arData[0],
-            args = arData[1],
-            info = {};
-            
-        if (strEventId === "cordova.echo.callback") {
-            _event.trigger("echoCallback", args);
-        }
-                  
-    };
-    
-    _self._id = "";
-    
-    _self.init();
-};
-
-echoJNext = new JNEXT.EchoJNext();

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/manifest.json
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/manifest.json b/test/plugins/cordova.echo/src/BlackBerry10/manifest.json
deleted file mode 100644
index d14e79e..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/manifest.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-    "global": false,
-    "namespace": "cordova.echo",
-    "dependencies": []
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json/autolink.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json/autolink.h b/test/plugins/cordova.echo/src/BlackBerry10/public/json/autolink.h
deleted file mode 100644
index e0e5eb3..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json/autolink.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#ifndef JSON_AUTOLINK_H_INCLUDED
-# define JSON_AUTOLINK_H_INCLUDED
-
-# include "config.h"
-
-# ifdef JSON_IN_CPPTL
-#  include <cpptl/cpptl_autolink.h>
-# endif
-
-# if !defined(JSON_NO_AUTOLINK)  &&  !defined(JSON_DLL_BUILD)  &&  !defined(JSON_IN_CPPTL)
-#  define CPPTL_AUTOLINK_NAME "json"
-#  undef CPPTL_AUTOLINK_DLL
-#  ifdef JSON_DLL
-#   define CPPTL_AUTOLINK_DLL
-#  endif
-#  include "autolink.h"
-# endif
-
-#endif // JSON_AUTOLINK_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json/config.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json/config.h b/test/plugins/cordova.echo/src/BlackBerry10/public/json/config.h
deleted file mode 100644
index c946f30..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json/config.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#ifndef JSON_CONFIG_H_INCLUDED
-# define JSON_CONFIG_H_INCLUDED
-
-/// If defined, indicates that json library is embedded in CppTL library.
-//# define JSON_IN_CPPTL 1
-
-/// If defined, indicates that json may leverage CppTL library
-//#  define JSON_USE_CPPTL 1
-/// If defined, indicates that cpptl vector based map should be used instead of std::map
-/// as Value container.
-//#  define JSON_USE_CPPTL_SMALLMAP 1
-/// If defined, indicates that Json specific container should be used
-/// (hash table & simple deque container with customizable allocator).
-/// THIS FEATURE IS STILL EXPERIMENTAL!
-//#  define JSON_VALUE_USE_INTERNAL_MAP 1
-/// Force usage of standard new/malloc based allocator instead of memory pool based allocator.
-/// The memory pools allocator used optimization (initializing Value and ValueInternalLink
-/// as if it was a POD) that may cause some validation tool to report errors.
-/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined.
-//#  define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
-
-/// If defined, indicates that Json use exception to report invalid type manipulation
-/// instead of C assert macro.
-# define JSON_USE_EXCEPTION 1
-
-# ifdef JSON_IN_CPPTL
-#  include <cpptl/config.h>
-#  ifndef JSON_USE_CPPTL
-#   define JSON_USE_CPPTL 1
-#  endif
-# endif
-
-# ifdef JSON_IN_CPPTL
-#  define JSON_API CPPTL_API
-# elif defined(JSON_DLL_BUILD)
-#  define JSON_API __declspec(dllexport)
-# elif defined(JSON_DLL)
-#  define JSON_API __declspec(dllimport)
-# else
-#  define JSON_API
-# endif
-
-#endif // JSON_CONFIG_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json/features.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json/features.h b/test/plugins/cordova.echo/src/BlackBerry10/public/json/features.h
deleted file mode 100644
index 8ecddb9..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json/features.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
-# define CPPTL_JSON_FEATURES_H_INCLUDED
-
-# include "forwards.h"
-
-namespace Json {
-
-   /** \brief Configuration passed to reader and writer.
-    * This configuration object can be used to force the Reader or Writer
-    * to behave in a standard conforming way.
-    */
-   class JSON_API Features
-   {
-   public:
-      /** \brief A configuration that allows all features and assumes all strings are UTF-8.
-       * - C & C++ comments are allowed
-       * - Root object can be any JSON value
-       * - Assumes Value strings are encoded in UTF-8
-       */
-      static Features all();
-
-      /** \brief A configuration that is strictly compatible with the JSON specification.
-       * - Comments are forbidden.
-       * - Root object must be either an array or an object value.
-       * - Assumes Value strings are encoded in UTF-8
-       */
-      static Features strictMode();
-
-      /** \brief Initialize the configuration like JsonConfig::allFeatures;
-       */
-      Features();
-
-      /// \c true if comments are allowed. Default: \c true.
-      bool allowComments_;
-
-      /// \c true if root must be either an array or an object value. Default: \c false.
-      bool strictRoot_;
-   };
-
-} // namespace Json
-
-#endif // CPPTL_JSON_FEATURES_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json/forwards.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json/forwards.h b/test/plugins/cordova.echo/src/BlackBerry10/public/json/forwards.h
deleted file mode 100644
index b96a134..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json/forwards.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#ifndef JSON_FORWARDS_H_INCLUDED
-# define JSON_FORWARDS_H_INCLUDED
-
-# include "config.h"
-
-namespace Json {
-
-   // writer.h
-   class FastWriter;
-   class StyledWriter;
-
-   // reader.h
-   class Reader;
-
-   // features.h
-   class Features;
-
-   // value.h
-   typedef int Int;
-   typedef unsigned int UInt;
-   class StaticString;
-   class Path;
-   class PathArgument;
-   class Value;
-   class ValueIteratorBase;
-   class ValueIterator;
-   class ValueConstIterator;
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   class ValueAllocator;
-   class ValueMapAllocator;
-   class ValueInternalLink;
-   class ValueInternalArray;
-   class ValueInternalMap;
-#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
-
-} // namespace Json
-
-
-#endif // JSON_FORWARDS_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json/json.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json/json.h b/test/plugins/cordova.echo/src/BlackBerry10/public/json/json.h
deleted file mode 100644
index b635f8a..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json/json.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#ifndef JSON_JSON_H_INCLUDED
-# define JSON_JSON_H_INCLUDED
-
-# include "autolink.h"
-# include "value.h"
-# include "reader.h"
-# include "writer.h"
-# include "features.h"
-
-#endif // JSON_JSON_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json/reader.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json/reader.h b/test/plugins/cordova.echo/src/BlackBerry10/public/json/reader.h
deleted file mode 100644
index e3f8d0d..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json/reader.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#ifndef CPPTL_JSON_READER_H_INCLUDED
-# define CPPTL_JSON_READER_H_INCLUDED
-
-# include "features.h"
-# include "value.h"
-# include <deque>
-# include <stack>
-# include <string>
-# include <iostream>
-
-namespace Json {
-
-   /** \brief Unserialize a <a HREF="http://www.json.org">JSON</a> document into a Value.
-    *
-    */
-   class JSON_API Reader
-   {
-   public:
-      typedef char Char;
-      typedef const Char *Location;
-
-      /** \brief Constructs a Reader allowing all features
-       * for parsing.
-       */
-      Reader();
-
-      /** \brief Constructs a Reader allowing the specified feature set
-       * for parsing.
-       */
-      Reader( const Features &features );
-
-      /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
-       * \param document UTF-8 encoded string containing the document to read.
-       * \param root [out] Contains the root value of the document if it was
-       *             successfully parsed.
-       * \param collectComments \c true to collect comment and allow writing them back during
-       *                        serialization, \c false to discard comments.
-       *                        This parameter is ignored if Features::allowComments_
-       *                        is \c false.
-       * \return \c true if the document was successfully parsed, \c false if an error occurred.
-       */
-      bool parse( const std::string &document, 
-                  Value &root,
-                  bool collectComments = true );
-
-      /** \brief Read a Value from a <a HREF="http://www.json.org">JSON</a> document.
-       * \param document UTF-8 encoded string containing the document to read.
-       * \param root [out] Contains the root value of the document if it was
-       *             successfully parsed.
-       * \param collectComments \c true to collect comment and allow writing them back during
-       *                        serialization, \c false to discard comments.
-       *                        This parameter is ignored if Features::allowComments_
-       *                        is \c false.
-       * \return \c true if the document was successfully parsed, \c false if an error occurred.
-       */
-      bool parse( const char *beginDoc, const char *endDoc, 
-                  Value &root,
-                  bool collectComments = true );
-
-      /// \brief Parse from input stream.
-      /// \see Json::operator>>(std::istream&, Json::Value&).
-      bool parse( std::istream &is,
-                  Value &root,
-                  bool collectComments = true );
-
-      /** \brief Returns a user friendly string that list errors in the parsed document.
-       * \return Formatted error message with the list of errors with their location in 
-       *         the parsed document. An empty string is returned if no error occurred
-       *         during parsing.
-       */
-      std::string getFormatedErrorMessages() const;
-
-   private:
-      enum TokenType
-      {
-         tokenEndOfStream = 0,
-         tokenObjectBegin,
-         tokenObjectEnd,
-         tokenArrayBegin,
-         tokenArrayEnd,
-         tokenString,
-         tokenNumber,
-         tokenTrue,
-         tokenFalse,
-         tokenNull,
-         tokenArraySeparator,
-         tokenMemberSeparator,
-         tokenComment,
-         tokenError
-      };
-
-      class Token
-      {
-      public:
-         TokenType type_;
-         Location start_;
-         Location end_;
-      };
-
-      class ErrorInfo
-      {
-      public:
-         Token token_;
-         std::string message_;
-         Location extra_;
-      };
-
-      typedef std::deque<ErrorInfo> Errors;
-
-      bool expectToken( TokenType type, Token &token, const char *message );
-      bool readToken( Token &token );
-      void skipSpaces();
-      bool match( Location pattern, 
-                  int patternLength );
-      bool readComment();
-      bool readCStyleComment();
-      bool readCppStyleComment();
-      bool readString();
-      void readNumber();
-      bool readValue();
-      bool readObject( Token &token );
-      bool readArray( Token &token );
-      bool decodeNumber( Token &token );
-      bool decodeString( Token &token );
-      bool decodeString( Token &token, std::string &decoded );
-      bool decodeDouble( Token &token );
-      bool decodeUnicodeCodePoint( Token &token, 
-                                   Location &current, 
-                                   Location end, 
-                                   unsigned int &unicode );
-      bool decodeUnicodeEscapeSequence( Token &token, 
-                                        Location &current, 
-                                        Location end, 
-                                        unsigned int &unicode );
-      bool addError( const std::string &message, 
-                     Token &token,
-                     Location extra = 0 );
-      bool recoverFromError( TokenType skipUntilToken );
-      bool addErrorAndRecover( const std::string &message, 
-                               Token &token,
-                               TokenType skipUntilToken );
-      void skipUntilSpace();
-      Value &currentValue();
-      Char getNextChar();
-      void getLocationLineAndColumn( Location location,
-                                     int &line,
-                                     int &column ) const;
-      std::string getLocationLineAndColumn( Location location ) const;
-      void addComment( Location begin, 
-                       Location end, 
-                       CommentPlacement placement );
-      void skipCommentTokens( Token &token );
-   
-      typedef std::stack<Value *> Nodes;
-      Nodes nodes_;
-      Errors errors_;
-      std::string document_;
-      Location begin_;
-      Location end_;
-      Location current_;
-      Location lastValueEnd_;
-      Value *lastValue_;
-      std::string commentsBefore_;
-      Features features_;
-      bool collectComments_;
-   };
-
-   /** \brief Read from 'sin' into 'root'.
-
-    Always keep comments from the input JSON.
-
-    This can be used to read a file into a particular sub-object.
-    For example:
-    \code
-    Json::Value root;
-    cin >> root["dir"]["file"];
-    cout << root;
-    \endcode
-    Result:
-    \verbatim
-    {
-	"dir": {
-	    "file": {
-		// The input stream JSON would be nested here.
-	    }
-	}
-    }
-    \endverbatim
-    \throw std::exception on parse error.
-    \see Json::operator<<()
-   */
-   std::istream& operator>>( std::istream&, Value& );
-
-} // namespace Json
-
-#endif // CPPTL_JSON_READER_H_INCLUDED


[06/54] [abbrv] renamed blackberry assets

Posted by ti...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json/value.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json/value.h b/test/plugins/cordova.echo/src/BlackBerry10/public/json/value.h
deleted file mode 100644
index 1253f96..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json/value.h
+++ /dev/null
@@ -1,1088 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#ifndef CPPTL_JSON_H_INCLUDED
-# define CPPTL_JSON_H_INCLUDED
-
-# include "forwards.h"
-# include <string>
-# include <vector>
-
-# ifndef JSON_USE_CPPTL_SMALLMAP
-#  include <map>
-# else
-#  include <cpptl/smallmap.h>
-# endif
-# ifdef JSON_USE_CPPTL
-#  include <cpptl/forwards.h>
-# endif
-
-/** \brief JSON (JavaScript Object Notation).
- */
-namespace Json {
-
-   /** \brief Type of the value held by a Value object.
-    */
-   enum ValueType
-   {
-      nullValue = 0, ///< 'null' value
-      intValue,      ///< signed integer value
-      uintValue,     ///< unsigned integer value
-      realValue,     ///< double value
-      stringValue,   ///< UTF-8 string value
-      booleanValue,  ///< bool value
-      arrayValue,    ///< array value (ordered list)
-      objectValue    ///< object value (collection of name/value pairs).
-   };
-
-   enum CommentPlacement
-   {
-      commentBefore = 0,        ///< a comment placed on the line before a value
-      commentAfterOnSameLine,   ///< a comment just after a value on the same line
-      commentAfter,             ///< a comment on the line after a value (only make sense for root value)
-      numberOfCommentPlacement
-   };
-
-//# ifdef JSON_USE_CPPTL
-//   typedef CppTL::AnyEnumerator<const char *> EnumMemberNames;
-//   typedef CppTL::AnyEnumerator<const Value &> EnumValues;
-//# endif
-
-   /** \brief Lightweight wrapper to tag static string.
-    *
-    * Value constructor and objectValue member assignement takes advantage of the
-    * StaticString and avoid the cost of string duplication when storing the
-    * string or the member name.
-    *
-    * Example of usage:
-    * \code
-    * Json::Value aValue( StaticString("some text") );
-    * Json::Value object;
-    * static const StaticString code("code");
-    * object[code] = 1234;
-    * \endcode
-    */
-   class JSON_API StaticString
-   {
-   public:
-      explicit StaticString( const char *czstring )
-         : str_( czstring )
-      {
-      }
-
-      operator const char *() const
-      {
-         return str_;
-      }
-
-      const char *c_str() const
-      {
-         return str_;
-      }
-
-   private:
-      const char *str_;
-   };
-
-   /** \brief Represents a <a HREF="http://www.json.org">JSON</a> value.
-    *
-    * This class is a discriminated union wrapper that can represents a:
-    * - signed integer [range: Value::minInt - Value::maxInt]
-    * - unsigned integer (range: 0 - Value::maxUInt)
-    * - double
-    * - UTF-8 string
-    * - boolean
-    * - 'null'
-    * - an ordered list of Value
-    * - collection of name/value pairs (javascript object)
-    *
-    * The type of the held value is represented by a #ValueType and 
-    * can be obtained using type().
-    *
-    * values of an #objectValue or #arrayValue can be accessed using operator[]() methods. 
-    * Non const methods will automatically create the a #nullValue element 
-    * if it does not exist. 
-    * The sequence of an #arrayValue will be automatically resize and initialized 
-    * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue.
-    *
-    * The get() methods can be used to obtanis default value in the case the required element
-    * does not exist.
-    *
-    * It is possible to iterate over the list of a #objectValue values using 
-    * the getMemberNames() method.
-    */
-   class JSON_API Value 
-   {
-      friend class ValueIteratorBase;
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-      friend class ValueInternalLink;
-      friend class ValueInternalMap;
-# endif
-   public:
-      typedef std::vector<std::string> Members;
-      typedef ValueIterator iterator;
-      typedef ValueConstIterator const_iterator;
-      typedef Json::UInt UInt;
-      typedef Json::Int Int;
-      typedef UInt ArrayIndex;
-
-      static const Value null;
-      static const Int minInt;
-      static const Int maxInt;
-      static const UInt maxUInt;
-
-   private:
-#ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-# ifndef JSON_VALUE_USE_INTERNAL_MAP
-      class CZString 
-      {
-      public:
-         enum DuplicationPolicy 
-         {
-            noDuplication = 0,
-            duplicate,
-            duplicateOnCopy
-         };
-         CZString( int index );
-         CZString( const char *cstr, DuplicationPolicy allocate );
-         CZString( const CZString &other );
-         ~CZString();
-         CZString &operator =( const CZString &other );
-         bool operator<( const CZString &other ) const;
-         bool operator==( const CZString &other ) const;
-         int index() const;
-         const char *c_str() const;
-         bool isStaticString() const;
-      private:
-         void swap( CZString &other );
-         const char *cstr_;
-         int index_;
-      };
-
-   public:
-#  ifndef JSON_USE_CPPTL_SMALLMAP
-      typedef std::map<CZString, Value> ObjectValues;
-#  else
-      typedef CppTL::SmallMap<CZString, Value> ObjectValues;
-#  endif // ifndef JSON_USE_CPPTL_SMALLMAP
-# endif // ifndef JSON_VALUE_USE_INTERNAL_MAP
-#endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-   public:
-      /** \brief Create a default Value of the given type.
-
-        This is a very useful constructor.
-        To create an empty array, pass arrayValue.
-        To create an empty object, pass objectValue.
-        Another Value can then be set to this one by assignment.
-	This is useful since clear() and resize() will not alter types.
-
-        Examples:
-	\code
-	Json::Value null_value; // null
-	Json::Value arr_value(Json::arrayValue); // []
-	Json::Value obj_value(Json::objectValue); // {}
-	\endcode
-      */
-      Value( ValueType type = nullValue );
-      Value( Int value );
-      Value( UInt value );
-      Value( double value );
-      Value( const char *value );
-      Value( const char *beginValue, const char *endValue );
-      /** \brief Constructs a value from a static string.
-
-       * Like other value string constructor but do not duplicate the string for
-       * internal storage. The given string must remain alive after the call to this
-       * constructor.
-       * Example of usage:
-       * \code
-       * Json::Value aValue( StaticString("some text") );
-       * \endcode
-       */
-      Value( const StaticString &value );
-      Value( const std::string &value );
-# ifdef JSON_USE_CPPTL
-      Value( const CppTL::ConstString &value );
-# endif
-      Value( bool value );
-      Value( const Value &other );
-      ~Value();
-
-      Value &operator=( const Value &other );
-      /// Swap values.
-      /// \note Currently, comments are intentionally not swapped, for
-      /// both logic and efficiency.
-      void swap( Value &other );
-
-      ValueType type() const;
-
-      bool operator <( const Value &other ) const;
-      bool operator <=( const Value &other ) const;
-      bool operator >=( const Value &other ) const;
-      bool operator >( const Value &other ) const;
-
-      bool operator ==( const Value &other ) const;
-      bool operator !=( const Value &other ) const;
-
-      int compare( const Value &other );
-
-      const char *asCString() const;
-      std::string asString() const;
-# ifdef JSON_USE_CPPTL
-      CppTL::ConstString asConstString() const;
-# endif
-      Int asInt() const;
-      UInt asUInt() const;
-      double asDouble() const;
-      bool asBool() const;
-
-      bool isNull() const;
-      bool isBool() const;
-      bool isInt() const;
-      bool isUInt() const;
-      bool isIntegral() const;
-      bool isDouble() const;
-      bool isNumeric() const;
-      bool isString() const;
-      bool isArray() const;
-      bool isObject() const;
-
-      bool isConvertibleTo( ValueType other ) const;
-
-      /// Number of values in array or object
-      UInt size() const;
-
-      /// \brief Return true if empty array, empty object, or null;
-      /// otherwise, false.
-      bool empty() const;
-
-      /// Return isNull()
-      bool operator!() const;
-
-      /// Remove all object members and array elements.
-      /// \pre type() is arrayValue, objectValue, or nullValue
-      /// \post type() is unchanged
-      void clear();
-
-      /// Resize the array to size elements. 
-      /// New elements are initialized to null.
-      /// May only be called on nullValue or arrayValue.
-      /// \pre type() is arrayValue or nullValue
-      /// \post type() is arrayValue
-      void resize( UInt size );
-
-      /// Access an array element (zero based index ).
-      /// If the array contains less than index element, then null value are inserted
-      /// in the array so that its size is index+1.
-      /// (You may need to say 'value[0u]' to get your compiler to distinguish
-      ///  this from the operator[] which takes a string.)
-      Value &operator[]( UInt index );
-      /// Access an array element (zero based index )
-      /// (You may need to say 'value[0u]' to get your compiler to distinguish
-      ///  this from the operator[] which takes a string.)
-      const Value &operator[]( UInt index ) const;
-      /// If the array contains at least index+1 elements, returns the element value, 
-      /// otherwise returns defaultValue.
-      Value get( UInt index, 
-                 const Value &defaultValue ) const;
-      /// Return true if index < size().
-      bool isValidIndex( UInt index ) const;
-      /// \brief Append value to array at the end.
-      ///
-      /// Equivalent to jsonvalue[jsonvalue.size()] = value;
-      Value &append( const Value &value );
-
-      /// Access an object value by name, create a null member if it does not exist.
-      Value &operator[]( const char *key );
-      /// Access an object value by name, returns null if there is no member with that name.
-      const Value &operator[]( const char *key ) const;
-      /// Access an object value by name, create a null member if it does not exist.
-      Value &operator[]( const std::string &key );
-      /// Access an object value by name, returns null if there is no member with that name.
-      const Value &operator[]( const std::string &key ) const;
-      /** \brief Access an object value by name, create a null member if it does not exist.
-
-       * If the object as no entry for that name, then the member name used to store
-       * the new entry is not duplicated.
-       * Example of use:
-       * \code
-       * Json::Value object;
-       * static const StaticString code("code");
-       * object[code] = 1234;
-       * \endcode
-       */
-      Value &operator[]( const StaticString &key );
-# ifdef JSON_USE_CPPTL
-      /// Access an object value by name, create a null member if it does not exist.
-      Value &operator[]( const CppTL::ConstString &key );
-      /// Access an object value by name, returns null if there is no member with that name.
-      const Value &operator[]( const CppTL::ConstString &key ) const;
-# endif
-      /// Return the member named key if it exist, defaultValue otherwise.
-      Value get( const char *key, 
-                 const Value &defaultValue ) const;
-      /// Return the member named key if it exist, defaultValue otherwise.
-      Value get( const std::string &key,
-                 const Value &defaultValue ) const;
-# ifdef JSON_USE_CPPTL
-      /// Return the member named key if it exist, defaultValue otherwise.
-      Value get( const CppTL::ConstString &key,
-                 const Value &defaultValue ) const;
-# endif
-      /// \brief Remove and return the named member.  
-      ///
-      /// Do nothing if it did not exist.
-      /// \return the removed Value, or null.
-      /// \pre type() is objectValue or nullValue
-      /// \post type() is unchanged
-      Value removeMember( const char* key );
-      /// Same as removeMember(const char*)
-      Value removeMember( const std::string &key );
-
-      /// Return true if the object has a member named key.
-      bool isMember( const char *key ) const;
-      /// Return true if the object has a member named key.
-      bool isMember( const std::string &key ) const;
-# ifdef JSON_USE_CPPTL
-      /// Return true if the object has a member named key.
-      bool isMember( const CppTL::ConstString &key ) const;
-# endif
-
-      /// \brief Return a list of the member names.
-      ///
-      /// If null, return an empty list.
-      /// \pre type() is objectValue or nullValue
-      /// \post if type() was nullValue, it remains nullValue
-      Members getMemberNames() const;
-
-//# ifdef JSON_USE_CPPTL
-//      EnumMemberNames enumMemberNames() const;
-//      EnumValues enumValues() const;
-//# endif
-
-      /// Comments must be //... or /* ... */
-      void setComment( const char *comment,
-                       CommentPlacement placement );
-      /// Comments must be //... or /* ... */
-      void setComment( const std::string &comment,
-                       CommentPlacement placement );
-      bool hasComment( CommentPlacement placement ) const;
-      /// Include delimiters and embedded newlines.
-      std::string getComment( CommentPlacement placement ) const;
-
-      std::string toStyledString() const;
-
-      const_iterator begin() const;
-      const_iterator end() const;
-
-      iterator begin();
-      iterator end();
-
-   private:
-      Value &resolveReference( const char *key, 
-                               bool isStatic );
-
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-      inline bool isItemAvailable() const
-      {
-         return itemIsUsed_ == 0;
-      }
-
-      inline void setItemUsed( bool isUsed = true )
-      {
-         itemIsUsed_ = isUsed ? 1 : 0;
-      }
-
-      inline bool isMemberNameStatic() const
-      {
-         return memberNameIsStatic_ == 0;
-      }
-
-      inline void setMemberNameIsStatic( bool isStatic )
-      {
-         memberNameIsStatic_ = isStatic ? 1 : 0;
-      }
-# endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP
-
-   private:
-      struct CommentInfo
-      {
-         CommentInfo();
-         ~CommentInfo();
-
-         void setComment( const char *text );
-
-         char *comment_;
-      };
-
-      //struct MemberNamesTransform
-      //{
-      //   typedef const char *result_type;
-      //   const char *operator()( const CZString &name ) const
-      //   {
-      //      return name.c_str();
-      //   }
-      //};
-
-      union ValueHolder
-      {
-         Int int_;
-         UInt uint_;
-         double real_;
-         bool bool_;
-         char *string_;
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-         ValueInternalArray *array_;
-         ValueInternalMap *map_;
-#else
-         ObjectValues *map_;
-# endif
-      } value_;
-      ValueType type_ : 8;
-      int allocated_ : 1;     // Notes: if declared as bool, bitfield is useless.
-# ifdef JSON_VALUE_USE_INTERNAL_MAP
-      unsigned int itemIsUsed_ : 1;      // used by the ValueInternalMap container.
-      int memberNameIsStatic_ : 1;       // used by the ValueInternalMap container.
-# endif
-      CommentInfo *comments_;
-   };
-
-
-   /** \brief Experimental and untested: represents an element of the "path" to access a node.
-    */
-   class PathArgument
-   {
-   public:
-      friend class Path;
-
-      PathArgument();
-      PathArgument( UInt index );
-      PathArgument( const char *key );
-      PathArgument( const std::string &key );
-
-   private:
-      enum Kind
-      {
-         kindNone = 0,
-         kindIndex,
-         kindKey
-      };
-      std::string key_;
-      UInt index_;
-      Kind kind_;
-   };
-
-   /** \brief Experimental and untested: represents a "path" to access a node.
-    *
-    * Syntax:
-    * - "." => root node
-    * - ".[n]" => elements at index 'n' of root node (an array value)
-    * - ".name" => member named 'name' of root node (an object value)
-    * - ".name1.name2.name3"
-    * - ".[0][1][2].name1[3]"
-    * - ".%" => member name is provided as parameter
-    * - ".[%]" => index is provied as parameter
-    */
-   class Path
-   {
-   public:
-      Path( const std::string &path,
-            const PathArgument &a1 = PathArgument(),
-            const PathArgument &a2 = PathArgument(),
-            const PathArgument &a3 = PathArgument(),
-            const PathArgument &a4 = PathArgument(),
-            const PathArgument &a5 = PathArgument() );
-
-      const Value &resolve( const Value &root ) const;
-      Value resolve( const Value &root, 
-                     const Value &defaultValue ) const;
-      /// Creates the "path" to access the specified node and returns a reference on the node.
-      Value &make( Value &root ) const;
-
-   private:
-      typedef std::vector<const PathArgument *> InArgs;
-      typedef std::vector<PathArgument> Args;
-
-      void makePath( const std::string &path,
-                     const InArgs &in );
-      void addPathInArg( const std::string &path, 
-                         const InArgs &in, 
-                         InArgs::const_iterator &itInArg, 
-                         PathArgument::Kind kind );
-      void invalidPath( const std::string &path, 
-                        int location );
-
-      Args args_;
-   };
-
-   /** \brief Experimental do not use: Allocator to customize member name and string value memory management done by Value.
-    *
-    * - makeMemberName() and releaseMemberName() are called to respectively duplicate and
-    *   free an Json::objectValue member name.
-    * - duplicateStringValue() and releaseStringValue() are called similarly to
-    *   duplicate and free a Json::stringValue value.
-    */
-   class ValueAllocator
-   {
-   public:
-      enum { unknown = (unsigned)-1 };
-
-      virtual ~ValueAllocator();
-
-      virtual char *makeMemberName( const char *memberName ) = 0;
-      virtual void releaseMemberName( char *memberName ) = 0;
-      virtual char *duplicateStringValue( const char *value, 
-                                          unsigned int length = unknown ) = 0;
-      virtual void releaseStringValue( char *value ) = 0;
-   };
-
-#ifdef JSON_VALUE_USE_INTERNAL_MAP
-   /** \brief Allocator to customize Value internal map.
-    * Below is an example of a simple implementation (default implementation actually
-    * use memory pool for speed).
-    * \code
-      class DefaultValueMapAllocator : public ValueMapAllocator
-      {
-      public: // overridden from ValueMapAllocator
-         virtual ValueInternalMap *newMap()
-         {
-            return new ValueInternalMap();
-         }
-
-         virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
-         {
-            return new ValueInternalMap( other );
-         }
-
-         virtual void destructMap( ValueInternalMap *map )
-         {
-            delete map;
-         }
-
-         virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
-         {
-            return new ValueInternalLink[size];
-         }
-
-         virtual void releaseMapBuckets( ValueInternalLink *links )
-         {
-            delete [] links;
-         }
-
-         virtual ValueInternalLink *allocateMapLink()
-         {
-            return new ValueInternalLink();
-         }
-
-         virtual void releaseMapLink( ValueInternalLink *link )
-         {
-            delete link;
-         }
-      };
-    * \endcode
-    */ 
-   class JSON_API ValueMapAllocator
-   {
-   public:
-      virtual ~ValueMapAllocator();
-      virtual ValueInternalMap *newMap() = 0;
-      virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0;
-      virtual void destructMap( ValueInternalMap *map ) = 0;
-      virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0;
-      virtual void releaseMapBuckets( ValueInternalLink *links ) = 0;
-      virtual ValueInternalLink *allocateMapLink() = 0;
-      virtual void releaseMapLink( ValueInternalLink *link ) = 0;
-   };
-
-   /** \brief ValueInternalMap hash-map bucket chain link (for internal use only).
-    * \internal previous_ & next_ allows for bidirectional traversal.
-    */
-   class JSON_API ValueInternalLink
-   {
-   public:
-      enum { itemPerLink = 6 };  // sizeof(ValueInternalLink) = 128 on 32 bits architecture.
-      enum InternalFlags { 
-         flagAvailable = 0,
-         flagUsed = 1
-      };
-
-      ValueInternalLink();
-
-      ~ValueInternalLink();
-
-      Value items_[itemPerLink];
-      char *keys_[itemPerLink];
-      ValueInternalLink *previous_;
-      ValueInternalLink *next_;
-   };
-
-
-   /** \brief A linked page based hash-table implementation used internally by Value.
-    * \internal ValueInternalMap is a tradional bucket based hash-table, with a linked
-    * list in each bucket to handle collision. There is an addional twist in that
-    * each node of the collision linked list is a page containing a fixed amount of
-    * value. This provides a better compromise between memory usage and speed.
-    * 
-    * Each bucket is made up of a chained list of ValueInternalLink. The last
-    * link of a given bucket can be found in the 'previous_' field of the following bucket.
-    * The last link of the last bucket is stored in tailLink_ as it has no following bucket.
-    * Only the last link of a bucket may contains 'available' item. The last link always
-    * contains at least one element unless is it the bucket one very first link.
-    */
-   class JSON_API ValueInternalMap
-   {
-      friend class ValueIteratorBase;
-      friend class Value;
-   public:
-      typedef unsigned int HashKey;
-      typedef unsigned int BucketIndex;
-
-# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-      struct IteratorState
-      {
-         IteratorState() 
-            : map_(0)
-            , link_(0)
-            , itemIndex_(0)
-            , bucketIndex_(0) 
-         {
-         }
-         ValueInternalMap *map_;
-         ValueInternalLink *link_;
-         BucketIndex itemIndex_;
-         BucketIndex bucketIndex_;
-      };
-# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-      ValueInternalMap();
-      ValueInternalMap( const ValueInternalMap &other );
-      ValueInternalMap &operator =( const ValueInternalMap &other );
-      ~ValueInternalMap();
-
-      void swap( ValueInternalMap &other );
-
-      BucketIndex size() const;
-
-      void clear();
-
-      bool reserveDelta( BucketIndex growth );
-
-      bool reserve( BucketIndex newItemCount );
-
-      const Value *find( const char *key ) const;
-
-      Value *find( const char *key );
-
-      Value &resolveReference( const char *key, 
-                               bool isStatic );
-
-      void remove( const char *key );
-
-      void doActualRemove( ValueInternalLink *link, 
-                           BucketIndex index,
-                           BucketIndex bucketIndex );
-
-      ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex );
-
-      Value &setNewItem( const char *key, 
-                         bool isStatic, 
-                         ValueInternalLink *link, 
-                         BucketIndex index );
-
-      Value &unsafeAdd( const char *key, 
-                        bool isStatic, 
-                        HashKey hashedKey );
-
-      HashKey hash( const char *key ) const;
-
-      int compare( const ValueInternalMap &other ) const;
-
-   private:
-      void makeBeginIterator( IteratorState &it ) const;
-      void makeEndIterator( IteratorState &it ) const;
-      static bool equals( const IteratorState &x, const IteratorState &other );
-      static void increment( IteratorState &iterator );
-      static void incrementBucket( IteratorState &iterator );
-      static void decrement( IteratorState &iterator );
-      static const char *key( const IteratorState &iterator );
-      static const char *key( const IteratorState &iterator, bool &isStatic );
-      static Value &value( const IteratorState &iterator );
-      static int distance( const IteratorState &x, const IteratorState &y );
-
-   private:
-      ValueInternalLink *buckets_;
-      ValueInternalLink *tailLink_;
-      BucketIndex bucketsSize_;
-      BucketIndex itemCount_;
-   };
-
-   /** \brief A simplified deque implementation used internally by Value.
-   * \internal
-   * It is based on a list of fixed "page", each page contains a fixed number of items.
-   * Instead of using a linked-list, a array of pointer is used for fast item look-up.
-   * Look-up for an element is as follow:
-   * - compute page index: pageIndex = itemIndex / itemsPerPage
-   * - look-up item in page: pages_[pageIndex][itemIndex % itemsPerPage]
-   *
-   * Insertion is amortized constant time (only the array containing the index of pointers
-   * need to be reallocated when items are appended).
-   */
-   class JSON_API ValueInternalArray
-   {
-      friend class Value;
-      friend class ValueIteratorBase;
-   public:
-      enum { itemsPerPage = 8 };    // should be a power of 2 for fast divide and modulo.
-      typedef Value::ArrayIndex ArrayIndex;
-      typedef unsigned int PageIndex;
-
-# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-      struct IteratorState // Must be a POD
-      {
-         IteratorState() 
-            : array_(0)
-            , currentPageIndex_(0)
-            , currentItemIndex_(0) 
-         {
-         }
-         ValueInternalArray *array_;
-         Value **currentPageIndex_;
-         unsigned int currentItemIndex_;
-      };
-# endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-      ValueInternalArray();
-      ValueInternalArray( const ValueInternalArray &other );
-      ValueInternalArray &operator =( const ValueInternalArray &other );
-      ~ValueInternalArray();
-      void swap( ValueInternalArray &other );
-
-      void clear();
-      void resize( ArrayIndex newSize );
-
-      Value &resolveReference( ArrayIndex index );
-
-      Value *find( ArrayIndex index ) const;
-
-      ArrayIndex size() const;
-
-      int compare( const ValueInternalArray &other ) const;
-
-   private:
-      static bool equals( const IteratorState &x, const IteratorState &other );
-      static void increment( IteratorState &iterator );
-      static void decrement( IteratorState &iterator );
-      static Value &dereference( const IteratorState &iterator );
-      static Value &unsafeDereference( const IteratorState &iterator );
-      static int distance( const IteratorState &x, const IteratorState &y );
-      static ArrayIndex indexOf( const IteratorState &iterator );
-      void makeBeginIterator( IteratorState &it ) const;
-      void makeEndIterator( IteratorState &it ) const;
-      void makeIterator( IteratorState &it, ArrayIndex index ) const;
-
-      void makeIndexValid( ArrayIndex index );
-
-      Value **pages_;
-      ArrayIndex size_;
-      PageIndex pageCount_;
-   };
-
-   /** \brief Experimental: do not use. Allocator to customize Value internal array.
-    * Below is an example of a simple implementation (actual implementation use
-    * memory pool).
-      \code
-class DefaultValueArrayAllocator : public ValueArrayAllocator
-{
-public: // overridden from ValueArrayAllocator
-   virtual ~DefaultValueArrayAllocator()
-   {
-   }
-
-   virtual ValueInternalArray *newArray()
-   {
-      return new ValueInternalArray();
-   }
-
-   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
-   {
-      return new ValueInternalArray( other );
-   }
-
-   virtual void destruct( ValueInternalArray *array )
-   {
-      delete array;
-   }
-
-   virtual void reallocateArrayPageIndex( Value **&indexes, 
-                                          ValueInternalArray::PageIndex &indexCount,
-                                          ValueInternalArray::PageIndex minNewIndexCount )
-   {
-      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
-      if ( minNewIndexCount > newIndexCount )
-         newIndexCount = minNewIndexCount;
-      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
-      if ( !newIndexes )
-         throw std::bad_alloc();
-      indexCount = newIndexCount;
-      indexes = static_cast<Value **>( newIndexes );
-   }
-   virtual void releaseArrayPageIndex( Value **indexes, 
-                                       ValueInternalArray::PageIndex indexCount )
-   {
-      if ( indexes )
-         free( indexes );
-   }
-
-   virtual Value *allocateArrayPage()
-   {
-      return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
-   }
-
-   virtual void releaseArrayPage( Value *value )
-   {
-      if ( value )
-         free( value );
-   }
-};
-      \endcode
-    */ 
-   class JSON_API ValueArrayAllocator
-   {
-   public:
-      virtual ~ValueArrayAllocator();
-      virtual ValueInternalArray *newArray() = 0;
-      virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0;
-      virtual void destructArray( ValueInternalArray *array ) = 0;
-      /** \brief Reallocate array page index.
-       * Reallocates an array of pointer on each page.
-       * \param indexes [input] pointer on the current index. May be \c NULL.
-       *                [output] pointer on the new index of at least 
-       *                         \a minNewIndexCount pages. 
-       * \param indexCount [input] current number of pages in the index.
-       *                   [output] number of page the reallocated index can handle.
-       *                            \b MUST be >= \a minNewIndexCount.
-       * \param minNewIndexCount Minimum number of page the new index must be able to
-       *                         handle.
-       */
-      virtual void reallocateArrayPageIndex( Value **&indexes, 
-                                             ValueInternalArray::PageIndex &indexCount,
-                                             ValueInternalArray::PageIndex minNewIndexCount ) = 0;
-      virtual void releaseArrayPageIndex( Value **indexes, 
-                                          ValueInternalArray::PageIndex indexCount ) = 0;
-      virtual Value *allocateArrayPage() = 0;
-      virtual void releaseArrayPage( Value *value ) = 0;
-   };
-#endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
-
-
-   /** \brief base class for Value iterators.
-    *
-    */
-   class ValueIteratorBase
-   {
-   public:
-      typedef unsigned int size_t;
-      typedef int difference_type;
-      typedef ValueIteratorBase SelfType;
-
-      ValueIteratorBase();
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-      explicit ValueIteratorBase( const Value::ObjectValues::iterator &current );
-#else
-      ValueIteratorBase( const ValueInternalArray::IteratorState &state );
-      ValueIteratorBase( const ValueInternalMap::IteratorState &state );
-#endif
-
-      bool operator ==( const SelfType &other ) const
-      {
-         return isEqual( other );
-      }
-
-      bool operator !=( const SelfType &other ) const
-      {
-         return !isEqual( other );
-      }
-
-      difference_type operator -( const SelfType &other ) const
-      {
-         return computeDistance( other );
-      }
-
-      /// Return either the index or the member name of the referenced value as a Value.
-      Value key() const;
-
-      /// Return the index of the referenced Value. -1 if it is not an arrayValue.
-      UInt index() const;
-
-      /// Return the member name of the referenced Value. "" if it is not an objectValue.
-      const char *memberName() const;
-
-   protected:
-      Value &deref() const;
-
-      void increment();
-
-      void decrement();
-
-      difference_type computeDistance( const SelfType &other ) const;
-
-      bool isEqual( const SelfType &other ) const;
-
-      void copy( const SelfType &other );
-
-   private:
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-      Value::ObjectValues::iterator current_;
-      // Indicates that iterator is for a null value.
-      bool isNull_;
-#else
-      union
-      {
-         ValueInternalArray::IteratorState array_;
-         ValueInternalMap::IteratorState map_;
-      } iterator_;
-      bool isArray_;
-#endif
-   };
-
-   /** \brief const iterator for object and array value.
-    *
-    */
-   class ValueConstIterator : public ValueIteratorBase
-   {
-      friend class Value;
-   public:
-      typedef unsigned int size_t;
-      typedef int difference_type;
-      typedef const Value &reference;
-      typedef const Value *pointer;
-      typedef ValueConstIterator SelfType;
-
-      ValueConstIterator();
-   private:
-      /*! \internal Use by Value to create an iterator.
-       */
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-      explicit ValueConstIterator( const Value::ObjectValues::iterator &current );
-#else
-      ValueConstIterator( const ValueInternalArray::IteratorState &state );
-      ValueConstIterator( const ValueInternalMap::IteratorState &state );
-#endif
-   public:
-      SelfType &operator =( const ValueIteratorBase &other );
-
-      SelfType operator++( int )
-      {
-         SelfType temp( *this );
-         ++*this;
-         return temp;
-      }
-
-      SelfType operator--( int )
-      {
-         SelfType temp( *this );
-         --*this;
-         return temp;
-      }
-
-      SelfType &operator--()
-      {
-         decrement();
-         return *this;
-      }
-
-      SelfType &operator++()
-      {
-         increment();
-         return *this;
-      }
-
-      reference operator *() const
-      {
-         return deref();
-      }
-   };
-
-
-   /** \brief Iterator for object and array value.
-    */
-   class ValueIterator : public ValueIteratorBase
-   {
-      friend class Value;
-   public:
-      typedef unsigned int size_t;
-      typedef int difference_type;
-      typedef Value &reference;
-      typedef Value *pointer;
-      typedef ValueIterator SelfType;
-
-      ValueIterator();
-      ValueIterator( const ValueConstIterator &other );
-      ValueIterator( const ValueIterator &other );
-   private:
-      /*! \internal Use by Value to create an iterator.
-       */
-#ifndef JSON_VALUE_USE_INTERNAL_MAP
-      explicit ValueIterator( const Value::ObjectValues::iterator &current );
-#else
-      ValueIterator( const ValueInternalArray::IteratorState &state );
-      ValueIterator( const ValueInternalMap::IteratorState &state );
-#endif
-   public:
-
-      SelfType &operator =( const SelfType &other );
-
-      SelfType operator++( int )
-      {
-         SelfType temp( *this );
-         ++*this;
-         return temp;
-      }
-
-      SelfType operator--( int )
-      {
-         SelfType temp( *this );
-         --*this;
-         return temp;
-      }
-
-      SelfType &operator--()
-      {
-         decrement();
-         return *this;
-      }
-
-      SelfType &operator++()
-      {
-         increment();
-         return *this;
-      }
-
-      reference operator *() const
-      {
-         return deref();
-      }
-   };
-
-
-} // namespace Json
-
-
-#endif // CPPTL_JSON_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json/writer.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json/writer.h b/test/plugins/cordova.echo/src/BlackBerry10/public/json/writer.h
deleted file mode 100644
index 0c6cdaa..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json/writer.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#ifndef JSON_WRITER_H_INCLUDED
-# define JSON_WRITER_H_INCLUDED
-
-# include "value.h"
-# include <vector>
-# include <string>
-# include <iostream>
-
-namespace Json {
-
-   class Value;
-
-   /** \brief Abstract class for writers.
-    */
-   class JSON_API Writer
-   {
-   public:
-      virtual ~Writer();
-
-      virtual std::string write( const Value &root ) = 0;
-   };
-
-   /** \brief Outputs a Value in <a HREF="http://www.json.org">JSON</a> format without formatting (not human friendly).
-    *
-    * The JSON document is written in a single line. It is not intended for 'human' consumption,
-    * but may be usefull to support feature such as RPC where bandwith is limited.
-    * \sa Reader, Value
-    */
-   class JSON_API FastWriter : public Writer
-   {
-   public:
-      FastWriter();
-      virtual ~FastWriter(){}
-
-      void enableYAMLCompatibility();
-
-   public: // overridden from Writer
-      virtual std::string write( const Value &root );
-
-   private:
-      void writeValue( const Value &value );
-
-      std::string document_;
-      bool yamlCompatiblityEnabled_;
-   };
-
-   /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way.
-    *
-    * The rules for line break and indent are as follow:
-    * - Object value:
-    *     - if empty then print {} without indent and line break
-    *     - if not empty the print '{', line break & indent, print one value per line
-    *       and then unindent and line break and print '}'.
-    * - Array value:
-    *     - if empty then print [] without indent and line break
-    *     - if the array contains no object value, empty array or some other value types,
-    *       and all the values fit on one lines, then print the array on a single line.
-    *     - otherwise, it the values do not fit on one line, or the array contains
-    *       object or non empty array, then print one value per line.
-    *
-    * If the Value have comments then they are outputed according to their #CommentPlacement.
-    *
-    * \sa Reader, Value, Value::setComment()
-    */
-   class JSON_API StyledWriter: public Writer
-   {
-   public:
-      StyledWriter();
-      virtual ~StyledWriter(){}
-
-   public: // overridden from Writer
-      /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
-       * \param root Value to serialize.
-       * \return String containing the JSON document that represents the root value.
-       */
-      virtual std::string write( const Value &root );
-
-   private:
-      void writeValue( const Value &value );
-      void writeArrayValue( const Value &value );
-      bool isMultineArray( const Value &value );
-      void pushValue( const std::string &value );
-      void writeIndent();
-      void writeWithIndent( const std::string &value );
-      void indent();
-      void unindent();
-      void writeCommentBeforeValue( const Value &root );
-      void writeCommentAfterValueOnSameLine( const Value &root );
-      bool hasCommentForValue( const Value &value );
-      static std::string normalizeEOL( const std::string &text );
-
-      typedef std::vector<std::string> ChildValues;
-
-      ChildValues childValues_;
-      std::string document_;
-      std::string indentString_;
-      int rightMargin_;
-      int indentSize_;
-      bool addChildValues_;
-   };
-
-   /** \brief Writes a Value in <a HREF="http://www.json.org">JSON</a> format in a human friendly way,
-        to a stream rather than to a string.
-    *
-    * The rules for line break and indent are as follow:
-    * - Object value:
-    *     - if empty then print {} without indent and line break
-    *     - if not empty the print '{', line break & indent, print one value per line
-    *       and then unindent and line break and print '}'.
-    * - Array value:
-    *     - if empty then print [] without indent and line break
-    *     - if the array contains no object value, empty array or some other value types,
-    *       and all the values fit on one lines, then print the array on a single line.
-    *     - otherwise, it the values do not fit on one line, or the array contains
-    *       object or non empty array, then print one value per line.
-    *
-    * If the Value have comments then they are outputed according to their #CommentPlacement.
-    *
-    * \param indentation Each level will be indented by this amount extra.
-    * \sa Reader, Value, Value::setComment()
-    */
-   class JSON_API StyledStreamWriter
-   {
-   public:
-      StyledStreamWriter( std::string indentation="\t" );
-      ~StyledStreamWriter(){}
-
-   public:
-      /** \brief Serialize a Value in <a HREF="http://www.json.org">JSON</a> format.
-       * \param out Stream to write to. (Can be ostringstream, e.g.)
-       * \param root Value to serialize.
-       * \note There is no point in deriving from Writer, since write() should not return a value.
-       */
-      void write( std::ostream &out, const Value &root );
-
-   private:
-      void writeValue( const Value &value );
-      void writeArrayValue( const Value &value );
-      bool isMultineArray( const Value &value );
-      void pushValue( const std::string &value );
-      void writeIndent();
-      void writeWithIndent( const std::string &value );
-      void indent();
-      void unindent();
-      void writeCommentBeforeValue( const Value &root );
-      void writeCommentAfterValueOnSameLine( const Value &root );
-      bool hasCommentForValue( const Value &value );
-      static std::string normalizeEOL( const std::string &text );
-
-      typedef std::vector<std::string> ChildValues;
-
-      ChildValues childValues_;
-      std::ostream* document_;
-      std::string indentString_;
-      int rightMargin_;
-      std::string indentation_;
-      bool addChildValues_;
-   };
-
-   std::string JSON_API valueToString( Int value );
-   std::string JSON_API valueToString( UInt value );
-   std::string JSON_API valueToString( double value );
-   std::string JSON_API valueToString( bool value );
-   std::string JSON_API valueToQuotedString( const char *value );
-
-   /// \brief Output using the StyledStreamWriter.
-   /// \see Json::operator>>()
-   std::ostream& operator<<( std::ostream&, const Value &root );
-
-} // namespace Json
-
-
-
-#endif // JSON_WRITER_H_INCLUDED

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json_batchallocator.h
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json_batchallocator.h b/test/plugins/cordova.echo/src/BlackBerry10/public/json_batchallocator.h
deleted file mode 100644
index 7023752..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json_batchallocator.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-#ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED
-# define JSONCPP_BATCHALLOCATOR_H_INCLUDED
-
-# include <stdlib.h>
-# include <assert.h>
-
-# ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION
-
-namespace Json {
-
-/* Fast memory allocator.
- *
- * This memory allocator allocates memory for a batch of object (specified by
- * the page size, the number of object in each page).
- *
- * It does not allow the destruction of a single object. All the allocated objects
- * can be destroyed at once. The memory can be either released or reused for future
- * allocation.
- * 
- * The in-place new operator must be used to construct the object using the pointer
- * returned by allocate.
- */
-template<typename AllocatedType
-        ,const unsigned int objectPerAllocation>
-class BatchAllocator
-{
-public:
-   typedef AllocatedType Type;
-
-   BatchAllocator( unsigned int objectsPerPage = 255 )
-      : freeHead_( 0 )
-      , objectsPerPage_( objectsPerPage )
-   {
-//      printf( "Size: %d => %s\n", sizeof(AllocatedType), typeid(AllocatedType).name() );
-      assert( sizeof(AllocatedType) * objectPerAllocation >= sizeof(AllocatedType *) ); // We must be able to store a slist in the object free space.
-      assert( objectsPerPage >= 16 );
-      batches_ = allocateBatch( 0 );   // allocated a dummy page
-      currentBatch_ = batches_;
-   }
-
-   ~BatchAllocator()
-   {
-      for ( BatchInfo *batch = batches_; batch;  )
-      {
-         BatchInfo *nextBatch = batch->next_;
-         free( batch );
-         batch = nextBatch;
-      }
-   }
-
-   /// allocate space for an array of objectPerAllocation object.
-   /// @warning it is the responsability of the caller to call objects constructors.
-   AllocatedType *allocate()
-   {
-      if ( freeHead_ ) // returns node from free list.
-      {
-         AllocatedType *object = freeHead_;
-         freeHead_ = *(AllocatedType **)object;
-         return object;
-      }
-      if ( currentBatch_->used_ == currentBatch_->end_ )
-      {
-         currentBatch_ = currentBatch_->next_;
-         while ( currentBatch_  &&  currentBatch_->used_ == currentBatch_->end_ )
-            currentBatch_ = currentBatch_->next_;
-
-         if ( !currentBatch_  ) // no free batch found, allocate a new one
-         { 
-            currentBatch_ = allocateBatch( objectsPerPage_ );
-            currentBatch_->next_ = batches_; // insert at the head of the list
-            batches_ = currentBatch_;
-         }
-      }
-      AllocatedType *allocated = currentBatch_->used_;
-      currentBatch_->used_ += objectPerAllocation;
-      return allocated;
-   }
-
-   /// Release the object.
-   /// @warning it is the responsability of the caller to actually destruct the object.
-   void release( AllocatedType *object )
-   {
-      assert( object != 0 );
-      *(AllocatedType **)object = freeHead_;
-      freeHead_ = object;
-   }
-
-private:
-   struct BatchInfo
-   {
-      BatchInfo *next_;
-      AllocatedType *used_;
-      AllocatedType *end_;
-      AllocatedType buffer_[objectPerAllocation];
-   };
-
-   // disabled copy constructor and assignement operator.
-   BatchAllocator( const BatchAllocator & );
-   void operator =( const BatchAllocator &);
-
-   static BatchInfo *allocateBatch( unsigned int objectsPerPage )
-   {
-      const unsigned int mallocSize = sizeof(BatchInfo) - sizeof(AllocatedType)* objectPerAllocation
-                                + sizeof(AllocatedType) * objectPerAllocation * objectsPerPage;
-      BatchInfo *batch = static_cast<BatchInfo*>( malloc( mallocSize ) );
-      batch->next_ = 0;
-      batch->used_ = batch->buffer_;
-      batch->end_ = batch->buffer_ + objectsPerPage;
-      return batch;
-   }
-
-   BatchInfo *batches_;
-   BatchInfo *currentBatch_;
-   /// Head of a single linked list within the allocated space of freeed object
-   AllocatedType *freeHead_;
-   unsigned int objectsPerPage_;
-};
-
-
-} // namespace Json
-
-# endif // ifndef JSONCPP_DOC_INCLUDE_IMPLEMENTATION
-
-#endif // JSONCPP_BATCHALLOCATOR_H_INCLUDED
-

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json_internalarray.inl
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json_internalarray.inl b/test/plugins/cordova.echo/src/BlackBerry10/public/json_internalarray.inl
deleted file mode 100644
index 9b985d2..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json_internalarray.inl
+++ /dev/null
@@ -1,448 +0,0 @@
-// included by json_value.cpp
-// everything is within Json namespace
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueInternalArray
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-ValueArrayAllocator::~ValueArrayAllocator()
-{
-}
-
-// //////////////////////////////////////////////////////////////////
-// class DefaultValueArrayAllocator
-// //////////////////////////////////////////////////////////////////
-#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-class DefaultValueArrayAllocator : public ValueArrayAllocator
-{
-public: // overridden from ValueArrayAllocator
-   virtual ~DefaultValueArrayAllocator()
-   {
-   }
-
-   virtual ValueInternalArray *newArray()
-   {
-      return new ValueInternalArray();
-   }
-
-   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
-   {
-      return new ValueInternalArray( other );
-   }
-
-   virtual void destructArray( ValueInternalArray *array )
-   {
-      delete array;
-   }
-
-   virtual void reallocateArrayPageIndex( Value **&indexes, 
-                                          ValueInternalArray::PageIndex &indexCount,
-                                          ValueInternalArray::PageIndex minNewIndexCount )
-   {
-      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
-      if ( minNewIndexCount > newIndexCount )
-         newIndexCount = minNewIndexCount;
-      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
-      if ( !newIndexes )
-         throw std::bad_alloc();
-      indexCount = newIndexCount;
-      indexes = static_cast<Value **>( newIndexes );
-   }
-   virtual void releaseArrayPageIndex( Value **indexes, 
-                                       ValueInternalArray::PageIndex indexCount )
-   {
-      if ( indexes )
-         free( indexes );
-   }
-
-   virtual Value *allocateArrayPage()
-   {
-      return static_cast<Value *>( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) );
-   }
-
-   virtual void releaseArrayPage( Value *value )
-   {
-      if ( value )
-         free( value );
-   }
-};
-
-#else // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-/// @todo make this thread-safe (lock when accessign batch allocator)
-class DefaultValueArrayAllocator : public ValueArrayAllocator
-{
-public: // overridden from ValueArrayAllocator
-   virtual ~DefaultValueArrayAllocator()
-   {
-   }
-
-   virtual ValueInternalArray *newArray()
-   {
-      ValueInternalArray *array = arraysAllocator_.allocate();
-      new (array) ValueInternalArray(); // placement new
-      return array;
-   }
-
-   virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other )
-   {
-      ValueInternalArray *array = arraysAllocator_.allocate();
-      new (array) ValueInternalArray( other ); // placement new
-      return array;
-   }
-
-   virtual void destructArray( ValueInternalArray *array )
-   {
-      if ( array )
-      {
-         array->~ValueInternalArray();
-         arraysAllocator_.release( array );
-      }
-   }
-
-   virtual void reallocateArrayPageIndex( Value **&indexes, 
-                                          ValueInternalArray::PageIndex &indexCount,
-                                          ValueInternalArray::PageIndex minNewIndexCount )
-   {
-      ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1;
-      if ( minNewIndexCount > newIndexCount )
-         newIndexCount = minNewIndexCount;
-      void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount );
-      if ( !newIndexes )
-         throw std::bad_alloc();
-      indexCount = newIndexCount;
-      indexes = static_cast<Value **>( newIndexes );
-   }
-   virtual void releaseArrayPageIndex( Value **indexes, 
-                                       ValueInternalArray::PageIndex indexCount )
-   {
-      if ( indexes )
-         free( indexes );
-   }
-
-   virtual Value *allocateArrayPage()
-   {
-      return static_cast<Value *>( pagesAllocator_.allocate() );
-   }
-
-   virtual void releaseArrayPage( Value *value )
-   {
-      if ( value )
-         pagesAllocator_.release( value );
-   }
-private:
-   BatchAllocator<ValueInternalArray,1> arraysAllocator_;
-   BatchAllocator<Value,ValueInternalArray::itemsPerPage> pagesAllocator_;
-};
-#endif // #ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-
-static ValueArrayAllocator *&arrayAllocator()
-{
-   static DefaultValueArrayAllocator defaultAllocator;
-   static ValueArrayAllocator *arrayAllocator = &defaultAllocator;
-   return arrayAllocator;
-}
-
-static struct DummyArrayAllocatorInitializer {
-   DummyArrayAllocatorInitializer() 
-   {
-      arrayAllocator();      // ensure arrayAllocator() statics are initialized before main().
-   }
-} dummyArrayAllocatorInitializer;
-
-// //////////////////////////////////////////////////////////////////
-// class ValueInternalArray
-// //////////////////////////////////////////////////////////////////
-bool 
-ValueInternalArray::equals( const IteratorState &x, 
-                            const IteratorState &other )
-{
-   return x.array_ == other.array_  
-          &&  x.currentItemIndex_ == other.currentItemIndex_  
-          &&  x.currentPageIndex_ == other.currentPageIndex_;
-}
-
-
-void 
-ValueInternalArray::increment( IteratorState &it )
-{
-   JSON_ASSERT_MESSAGE( it.array_  &&
-      (it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
-      != it.array_->size_,
-      "ValueInternalArray::increment(): moving iterator beyond end" );
-   ++(it.currentItemIndex_);
-   if ( it.currentItemIndex_ == itemsPerPage )
-   {
-      it.currentItemIndex_ = 0;
-      ++(it.currentPageIndex_);
-   }
-}
-
-
-void 
-ValueInternalArray::decrement( IteratorState &it )
-{
-   JSON_ASSERT_MESSAGE( it.array_  &&  it.currentPageIndex_ == it.array_->pages_ 
-                        &&  it.currentItemIndex_ == 0,
-      "ValueInternalArray::decrement(): moving iterator beyond end" );
-   if ( it.currentItemIndex_ == 0 )
-   {
-      it.currentItemIndex_ = itemsPerPage-1;
-      --(it.currentPageIndex_);
-   }
-   else
-   {
-      --(it.currentItemIndex_);
-   }
-}
-
-
-Value &
-ValueInternalArray::unsafeDereference( const IteratorState &it )
-{
-   return (*(it.currentPageIndex_))[it.currentItemIndex_];
-}
-
-
-Value &
-ValueInternalArray::dereference( const IteratorState &it )
-{
-   JSON_ASSERT_MESSAGE( it.array_  &&
-      (it.currentPageIndex_ - it.array_->pages_)*itemsPerPage + it.currentItemIndex_
-      < it.array_->size_,
-      "ValueInternalArray::dereference(): dereferencing invalid iterator" );
-   return unsafeDereference( it );
-}
-
-void 
-ValueInternalArray::makeBeginIterator( IteratorState &it ) const
-{
-   it.array_ = const_cast<ValueInternalArray *>( this );
-   it.currentItemIndex_ = 0;
-   it.currentPageIndex_ = pages_;
-}
-
-
-void 
-ValueInternalArray::makeIterator( IteratorState &it, ArrayIndex index ) const
-{
-   it.array_ = const_cast<ValueInternalArray *>( this );
-   it.currentItemIndex_ = index % itemsPerPage;
-   it.currentPageIndex_ = pages_ + index / itemsPerPage;
-}
-
-
-void 
-ValueInternalArray::makeEndIterator( IteratorState &it ) const
-{
-   makeIterator( it, size_ );
-}
-
-
-ValueInternalArray::ValueInternalArray()
-   : pages_( 0 )
-   , size_( 0 )
-   , pageCount_( 0 )
-{
-}
-
-
-ValueInternalArray::ValueInternalArray( const ValueInternalArray &other )
-   : pages_( 0 )
-   , pageCount_( 0 )
-   , size_( other.size_ )
-{
-   PageIndex minNewPages = other.size_ / itemsPerPage;
-   arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
-   JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages, 
-                        "ValueInternalArray::reserve(): bad reallocation" );
-   IteratorState itOther;
-   other.makeBeginIterator( itOther );
-   Value *value;
-   for ( ArrayIndex index = 0; index < size_; ++index, increment(itOther) )
-   {
-      if ( index % itemsPerPage == 0 )
-      {
-         PageIndex pageIndex = index / itemsPerPage;
-         value = arrayAllocator()->allocateArrayPage();
-         pages_[pageIndex] = value;
-      }
-      new (value) Value( dereference( itOther ) );
-   }
-}
-
-
-ValueInternalArray &
-ValueInternalArray::operator =( const ValueInternalArray &other )
-{
-   ValueInternalArray temp( other );
-   swap( temp );
-   return *this;
-}
-
-
-ValueInternalArray::~ValueInternalArray()
-{
-   // destroy all constructed items
-   IteratorState it;
-   IteratorState itEnd;
-   makeBeginIterator( it);
-   makeEndIterator( itEnd );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      Value *value = &dereference(it);
-      value->~Value();
-   }
-   // release all pages
-   PageIndex lastPageIndex = size_ / itemsPerPage;
-   for ( PageIndex pageIndex = 0; pageIndex < lastPageIndex; ++pageIndex )
-      arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
-   // release pages index
-   arrayAllocator()->releaseArrayPageIndex( pages_, pageCount_ );
-}
-
-
-void 
-ValueInternalArray::swap( ValueInternalArray &other )
-{
-   Value **tempPages = pages_;
-   pages_ = other.pages_;
-   other.pages_ = tempPages;
-   ArrayIndex tempSize = size_;
-   size_ = other.size_;
-   other.size_ = tempSize;
-   PageIndex tempPageCount = pageCount_;
-   pageCount_ = other.pageCount_;
-   other.pageCount_ = tempPageCount;
-}
-
-void 
-ValueInternalArray::clear()
-{
-   ValueInternalArray dummy;
-   swap( dummy );
-}
-
-
-void 
-ValueInternalArray::resize( ArrayIndex newSize )
-{
-   if ( newSize == 0 )
-      clear();
-   else if ( newSize < size_ )
-   {
-      IteratorState it;
-      IteratorState itEnd;
-      makeIterator( it, newSize );
-      makeIterator( itEnd, size_ );
-      for ( ; !equals(it,itEnd); increment(it) )
-      {
-         Value *value = &dereference(it);
-         value->~Value();
-      }
-      PageIndex pageIndex = (newSize + itemsPerPage - 1) / itemsPerPage;
-      PageIndex lastPageIndex = size_ / itemsPerPage;
-      for ( ; pageIndex < lastPageIndex; ++pageIndex )
-         arrayAllocator()->releaseArrayPage( pages_[pageIndex] );
-      size_ = newSize;
-   }
-   else if ( newSize > size_ )
-      resolveReference( newSize );
-}
-
-
-void 
-ValueInternalArray::makeIndexValid( ArrayIndex index )
-{
-   // Need to enlarge page index ?
-   if ( index >= pageCount_ * itemsPerPage )
-   {
-      PageIndex minNewPages = (index + 1) / itemsPerPage;
-      arrayAllocator()->reallocateArrayPageIndex( pages_, pageCount_, minNewPages );
-      JSON_ASSERT_MESSAGE( pageCount_ >= minNewPages, "ValueInternalArray::reserve(): bad reallocation" );
-   }
-
-   // Need to allocate new pages ?
-   ArrayIndex nextPageIndex = 
-      (size_ % itemsPerPage) != 0 ? size_ - (size_%itemsPerPage) + itemsPerPage
-                                  : size_;
-   if ( nextPageIndex <= index )
-   {
-      PageIndex pageIndex = nextPageIndex / itemsPerPage;
-      PageIndex pageToAllocate = (index - nextPageIndex) / itemsPerPage + 1;
-      for ( ; pageToAllocate-- > 0; ++pageIndex )
-         pages_[pageIndex] = arrayAllocator()->allocateArrayPage();
-   }
-
-   // Initialize all new entries
-   IteratorState it;
-   IteratorState itEnd;
-   makeIterator( it, size_ );
-   size_ = index + 1;
-   makeIterator( itEnd, size_ );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      Value *value = &dereference(it);
-      new (value) Value(); // Construct a default value using placement new
-   }
-}
-
-Value &
-ValueInternalArray::resolveReference( ArrayIndex index )
-{
-   if ( index >= size_ )
-      makeIndexValid( index );
-   return pages_[index/itemsPerPage][index%itemsPerPage];
-}
-
-Value *
-ValueInternalArray::find( ArrayIndex index ) const
-{
-   if ( index >= size_ )
-      return 0;
-   return &(pages_[index/itemsPerPage][index%itemsPerPage]);
-}
-
-ValueInternalArray::ArrayIndex 
-ValueInternalArray::size() const
-{
-   return size_;
-}
-
-int 
-ValueInternalArray::distance( const IteratorState &x, const IteratorState &y )
-{
-   return indexOf(y) - indexOf(x);
-}
-
-
-ValueInternalArray::ArrayIndex 
-ValueInternalArray::indexOf( const IteratorState &iterator )
-{
-   if ( !iterator.array_ )
-      return ArrayIndex(-1);
-   return ArrayIndex(
-      (iterator.currentPageIndex_ - iterator.array_->pages_) * itemsPerPage 
-      + iterator.currentItemIndex_ );
-}
-
-
-int 
-ValueInternalArray::compare( const ValueInternalArray &other ) const
-{
-   int sizeDiff( size_ - other.size_ );
-   if ( sizeDiff != 0 )
-      return sizeDiff;
-   
-   for ( ArrayIndex index =0; index < size_; ++index )
-   {
-      int diff = pages_[index/itemsPerPage][index%itemsPerPage].compare( 
-         other.pages_[index/itemsPerPage][index%itemsPerPage] );
-      if ( diff != 0 )
-         return diff;
-   }
-   return 0;
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0a7b3e3d/test/plugins/cordova.echo/src/BlackBerry10/public/json_internalmap.inl
----------------------------------------------------------------------
diff --git a/test/plugins/cordova.echo/src/BlackBerry10/public/json_internalmap.inl b/test/plugins/cordova.echo/src/BlackBerry10/public/json_internalmap.inl
deleted file mode 100644
index 1977148..0000000
--- a/test/plugins/cordova.echo/src/BlackBerry10/public/json_internalmap.inl
+++ /dev/null
@@ -1,607 +0,0 @@
-// included by json_value.cpp
-// everything is within Json namespace
-
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// class ValueInternalMap
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-// //////////////////////////////////////////////////////////////////
-
-/** \internal MUST be safely initialized using memset( this, 0, sizeof(ValueInternalLink) );
-   * This optimization is used by the fast allocator.
-   */
-ValueInternalLink::ValueInternalLink()
-   : previous_( 0 )
-   , next_( 0 )
-{
-}
-
-ValueInternalLink::~ValueInternalLink()
-{ 
-   for ( int index =0; index < itemPerLink; ++index )
-   {
-      if ( !items_[index].isItemAvailable() )
-      {
-         if ( !items_[index].isMemberNameStatic() )
-            free( keys_[index] );
-      }
-      else
-         break;
-   }
-}
-
-
-
-ValueMapAllocator::~ValueMapAllocator()
-{
-}
-
-#ifdef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
-class DefaultValueMapAllocator : public ValueMapAllocator
-{
-public: // overridden from ValueMapAllocator
-   virtual ValueInternalMap *newMap()
-   {
-      return new ValueInternalMap();
-   }
-
-   virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
-   {
-      return new ValueInternalMap( other );
-   }
-
-   virtual void destructMap( ValueInternalMap *map )
-   {
-      delete map;
-   }
-
-   virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
-   {
-      return new ValueInternalLink[size];
-   }
-
-   virtual void releaseMapBuckets( ValueInternalLink *links )
-   {
-      delete [] links;
-   }
-
-   virtual ValueInternalLink *allocateMapLink()
-   {
-      return new ValueInternalLink();
-   }
-
-   virtual void releaseMapLink( ValueInternalLink *link )
-   {
-      delete link;
-   }
-};
-#else
-/// @todo make this thread-safe (lock when accessign batch allocator)
-class DefaultValueMapAllocator : public ValueMapAllocator
-{
-public: // overridden from ValueMapAllocator
-   virtual ValueInternalMap *newMap()
-   {
-      ValueInternalMap *map = mapsAllocator_.allocate();
-      new (map) ValueInternalMap(); // placement new
-      return map;
-   }
-
-   virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other )
-   {
-      ValueInternalMap *map = mapsAllocator_.allocate();
-      new (map) ValueInternalMap( other ); // placement new
-      return map;
-   }
-
-   virtual void destructMap( ValueInternalMap *map )
-   {
-      if ( map )
-      {
-         map->~ValueInternalMap();
-         mapsAllocator_.release( map );
-      }
-   }
-
-   virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
-   {
-      return new ValueInternalLink[size];
-   }
-
-   virtual void releaseMapBuckets( ValueInternalLink *links )
-   {
-      delete [] links;
-   }
-
-   virtual ValueInternalLink *allocateMapLink()
-   {
-      ValueInternalLink *link = linksAllocator_.allocate();
-      memset( link, 0, sizeof(ValueInternalLink) );
-      return link;
-   }
-
-   virtual void releaseMapLink( ValueInternalLink *link )
-   {
-      link->~ValueInternalLink();
-      linksAllocator_.release( link );
-   }
-private:
-   BatchAllocator<ValueInternalMap,1> mapsAllocator_;
-   BatchAllocator<ValueInternalLink,1> linksAllocator_;
-};
-#endif
-
-static ValueMapAllocator *&mapAllocator()
-{
-   static DefaultValueMapAllocator defaultAllocator;
-   static ValueMapAllocator *mapAllocator = &defaultAllocator;
-   return mapAllocator;
-}
-
-static struct DummyMapAllocatorInitializer {
-   DummyMapAllocatorInitializer() 
-   {
-      mapAllocator();      // ensure mapAllocator() statics are initialized before main().
-   }
-} dummyMapAllocatorInitializer;
-
-
-
-// h(K) = value * K >> w ; with w = 32 & K prime w.r.t. 2^32.
-
-/*
-use linked list hash map. 
-buckets array is a container.
-linked list element contains 6 key/values. (memory = (16+4) * 6 + 4 = 124)
-value have extra state: valid, available, deleted
-*/
-
-
-ValueInternalMap::ValueInternalMap()
-   : buckets_( 0 )
-   , tailLink_( 0 )
-   , bucketsSize_( 0 )
-   , itemCount_( 0 )
-{
-}
-
-
-ValueInternalMap::ValueInternalMap( const ValueInternalMap &other )
-   : buckets_( 0 )
-   , tailLink_( 0 )
-   , bucketsSize_( 0 )
-   , itemCount_( 0 )
-{
-   reserve( other.itemCount_ );
-   IteratorState it;
-   IteratorState itEnd;
-   other.makeBeginIterator( it );
-   other.makeEndIterator( itEnd );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      bool isStatic;
-      const char *memberName = key( it, isStatic );
-      const Value &aValue = value( it );
-      resolveReference(memberName, isStatic) = aValue;
-   }
-}
-
-
-ValueInternalMap &
-ValueInternalMap::operator =( const ValueInternalMap &other )
-{
-   ValueInternalMap dummy( other );
-   swap( dummy );
-   return *this;
-}
-
-
-ValueInternalMap::~ValueInternalMap()
-{
-   if ( buckets_ )
-   {
-      for ( BucketIndex bucketIndex =0; bucketIndex < bucketsSize_; ++bucketIndex )
-      {
-         ValueInternalLink *link = buckets_[bucketIndex].next_;
-         while ( link )
-         {
-            ValueInternalLink *linkToRelease = link;
-            link = link->next_;
-            mapAllocator()->releaseMapLink( linkToRelease );
-         }
-      }
-      mapAllocator()->releaseMapBuckets( buckets_ );
-   }
-}
-
-
-void 
-ValueInternalMap::swap( ValueInternalMap &other )
-{
-   ValueInternalLink *tempBuckets = buckets_;
-   buckets_ = other.buckets_;
-   other.buckets_ = tempBuckets;
-   ValueInternalLink *tempTailLink = tailLink_;
-   tailLink_ = other.tailLink_;
-   other.tailLink_ = tempTailLink;
-   BucketIndex tempBucketsSize = bucketsSize_;
-   bucketsSize_ = other.bucketsSize_;
-   other.bucketsSize_ = tempBucketsSize;
-   BucketIndex tempItemCount = itemCount_;
-   itemCount_ = other.itemCount_;
-   other.itemCount_ = tempItemCount;
-}
-
-
-void 
-ValueInternalMap::clear()
-{
-   ValueInternalMap dummy;
-   swap( dummy );
-}
-
-
-ValueInternalMap::BucketIndex 
-ValueInternalMap::size() const
-{
-   return itemCount_;
-}
-
-bool 
-ValueInternalMap::reserveDelta( BucketIndex growth )
-{
-   return reserve( itemCount_ + growth );
-}
-
-bool 
-ValueInternalMap::reserve( BucketIndex newItemCount )
-{
-   if ( !buckets_  &&  newItemCount > 0 )
-   {
-      buckets_ = mapAllocator()->allocateMapBuckets( 1 );
-      bucketsSize_ = 1;
-      tailLink_ = &buckets_[0];
-   }
-//   BucketIndex idealBucketCount = (newItemCount + ValueInternalLink::itemPerLink) / ValueInternalLink::itemPerLink;
-   return true;
-}
-
-
-const Value *
-ValueInternalMap::find( const char *key ) const
-{
-   if ( !bucketsSize_ )
-      return 0;
-   HashKey hashedKey = hash( key );
-   BucketIndex bucketIndex = hashedKey % bucketsSize_;
-   for ( const ValueInternalLink *current = &buckets_[bucketIndex]; 
-         current != 0; 
-         current = current->next_ )
-   {
-      for ( BucketIndex index=0; index < ValueInternalLink::itemPerLink; ++index )
-      {
-         if ( current->items_[index].isItemAvailable() )
-            return 0;
-         if ( strcmp( key, current->keys_[index] ) == 0 )
-            return &current->items_[index];
-      }
-   }
-   return 0;
-}
-
-
-Value *
-ValueInternalMap::find( const char *key )
-{
-   const ValueInternalMap *constThis = this;
-   return const_cast<Value *>( constThis->find( key ) );
-}
-
-
-Value &
-ValueInternalMap::resolveReference( const char *key,
-                                    bool isStatic )
-{
-   HashKey hashedKey = hash( key );
-   if ( bucketsSize_ )
-   {
-      BucketIndex bucketIndex = hashedKey % bucketsSize_;
-      ValueInternalLink **previous = 0;
-      BucketIndex index;
-      for ( ValueInternalLink *current = &buckets_[bucketIndex]; 
-            current != 0; 
-            previous = &current->next_, current = current->next_ )
-      {
-         for ( index=0; index < ValueInternalLink::itemPerLink; ++index )
-         {
-            if ( current->items_[index].isItemAvailable() )
-               return setNewItem( key, isStatic, current, index );
-            if ( strcmp( key, current->keys_[index] ) == 0 )
-               return current->items_[index];
-         }
-      }
-   }
-
-   reserveDelta( 1 );
-   return unsafeAdd( key, isStatic, hashedKey );
-}
-
-
-void 
-ValueInternalMap::remove( const char *key )
-{
-   HashKey hashedKey = hash( key );
-   if ( !bucketsSize_ )
-      return;
-   BucketIndex bucketIndex = hashedKey % bucketsSize_;
-   for ( ValueInternalLink *link = &buckets_[bucketIndex]; 
-         link != 0; 
-         link = link->next_ )
-   {
-      BucketIndex index;
-      for ( index =0; index < ValueInternalLink::itemPerLink; ++index )
-      {
-         if ( link->items_[index].isItemAvailable() )
-            return;
-         if ( strcmp( key, link->keys_[index] ) == 0 )
-         {
-            doActualRemove( link, index, bucketIndex );
-            return;
-         }
-      }
-   }
-}
-
-void 
-ValueInternalMap::doActualRemove( ValueInternalLink *link, 
-                                  BucketIndex index,
-                                  BucketIndex bucketIndex )
-{
-   // find last item of the bucket and swap it with the 'removed' one.
-   // set removed items flags to 'available'.
-   // if last page only contains 'available' items, then desallocate it (it's empty)
-   ValueInternalLink *&lastLink = getLastLinkInBucket( index );
-   BucketIndex lastItemIndex = 1; // a link can never be empty, so start at 1
-   for ( ;   
-         lastItemIndex < ValueInternalLink::itemPerLink; 
-         ++lastItemIndex ) // may be optimized with dicotomic search
-   {
-      if ( lastLink->items_[lastItemIndex].isItemAvailable() )
-         break;
-   }
-   
-   BucketIndex lastUsedIndex = lastItemIndex - 1;
-   Value *valueToDelete = &link->items_[index];
-   Value *valueToPreserve = &lastLink->items_[lastUsedIndex];
-   if ( valueToDelete != valueToPreserve )
-      valueToDelete->swap( *valueToPreserve );
-   if ( lastUsedIndex == 0 )  // page is now empty
-   {  // remove it from bucket linked list and delete it.
-      ValueInternalLink *linkPreviousToLast = lastLink->previous_;
-      if ( linkPreviousToLast != 0 )   // can not deleted bucket link.
-      {
-         mapAllocator()->releaseMapLink( lastLink );
-         linkPreviousToLast->next_ = 0;
-         lastLink = linkPreviousToLast;
-      }
-   }
-   else
-   {
-      Value dummy;
-      valueToPreserve->swap( dummy ); // restore deleted to default Value.
-      valueToPreserve->setItemUsed( false );
-   }
-   --itemCount_;
-}
-
-
-ValueInternalLink *&
-ValueInternalMap::getLastLinkInBucket( BucketIndex bucketIndex )
-{
-   if ( bucketIndex == bucketsSize_ - 1 )
-      return tailLink_;
-   ValueInternalLink *&previous = buckets_[bucketIndex+1].previous_;
-   if ( !previous )
-      previous = &buckets_[bucketIndex];
-   return previous;
-}
-
-
-Value &
-ValueInternalMap::setNewItem( const char *key, 
-                              bool isStatic,
-                              ValueInternalLink *link, 
-                              BucketIndex index )
-{
-   char *duplicatedKey = valueAllocator()->makeMemberName( key );
-   ++itemCount_;
-   link->keys_[index] = duplicatedKey;
-   link->items_[index].setItemUsed();
-   link->items_[index].setMemberNameIsStatic( isStatic );
-   return link->items_[index]; // items already default constructed.
-}
-
-
-Value &
-ValueInternalMap::unsafeAdd( const char *key, 
-                             bool isStatic, 
-                             HashKey hashedKey )
-{
-   JSON_ASSERT_MESSAGE( bucketsSize_ > 0, "ValueInternalMap::unsafeAdd(): internal logic error." );
-   BucketIndex bucketIndex = hashedKey % bucketsSize_;
-   ValueInternalLink *&previousLink = getLastLinkInBucket( bucketIndex );
-   ValueInternalLink *link = previousLink;
-   BucketIndex index;
-   for ( index =0; index < ValueInternalLink::itemPerLink; ++index )
-   {
-      if ( link->items_[index].isItemAvailable() )
-         break;
-   }
-   if ( index == ValueInternalLink::itemPerLink ) // need to add a new page
-   {
-      ValueInternalLink *newLink = mapAllocator()->allocateMapLink();
-      index = 0;
-      link->next_ = newLink;
-      previousLink = newLink;
-      link = newLink;
-   }
-   return setNewItem( key, isStatic, link, index );
-}
-
-
-ValueInternalMap::HashKey 
-ValueInternalMap::hash( const char *key ) const
-{
-   HashKey hash = 0;
-   while ( *key )
-      hash += *key++ * 37;
-   return hash;
-}
-
-
-int 
-ValueInternalMap::compare( const ValueInternalMap &other ) const
-{
-   int sizeDiff( itemCount_ - other.itemCount_ );
-   if ( sizeDiff != 0 )
-      return sizeDiff;
-   // Strict order guaranty is required. Compare all keys FIRST, then compare values.
-   IteratorState it;
-   IteratorState itEnd;
-   makeBeginIterator( it );
-   makeEndIterator( itEnd );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      if ( !other.find( key( it ) ) )
-         return 1;
-   }
-
-   // All keys are equals, let's compare values
-   makeBeginIterator( it );
-   for ( ; !equals(it,itEnd); increment(it) )
-   {
-      const Value *otherValue = other.find( key( it ) );
-      int valueDiff = value(it).compare( *otherValue );
-      if ( valueDiff != 0 )
-         return valueDiff;
-   }
-   return 0;
-}
-
-
-void 
-ValueInternalMap::makeBeginIterator( IteratorState &it ) const
-{
-   it.map_ = const_cast<ValueInternalMap *>( this );
-   it.bucketIndex_ = 0;
-   it.itemIndex_ = 0;
-   it.link_ = buckets_;
-}
-
-
-void 
-ValueInternalMap::makeEndIterator( IteratorState &it ) const
-{
-   it.map_ = const_cast<ValueInternalMap *>( this );
-   it.bucketIndex_ = bucketsSize_;
-   it.itemIndex_ = 0;
-   it.link_ = 0;
-}
-
-
-bool 
-ValueInternalMap::equals( const IteratorState &x, const IteratorState &other )
-{
-   return x.map_ == other.map_  
-          &&  x.bucketIndex_ == other.bucketIndex_  
-          &&  x.link_ == other.link_
-          &&  x.itemIndex_ == other.itemIndex_;
-}
-
-
-void 
-ValueInternalMap::incrementBucket( IteratorState &iterator )
-{
-   ++iterator.bucketIndex_;
-   JSON_ASSERT_MESSAGE( iterator.bucketIndex_ <= iterator.map_->bucketsSize_,
-      "ValueInternalMap::increment(): attempting to iterate beyond end." );
-   if ( iterator.bucketIndex_ == iterator.map_->bucketsSize_ )
-      iterator.link_ = 0;
-   else
-      iterator.link_ = &(iterator.map_->buckets_[iterator.bucketIndex_]);
-   iterator.itemIndex_ = 0;
-}
-
-
-void 
-ValueInternalMap::increment( IteratorState &iterator )
-{
-   JSON_ASSERT_MESSAGE( iterator.map_, "Attempting to iterator using invalid iterator." );
-   ++iterator.itemIndex_;
-   if ( iterator.itemIndex_ == ValueInternalLink::itemPerLink )
-   {
-      JSON_ASSERT_MESSAGE( iterator.link_ != 0,
-         "ValueInternalMap::increment(): attempting to iterate beyond end." );
-      iterator.link_ = iterator.link_->next_;
-      if ( iterator.link_ == 0 )
-         incrementBucket( iterator );
-   }
-   else if ( iterator.link_->items_[iterator.itemIndex_].isItemAvailable() )
-   {
-      incrementBucket( iterator );
-   }
-}
-
-
-void 
-ValueInternalMap::decrement( IteratorState &iterator )
-{
-   if ( iterator.itemIndex_ == 0 )
-   {
-      JSON_ASSERT_MESSAGE( iterator.map_, "Attempting to iterate using invalid iterator." );
-      if ( iterator.link_ == &iterator.map_->buckets_[iterator.bucketIndex_] )
-      {
-         JSON_ASSERT_MESSAGE( iterator.bucketIndex_ > 0, "Attempting to iterate beyond beginning." );
-         --(iterator.bucketIndex_);
-      }
-      iterator.link_ = iterator.link_->previous_;
-      iterator.itemIndex_ = ValueInternalLink::itemPerLink - 1;
-   }
-}
-
-
-const char *
-ValueInternalMap::key( const IteratorState &iterator )
-{
-   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
-   return iterator.link_->keys_[iterator.itemIndex_];
-}
-
-const char *
-ValueInternalMap::key( const IteratorState &iterator, bool &isStatic )
-{
-   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
-   isStatic = iterator.link_->items_[iterator.itemIndex_].isMemberNameStatic();
-   return iterator.link_->keys_[iterator.itemIndex_];
-}
-
-
-Value &
-ValueInternalMap::value( const IteratorState &iterator )
-{
-   JSON_ASSERT_MESSAGE( iterator.link_, "Attempting to iterate using invalid iterator." );
-   return iterator.link_->items_[iterator.itemIndex_];
-}
-
-
-int 
-ValueInternalMap::distance( const IteratorState &x, const IteratorState &y )
-{
-   int offset = 0;
-   IteratorState it = x;
-   while ( !equals( it, y ) )
-      increment( it );
-   return offset;
-}


[37/54] [abbrv] git commit: Fixed moving src folder around

Posted by ti...@apache.org.
Fixed moving src folder around


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/570f9222
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/570f9222
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/570f9222

Branch: refs/heads/future
Commit: 570f92222e1151f82d95a01d8993b8189d886c06
Parents: 482acf8
Author: Tim Kim <ti...@adobe.com>
Authored: Wed Apr 3 13:46:02 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Tue Apr 9 14:01:02 2013 -0700

----------------------------------------------------------------------
 util/plugin_loader.js |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/570f9222/util/plugin_loader.js
----------------------------------------------------------------------
diff --git a/util/plugin_loader.js b/util/plugin_loader.js
index 6d55694..b14a640 100644
--- a/util/plugin_loader.js
+++ b/util/plugin_loader.js
@@ -45,7 +45,6 @@ exports.handlePrepare = function(projectRoot, plugins_dir, wwwDir, platform) {
     // This array holds all the metadata for each module and ends up in cordova_plugins.json
     var moduleObjects = [];
 
-
     plugins && plugins.forEach(function(plugin) {
         var pluginDir = path.join(plugins_dir, plugin);
         var xml = new et.ElementTree(et.XML(fs.readFileSync(path.join(pluginDir, 'plugin.xml'), 'utf-8')));
@@ -56,18 +55,28 @@ exports.handlePrepare = function(projectRoot, plugins_dir, wwwDir, platform) {
         var assets = xml.findall('./asset');
         assets && assets.forEach(function(asset) {
             var target = asset.attrib.target;
+           
             var lastSlash = target.lastIndexOf('/');
             var dirname  = lastSlash < 0 ? ''     : target.substring(0, lastSlash);
             var basename = lastSlash < 0 ? target : target.substring(lastSlash + 1);
 
             var targetDir = path.join(wwwDir, dirname);
+             
             shell.mkdir('-p', targetDir);
 
             var srcFile = path.join(pluginDir, asset.attrib.src);
             var targetFile = path.join(targetDir, basename);
 
-            var cpOptions = fs.statSync(srcFile).isDirectory() ? '-Rf' : '-f';
+            var cpOptions = '-f';
+            
+            if(fs.statSync(srcFile).isDirectory()){
+                shell.mkdir('-p',targetFile);
+                srcFile = srcFile+'/*';
+                cpOptions = '-Rf';
+            }
+
             shell.cp(cpOptions, [srcFile], targetFile);
+            
         });
 
         // And then add the plugins dir to the platform's www.


[26/54] [abbrv] git commit: CB-2782 adding support for

Posted by ti...@apache.org.
CB-2782 adding support for <info>


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/2799c849
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/2799c849
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/2799c849

Branch: refs/heads/future
Commit: 2799c849aa82b83169b3052580b1c6919503b1b7
Parents: 9a5045c
Author: Anis Kadri <an...@apache.org>
Authored: Thu Apr 4 14:54:31 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Thu Apr 4 14:54:31 2013 -0700

----------------------------------------------------------------------
 plugman.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/2799c849/plugman.js
----------------------------------------------------------------------
diff --git a/plugman.js b/plugman.js
index 4e8a51d..a422dab 100755
--- a/plugman.js
+++ b/plugman.js
@@ -98,6 +98,7 @@ function execAction(action, platform, project_dir, plugin_dir, cli_variables) {
       , filtered_variables = {};
 
     if (action == 'install') {
+        // checking preferences
         prefs = plugin_et.findall('./preference') || [];
         prefs = prefs.concat(plugin_et.findall('./platform[@name="'+platform+'"]/preference'));
         var missing_vars = [];
@@ -112,6 +113,10 @@ function execAction(action, platform, project_dir, plugin_dir, cli_variables) {
             console.error('Variable missing: ' + missing_vars.join(", "));
             return;
         }
+
+        if((info = plugin_et.find('./platform[@name="'+platform+'"]/info'))) {
+            console.log(info.text);
+        }
     }
     
     // run the platform-specific function


[38/54] [abbrv] git commit: Remove src/ directory structure.

Posted by ti...@apache.org.
Remove src/<platform> directory structure.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/482acf84
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/482acf84
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/482acf84

Branch: refs/heads/future
Commit: 482acf84c716a4ef7da236a885920998be7fdc56
Parents: 65bc262
Author: Braden Shepherdson <br...@gmail.com>
Authored: Wed Mar 27 11:30:56 2013 -0400
Committer: Tim Kim <ti...@adobe.com>
Committed: Tue Apr 9 14:01:02 2013 -0700

----------------------------------------------------------------------
 platforms/android.js    |   16 +++++-----------
 platforms/blackberry.js |   15 +++++----------
 platforms/ios.js        |   26 +++++++++++++-------------
 3 files changed, 23 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/482acf84/platforms/android.js
----------------------------------------------------------------------
diff --git a/platforms/android.js b/platforms/android.js
index 41ac491..f099284 100644
--- a/platforms/android.js
+++ b/platforms/android.js
@@ -100,10 +100,10 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
             fs.unlinkSync(destFile);
             // check if directory is empty
             var curDir = srcDir;
-            while(curDir !== project_dir + '/src') {
+            while(curDir !== path.join(project_dir, 'src')) {
                 if(fs.readdirSync(curDir).length == 0) {
                     fs.rmdirSync(curDir);
-                    curDir = path.resolve(curDir + '/..');
+                    curDir = path.resolve(path.join(curDir, '..'));
                 } else {
                     // directory not empty...do nothing
                     break;
@@ -119,11 +119,11 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
 
         if (action == 'install') {
             shell.mkdir('-p', libDir);
-            var src = path.resolve(plugin_dir, 'src/android',
+            var src = path.resolve(plugin_dir,
                                         libFile.attrib['src']),
                 dest = path.resolve(libDir,
                                 path.basename(libFile.attrib['src']));
-            
+
             shell.cp(src, dest);
         } else {
             var destFile = path.resolve(libDir,
@@ -173,13 +173,7 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
 
 
 function srcPath(pluginPath, filename) {
-    var prefix = /^src\/android/;
-
-    if (prefix.test(filename)) {
-        return path.resolve(pluginPath, filename);
-    } else {
-        return path.resolve(pluginPath, 'src/android', filename);
-    }
+    return path.resolve(pluginPath, filename);
 }
 
 // reads the package name out of the Android Manifest file

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/482acf84/platforms/blackberry.js
----------------------------------------------------------------------
diff --git a/platforms/blackberry.js b/platforms/blackberry.js
index 8e3cb5a..b7096bf 100644
--- a/platforms/blackberry.js
+++ b/platforms/blackberry.js
@@ -74,10 +74,10 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et) {
             fs.unlinkSync(destFile);
             // check if directory is empty
             var curDir = srcDir;
-            while(curDir !== project_dir + '/src') {
+            while(curDir !== path.join(project_dir, 'src')) {
                 if(fs.readdirSync(curDir).length == 0) {
                     fs.rmdirSync(curDir);
-                    curDir = path.resolve(curDir + '/..');
+                    curDir = path.resolve(curDir, '..');
                 } else {
                     // directory not empty...do nothing
                     break;
@@ -93,7 +93,8 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et) {
 
         if (action == 'install') {
             shell.mkdir('-p', libDir);
-            var src = path.resolve(plugin_dir, 'src/blackberry',
+            
+            var src = path.resolve(plugin_dir,
                                         libFile.attrib['src']),
                 dest = path.resolve(libDir,
                                 path.basename(libFile.attrib['src']));
@@ -141,13 +142,7 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et) {
 
 
 function srcPath(pluginPath, filename) {
-    var prefix = /^src\/blackberry/;
-
-    if (prefix.test(filename)) {
-        return path.resolve(pluginPath, filename);
-    } else {
-        return path.resolve(pluginPath, 'src/blackberry', filename);
-    }
+    return path.resolve(pluginPath, filename);
 }
 
 function pluginInstalled(plugin_et, project_dir) {

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/482acf84/platforms/ios.js
----------------------------------------------------------------------
diff --git a/platforms/ios.js b/platforms/ios.js
index 5431787..c7077fb 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -39,7 +39,7 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
 
     // grab and parse pbxproj
     // we don't want CordovaLib's xcode project
-    var project_files = glob.sync(project_dir + '/*.xcodeproj/project.pbxproj');
+    var project_files = glob.sync(path.join(project_dir, '*.xcodeproj', 'project.pbxproj'));
     
     if (!project_files.length) throw "does not appear to be an xcode project (no xcode project file)";
     var pbxPath = project_files[0];
@@ -48,9 +48,9 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
     xcodeproj.parseSync();
 
     // grab and parse plist file or config.xml
-    var config_files = (glob.sync(project_dir + '/**/{PhoneGap,Cordova}.plist').length == 0 ? 
-                        glob.sync(project_dir + '/**/config.xml') :
-                        glob.sync(project_dir + '/**/{PhoneGap,Cordova}.plist')
+    var config_files = (glob.sync(path.join(project_dir, '**', '{PhoneGap,Cordova}.plist')).length == 0 ? 
+                        glob.sync(path.join(project_dir, '**', 'config.xml')) :
+                        glob.sync(path.join(project_dir, '**', '{PhoneGap,Cordova}.plist'))
                        );
 
     config_files = config_files.filter(function (val) {
@@ -84,18 +84,18 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
     // move native files (source/header/resource)
     sourceFiles && sourceFiles.forEach(function (sourceFile) {
         var src = sourceFile.attrib['src'],
-            srcFile = path.resolve(plugin_dir, 'src/ios', src),
+            srcFile = path.resolve(plugin_dir, src),
             targetDir = path.resolve(pluginsDir, getRelativeDir(sourceFile)),
             destFile = path.resolve(targetDir, path.basename(src));
          
         if (action == 'install') {
-            xcodeproj.addSourceFile('Plugins/' + path.relative(pluginsDir, destFile));
+            xcodeproj.addSourceFile(path.join('Plugins', path.relative(pluginsDir, destFile)));
             shell.mkdir('-p', targetDir);
             checkLastCommand();
             shell.cp(srcFile, destFile);
             checkLastCommand();
         } else {
-            xcodeproj.removeSourceFile('Plugins/' + path.basename(src));   
+            xcodeproj.removeSourceFile(path.join('Plugins', path.basename(src)));
             if(fs.existsSync(destFile))
                 fs.unlinkSync(destFile);
             shell.rm('-rf', targetDir);    
@@ -105,18 +105,18 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
 
     headerFiles && headerFiles.forEach(function (headerFile) {
         var src = headerFile.attrib['src'],
-            srcFile = path.resolve(plugin_dir, 'src/ios', src),
+            srcFile = path.resolve(plugin_dir, src),
             targetDir = path.resolve(pluginsDir, getRelativeDir(headerFile)),
             destFile = path.resolve(targetDir, path.basename(src));
          
         if (action == 'install') {     
-            xcodeproj.addHeaderFile('Plugins/' + path.relative(pluginsDir, destFile));
+            xcodeproj.addHeaderFile(path.join('Plugins', path.relative(pluginsDir, destFile)));
             shell.mkdir('-p', targetDir);
             checkLastCommand();
             shell.cp(srcFile, destFile);
             checkLastCommand();
         } else {
-            xcodeproj.removeHeaderFile('Plugins/' + path.basename(src));
+            xcodeproj.removeHeaderFile(path.join('Plugins', path.basename(src)));
             if(fs.existsSync(destFile))
                 fs.unlinkSync(destFile);
             shell.rm('-rf', targetDir);
@@ -126,11 +126,11 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
 
     resourceFiles && resourceFiles.forEach(function (resource) {
         var src = resource.attrib['src'],
-            srcFile = path.resolve(plugin_dir, 'src/ios', src),
+            srcFile = path.resolve(plugin_dir, src),
             destFile = path.resolve(resourcesDir, path.basename(src));
 
         if (action == 'install') {
-            xcodeproj.addResourceFile('Resources/' + path.basename(src));
+            xcodeproj.addResourceFile(path.join('Resources', path.basename(src)));
             var st = fs.statSync(srcFile);
             if (st.isDirectory()) {
                 shell.cp('-R', srcFile, resourcesDir);
@@ -140,7 +140,7 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
                 checkLastCommand();
             }
         } else {
-            xcodeproj.removeResourceFile('Resources/' + path.basename(src));
+            xcodeproj.removeResourceFile(path.join('Resources', path.basename(src)));
             shell.rm('-rf', destFile);
             checkLastCommand();
         }


[15/54] [abbrv] git commit: adding old iOS project with support for {PhoneGap, Cordova}.plist

Posted by ti...@apache.org.
adding old iOS project with support for {PhoneGap,Cordova}.plist


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/8d5d7a84
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/8d5d7a84
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/8d5d7a84

Branch: refs/heads/future
Commit: 8d5d7a84b0184990f782ef0937bcf30c381113b2
Parents: 77832b1
Author: Anis Kadri <an...@apache.org>
Authored: Mon Apr 1 15:28:20 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Apr 1 15:28:20 2013 -0700

----------------------------------------------------------------------
 .../CordovaLib.xcodeproj/project.pbxproj           |  636 +++++++++++++++
 .../SampleApp.xcodeproj/project.orig.pbxproj       |  498 +++++++++++
 .../ios-plist/SampleApp.xcodeproj/project.pbxproj  |  498 +++++++++++
 test/projects/ios-plist/SampleApp/PhoneGap.plist   |   53 ++
 .../ios-plist/SampleApp/SampleApp-Info.plist       |   80 ++
 5 files changed, 1765 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/8d5d7a84/test/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/test/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/test/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..5d0d461
--- /dev/null
+++ b/test/projects/ios-plist/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
@@ -0,0 +1,636 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */; };
+		1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F3C04CC12BC247D004F9E10 /* CDVContact.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F3C04CD12BC247D004F9E10 /* CDVContact.m */; };
+		1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F584B991385A28900ED25E8 /* CDVCapture.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F584B9A1385A28900ED25E8 /* CDVCapture.m */; };
+		1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F92F49E1314023E0046367C /* CDVPluginResult.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F92F49F1314023E0046367C /* CDVPluginResult.m */; };
+		301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */ = {isa = PBXBuildFile; fileRef = 301F2F2914F3C9CA003FE9FC /* CDV.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 302965BB13A94E9D007046C5 /* CDVDebug.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3034979A1513D56A0090E688 /* CDVLocalStorage.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3034979B1513D56A0090E688 /* CDVLocalStorage.m */; };
+		30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */; };
+		307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 307A8F9C1385A2EC00E43782 /* CDVConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 307A8F9D1385A2EC00E43782 /* CDVConnection.m */; };
+		30A90B9114588697006178D3 /* JSONKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 30A90B8F14588697006178D3 /* JSONKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30A90B9314588697006178D3 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 30A90B9014588697006178D3 /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+		30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = 30B39EBC13D0268B0009682A /* CDVSplashScreen.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 30B39EBD13D0268B0009682A /* CDVSplashScreen.m */; };
+		30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C5F1DD15AF9E950052A00D /* CDVDevice.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C5F1DE15AF9E950052A00D /* CDVDevice.m */; };
+		30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C6847E1406CB38004C1A8E /* CDVWhitelist.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C6847F1406CB38004C1A8E /* CDVWhitelist.m */; };
+		30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C684921407044A004C1A8E /* CDVURLProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 30C684931407044A004C1A8E /* CDVURLProtocol.m */; };
+		30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E33AF013A7E24B00594D64 /* CDVPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E33AF113A7E24B00594D64 /* CDVPlugin.m */; };
+		30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */; };
+		30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E76876B156A90EE00EB6FA3 /* CDVLogger.m */; };
+		3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E76876C156A90EE00EB6FA3 /* CDVLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43614B65FD800F0E735 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43714B65FD800F0E735 /* CDVViewController.m */; };
+		8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 8852C43814B65FD800F0E735 /* CDVCordovaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8852C43914B65FD800F0E735 /* CDVCordovaView.m */; };
+		8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD261090FBE7009987E8 /* CDVCamera.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD271090FBE7009987E8 /* CDVCamera.m */; };
+		8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */; };
+		8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2A1090FBE7009987E8 /* CDVContacts.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2B1090FBE7009987E8 /* CDVContacts.m */; };
+		8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */; };
+		8887FD701090FBE7009987E8 /* CDVFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD301090FBE7009987E8 /* CDVFile.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD711090FBE7009987E8 /* CDVFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD311090FBE7009987E8 /* CDVFile.m */; };
+		8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */; };
+		8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD461090FBE7009987E8 /* CDVLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD471090FBE7009987E8 /* CDVLocation.m */; };
+		8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD4E1090FBE7009987E8 /* CDVNotification.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD4F1090FBE7009987E8 /* CDVNotification.m */; };
+		8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD501090FBE7009987E8 /* NSData+Base64.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD511090FBE7009987E8 /* NSData+Base64.m */; };
+		8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD5E1090FBE7009987E8 /* CDVReachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD5F1090FBE7009987E8 /* CDVReachability.m */; };
+		8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */ = {isa = PBXBuildFile; fileRef = 8887FD601090FBE7009987E8 /* CDVSound.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */ = {isa = PBXBuildFile; fileRef = 8887FD611090FBE7009987E8 /* CDVSound.m */; };
+		88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */ = {isa = PBXBuildFile; fileRef = 88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */; };
+		9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */; };
+		9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */; };
+		C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */ = {isa = PBXBuildFile; fileRef = C937A4541337599E002C4C79 /* CDVFileTransfer.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */ = {isa = PBXBuildFile; fileRef = C937A4551337599E002C4C79 /* CDVFileTransfer.m */; };
+		EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */; };
+		EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */; };
+		EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */; };
+		EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */; };
+		EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */ = {isa = PBXBuildFile; fileRef = EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */; };
+		EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */ = {isa = PBXBuildFile; fileRef = EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */; };
+		EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */ = {isa = PBXBuildFile; fileRef = EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */ = {isa = PBXBuildFile; fileRef = EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVBattery.h; path = Classes/CDVBattery.h; sourceTree = "<group>"; };
+		1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVBattery.m; path = Classes/CDVBattery.m; sourceTree = "<group>"; };
+		1F3C04CC12BC247D004F9E10 /* CDVContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContact.h; path = Classes/CDVContact.h; sourceTree = "<group>"; };
+		1F3C04CD12BC247D004F9E10 /* CDVContact.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContact.m; path = Classes/CDVContact.m; sourceTree = "<group>"; };
+		1F584B991385A28900ED25E8 /* CDVCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCapture.h; path = Classes/CDVCapture.h; sourceTree = "<group>"; };
+		1F584B9A1385A28900ED25E8 /* CDVCapture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCapture.m; path = Classes/CDVCapture.m; sourceTree = "<group>"; };
+		1F92F49E1314023E0046367C /* CDVPluginResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPluginResult.h; path = Classes/CDVPluginResult.h; sourceTree = "<group>"; };
+		1F92F49F1314023E0046367C /* CDVPluginResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPluginResult.m; path = Classes/CDVPluginResult.m; sourceTree = "<group>"; };
+		301F2F2914F3C9CA003FE9FC /* CDV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDV.h; path = Classes/CDV.h; sourceTree = "<group>"; };
+		302965BB13A94E9D007046C5 /* CDVDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebug.h; path = Classes/CDVDebug.h; sourceTree = "<group>"; };
+		30325A0B136B343700982B63 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
+		3034979A1513D56A0090E688 /* CDVLocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocalStorage.h; path = Classes/CDVLocalStorage.h; sourceTree = "<group>"; };
+		3034979B1513D56A0090E688 /* CDVLocalStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocalStorage.m; path = Classes/CDVLocalStorage.m; sourceTree = "<group>"; };
+		30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAvailability.h; path = Classes/CDVAvailability.h; sourceTree = "<group>"; };
+		3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIDevice+Extensions.h"; path = "Classes/UIDevice+Extensions.h"; sourceTree = "<group>"; };
+		3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIDevice+Extensions.m"; path = "Classes/UIDevice+Extensions.m"; sourceTree = "<group>"; };
+		307A8F9C1385A2EC00E43782 /* CDVConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVConnection.h; path = Classes/CDVConnection.h; sourceTree = "<group>"; };
+		307A8F9D1385A2EC00E43782 /* CDVConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVConnection.m; path = Classes/CDVConnection.m; sourceTree = "<group>"; };
+		30A90B8F14588697006178D3 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = "<group>"; };
+		30A90B9014588697006178D3 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = "<group>"; };
+		30B39EBC13D0268B0009682A /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = Classes/CDVSplashScreen.h; sourceTree = "<group>"; };
+		30B39EBD13D0268B0009682A /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = Classes/CDVSplashScreen.m; sourceTree = "<group>"; };
+		30C5F1DD15AF9E950052A00D /* CDVDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDevice.h; path = Classes/CDVDevice.h; sourceTree = "<group>"; };
+		30C5F1DE15AF9E950052A00D /* CDVDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDevice.m; path = Classes/CDVDevice.m; sourceTree = "<group>"; };
+		30C6847E1406CB38004C1A8E /* CDVWhitelist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVWhitelist.h; path = Classes/CDVWhitelist.h; sourceTree = "<group>"; };
+		30C6847F1406CB38004C1A8E /* CDVWhitelist.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVWhitelist.m; path = Classes/CDVWhitelist.m; sourceTree = "<group>"; };
+		30C684921407044A004C1A8E /* CDVURLProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVURLProtocol.h; path = Classes/CDVURLProtocol.h; sourceTree = "<group>"; };
+		30C684931407044A004C1A8E /* CDVURLProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVURLProtocol.m; path = Classes/CDVURLProtocol.m; sourceTree = "<group>"; };
+		30E33AF013A7E24B00594D64 /* CDVPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVPlugin.h; path = Classes/CDVPlugin.h; sourceTree = "<group>"; };
+		30E33AF113A7E24B00594D64 /* CDVPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVPlugin.m; path = Classes/CDVPlugin.m; sourceTree = "<group>"; };
+		30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+QueueAdditions.h"; path = "Classes/NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
+		30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+QueueAdditions.m"; path = "Classes/NSMutableArray+QueueAdditions.m"; sourceTree = "<group>"; };
+		30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegate.h; path = Classes/CDVCommandDelegate.h; sourceTree = "<group>"; };
+		3E76876B156A90EE00EB6FA3 /* CDVLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLogger.m; path = Classes/CDVLogger.m; sourceTree = "<group>"; };
+		3E76876C156A90EE00EB6FA3 /* CDVLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLogger.h; path = Classes/CDVLogger.h; sourceTree = "<group>"; };
+		686357AA141002F100DF4CF2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		686357AC141002F100DF4CF2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		686357AE141002F100DF4CF2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
+		686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+		686357CF14100ADB00DF4CF2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+		686357D014100ADE00DF4CF2 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
+		686357D214100AE700DF4CF2 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		686357D414100AF200DF4CF2 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+		686357DC14100B1600DF4CF2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+		68A32D7114102E1C006B237C /* libCordova.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCordova.a; sourceTree = BUILT_PRODUCTS_DIR; };
+		68A32D7414103017006B237C /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
+		8852C43614B65FD800F0E735 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVViewController.h; path = Classes/CDVViewController.h; sourceTree = "<group>"; };
+		8852C43714B65FD800F0E735 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVViewController.m; path = Classes/CDVViewController.m; sourceTree = "<group>"; };
+		8852C43814B65FD800F0E735 /* CDVCordovaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCordovaView.h; path = Classes/CDVCordovaView.h; sourceTree = "<group>"; };
+		8852C43914B65FD800F0E735 /* CDVCordovaView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCordovaView.m; path = Classes/CDVCordovaView.m; sourceTree = "<group>"; };
+		8887FD261090FBE7009987E8 /* CDVCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCamera.h; path = Classes/CDVCamera.h; sourceTree = "<group>"; };
+		8887FD271090FBE7009987E8 /* CDVCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCamera.m; path = Classes/CDVCamera.m; sourceTree = "<group>"; };
+		8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Extensions.h"; path = "Classes/NSDictionary+Extensions.h"; sourceTree = "<group>"; };
+		8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+Extensions.m"; path = "Classes/NSDictionary+Extensions.m"; sourceTree = "<group>"; };
+		8887FD2A1090FBE7009987E8 /* CDVContacts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVContacts.h; path = Classes/CDVContacts.h; sourceTree = "<group>"; };
+		8887FD2B1090FBE7009987E8 /* CDVContacts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVContacts.m; path = Classes/CDVContacts.m; sourceTree = "<group>"; };
+		8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVDebugConsole.h; path = Classes/CDVDebugConsole.h; sourceTree = "<group>"; };
+		8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVDebugConsole.m; path = Classes/CDVDebugConsole.m; sourceTree = "<group>"; };
+		8887FD301090FBE7009987E8 /* CDVFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFile.h; path = Classes/CDVFile.h; sourceTree = "<group>"; };
+		8887FD311090FBE7009987E8 /* CDVFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFile.m; path = Classes/CDVFile.m; sourceTree = "<group>"; };
+		8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVInvokedUrlCommand.h; path = Classes/CDVInvokedUrlCommand.h; sourceTree = "<group>"; };
+		8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVInvokedUrlCommand.m; path = Classes/CDVInvokedUrlCommand.m; sourceTree = "<group>"; };
+		8887FD461090FBE7009987E8 /* CDVLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVLocation.h; path = Classes/CDVLocation.h; sourceTree = "<group>"; };
+		8887FD471090FBE7009987E8 /* CDVLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVLocation.m; path = Classes/CDVLocation.m; sourceTree = "<group>"; };
+		8887FD4E1090FBE7009987E8 /* CDVNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVNotification.h; path = Classes/CDVNotification.h; sourceTree = "<group>"; };
+		8887FD4F1090FBE7009987E8 /* CDVNotification.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVNotification.m; path = Classes/CDVNotification.m; sourceTree = "<group>"; };
+		8887FD501090FBE7009987E8 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+Base64.h"; path = "Classes/NSData+Base64.h"; sourceTree = "<group>"; };
+		8887FD511090FBE7009987E8 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+Base64.m"; path = "Classes/NSData+Base64.m"; sourceTree = "<group>"; };
+		8887FD5E1090FBE7009987E8 /* CDVReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVReachability.h; path = Classes/CDVReachability.h; sourceTree = "<group>"; };
+		8887FD5F1090FBE7009987E8 /* CDVReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVReachability.m; path = Classes/CDVReachability.m; sourceTree = "<group>"; };
+		8887FD601090FBE7009987E8 /* CDVSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSound.h; path = Classes/CDVSound.h; sourceTree = "<group>"; };
+		8887FD611090FBE7009987E8 /* CDVSound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSound.m; path = Classes/CDVSound.m; sourceTree = "<group>"; };
+		88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVAccelerometer.h; path = Classes/CDVAccelerometer.h; sourceTree = "<group>"; };
+		88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVAccelerometer.m; path = Classes/CDVAccelerometer.m; sourceTree = "<group>"; };
+		9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVGlobalization.h; path = Classes/CDVGlobalization.h; sourceTree = "<group>"; };
+		9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVGlobalization.m; path = Classes/CDVGlobalization.m; sourceTree = "<group>"; };
+		AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CordovaLib_Prefix.pch; sourceTree = SOURCE_ROOT; };
+		C937A4541337599E002C4C79 /* CDVFileTransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVFileTransfer.h; path = Classes/CDVFileTransfer.h; sourceTree = "<group>"; };
+		C937A4551337599E002C4C79 /* CDVFileTransfer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVFileTransfer.m; path = Classes/CDVFileTransfer.m; sourceTree = "<group>"; };
+		EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandQueue.h; path = Classes/CDVCommandQueue.h; sourceTree = "<group>"; };
+		EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandQueue.m; path = Classes/CDVCommandQueue.m; sourceTree = "<group>"; };
+		EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVCommandDelegateImpl.h; path = Classes/CDVCommandDelegateImpl.h; sourceTree = "<group>"; };
+		EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVCommandDelegateImpl.m; path = Classes/CDVCommandDelegateImpl.m; sourceTree = "<group>"; };
+		EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVEcho.h; path = Classes/CDVEcho.h; sourceTree = "<group>"; };
+		EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVEcho.m; path = Classes/CDVEcho.m; sourceTree = "<group>"; };
+		EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSArray+Comparisons.h"; path = "Classes/NSArray+Comparisons.h"; sourceTree = "<group>"; };
+		EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSArray+Comparisons.m"; path = "Classes/NSArray+Comparisons.m"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		D2AAC07C0554694100DB518D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		034768DFFF38A50411DB9C8B /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				68A32D7114102E1C006B237C /* libCordova.a */,
+			);
+			name = Products;
+			sourceTree = CORDOVALIB;
+		};
+		0867D691FE84028FC02AAC07 /* CordovaLib */ = {
+			isa = PBXGroup;
+			children = (
+				8887FD101090FB43009987E8 /* Classes */,
+				32C88DFF0371C24200C91783 /* Other Sources */,
+				0867D69AFE84028FC02AAC07 /* Frameworks */,
+				034768DFFF38A50411DB9C8B /* Products */,
+				30325A0B136B343700982B63 /* VERSION */,
+			);
+			name = CordovaLib;
+			sourceTree = "<group>";
+		};
+		0867D69AFE84028FC02AAC07 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				68A32D7414103017006B237C /* AddressBook.framework */,
+				686357DC14100B1600DF4CF2 /* CoreMedia.framework */,
+				686357CE14100ADA00DF4CF2 /* AudioToolbox.framework */,
+				686357CF14100ADB00DF4CF2 /* AVFoundation.framework */,
+				686357D014100ADE00DF4CF2 /* CoreLocation.framework */,
+				686357D214100AE700DF4CF2 /* MobileCoreServices.framework */,
+				686357D414100AF200DF4CF2 /* SystemConfiguration.framework */,
+				686357CC14100AAD00DF4CF2 /* AddressBookUI.framework */,
+				686357AA141002F100DF4CF2 /* UIKit.framework */,
+				686357AC141002F100DF4CF2 /* Foundation.framework */,
+				686357AE141002F100DF4CF2 /* CoreGraphics.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		3054098714B77FF3009841CA /* Cleaver */ = {
+			isa = PBXGroup;
+			children = (
+				8852C43614B65FD800F0E735 /* CDVViewController.h */,
+				8852C43714B65FD800F0E735 /* CDVViewController.m */,
+				8852C43814B65FD800F0E735 /* CDVCordovaView.h */,
+				8852C43914B65FD800F0E735 /* CDVCordovaView.m */,
+				EB3B3545161CB44D003DBE7D /* CDVCommandQueue.h */,
+				EB3B3546161CB44D003DBE7D /* CDVCommandQueue.m */,
+			);
+			name = Cleaver;
+			sourceTree = "<group>";
+		};
+		32C88DFF0371C24200C91783 /* Other Sources */ = {
+			isa = PBXGroup;
+			children = (
+				AA747D9E0F9514B9006C5449 /* CordovaLib_Prefix.pch */,
+			);
+			name = "Other Sources";
+			sourceTree = "<group>";
+		};
+		888700D710922F56009987E8 /* Commands */ = {
+			isa = PBXGroup;
+			children = (
+				30C5F1DD15AF9E950052A00D /* CDVDevice.h */,
+				30C5F1DE15AF9E950052A00D /* CDVDevice.m */,
+				301F2F2914F3C9CA003FE9FC /* CDV.h */,
+				3034979A1513D56A0090E688 /* CDVLocalStorage.h */,
+				3034979B1513D56A0090E688 /* CDVLocalStorage.m */,
+				30392E4D14F4FCAB00B9E0B8 /* CDVAvailability.h */,
+				30F5EBA914CA26E700987760 /* CDVCommandDelegate.h */,
+				EB3B357A161F2A44003DBE7D /* CDVCommandDelegateImpl.h */,
+				EB3B357B161F2A45003DBE7D /* CDVCommandDelegateImpl.m */,
+				30C684921407044A004C1A8E /* CDVURLProtocol.h */,
+				30C684931407044A004C1A8E /* CDVURLProtocol.m */,
+				30C6847E1406CB38004C1A8E /* CDVWhitelist.h */,
+				30C6847F1406CB38004C1A8E /* CDVWhitelist.m */,
+				1F2BECBE13F9785B00A93BF6 /* CDVBattery.h */,
+				1F2BECBF13F9785B00A93BF6 /* CDVBattery.m */,
+				30B39EBC13D0268B0009682A /* CDVSplashScreen.h */,
+				30B39EBD13D0268B0009682A /* CDVSplashScreen.m */,
+				30E33AF013A7E24B00594D64 /* CDVPlugin.h */,
+				30E33AF113A7E24B00594D64 /* CDVPlugin.m */,
+				307A8F9C1385A2EC00E43782 /* CDVConnection.h */,
+				307A8F9D1385A2EC00E43782 /* CDVConnection.m */,
+				1F92F49E1314023E0046367C /* CDVPluginResult.h */,
+				1F92F49F1314023E0046367C /* CDVPluginResult.m */,
+				88BA573B109BB46F00FB5E78 /* CDVAccelerometer.h */,
+				88BA573C109BB46F00FB5E78 /* CDVAccelerometer.m */,
+				8887FD261090FBE7009987E8 /* CDVCamera.h */,
+				8887FD271090FBE7009987E8 /* CDVCamera.m */,
+				1F584B991385A28900ED25E8 /* CDVCapture.h */,
+				1F584B9A1385A28900ED25E8 /* CDVCapture.m */,
+				1F3C04CC12BC247D004F9E10 /* CDVContact.h */,
+				1F3C04CD12BC247D004F9E10 /* CDVContact.m */,
+				8887FD2A1090FBE7009987E8 /* CDVContacts.h */,
+				8887FD2B1090FBE7009987E8 /* CDVContacts.m */,
+				8887FD2C1090FBE7009987E8 /* CDVDebugConsole.h */,
+				8887FD2D1090FBE7009987E8 /* CDVDebugConsole.m */,
+				EB80C2AA15DEA63D004D9E7B /* CDVEcho.h */,
+				EB80C2AB15DEA63D004D9E7B /* CDVEcho.m */,
+				8887FD301090FBE7009987E8 /* CDVFile.h */,
+				8887FD311090FBE7009987E8 /* CDVFile.m */,
+				8887FD341090FBE7009987E8 /* CDVInvokedUrlCommand.h */,
+				8887FD351090FBE7009987E8 /* CDVInvokedUrlCommand.m */,
+				C937A4541337599E002C4C79 /* CDVFileTransfer.h */,
+				C937A4551337599E002C4C79 /* CDVFileTransfer.m */,
+				8887FD461090FBE7009987E8 /* CDVLocation.h */,
+				8887FD471090FBE7009987E8 /* CDVLocation.m */,
+				8887FD4E1090FBE7009987E8 /* CDVNotification.h */,
+				8887FD4F1090FBE7009987E8 /* CDVNotification.m */,
+				8887FD5E1090FBE7009987E8 /* CDVReachability.h */,
+				8887FD5F1090FBE7009987E8 /* CDVReachability.m */,
+				8887FD601090FBE7009987E8 /* CDVSound.h */,
+				8887FD611090FBE7009987E8 /* CDVSound.m */,
+				3E76876B156A90EE00EB6FA3 /* CDVLogger.m */,
+				3E76876C156A90EE00EB6FA3 /* CDVLogger.h */,
+				9D76CF3A1625A4C50008A0F6 /* CDVGlobalization.h */,
+				9D76CF3B1625A4C50008A0F6 /* CDVGlobalization.m */,
+			);
+			name = Commands;
+			sourceTree = "<group>";
+		};
+		888700D910923009009987E8 /* Util */ = {
+			isa = PBXGroup;
+			children = (
+				3062D11E151D0EDB000D9128 /* UIDevice+Extensions.h */,
+				3062D11F151D0EDB000D9128 /* UIDevice+Extensions.m */,
+				EBA3557115ABD38C00F4DE24 /* NSArray+Comparisons.h */,
+				EBA3557215ABD38C00F4DE24 /* NSArray+Comparisons.m */,
+				8887FD281090FBE7009987E8 /* NSDictionary+Extensions.h */,
+				8887FD291090FBE7009987E8 /* NSDictionary+Extensions.m */,
+				302965BB13A94E9D007046C5 /* CDVDebug.h */,
+				30E563CD13E217EC00C949AA /* NSMutableArray+QueueAdditions.h */,
+				30E563CE13E217EC00C949AA /* NSMutableArray+QueueAdditions.m */,
+				8887FD501090FBE7009987E8 /* NSData+Base64.h */,
+				8887FD511090FBE7009987E8 /* NSData+Base64.m */,
+			);
+			name = Util;
+			sourceTree = "<group>";
+		};
+		8887FD101090FB43009987E8 /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				3054098714B77FF3009841CA /* Cleaver */,
+				888700D710922F56009987E8 /* Commands */,
+				8887FD361090FBE7009987E8 /* JSON */,
+				888700D910923009009987E8 /* Util */,
+			);
+			name = Classes;
+			sourceTree = "<group>";
+		};
+		8887FD361090FBE7009987E8 /* JSON */ = {
+			isa = PBXGroup;
+			children = (
+				30A90B8F14588697006178D3 /* JSONKit.h */,
+				30A90B9014588697006178D3 /* JSONKit.m */,
+			);
+			name = JSON;
+			path = Classes/JSON;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		D2AAC07A0554694100DB518D /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8887FD661090FBE7009987E8 /* CDVCamera.h in Headers */,
+				8887FD681090FBE7009987E8 /* NSDictionary+Extensions.h in Headers */,
+				8887FD6A1090FBE7009987E8 /* CDVContacts.h in Headers */,
+				8887FD6C1090FBE7009987E8 /* CDVDebugConsole.h in Headers */,
+				8887FD701090FBE7009987E8 /* CDVFile.h in Headers */,
+				8887FD741090FBE7009987E8 /* CDVInvokedUrlCommand.h in Headers */,
+				8887FD851090FBE7009987E8 /* CDVLocation.h in Headers */,
+				8887FD8D1090FBE7009987E8 /* CDVNotification.h in Headers */,
+				8887FD8F1090FBE7009987E8 /* NSData+Base64.h in Headers */,
+				8887FD9D1090FBE7009987E8 /* CDVReachability.h in Headers */,
+				8887FD9F1090FBE7009987E8 /* CDVSound.h in Headers */,
+				88BA573D109BB46F00FB5E78 /* CDVAccelerometer.h in Headers */,
+				1F3C04CE12BC247D004F9E10 /* CDVContact.h in Headers */,
+				1F92F4A01314023E0046367C /* CDVPluginResult.h in Headers */,
+				C937A4561337599E002C4C79 /* CDVFileTransfer.h in Headers */,
+				307A8F9E1385A2EC00E43782 /* CDVConnection.h in Headers */,
+				1F584B9B1385A28A00ED25E8 /* CDVCapture.h in Headers */,
+				30E33AF213A7E24B00594D64 /* CDVPlugin.h in Headers */,
+				302965BC13A94E9D007046C5 /* CDVDebug.h in Headers */,
+				30B39EBE13D0268B0009682A /* CDVSplashScreen.h in Headers */,
+				30E563CF13E217EC00C949AA /* NSMutableArray+QueueAdditions.h in Headers */,
+				1F2BECC013F9785B00A93BF6 /* CDVBattery.h in Headers */,
+				30C684801406CB38004C1A8E /* CDVWhitelist.h in Headers */,
+				30C684941407044B004C1A8E /* CDVURLProtocol.h in Headers */,
+				30A90B9114588697006178D3 /* JSONKit.h in Headers */,
+				8852C43A14B65FD800F0E735 /* CDVViewController.h in Headers */,
+				8852C43F14B65FD800F0E735 /* CDVCordovaView.h in Headers */,
+				30F5EBAB14CA26E700987760 /* CDVCommandDelegate.h in Headers */,
+				301F2F2A14F3C9CA003FE9FC /* CDV.h in Headers */,
+				30392E4E14F4FCAB00B9E0B8 /* CDVAvailability.h in Headers */,
+				3034979C1513D56A0090E688 /* CDVLocalStorage.h in Headers */,
+				3062D120151D0EDB000D9128 /* UIDevice+Extensions.h in Headers */,
+				3E76876F156A90EE00EB6FA3 /* CDVLogger.h in Headers */,
+				EBA3557315ABD38C00F4DE24 /* NSArray+Comparisons.h in Headers */,
+				30C5F1DF15AF9E950052A00D /* CDVDevice.h in Headers */,
+				EB80C2AC15DEA63D004D9E7B /* CDVEcho.h in Headers */,
+				EB3B3547161CB44D003DBE7D /* CDVCommandQueue.h in Headers */,
+				EB3B357C161F2A45003DBE7D /* CDVCommandDelegateImpl.h in Headers */,
+				9D76CF3C1625A4C50008A0F6 /* CDVGlobalization.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		D2AAC07D0554694100DB518D /* CordovaLib */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */;
+			buildPhases = (
+				D2AAC07A0554694100DB518D /* Headers */,
+				D2AAC07B0554694100DB518D /* Sources */,
+				D2AAC07C0554694100DB518D /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = CordovaLib;
+			productName = CordovaLib;
+			productReference = 68A32D7114102E1C006B237C /* libCordova.a */;
+			productType = "com.apple.product-type.library.static";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		0867D690FE84028FC02AAC07 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0430;
+			};
+			buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 1;
+			knownRegions = (
+				English,
+				Japanese,
+				French,
+				German,
+				en,
+			);
+			mainGroup = 0867D691FE84028FC02AAC07 /* CordovaLib */;
+			productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				D2AAC07D0554694100DB518D /* CordovaLib */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+		D2AAC07B0554694100DB518D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8887FD671090FBE7009987E8 /* CDVCamera.m in Sources */,
+				8887FD691090FBE7009987E8 /* NSDictionary+Extensions.m in Sources */,
+				8887FD6B1090FBE7009987E8 /* CDVContacts.m in Sources */,
+				8887FD6D1090FBE7009987E8 /* CDVDebugConsole.m in Sources */,
+				8887FD711090FBE7009987E8 /* CDVFile.m in Sources */,
+				8887FD751090FBE7009987E8 /* CDVInvokedUrlCommand.m in Sources */,
+				8887FD861090FBE7009987E8 /* CDVLocation.m in Sources */,
+				8887FD8E1090FBE7009987E8 /* CDVNotification.m in Sources */,
+				8887FD901090FBE7009987E8 /* NSData+Base64.m in Sources */,
+				8887FD9E1090FBE7009987E8 /* CDVReachability.m in Sources */,
+				8887FDA01090FBE7009987E8 /* CDVSound.m in Sources */,
+				88BA573E109BB46F00FB5E78 /* CDVAccelerometer.m in Sources */,
+				1F3C04CF12BC247D004F9E10 /* CDVContact.m in Sources */,
+				1F92F4A11314023E0046367C /* CDVPluginResult.m in Sources */,
+				C937A4571337599E002C4C79 /* CDVFileTransfer.m in Sources */,
+				307A8F9F1385A2EC00E43782 /* CDVConnection.m in Sources */,
+				1F584B9C1385A28A00ED25E8 /* CDVCapture.m in Sources */,
+				30E33AF313A7E24B00594D64 /* CDVPlugin.m in Sources */,
+				30B39EBF13D0268B0009682A /* CDVSplashScreen.m in Sources */,
+				30E563D013E217EC00C949AA /* NSMutableArray+QueueAdditions.m in Sources */,
+				1F2BECC113F9785B00A93BF6 /* CDVBattery.m in Sources */,
+				30C684821406CB38004C1A8E /* CDVWhitelist.m in Sources */,
+				30C684961407044B004C1A8E /* CDVURLProtocol.m in Sources */,
+				30A90B9314588697006178D3 /* JSONKit.m in Sources */,
+				8852C43C14B65FD800F0E735 /* CDVViewController.m in Sources */,
+				8852C44114B65FD800F0E735 /* CDVCordovaView.m in Sources */,
+				3034979E1513D56A0090E688 /* CDVLocalStorage.m in Sources */,
+				3062D122151D0EDB000D9128 /* UIDevice+Extensions.m in Sources */,
+				3E76876D156A90EE00EB6FA3 /* CDVLogger.m in Sources */,
+				EBA3557515ABD38C00F4DE24 /* NSArray+Comparisons.m in Sources */,
+				30C5F1E015AF9E950052A00D /* CDVDevice.m in Sources */,
+				EB80C2AD15DEA63D004D9E7B /* CDVEcho.m in Sources */,
+				EB3B3548161CB44D003DBE7D /* CDVCommandQueue.m in Sources */,
+				EB3B357D161F2A45003DBE7D /* CDVCommandDelegateImpl.m in Sources */,
+				9D76CF3D1625A4C50008A0F6 /* CDVGlobalization.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+		1DEB921F08733DC00010E9CD /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				"ARCHS[sdk=iphoneos*]" = (
+					armv6,
+					armv7,
+				);
+				"ARCHS[sdk=iphoneos6.*]" = (
+					armv7,
+					armv7s,
+				);
+				"ARCHS[sdk=iphonesimulator*]" = i386;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				COPY_PHASE_STRIP = NO;
+				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = "";
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				INSTALL_PATH = /usr/local/lib;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+				PRODUCT_NAME = Cordova;
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SKIP_INSTALL = YES;
+			};
+			name = Debug;
+		};
+		1DEB922008733DC00010E9CD /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				"ARCHS[sdk=iphoneos*]" = (
+					armv6,
+					armv7,
+				);
+				"ARCHS[sdk=iphoneos6.*]" = (
+					armv7,
+					armv7s,
+				);
+				"ARCHS[sdk=iphonesimulator*]" = i386;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				DSTROOT = "/tmp/$(PROJECT_NAME).dst";
+				GCC_MODEL_TUNING = G5;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = CordovaLib_Prefix.pch;
+				GCC_PREPROCESSOR_DEFINITIONS = "";
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				INSTALL_PATH = /usr/local/lib;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+				PRODUCT_NAME = Cordova;
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SKIP_INSTALL = YES;
+			};
+			name = Release;
+		};
+		1DEB922308733DC00010E9CD /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				"ARCHS[sdk=iphoneos*]" = (
+					armv6,
+					armv7,
+				);
+				"ARCHS[sdk=iphoneos6.*]" = (
+					armv7,
+					armv7s,
+				);
+				"ARCHS[sdk=iphonesimulator*]" = i386;
+				GCC_C_LANGUAGE_STANDARD = c99;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = "";
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+				ONLY_ACTIVE_ARCH = NO;
+				OTHER_CFLAGS = "-DDEBUG";
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SDKROOT = iphoneos;
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				USER_HEADER_SEARCH_PATHS = "";
+				VALID_ARCHS = "i386 armv6 armv7 armv7s";
+			};
+			name = Debug;
+		};
+		1DEB922408733DC00010E9CD /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				"ARCHS[sdk=iphoneos*]" = (
+					armv6,
+					armv7,
+				);
+				"ARCHS[sdk=iphoneos6.*]" = (
+					armv7,
+					armv7s,
+				);
+				"ARCHS[sdk=iphonesimulator*]" = i386;
+				GCC_C_LANGUAGE_STANDARD = c99;
+				GCC_PREPROCESSOR_DEFINITIONS = "";
+				GCC_THUMB_SUPPORT = NO;
+				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 4.2;
+				ONLY_ACTIVE_ARCH = NO;
+				PUBLIC_HEADERS_FOLDER_PATH = include/Cordova;
+				SDKROOT = iphoneos;
+				SKIP_INSTALL = YES;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALID_ARCHS = "i386 armv6 armv7 armv7s";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CordovaLib" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1DEB921F08733DC00010E9CD /* Debug */,
+				1DEB922008733DC00010E9CD /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CordovaLib" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				1DEB922308733DC00010E9CD /* Debug */,
+				1DEB922408733DC00010E9CD /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/8d5d7a84/test/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj
----------------------------------------------------------------------
diff --git a/test/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj b/test/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj
new file mode 100644
index 0000000..a4d87f9
--- /dev/null
+++ b/test/projects/ios-plist/SampleApp.xcodeproj/project.orig.pbxproj
@@ -0,0 +1,498 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A463F14DB0A1B007FEAC7 /* Foundation.framework */; };
+		571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464114DB0A1B007FEAC7 /* UIKit.framework */; };
+		571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */; };
+		571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464514DB0A1B007FEAC7 /* AddressBook.framework */; };
+		571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */; };
+		571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */; };
+		571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */; };
+		571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */; };
+		571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */; };
+		571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465114DB0A1B007FEAC7 /* QuartzCore.framework */; };
+		571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */; };
+		571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */; };
+		571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A465714DB0A1B007FEAC7 /* CoreMedia.framework */; };
+		571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */; };
+		571A466014DB0A1B007FEAC7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A465F14DB0A1B007FEAC7 /* main.m */; };
+		571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 571A466214DB0A1B007FEAC7 /* PhoneGap.framework */; };
+		571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466614DB0A1B007FEAC7 /* Localizable.strings */; };
+		571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 571A466A14DB0A1B007FEAC7 /* Localizable.strings */; };
+		571A466F14DB0A1B007FEAC7 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A466E14DB0A1B007FEAC7 /* icon.png */; };
+		571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467014DB0A1B007FEAC7 /* icon@2x.png */; };
+		571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467214DB0A1B007FEAC7 /* icon-72.png */; };
+		571A467614DB0A1B007FEAC7 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467514DB0A1B007FEAC7 /* Default.png */; };
+		571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 571A467714DB0A1B007FEAC7 /* Default@2x.png */; };
+		571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 571A467914DB0A1B007FEAC7 /* Capture.bundle */; };
+		571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = 571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */; };
+		571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A467F14DB0A1B007FEAC7 /* AppDelegate.m */; };
+		571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 571A468214DB0A1B007FEAC7 /* MainViewController.m */; };
+		571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 571A468414DB0A1B007FEAC7 /* MainViewController.xib */; };
+		577FC36614DB0B620082BA7B /* www in Resources */ = {isa = PBXBuildFile; fileRef = 577FC36514DB0B620082BA7B /* www */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		571A463B14DB0A1B007FEAC7 /* ChildApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChildApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		571A463F14DB0A1B007FEAC7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		571A464114DB0A1B007FEAC7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		571A464514DB0A1B007FEAC7 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
+		571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
+		571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
+		571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
+		571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
+		571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
+		571A465114DB0A1B007FEAC7 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
+		571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+		571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		571A465714DB0A1B007FEAC7 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+		571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ChildApp-Info.plist"; sourceTree = "<group>"; };
+		571A465D14DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		571A465F14DB0A1B007FEAC7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ChildApp-Prefix.pch"; sourceTree = "<group>"; };
+		571A466214DB0A1B007FEAC7 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
+		571A466714DB0A1B007FEAC7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
+		571A466B14DB0A1B007FEAC7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = "<group>"; };
+		571A466E14DB0A1B007FEAC7 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
+		571A467014DB0A1B007FEAC7 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
+		571A467214DB0A1B007FEAC7 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
+		571A467514DB0A1B007FEAC7 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
+		571A467714DB0A1B007FEAC7 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
+		571A467914DB0A1B007FEAC7 /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = "<group>"; };
+		571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
+		571A467E14DB0A1B007FEAC7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
+		571A467F14DB0A1B007FEAC7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
+		571A468114DB0A1B007FEAC7 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
+		571A468214DB0A1B007FEAC7 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
+		571A468414DB0A1B007FEAC7 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
+		571A468714DB0A1B007FEAC7 /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = "<group>"; };
+		577FC36514DB0B620082BA7B /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		571A463514DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A464014DB0A1B007FEAC7 /* Foundation.framework in Frameworks */,
+				571A464214DB0A1B007FEAC7 /* UIKit.framework in Frameworks */,
+				571A464414DB0A1B007FEAC7 /* CoreGraphics.framework in Frameworks */,
+				571A464614DB0A1B007FEAC7 /* AddressBook.framework in Frameworks */,
+				571A464814DB0A1B007FEAC7 /* AddressBookUI.framework in Frameworks */,
+				571A464A14DB0A1B007FEAC7 /* AudioToolbox.framework in Frameworks */,
+				571A464C14DB0A1B007FEAC7 /* AVFoundation.framework in Frameworks */,
+				571A464E14DB0A1B007FEAC7 /* CoreLocation.framework in Frameworks */,
+				571A465014DB0A1B007FEAC7 /* MediaPlayer.framework in Frameworks */,
+				571A465214DB0A1B007FEAC7 /* QuartzCore.framework in Frameworks */,
+				571A465414DB0A1B007FEAC7 /* SystemConfiguration.framework in Frameworks */,
+				571A465614DB0A1B007FEAC7 /* MobileCoreServices.framework in Frameworks */,
+				571A465814DB0A1B007FEAC7 /* CoreMedia.framework in Frameworks */,
+				571A466314DB0A1B007FEAC7 /* PhoneGap.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		571A463814DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		571A462D14DB0A1A007FEAC7 = {
+			isa = PBXGroup;
+			children = (
+				577FC36514DB0B620082BA7B /* www */,
+				571A465914DB0A1B007FEAC7 /* ChildApp */,
+				571A463E14DB0A1B007FEAC7 /* Frameworks */,
+				571A463C14DB0A1B007FEAC7 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		571A463C14DB0A1B007FEAC7 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				571A463B14DB0A1B007FEAC7 /* ChildApp.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		571A463E14DB0A1B007FEAC7 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				571A463F14DB0A1B007FEAC7 /* Foundation.framework */,
+				571A464114DB0A1B007FEAC7 /* UIKit.framework */,
+				571A464314DB0A1B007FEAC7 /* CoreGraphics.framework */,
+				571A464514DB0A1B007FEAC7 /* AddressBook.framework */,
+				571A464714DB0A1B007FEAC7 /* AddressBookUI.framework */,
+				571A464914DB0A1B007FEAC7 /* AudioToolbox.framework */,
+				571A464B14DB0A1B007FEAC7 /* AVFoundation.framework */,
+				571A464D14DB0A1B007FEAC7 /* CoreLocation.framework */,
+				571A464F14DB0A1B007FEAC7 /* MediaPlayer.framework */,
+				571A465114DB0A1B007FEAC7 /* QuartzCore.framework */,
+				571A465314DB0A1B007FEAC7 /* SystemConfiguration.framework */,
+				571A465514DB0A1B007FEAC7 /* MobileCoreServices.framework */,
+				571A465714DB0A1B007FEAC7 /* CoreMedia.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		571A465914DB0A1B007FEAC7 /* ChildApp */ = {
+			isa = PBXGroup;
+			children = (
+				571A466214DB0A1B007FEAC7 /* PhoneGap.framework */,
+				571A466414DB0A1B007FEAC7 /* Resources */,
+				571A467D14DB0A1B007FEAC7 /* Classes */,
+				571A468614DB0A1B007FEAC7 /* Plugins */,
+				571A465A14DB0A1B007FEAC7 /* Supporting Files */,
+			);
+			path = ChildApp;
+			sourceTree = "<group>";
+		};
+		571A465A14DB0A1B007FEAC7 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				571A465B14DB0A1B007FEAC7 /* ChildApp-Info.plist */,
+				571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */,
+				571A465F14DB0A1B007FEAC7 /* main.m */,
+				571A466114DB0A1B007FEAC7 /* ChildApp-Prefix.pch */,
+				571A467B14DB0A1B007FEAC7 /* PhoneGap.plist */,
+				571A468414DB0A1B007FEAC7 /* MainViewController.xib */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		571A466414DB0A1B007FEAC7 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				571A467914DB0A1B007FEAC7 /* Capture.bundle */,
+				571A466514DB0A1B007FEAC7 /* en.lproj */,
+				571A466914DB0A1B007FEAC7 /* es.lproj */,
+				571A466D14DB0A1B007FEAC7 /* icons */,
+				571A467414DB0A1B007FEAC7 /* splash */,
+			);
+			name = Resources;
+			sourceTree = "<group>";
+		};
+		571A466514DB0A1B007FEAC7 /* en.lproj */ = {
+			isa = PBXGroup;
+			children = (
+				571A466614DB0A1B007FEAC7 /* Localizable.strings */,
+			);
+			name = en.lproj;
+			sourceTree = "<group>";
+		};
+		571A466914DB0A1B007FEAC7 /* es.lproj */ = {
+			isa = PBXGroup;
+			children = (
+				571A466A14DB0A1B007FEAC7 /* Localizable.strings */,
+			);
+			name = es.lproj;
+			sourceTree = "<group>";
+		};
+		571A466D14DB0A1B007FEAC7 /* icons */ = {
+			isa = PBXGroup;
+			children = (
+				571A466E14DB0A1B007FEAC7 /* icon.png */,
+				571A467014DB0A1B007FEAC7 /* icon@2x.png */,
+				571A467214DB0A1B007FEAC7 /* icon-72.png */,
+			);
+			name = icons;
+			sourceTree = "<group>";
+		};
+		571A467414DB0A1B007FEAC7 /* splash */ = {
+			isa = PBXGroup;
+			children = (
+				571A467514DB0A1B007FEAC7 /* Default.png */,
+				571A467714DB0A1B007FEAC7 /* Default@2x.png */,
+			);
+			name = splash;
+			sourceTree = "<group>";
+		};
+		571A467D14DB0A1B007FEAC7 /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+				571A467E14DB0A1B007FEAC7 /* AppDelegate.h */,
+				571A467F14DB0A1B007FEAC7 /* AppDelegate.m */,
+				571A468114DB0A1B007FEAC7 /* MainViewController.h */,
+				571A468214DB0A1B007FEAC7 /* MainViewController.m */,
+			);
+			name = Classes;
+			sourceTree = "<group>";
+		};
+		571A468614DB0A1B007FEAC7 /* Plugins */ = {
+			isa = PBXGroup;
+			children = (
+				571A468714DB0A1B007FEAC7 /* README */,
+			);
+			name = Plugins;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		571A463A14DB0A1B007FEAC7 /* ChildApp */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */;
+			buildPhases = (
+				571A463414DB0A1B007FEAC7 /* Sources */,
+				571A463514DB0A1B007FEAC7 /* Frameworks */,
+				571A463614DB0A1B007FEAC7 /* Resources */,
+				571A463714DB0A1B007FEAC7 /* Sources */,
+				571A463814DB0A1B007FEAC7 /* Frameworks */,
+				571A463914DB0A1B007FEAC7 /* ShellScript */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = ChildApp;
+			productName = ChildApp;
+			productReference = 571A463B14DB0A1B007FEAC7 /* ChildApp.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		571A462F14DB0A1A007FEAC7 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0420;
+			};
+			buildConfigurationList = 571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				es,
+			);
+			mainGroup = 571A462D14DB0A1A007FEAC7;
+			productRefGroup = 571A463C14DB0A1B007FEAC7 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				571A463A14DB0A1B007FEAC7 /* ChildApp */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		571A463614DB0A1B007FEAC7 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A465E14DB0A1B007FEAC7 /* InfoPlist.strings in Resources */,
+				571A466814DB0A1B007FEAC7 /* Localizable.strings in Resources */,
+				571A466C14DB0A1B007FEAC7 /* Localizable.strings in Resources */,
+				571A466F14DB0A1B007FEAC7 /* icon.png in Resources */,
+				571A467114DB0A1B007FEAC7 /* icon@2x.png in Resources */,
+				571A467314DB0A1B007FEAC7 /* icon-72.png in Resources */,
+				571A467614DB0A1B007FEAC7 /* Default.png in Resources */,
+				571A467814DB0A1B007FEAC7 /* Default@2x.png in Resources */,
+				571A467A14DB0A1B007FEAC7 /* Capture.bundle in Resources */,
+				571A467C14DB0A1B007FEAC7 /* PhoneGap.plist in Resources */,
+				571A468514DB0A1B007FEAC7 /* MainViewController.xib in Resources */,
+				577FC36614DB0B620082BA7B /* www in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		571A463914DB0A1B007FEAC7 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/bash;
+			shellScript = "\n\t\t\t\t\t\t\t\tif [ ! -d \"$PROJECT_DIR/www\" ] ; then\n\t\t\t\t\t\t\t\t\tcp -R /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/www \"$PROJECT_DIR\"\n\t\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t\t# detect www folder reference in project, if missing, print warning\n\t\t\t\t\t\t\t\tgrep \"{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \\\"<group>\\\"; };\" \"$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj\"\n\t\t\t\t\t\t\t\trc=$? \n\t\t\t\t\t\t\t\tif [ $rc != 0 ] ; then\n\t\t\t\t\t\t\t\techo -e \"warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)\" 1>&2\n\t\t\t\t\t\t\t\tfi\t\t\t\t\t\t\t";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		571A463414DB0A1B007FEAC7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				571A466014DB0A1B007FEAC7 /* main.m in Sources */,
+				571A468014DB0A1B007FEAC7 /* AppDelegate.m in Sources */,
+				571A468314DB0A1B007FEAC7 /* MainViewController.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		571A463714DB0A1B007FEAC7 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		571A465C14DB0A1B007FEAC7 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A465D14DB0A1B007FEAC7 /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+		571A466614DB0A1B007FEAC7 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A466714DB0A1B007FEAC7 /* en */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
+		571A466A14DB0A1B007FEAC7 /* Localizable.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				571A466B14DB0A1B007FEAC7 /* es */,
+			);
+			name = Localizable.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		571A468814DB0A1B007FEAC7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+				SDKROOT = iphoneos;
+			};
+			name = Debug;
+		};
+		571A468914DB0A1B007FEAC7 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				CLANG_ENABLE_OBJC_ARC = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_VERSION = com.apple.compilers.llvmgcc42;
+				GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+				SDKROOT = iphoneos;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		571A468B14DB0A1B007FEAC7 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = YES;
+				COPY_PHASE_STRIP = NO;
+				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
+				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
+				OTHER_LDFLAGS = (
+					"-weak_framework",
+					UIKit,
+					"-weak_framework",
+					AVFoundation,
+					"-weak_framework",
+					CoreMedia,
+					"-weak_library",
+					/usr/lib/libSystem.B.dylib,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		571A468C14DB0A1B007FEAC7 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = YES;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "ChildApp/ChildApp-Prefix.pch";
+				GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
+				INFOPLIST_FILE = "ChildApp/ChildApp-Info.plist";
+				OTHER_LDFLAGS = (
+					"-weak_framework",
+					UIKit,
+					"-weak_framework",
+					AVFoundation,
+					"-weak_framework",
+					CoreMedia,
+					"-weak_library",
+					/usr/lib/libSystem.B.dylib,
+				);
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		571A463214DB0A1A007FEAC7 /* Build configuration list for PBXProject "ChildApp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				571A468814DB0A1B007FEAC7 /* Debug */,
+				571A468914DB0A1B007FEAC7 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		571A468A14DB0A1B007FEAC7 /* Build configuration list for PBXNativeTarget "ChildApp" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				571A468B14DB0A1B007FEAC7 /* Debug */,
+				571A468C14DB0A1B007FEAC7 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 571A462F14DB0A1A007FEAC7 /* Project object */;
+}


[28/54] [abbrv] git commit: updating plugman test

Posted by ti...@apache.org.
updating plugman test


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/137365c6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/137365c6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/137365c6

Branch: refs/heads/future
Commit: 137365c620c6f699b9afa7c730d748f2a7786f7f
Parents: 3fd646e
Author: Anis Kadri <an...@apache.org>
Authored: Thu Apr 4 14:55:12 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Thu Apr 4 14:55:12 2013 -0700

----------------------------------------------------------------------
 test/plugman.js |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/137365c6/test/plugman.js
----------------------------------------------------------------------
diff --git a/test/plugman.js b/test/plugman.js
index 4db2553..3497a8c 100644
--- a/test/plugman.js
+++ b/test/plugman.js
@@ -135,7 +135,7 @@ exports['should install and uninstall android plugin'] = function (test) {
                          ); 
     var ret = shell.exec(command, options); 
     test.equal(0, ret.code);
-    test.equal("plugin installed\n", ret.output);
+    test.ok(ret.output.match(/plugin installed/));
     
     command = util.format('%s %s --remove --platform android --project %s --plugin %s', shell.which('node'),
                                                                                     plugman_exe, 
@@ -144,7 +144,34 @@ exports['should install and uninstall android plugin'] = function (test) {
                          ); 
     var ret = shell.exec(command, options); 
     test.equal(0, ret.code);
-    test.equal("plugin uninstalled\n", ret.output);
+    test.ok(ret.output.match(/plugin uninstalled/));
    
     test.done();
 }
+
+
+exports['should display additional install info'] = function (test) {
+  var test_project_dir = path.join(test_dir, 'android_two'),
+      test_plugin_dir = path.join(test_dir, 'ChildBrowser'),
+      options = {silent: true},
+      command;
+
+    // copy the ios test project to a temp directory
+    shell.cp('-r', path.join(__dirname, 'projects', 'android_two'), test_dir);
+
+    // copy the ios test plugin to a temp directory
+    shell.cp('-r', path.join(__dirname, 'plugins', 'ChildBrowser'), test_dir);
+
+    command = util.format('%s %s --platform android --project %s --plugin %s', shell.which('node'),
+                                                                           plugman_exe, 
+                                                                           test_project_dir, 
+                                                                           test_plugin_dir
+                         ); 
+    var ret = shell.exec(command, options); 
+    test.equal(0, ret.code);
+    test.ok(ret.output.match(/Please make sure you read this because it is very important to complete the installation of your plugin/));
+    test.ok(ret.output.match(/plugin installed/));
+    test.done();
+}
+
+// TODO: this module is seriously lacking tests


[18/54] [abbrv] git commit: adding faulty plugin

Posted by ti...@apache.org.
adding faulty plugin


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/9b83bc3f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/9b83bc3f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/9b83bc3f

Branch: refs/heads/future
Commit: 9b83bc3f50f6295d03cd78232a688283433e4489
Parents: 51a1f11
Author: Anis Kadri <an...@apache.org>
Authored: Mon Apr 1 17:04:47 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Apr 1 17:04:47 2013 -0700

----------------------------------------------------------------------
 test/plugins/FaultyPlugin/plugin.xml               |   73 ++++++++++++
 .../FaultyPlugin/src/android/FaultyPlugin.java     |   19 +++
 test/plugins/FaultyPlugin/src/ios/FaultyPlugin.h   |   49 ++++++++
 test/plugins/FaultyPlugin/src/ios/FaultyPlugin.m   |   86 +++++++++++++++
 4 files changed, 227 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9b83bc3f/test/plugins/FaultyPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/FaultyPlugin/plugin.xml b/test/plugins/FaultyPlugin/plugin.xml
new file mode 100644
index 0000000..abdd53a
--- /dev/null
+++ b/test/plugins/FaultyPlugin/plugin.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright 2013 Anis Kadri
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    id="com.phonegap.plugins.faultyplugin"
+    version="0.6.0">
+
+    <name>Faulty Plugin</name>
+
+	<access origin="build.phonegap.com" />
+	<access origin="s3.amazonaws.com" />
+	
+    <!-- android -->
+    <platform name="android">
+        <config-file target="AndroidManifest.xml" parent="/manifest/application">
+            <activity android:name="com.phonegap.plugins.faultyplugin.FaultyPlugin"
+                      android:label="@string/app_name">
+                <intent-filter>
+                </intent-filter>
+            </activity>
+        </config-file>
+
+        <!-- CDV < 2.0 -->
+        <config-file target="res/xml/plugins.xml" parent="/plugins">
+            <plugin name="FaultyPlugin"
+                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
+        </config-file>
+
+        <!-- CDV 2.0+ (for now) -->
+        <config-file target="res/xml/config.xml" parent="/cordova/plugins">
+            <plugin name="FaultyPlugin"
+                value="com.phonegap.plugins.faultyplugin.FaultyPlugin"/>
+        </config-file>
+
+        <source-file src="FaultyPlugin.java"
+                target-dir="src/com/phonegap/plugins/faultyplugin" />
+    </platform>
+
+    <!-- ios -->
+    <platform name="ios">
+        <!-- /cordova/plugins no longer exists, it is now /widget/plugins -->
+        <!-- this should fail to install on ios -->
+        <config-file target="config.xml" parent="/cordova/plugins">
+            <plugin name="FaultyPlugin"
+                value="FaultyPlugin"/>
+        </config-file>
+            
+        <header-file src="FaultyPlugin.h" />
+        <source-file src="FaultyPlugin.m" />
+        <!-- these files don't exist -->
+        <header-file src="FaultyPluginCommand.h" />
+        <source-file src="FaultyPluginCommand.m" />
+
+    </platform>
+</plugin>

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9b83bc3f/test/plugins/FaultyPlugin/src/android/FaultyPlugin.java
----------------------------------------------------------------------
diff --git a/test/plugins/FaultyPlugin/src/android/FaultyPlugin.java b/test/plugins/FaultyPlugin/src/android/FaultyPlugin.java
new file mode 100644
index 0000000..5263b0c
--- /dev/null
+++ b/test/plugins/FaultyPlugin/src/android/FaultyPlugin.java
@@ -0,0 +1,19 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9b83bc3f/test/plugins/FaultyPlugin/src/ios/FaultyPlugin.h
----------------------------------------------------------------------
diff --git a/test/plugins/FaultyPlugin/src/ios/FaultyPlugin.h b/test/plugins/FaultyPlugin/src/ios/FaultyPlugin.h
new file mode 100644
index 0000000..6a23ab6
--- /dev/null
+++ b/test/plugins/FaultyPlugin/src/ios/FaultyPlugin.h
@@ -0,0 +1,49 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+//
+//  PhoneGap ! ChildBrowserCommand
+//
+//
+//  Created by Jesse MacFadyen on 10-05-29.
+//  Copyright 2010 Nitobi. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#ifdef PHONEGAP_FRAMEWORK
+	#import <PhoneGap/PGPlugin.h>
+#else
+	#import "PGPlugin.h"
+#endif
+#import "ChildBrowserViewController.h"
+
+
+
+@interface ChildBrowserCommand : PGPlugin <ChildBrowserDelegate>  {
+
+	ChildBrowserViewController* childBrowser;
+}
+
+@property (nonatomic, retain) ChildBrowserViewController *childBrowser;
+
+
+- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
+-(void) onChildLocationChange:(NSString*)newLoc;
+
+@end

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9b83bc3f/test/plugins/FaultyPlugin/src/ios/FaultyPlugin.m
----------------------------------------------------------------------
diff --git a/test/plugins/FaultyPlugin/src/ios/FaultyPlugin.m b/test/plugins/FaultyPlugin/src/ios/FaultyPlugin.m
new file mode 100644
index 0000000..38aaf64
--- /dev/null
+++ b/test/plugins/FaultyPlugin/src/ios/FaultyPlugin.m
@@ -0,0 +1,86 @@
+//
+
+// 
+//
+//  Created by Jesse MacFadyen on 10-05-29.
+//  Copyright 2010 Nitobi. All rights reserved.
+//  Copyright (c) 2011, IBM Corporation
+//  Copyright 2011, Randy McMillan
+//
+
+#import "ChildBrowserCommand.h"
+
+#ifdef PHONEGAP_FRAMEWORK
+	#import <PhoneGap/PhoneGapViewController.h>
+#else
+	#import "PhoneGapViewController.h"
+#endif
+
+
+@implementation ChildBrowserCommand
+
+@synthesize childBrowser;
+
+- (void) showWebPage:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
+{	
+	
+    if(childBrowser == NULL)
+	{
+		childBrowser = [[ ChildBrowserViewController alloc ] initWithScale:FALSE ];
+		childBrowser.delegate = self;
+	}
+	
+/* // TODO: Work in progress
+	NSString* strOrientations = [ options objectForKey:@"supportedOrientations"];
+	NSArray* supportedOrientations = [strOrientations componentsSeparatedByString:@","];
+*/
+    PhoneGapViewController* cont = (PhoneGapViewController*)[ super appViewController ];
+    childBrowser.supportedOrientations = cont.supportedOrientations;
+    
+    if ([cont respondsToSelector:@selector(presentViewController)]) {
+        //Reference UIViewController.h Line:179 for update to iOS 5 difference - @RandyMcMillan
+        [cont presentViewController:childBrowser animated:YES completion:nil];        
+    } else {
+        [ cont presentModalViewController:childBrowser animated:YES ];
+    }                 
+        
+    NSString *url = (NSString*) [arguments objectAtIndex:0];
+        
+    [childBrowser loadURL:url  ];
+        
+}
+
+-(void) close:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options // args: url
+{
+    [ childBrowser closeBrowser];
+	
+}
+
+-(void) onClose
+{
+	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onClose();",@""];
+	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
+}
+
+-(void) onOpenInSafari
+{
+	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onOpenExternal();",@""];
+	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
+}
+
+
+-(void) onChildLocationChange:(NSString*)newLoc
+{
+	
+	NSString* tempLoc = [NSString stringWithFormat:@"%@",newLoc];
+	NSString* encUrl = [tempLoc stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+	 
+	NSString* jsCallback = [NSString stringWithFormat:@"ChildBrowser._onLocationChange('%@');",encUrl];
+	[self.webView stringByEvaluatingJavaScriptFromString:jsCallback];
+
+}
+
+
+
+
+@end


[11/54] [abbrv] git commit: updating iOS tests to use either plist or config.xml approach

Posted by ti...@apache.org.
updating iOS tests to use either plist or config.xml approach


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/19bea13a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/19bea13a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/19bea13a

Branch: refs/heads/future
Commit: 19bea13a49e9cd27564276acd42c1a8644a1406e
Parents: 2283374
Author: Anis Kadri <an...@apache.org>
Authored: Mon Apr 1 15:24:57 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Apr 1 15:24:57 2013 -0700

----------------------------------------------------------------------
 test/ios-config-xml-install.js   |  261 +++++++++++++++++++++++++++++++++
 test/ios-config-xml-uninstall.js |  227 ++++++++++++++++++++++++++++
 test/ios-install.js              |  260 --------------------------------
 test/ios-plist-install.js        |  232 +++++++++++++++++++++++++++++
 test/ios-plist-uninstall.js      |  219 +++++++++++++++++++++++++++
 test/ios-uninstall.js            |  238 ------------------------------
 6 files changed, 939 insertions(+), 498 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/19bea13a/test/ios-config-xml-install.js
----------------------------------------------------------------------
diff --git a/test/ios-config-xml-install.js b/test/ios-config-xml-install.js
new file mode 100644
index 0000000..fde9de3
--- /dev/null
+++ b/test/ios-config-xml-install.js
@@ -0,0 +1,261 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var fs = require('fs')
+  , path = require('path')
+  , xcode = require('xcode')
+  , osenv = require('osenv')
+  , shell = require('shelljs')
+  , et = require('elementtree')
+  , ios = require(path.join(__dirname, '..', 'platforms', 'ios'))
+
+  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
+  , test_project_dir = path.join(test_dir, 'projects', 'ios-config-xml')
+  , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
+  , xml_path     = path.join(test_dir, 'plugins', 'ChildBrowser', 'plugin.xml')
+  , xml_text, plugin_et
+
+  //, assetsDir = path.resolve(config.projectPath, 'www')
+  , srcDir = path.resolve(test_project_dir, 'SampleApp/Plugins')
+  , resDir = path.resolve(test_project_dir, 'SampleApp/Resources');
+
+exports.setUp = function(callback) {
+    shell.mkdir('-p', test_dir);
+    
+    // copy the ios test project to a temp directory
+    shell.cp('-r', path.join(__dirname, 'projects'), test_dir);
+
+    // copy the ios test plugin to a temp directory
+    shell.cp('-r', path.join(__dirname, 'plugins'), test_dir);
+
+    // parse the plugin.xml into an elementtree object
+    xml_text   = fs.readFileSync(xml_path, 'utf-8')
+    plugin_et  = new et.ElementTree(et.XML(xml_text));
+
+    callback();
+}
+
+exports.tearDown = function(callback) {
+    // remove the temp files (projects and plugins)
+    shell.rm('-rf', test_dir);
+    callback();
+}
+
+exports['should install webless plugin'] = function (test) {
+    
+    // setting up a DummyPlugin
+    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WeblessPlugin')
+    var dummy_xml_path = path.join(test_dir, 'plugins', 'WeblessPlugin', 'plugin.xml')
+    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+
+    ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et, { APP_ID: 12345 });
+
+    test.done();
+}
+
+exports['should move the js file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    var jsPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www', 'childbrowser.js');
+    test.ok(fs.existsSync(jsPath));
+    test.done();
+}
+
+exports['should move the source files'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    test.ok(fs.existsSync(srcDir + '/ChildBrowserCommand.m'))
+    test.ok(fs.existsSync(srcDir + '/ChildBrowserViewController.m'))
+    test.ok(fs.existsSync(srcDir + '/preserveDirs/PreserveDirsTest.m'))
+    test.ok(fs.existsSync(srcDir + '/targetDir/TargetDirTest.m'))
+    test.done();
+}
+
+exports['should move the header files'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    test.ok(fs.statSync(srcDir + '/ChildBrowserCommand.h'));
+    test.ok(fs.statSync(srcDir + '/ChildBrowserViewController.h'));
+    test.ok(fs.statSync(srcDir + '/preserveDirs/PreserveDirsTest.h'));
+    test.ok(fs.statSync(srcDir + '/targetDir/TargetDirTest.h'));
+    test.done();
+}
+
+exports['should move the xib file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    test.ok(fs.statSync(resDir + '/ChildBrowserViewController.xib'));
+    test.done();
+}
+
+exports['should move the bundle'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    var bundle = fs.statSync(resDir + '/ChildBrowser.bundle');
+
+    test.ok(bundle.isDirectory());
+    test.done();
+}
+
+exports['should edit config.xml'] = function (test) {
+    // setting up WebNotification (with config.xml) 
+    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WebNotifications')
+    var dummy_xml_path = path.join(test_dir, 'plugins', 'WebNotifications', 'plugin.xml')
+    
+    // overriding some params
+    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
+    
+    var configXmlPath = path.join(test_project_dir, 'SampleApp', 'config.xml');
+    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
+        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
+        expected = 'plugins/plugin[@name="WebNotifications"]' +
+                    '[@value="WebNotifications"]';
+
+    test.ok(pluginsDoc.find(expected));
+    test.equal(pluginsDoc.findall("access").length, 3, "/access");
+    test.equal(pluginsDoc.findall("access")[1].attrib["origin"], "build.phonegap.com")
+    test.equal(pluginsDoc.findall("access")[2].attrib["origin"], "s3.amazonaws.com")
+    test.done();
+}
+
+exports['should edit config.xml even when using old <plugins-plist> approach'] = function (test) {
+    // setting up PGSQLitePlugin (with config.xml) 
+    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
+    var dummy_xml_path = path.join(dummy_plugin_dir, 'plugin-old.xml')
+    
+    // overriding some params
+    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et, { APP_ID: 12345 });
+    
+    var configXmlPath = path.join(test_project_dir, 'SampleApp', 'config.xml');
+    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
+        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
+        expected = 'plugins/plugin[@name="com.phonegap.plugins.childbrowser"]' +
+                    '[@value="ChildBrowserCommand"]';
+
+    test.ok(pluginsDoc.find(expected));
+    test.equal(pluginsDoc.findall("access").length, 3, "/access");
+    test.equal(pluginsDoc.findall("access")[1].attrib["origin"], "build.phonegap.com")
+    test.equal(pluginsDoc.findall("access")[2].attrib["origin"], "12345.s3.amazonaws.com")
+
+    test.done();
+}
+
+exports['should edit the pbxproj file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj';
+
+    obj = xcode.project(projPath).parseSync();
+    var fileRefSection = obj.hash.project.objects['PBXFileReference'],
+        fileRefLength = Object.keys(fileRefSection).length,
+        EXPECTED_TOTAL_REFERENCES = 96; // magic number ahoy!
+
+    test.equal(fileRefLength, EXPECTED_TOTAL_REFERENCES);
+    test.done();
+}
+
+exports['should add the framework references to the pbxproj file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj',
+        projContents = fs.readFileSync(projPath, 'utf8'),
+        projLines = projContents.split("\n"),
+		weak_linked = "settings = {ATTRIBUTES = (Weak, ); };",
+        references;
+
+    references = projLines.filter(function (line) {
+        return !!(line.match("libsqlite3.dylib"));
+    })
+
+    // should be four libsqlite3 reference lines added
+    // pretty low-rent test eh
+    test.equal(references.length, 4);
+    test.ok(references[0].indexOf(weak_linked) == -1);
+    test.done();
+}
+
+exports['should add the framework references with weak option to the pbxproj file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj',
+        projContents = fs.readFileSync(projPath, 'utf8'),
+        projLines = projContents.split("\n"),
+		weak_linked = "settings = {ATTRIBUTES = (Weak, ); };",
+        references;
+
+    weak_references = projLines.filter(function (line) {
+        return !!(line.match("social.framework"));
+    })
+
+    non_weak_references = projLines.filter(function (line) {
+        return !!(line.match("music.framework"));
+    })
+
+    // should be four libsqlite3 reference lines added
+    // pretty low-rent test eh
+    test.equal(weak_references.length, 4);
+    test.ok(weak_references[0].indexOf(weak_linked) != -1);
+    
+    test.equal(non_weak_references.length, 4);
+    test.ok(non_weak_references[0].indexOf(weak_linked) == -1);
+    test.done();
+}
+
+exports['should not install a plugin that is already installed'] = function (test) {
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    test.throws(function(){ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et); }, 
+                /already installed/
+               );
+    test.done();
+}
+
+exports['should skip collision check when installation is forced'] = function (test) {
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    test.doesNotThrow(function(){ios.handlePlugin('force-install', test_project_dir, test_plugin_dir, plugin_et); }, 
+                /already installed/
+               );
+    test.done();
+}
+
+//exports['should revert changes when an error occurs'] = function (test) {
+//    var faulty_plugin_dir = path.join(test_dir, 'plugins', 'FaultyPlugin')
+//    var faulty_xml_path = path.join(test_dir, 'plugins', 'FaultyPlugin', 'plugin.xml')
+//    var faulty_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(faulty_xml_path, 'utf-8')));
+//    
+//    var project_dir = path.join(test_dir, 'projects', 'ios-new-config-xml')
+//    
+//    ios.handlePlugin('install', project_dir, faulty_plugin_dir, faulty_plugin_et, { APP_ID: 12345 });
+//
+//    test.throws(function(){ios.handlePlugin('install', project_dir, test_plugin_dir, plugin_et); }, 
+//                /already installed/
+//               );
+//    test.done();
+//}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/19bea13a/test/ios-config-xml-uninstall.js
----------------------------------------------------------------------
diff --git a/test/ios-config-xml-uninstall.js b/test/ios-config-xml-uninstall.js
new file mode 100644
index 0000000..a2b5885
--- /dev/null
+++ b/test/ios-config-xml-uninstall.js
@@ -0,0 +1,227 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var fs = require('fs')
+  , path = require('path')
+  , plist = require('plist')
+  , xcode = require('xcode')
+  , osenv = require('osenv')
+  , shell = require('shelljs')
+  , et = require('elementtree')
+  , ios = require(path.join(__dirname, '..', 'platforms', 'ios'))
+
+  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
+  , test_project_dir = path.join(test_dir, 'projects', 'ios-config-xml')
+  , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
+  , xml_path     = path.join(test_dir, 'plugins', 'ChildBrowser', 'plugin.xml')
+  , xml_text, plugin_et
+
+  //, assetsDir = path.resolve(config.projectPath, 'www')
+  , srcDir = path.resolve(test_project_dir, 'SampleApp/Plugins')
+  , resDir = path.resolve(test_project_dir, 'SampleApp/Resources');
+
+exports.setUp = function(callback) {
+    shell.mkdir('-p', test_dir);
+    
+    // copy the ios test project to a temp directory
+    shell.cp('-r', path.join(__dirname, 'projects'), test_dir);
+
+    // copy the ios test plugin to a temp directory
+    shell.cp('-r', path.join(__dirname, 'plugins'), test_dir);
+
+    // parse the plugin.xml into an elementtree object
+    xml_text   = fs.readFileSync(xml_path, 'utf-8')
+    plugin_et  = new et.ElementTree(et.XML(xml_text));
+
+    callback();
+}
+
+exports.tearDown = function(callback) {
+    // remove the temp files (projects and plugins)
+    shell.rm('-rf', test_dir);
+    callback();
+}
+
+exports['should remove webless plugin'] = function (test) {
+    
+    // setting up a DummyPlugin
+    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WeblessPlugin')
+    var dummy_xml_path = path.join(test_dir, 'plugins', 'WeblessPlugin', 'plugin.xml')
+    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+
+    ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
+
+    test.done();
+}
+
+exports['should remove the js file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    var jsPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www', 'childbrowser.js');
+    test.ok(!fs.existsSync(jsPath))
+    test.done();
+}
+
+exports['should remove the source files'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    test.ok(!fs.existsSync(srcDir + '/ChildBrowserCommand.m'))
+    test.ok(!fs.existsSync(srcDir + '/ChildBrowserViewController.m'))
+    test.ok(!fs.existsSync(srcDir + '/preserveDirs/PreserveDirsTest.m'))
+    test.ok(!fs.existsSync(srcDir + '/targetDir/TargetDirTest.m'))
+    test.done();
+}
+
+exports['should remove the header files'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    test.ok(!fs.existsSync(srcDir + '/ChildBrowserCommand.h'))
+    test.ok(!fs.existsSync(srcDir + '/ChildBrowserViewController.h'))
+    test.ok(!fs.existsSync(srcDir + '/preserveDirs/PreserveDirsTest.h'))
+    test.ok(!fs.existsSync(srcDir + '/targetDir/TargetDirTest.h'))
+    test.done();
+}
+
+exports['should remove the xib file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    test.ok(!fs.existsSync(resDir + '/ChildBrowserViewController.xib'))
+    test.done();
+}
+
+exports['should remove the bundle'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    test.ok(!fs.existsSync(resDir + '/ChildBrowser.bundle'))
+    test.done();
+}
+
+exports['should edit config.xml even when using old <plugins-plist> approach'] = function (test) {
+    // setting up PGSQLitePlugin (with config.xml) 
+    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'PGSQLitePlugin')
+    var dummy_xml_path = path.join(dummy_plugin_dir, 'plugin.xml')
+    
+    // overriding some params
+    var project_dir = path.join(test_dir, 'projects', 'ios-config-xml')
+    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+
+    // run the platform-specific function
+    ios.handlePlugin('install', project_dir, dummy_plugin_dir, dummy_plugin_et);
+    
+    ios.handlePlugin('uninstall', project_dir, dummy_plugin_dir, dummy_plugin_et);
+    
+    var configXmlPath = path.join(project_dir, 'SampleApp', 'config.xml');
+    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
+        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
+        expected = 'plugins/plugin[@name="PGSQLitePlugin"]' +
+                    '[@value="PGSQLitePlugin"]';
+
+    test.ok(!pluginsDoc.find(expected));
+	test.equal(pluginsDoc.findall("access").length, 1, "/access");
+
+    test.done();
+}
+
+exports['should edit config.xml'] = function (test) {
+    // setting up WebNotification (with config.xml) 
+    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WebNotifications')
+    var dummy_xml_path = path.join(test_dir, 'plugins', 'WebNotifications', 'plugin.xml')
+    
+    // overriding some params
+    var project_dir = path.join(test_dir, 'projects', 'ios-config-xml')
+    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+
+    // run the platform-specific function
+    ios.handlePlugin('install', project_dir, dummy_plugin_dir, dummy_plugin_et);
+    
+    ios.handlePlugin('uninstall', project_dir, dummy_plugin_dir, dummy_plugin_et);
+    
+    var configXmlPath = path.join(project_dir, 'SampleApp', 'config.xml');
+    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
+        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
+        expected = 'plugins/plugin[@name="WebNotifications"]' +
+                    '[@value="WebNotifications"]';
+
+    test.ok(!pluginsDoc.find(expected));
+	test.equal(pluginsDoc.findall("access").length, 1, "/access");
+
+    test.done();
+}
+
+exports['should edit the pbxproj file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj';
+
+    obj = xcode.project(projPath).parseSync();
+    var fileRefSection = obj.hash.project.objects['PBXFileReference'],
+        fileRefLength = Object.keys(fileRefSection).length,
+        EXPECTED_TOTAL_REFERENCES = 70; // magic number ahoy!
+
+    test.equal(fileRefLength, EXPECTED_TOTAL_REFERENCES);
+    test.done();
+}
+
+exports['should remove the framework references from the pbxproj file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    
+    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj',
+        projContents = fs.readFileSync(projPath, 'utf8'),
+        projLines = projContents.split("\n"),
+        references;
+
+    references = projLines.filter(function (line) {
+        return !!(line.match("libsqlite3.dylib"));
+    })
+
+    // should be four libsqlite3 reference lines added
+    // pretty low-rent test eh
+    test.equal(references.length, 0);
+    test.done();
+}
+
+exports['should not uninstall a plugin that is not installed'] = function (test) {
+    test.throws(function(){ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et); }, 
+                /not installed/
+               );
+    test.done();
+}
+
+exports['should skip collision check when installation is forced'] = function (test) {
+    test.doesNotThrow(function(){ios.handlePlugin('uninstall-force', test_project_dir, test_plugin_dir, plugin_et); }, 
+                /already installed/
+               );
+    test.done();
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/19bea13a/test/ios-install.js
----------------------------------------------------------------------
diff --git a/test/ios-install.js b/test/ios-install.js
deleted file mode 100644
index 438f48f..0000000
--- a/test/ios-install.js
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var fs = require('fs')
-  , path = require('path')
-  , plist = require('plist')
-  , xcode = require('xcode')
-  , osenv = require('osenv')
-  , shell = require('shelljs')
-  , et = require('elementtree')
-  , ios = require(path.join(__dirname, '..', 'platforms', 'ios'))
-
-  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
-  , test_project_dir = path.join(test_dir, 'projects', 'ios')
-  , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
-  , xml_path     = path.join(test_dir, 'plugins', 'ChildBrowser', 'plugin.xml')
-  , xml_text, plugin_et
-
-  //, assetsDir = path.resolve(config.projectPath, 'www')
-  , srcDir = path.resolve(test_project_dir, 'SampleApp/Plugins')
-  , resDir = path.resolve(test_project_dir, 'SampleApp/Resources');
-
-exports.setUp = function(callback) {
-    shell.mkdir('-p', test_dir);
-    
-    // copy the ios test project to a temp directory
-    shell.cp('-r', path.join(__dirname, 'projects'), test_dir);
-
-    // copy the ios test plugin to a temp directory
-    shell.cp('-r', path.join(__dirname, 'plugins'), test_dir);
-
-    // parse the plugin.xml into an elementtree object
-    xml_text   = fs.readFileSync(xml_path, 'utf-8')
-    plugin_et  = new et.ElementTree(et.XML(xml_text));
-
-    callback();
-}
-
-exports.tearDown = function(callback) {
-    // remove the temp files (projects and plugins)
-    shell.rm('-rf', test_dir);
-    callback();
-}
-
-exports['should install webless plugin'] = function (test) {
-    
-    // setting up a DummyPlugin
-    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WeblessPlugin')
-    var dummy_xml_path = path.join(test_dir, 'plugins', 'WeblessPlugin', 'plugin.xml')
-    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
-
-    ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et, { APP_ID: 12345 });
-
-    test.done();
-}
-
-exports['should move the js file'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
-    var jsPath = path.join(test_dir, 'projects', 'ios', 'www', 'childbrowser.js');
-    test.ok(fs.existsSync(jsPath));
-    test.done();
-}
-
-exports['should move the source files'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
-    test.ok(fs.existsSync(srcDir + '/ChildBrowserCommand.m'))
-    test.ok(fs.existsSync(srcDir + '/ChildBrowserViewController.m'))
-    test.ok(fs.existsSync(srcDir + '/preserveDirs/PreserveDirsTest.m'))
-    test.ok(fs.existsSync(srcDir + '/targetDir/TargetDirTest.m'))
-    test.done();
-}
-
-exports['should move the header files'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
-    test.ok(fs.statSync(srcDir + '/ChildBrowserCommand.h'));
-    test.ok(fs.statSync(srcDir + '/ChildBrowserViewController.h'));
-    test.ok(fs.statSync(srcDir + '/preserveDirs/PreserveDirsTest.h'));
-    test.ok(fs.statSync(srcDir + '/targetDir/TargetDirTest.h'));
-    test.done();
-}
-
-exports['should move the xib file'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
-    test.ok(fs.statSync(resDir + '/ChildBrowserViewController.xib'));
-    test.done();
-}
-
-exports['should move the bundle'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
-    var bundle = fs.statSync(resDir + '/ChildBrowser.bundle');
-
-    test.ok(bundle.isDirectory());
-    test.done();
-}
-
-
-exports['should edit PhoneGap.plist'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
-    var plistPath = test_project_dir + '/SampleApp/PhoneGap.plist';
-    var obj = plist.parseFileSync(plistPath);
-
-    test.equal(obj.Plugins['com.phonegap.plugins.childbrowser'],
-        'ChildBrowserCommand');
-        
-    test.equal(obj.ExternalHosts.length, 2)    
-    test.equal(obj.ExternalHosts[0], "build.phonegap.com")
-    test.equal(obj.ExternalHosts[1], "12345.s3.amazonaws.com")
-
-    test.done();
-}
-
-exports['should edit config.xml'] = function (test) {
-    // setting up WebNotification (with config.xml) 
-    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WebNotifications')
-    var dummy_xml_path = path.join(test_dir, 'plugins', 'WebNotifications', 'plugin.xml')
-    
-    // overriding some params
-    var project_dir = path.join(test_dir, 'projects', 'ios-config-xml')
-    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
-
-    // run the platform-specific function
-    ios.handlePlugin('install', project_dir, dummy_plugin_dir, dummy_plugin_et);
-    
-    var configXmlPath = path.join(project_dir, 'SampleApp', 'config.xml');
-    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
-        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
-        expected = 'plugins/plugin[@name="WebNotifications"]' +
-                    '[@value="WebNotifications"]';
-
-    test.ok(pluginsDoc.find(expected));
-    test.equal(pluginsDoc.findall("access").length, 3, "/access");
-    test.equal(pluginsDoc.findall("access")[1].attrib["origin"], "build.phonegap.com")
-    test.equal(pluginsDoc.findall("access")[2].attrib["origin"], "s3.amazonaws.com")
-    test.done();
-}
-
-exports['should edit config.xml even when using old <plugins-plist> approach'] = function (test) {
-    // setting up PGSQLitePlugin (with config.xml) 
-    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
-    var dummy_xml_path = path.join(dummy_plugin_dir, 'plugin.xml')
-    
-    // overriding some params
-    var project_dir = path.join(test_dir, 'projects', 'ios-config-xml')
-    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
-
-    // run the platform-specific function
-    ios.handlePlugin('install', project_dir, dummy_plugin_dir, dummy_plugin_et, { APP_ID: 12345 });
-    
-    var configXmlPath = path.join(project_dir, 'SampleApp', 'config.xml');
-    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
-        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
-        expected = 'plugins/plugin[@name="com.phonegap.plugins.childbrowser"]' +
-                    '[@value="ChildBrowserCommand"]';
-
-    test.ok(pluginsDoc.find(expected));
-    test.equal(pluginsDoc.findall("access").length, 3, "/access");
-    test.equal(pluginsDoc.findall("access")[1].attrib["origin"], "build.phonegap.com")
-    test.equal(pluginsDoc.findall("access")[2].attrib["origin"], "12345.s3.amazonaws.com")
-
-    test.done();
-}
-
-exports['should edit the pbxproj file'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
-    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj';
-
-    obj = xcode.project(projPath).parseSync();
-    var fileRefSection = obj.hash.project.objects['PBXFileReference'],
-        fileRefLength = Object.keys(fileRefSection).length,
-        EXPECTED_TOTAL_REFERENCES = 96; // magic number ahoy!
-
-    test.equal(fileRefLength, EXPECTED_TOTAL_REFERENCES);
-    test.done();
-}
-
-exports['should add the framework references to the pbxproj file'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj',
-        projContents = fs.readFileSync(projPath, 'utf8'),
-        projLines = projContents.split("\n"),
-		weak_linked = "settings = {ATTRIBUTES = (Weak, ); };",
-        references;
-
-    references = projLines.filter(function (line) {
-        return !!(line.match("libsqlite3.dylib"));
-    })
-
-    // should be four libsqlite3 reference lines added
-    // pretty low-rent test eh
-    test.equal(references.length, 4);
-    test.ok(references[0].indexOf(weak_linked) == -1);
-    test.done();
-}
-
-exports['should add the framework references with weak option to the pbxproj file'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj',
-        projContents = fs.readFileSync(projPath, 'utf8'),
-        projLines = projContents.split("\n"),
-		weak_linked = "settings = {ATTRIBUTES = (Weak, ); };",
-        references;
-
-    weak_references = projLines.filter(function (line) {
-        return !!(line.match("social.framework"));
-    })
-
-    non_weak_references = projLines.filter(function (line) {
-        return !!(line.match("music.framework"));
-    })
-
-    // should be four libsqlite3 reference lines added
-    // pretty low-rent test eh
-    test.equal(weak_references.length, 4);
-    test.ok(weak_references[0].indexOf(weak_linked) != -1);
-    
-	test.equal(non_weak_references.length, 4);
-    test.ok(non_weak_references[0].indexOf(weak_linked) == -1);
-	test.done();
-}
-
-exports['should not install a plugin that is already installed'] = function (test) {
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
-    test.throws(function(){ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et); }, 
-                /already installed/
-               );
-    test.done();
-}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/19bea13a/test/ios-plist-install.js
----------------------------------------------------------------------
diff --git a/test/ios-plist-install.js b/test/ios-plist-install.js
new file mode 100644
index 0000000..0c524d5
--- /dev/null
+++ b/test/ios-plist-install.js
@@ -0,0 +1,232 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var fs = require('fs')
+  , path = require('path')
+  , plist = require('plist')
+  , xcode = require('xcode')
+  , osenv = require('osenv')
+  , shell = require('shelljs')
+  , et = require('elementtree')
+  , ios = require(path.join(__dirname, '..', 'platforms', 'ios'))
+
+  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
+  , test_project_dir = path.join(test_dir, 'projects', 'ios-plist')
+  , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
+  , xml_path     = path.join(test_dir, 'plugins', 'ChildBrowser', 'plugin.xml')
+  , xml_text, plugin_et
+
+  //, assetsDir = path.resolve(config.projectPath, 'www')
+  , srcDir = path.resolve(test_project_dir, 'SampleApp/Plugins')
+  , resDir = path.resolve(test_project_dir, 'SampleApp/Resources');
+
+exports.setUp = function(callback) {
+    shell.mkdir('-p', test_dir);
+    
+    // copy the ios test project to a temp directory
+    shell.cp('-r', path.join(__dirname, 'projects'), test_dir);
+
+    // copy the ios test plugin to a temp directory
+    shell.cp('-r', path.join(__dirname, 'plugins'), test_dir);
+
+    // parse the plugin.xml into an elementtree object
+    xml_text   = fs.readFileSync(xml_path, 'utf-8')
+    plugin_et  = new et.ElementTree(et.XML(xml_text));
+
+    callback();
+}
+
+exports.tearDown = function(callback) {
+    // remove the temp files (projects and plugins)
+    shell.rm('-rf', test_dir);
+    callback();
+}
+
+exports['should install webless plugin'] = function (test) {
+    
+    // setting up a DummyPlugin
+    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WeblessPlugin')
+    var dummy_xml_path = path.join(test_dir, 'plugins', 'WeblessPlugin', 'plugin.xml')
+    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+
+    ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et, { APP_ID: 12345 });
+
+    test.done();
+}
+
+exports['should move the js file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    var jsPath = path.join(test_dir, 'projects', 'ios-plist', 'www', 'childbrowser.js');
+    test.ok(fs.existsSync(jsPath));
+    test.done();
+}
+
+exports['should move the source files'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    test.ok(fs.existsSync(srcDir + '/ChildBrowserCommand.m'))
+    test.ok(fs.existsSync(srcDir + '/ChildBrowserViewController.m'))
+    test.ok(fs.existsSync(srcDir + '/preserveDirs/PreserveDirsTest.m'))
+    test.ok(fs.existsSync(srcDir + '/targetDir/TargetDirTest.m'))
+    test.done();
+}
+
+exports['should move the header files'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    test.ok(fs.statSync(srcDir + '/ChildBrowserCommand.h'));
+    test.ok(fs.statSync(srcDir + '/ChildBrowserViewController.h'));
+    test.ok(fs.statSync(srcDir + '/preserveDirs/PreserveDirsTest.h'));
+    test.ok(fs.statSync(srcDir + '/targetDir/TargetDirTest.h'));
+    test.done();
+}
+
+exports['should move the xib file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    test.ok(fs.statSync(resDir + '/ChildBrowserViewController.xib'));
+    test.done();
+}
+
+exports['should move the bundle'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    var bundle = fs.statSync(resDir + '/ChildBrowser.bundle');
+
+    test.ok(bundle.isDirectory());
+    test.done();
+}
+
+
+exports['should edit PhoneGap.plist'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    var plistPath = test_project_dir + '/SampleApp/PhoneGap.plist';
+    var obj = plist.parseFileSync(plistPath);
+
+    test.equal(obj.Plugins['com.phonegap.plugins.childbrowser'],
+        'ChildBrowserCommand');
+        
+    test.equal(obj.ExternalHosts.length, 2)    
+    test.equal(obj.ExternalHosts[0], "build.phonegap.com")
+    test.equal(obj.ExternalHosts[1], "12345.s3.amazonaws.com")
+
+    test.done();
+}
+
+exports['should edit the pbxproj file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj';
+
+    obj = xcode.project(projPath).parseSync();
+    var fileRefSection = obj.hash.project.objects['PBXFileReference'],
+        fileRefLength = Object.keys(fileRefSection).length,
+        EXPECTED_TOTAL_REFERENCES = 96; // magic number ahoy!
+
+    test.equal(fileRefLength, EXPECTED_TOTAL_REFERENCES);
+    test.done();
+}
+
+exports['should add the framework references to the pbxproj file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj',
+        projContents = fs.readFileSync(projPath, 'utf8'),
+        projLines = projContents.split("\n"),
+		weak_linked = "settings = {ATTRIBUTES = (Weak, ); };",
+        references;
+
+    references = projLines.filter(function (line) {
+        return !!(line.match("libsqlite3.dylib"));
+    })
+
+    // should be four libsqlite3 reference lines added
+    // pretty low-rent test eh
+    test.equal(references.length, 4);
+    test.ok(references[0].indexOf(weak_linked) == -1);
+    test.done();
+}
+
+exports['should add the framework references with weak option to the pbxproj file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj',
+        projContents = fs.readFileSync(projPath, 'utf8'),
+        projLines = projContents.split("\n"),
+		weak_linked = "settings = {ATTRIBUTES = (Weak, ); };",
+        references;
+
+    weak_references = projLines.filter(function (line) {
+        return !!(line.match("social.framework"));
+    })
+
+    non_weak_references = projLines.filter(function (line) {
+        return !!(line.match("music.framework"));
+    })
+
+    // should be four libsqlite3 reference lines added
+    // pretty low-rent test eh
+    test.equal(weak_references.length, 4);
+    test.ok(weak_references[0].indexOf(weak_linked) != -1);
+    
+    test.equal(non_weak_references.length, 4);
+    test.ok(non_weak_references[0].indexOf(weak_linked) == -1);
+    test.done();
+}
+
+exports['should not install a plugin that is already installed'] = function (test) {
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+
+    test.throws(function(){ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et); }, 
+                /already installed/
+               );
+    test.done();
+}
+
+exports['should skip collision check when installation is forced'] = function (test) {
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    test.doesNotThrow(function(){ios.handlePlugin('force-install', test_project_dir, test_plugin_dir, plugin_et); }, 
+                /already installed/
+               );
+    test.done();
+}
+
+//exports['should revert changes when an error occurs'] = function (test) {
+//    var faulty_plugin_dir = path.join(test_dir, 'plugins', 'FaultyPlugin')
+//    var faulty_xml_path = path.join(test_dir, 'plugins', 'FaultyPlugin', 'plugin.xml')
+//    var faulty_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(faulty_xml_path, 'utf-8')));
+//    
+//    var project_dir = path.join(test_dir, 'projects', 'ios-new-config-xml')
+//    
+//    ios.handlePlugin('install', project_dir, faulty_plugin_dir, faulty_plugin_et, { APP_ID: 12345 });
+//
+//    test.throws(function(){ios.handlePlugin('install', project_dir, test_plugin_dir, plugin_et); }, 
+//                /already installed/
+//               );
+//    test.done();
+//}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/19bea13a/test/ios-plist-uninstall.js
----------------------------------------------------------------------
diff --git a/test/ios-plist-uninstall.js b/test/ios-plist-uninstall.js
new file mode 100644
index 0000000..fd6ed9e
--- /dev/null
+++ b/test/ios-plist-uninstall.js
@@ -0,0 +1,219 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var fs = require('fs')
+  , path = require('path')
+  , plist = require('plist')
+  , xcode = require('xcode')
+  , osenv = require('osenv')
+  , shell = require('shelljs')
+  , et = require('elementtree')
+  , ios = require(path.join(__dirname, '..', 'platforms', 'ios'))
+
+  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
+  , test_project_dir = path.join(test_dir, 'projects', 'ios-plist')
+  , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
+  , xml_path     = path.join(test_dir, 'plugins', 'ChildBrowser', 'plugin.xml')
+  , xml_text, plugin_et
+
+  //, assetsDir = path.resolve(config.projectPath, 'www')
+  , srcDir = path.resolve(test_project_dir, 'SampleApp/Plugins')
+  , resDir = path.resolve(test_project_dir, 'SampleApp/Resources');
+
+exports.setUp = function(callback) {
+    shell.mkdir('-p', test_dir);
+    
+    // copy the ios test project to a temp directory
+    shell.cp('-r', path.join(__dirname, 'projects'), test_dir);
+
+    // copy the ios test plugin to a temp directory
+    shell.cp('-r', path.join(__dirname, 'plugins'), test_dir);
+
+    // parse the plugin.xml into an elementtree object
+    xml_text   = fs.readFileSync(xml_path, 'utf-8')
+    plugin_et  = new et.ElementTree(et.XML(xml_text));
+
+    callback();
+}
+
+exports.tearDown = function(callback) {
+    // remove the temp files (projects and plugins)
+    shell.rm('-rf', test_dir);
+    callback();
+}
+
+exports['should remove webless plugin'] = function (test) {
+    
+    // setting up a DummyPlugin
+    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WeblessPlugin')
+    var dummy_xml_path = path.join(test_dir, 'plugins', 'WeblessPlugin', 'plugin.xml')
+    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+
+    ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
+
+    test.done();
+}
+
+exports['should remove the js file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    var jsPath = path.join(test_dir, 'projects', 'ios', 'www', 'childbrowser.js');
+    test.ok(!fs.existsSync(jsPath))
+    test.done();
+}
+
+exports['should remove the source files'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    test.ok(!fs.existsSync(srcDir + '/ChildBrowserCommand.m'))
+    test.ok(!fs.existsSync(srcDir + '/ChildBrowserViewController.m'))
+    test.ok(!fs.existsSync(srcDir + '/preserveDirs/PreserveDirsTest.m'))
+    test.ok(!fs.existsSync(srcDir + '/targetDir/TargetDirTest.m'))
+    test.done();
+}
+
+exports['should remove the header files'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    test.ok(!fs.existsSync(srcDir + '/ChildBrowserCommand.h'))
+    test.ok(!fs.existsSync(srcDir + '/ChildBrowserViewController.h'))
+    test.ok(!fs.existsSync(srcDir + '/preserveDirs/PreserveDirsTest.h'))
+    test.ok(!fs.existsSync(srcDir + '/targetDir/TargetDirTest.h'))
+    test.done();
+}
+
+exports['should remove the xib file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    test.ok(!fs.existsSync(resDir + '/ChildBrowserViewController.xib'))
+    test.done();
+}
+
+exports['should remove the bundle'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    test.ok(!fs.existsSync(resDir + '/ChildBrowser.bundle'))
+    test.done();
+}
+
+exports['should edit PhoneGap.plist'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    var plistPath = test_project_dir + '/SampleApp/PhoneGap.plist';
+    obj = plist.parseFileSync(plistPath);
+
+    test.notEqual(obj.Plugins['com.phonegap.plugins.childbrowser'],
+        'ChildBrowserCommand');
+        
+    test.equal(obj.ExternalHosts.length, 2)    
+    test.equal(obj.ExternalHosts[0], "build.phonegap.com")
+    test.equal(obj.ExternalHosts[1], "12345.s3.amazonaws.com")
+
+    test.done();
+}
+
+exports['should edit config.xml'] = function (test) {
+    // setting up WebNotification (with config.xml) 
+    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WebNotifications')
+    var dummy_xml_path = path.join(test_dir, 'plugins', 'WebNotifications', 'plugin.xml')
+    
+    // overriding some params
+    var project_dir = path.join(test_dir, 'projects', 'ios-config-xml')
+    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
+
+    // run the platform-specific function
+    ios.handlePlugin('install', project_dir, dummy_plugin_dir, dummy_plugin_et);
+    
+    ios.handlePlugin('uninstall', project_dir, dummy_plugin_dir, dummy_plugin_et);
+    
+    var configXmlPath = path.join(project_dir, 'SampleApp', 'config.xml');
+    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
+        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
+        expected = 'plugins/plugin[@name="WebNotifications"]' +
+                    '[@value="WebNotifications"]';
+
+    test.ok(!pluginsDoc.find(expected));
+	test.equal(pluginsDoc.findall("access").length, 1, "/access");
+
+    test.done();
+}
+
+exports['should edit the pbxproj file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj';
+
+    obj = xcode.project(projPath).parseSync();
+    var fileRefSection = obj.hash.project.objects['PBXFileReference'],
+        fileRefLength = Object.keys(fileRefSection).length,
+        EXPECTED_TOTAL_REFERENCES = 70; // magic number ahoy!
+
+    test.equal(fileRefLength, EXPECTED_TOTAL_REFERENCES);
+    test.done();
+}
+
+exports['should remove the framework references from the pbxproj file'] = function (test) {
+    // run the platform-specific function
+    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
+    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
+
+    
+    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj',
+        projContents = fs.readFileSync(projPath, 'utf8'),
+        projLines = projContents.split("\n"),
+        references;
+
+    references = projLines.filter(function (line) {
+        return !!(line.match("libsqlite3.dylib"));
+    })
+
+    // should be four libsqlite3 reference lines added
+    // pretty low-rent test eh
+    test.equal(references.length, 0);
+    test.done();
+}
+
+exports['should not uninstall a plugin that is not installed'] = function (test) {
+    test.throws(function(){ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et); }, 
+                /not installed/
+               );
+    test.done();
+}
+
+exports['should skip collision check when installation is forced'] = function (test) {
+    test.doesNotThrow(function(){ios.handlePlugin('uninstall-force', test_project_dir, test_plugin_dir, plugin_et); }, 
+                /already installed/
+               );
+    test.done();
+}

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/19bea13a/test/ios-uninstall.js
----------------------------------------------------------------------
diff --git a/test/ios-uninstall.js b/test/ios-uninstall.js
deleted file mode 100644
index 8d7692e..0000000
--- a/test/ios-uninstall.js
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var fs = require('fs')
-  , path = require('path')
-  , plist = require('plist')
-  , xcode = require('xcode')
-  , osenv = require('osenv')
-  , shell = require('shelljs')
-  , et = require('elementtree')
-  , ios = require(path.join(__dirname, '..', 'platforms', 'ios'))
-
-  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
-  , test_project_dir = path.join(test_dir, 'projects', 'ios')
-  , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
-  , xml_path     = path.join(test_dir, 'plugins', 'ChildBrowser', 'plugin.xml')
-  , xml_text, plugin_et
-
-  //, assetsDir = path.resolve(config.projectPath, 'www')
-  , srcDir = path.resolve(test_project_dir, 'SampleApp/Plugins')
-  , resDir = path.resolve(test_project_dir, 'SampleApp/Resources');
-
-exports.setUp = function(callback) {
-    shell.mkdir('-p', test_dir);
-    
-    // copy the ios test project to a temp directory
-    shell.cp('-r', path.join(__dirname, 'projects'), test_dir);
-
-    // copy the ios test plugin to a temp directory
-    shell.cp('-r', path.join(__dirname, 'plugins'), test_dir);
-
-    // parse the plugin.xml into an elementtree object
-    xml_text   = fs.readFileSync(xml_path, 'utf-8')
-    plugin_et  = new et.ElementTree(et.XML(xml_text));
-
-    callback();
-}
-
-exports.tearDown = function(callback) {
-    // remove the temp files (projects and plugins)
-    shell.rm('-rf', test_dir);
-    callback();
-}
-
-exports['should remove webless plugin'] = function (test) {
-    
-    // setting up a DummyPlugin
-    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WeblessPlugin')
-    var dummy_xml_path = path.join(test_dir, 'plugins', 'WeblessPlugin', 'plugin.xml')
-    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
-
-    ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
-    ios.handlePlugin('uninstall', test_project_dir, dummy_plugin_dir, dummy_plugin_et);
-
-    test.done();
-}
-
-exports['should remove the js file'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
-
-    var jsPath = path.join(test_dir, 'projects', 'ios', 'www', 'childbrowser.js');
-    test.ok(!fs.existsSync(jsPath))
-    test.done();
-}
-
-exports['should remove the source files'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
-
-    test.ok(!fs.existsSync(srcDir + '/ChildBrowserCommand.m'))
-    test.ok(!fs.existsSync(srcDir + '/ChildBrowserViewController.m'))
-    test.ok(!fs.existsSync(srcDir + '/preserveDirs/PreserveDirsTest.m'))
-    test.ok(!fs.existsSync(srcDir + '/targetDir/TargetDirTest.m'))
-    test.done();
-}
-
-exports['should remove the header files'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
-
-    test.ok(!fs.existsSync(srcDir + '/ChildBrowserCommand.h'))
-    test.ok(!fs.existsSync(srcDir + '/ChildBrowserViewController.h'))
-    test.ok(!fs.existsSync(srcDir + '/preserveDirs/PreserveDirsTest.h'))
-    test.ok(!fs.existsSync(srcDir + '/targetDir/TargetDirTest.h'))
-    test.done();
-}
-
-exports['should remove the xib file'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
-
-    test.ok(!fs.existsSync(resDir + '/ChildBrowserViewController.xib'))
-    test.done();
-}
-
-exports['should remove the bundle'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
-
-    test.ok(!fs.existsSync(resDir + '/ChildBrowser.bundle'))
-    test.done();
-}
-
-exports['should edit PhoneGap.plist'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
-
-    var plistPath = test_project_dir + '/SampleApp/PhoneGap.plist';
-    obj = plist.parseFileSync(plistPath);
-
-    test.notEqual(obj.Plugins['com.phonegap.plugins.childbrowser'],
-        'ChildBrowserCommand');
-        
-    test.equal(obj.ExternalHosts.length, 2)    
-    test.equal(obj.ExternalHosts[0], "build.phonegap.com")
-    test.equal(obj.ExternalHosts[1], "12345.s3.amazonaws.com")
-
-    test.done();
-}
-
-exports['should edit config.xml even when using old <plugins-plist> approach'] = function (test) {
-    // setting up PGSQLitePlugin (with config.xml) 
-    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'PGSQLitePlugin')
-    var dummy_xml_path = path.join(dummy_plugin_dir, 'plugin.xml')
-    
-    // overriding some params
-    var project_dir = path.join(test_dir, 'projects', 'ios-config-xml')
-    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
-
-    // run the platform-specific function
-    ios.handlePlugin('install', project_dir, dummy_plugin_dir, dummy_plugin_et);
-    
-    ios.handlePlugin('uninstall', project_dir, dummy_plugin_dir, dummy_plugin_et);
-    
-    var configXmlPath = path.join(project_dir, 'SampleApp', 'config.xml');
-    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
-        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
-        expected = 'plugins/plugin[@name="PGSQLitePlugin"]' +
-                    '[@value="PGSQLitePlugin"]';
-
-    test.ok(!pluginsDoc.find(expected));
-	test.equal(pluginsDoc.findall("access").length, 1, "/access");
-
-    test.done();
-}
-
-exports['should edit config.xml'] = function (test) {
-    // setting up WebNotification (with config.xml) 
-    var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WebNotifications')
-    var dummy_xml_path = path.join(test_dir, 'plugins', 'WebNotifications', 'plugin.xml')
-    
-    // overriding some params
-    var project_dir = path.join(test_dir, 'projects', 'ios-config-xml')
-    var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
-
-    // run the platform-specific function
-    ios.handlePlugin('install', project_dir, dummy_plugin_dir, dummy_plugin_et);
-    
-    ios.handlePlugin('uninstall', project_dir, dummy_plugin_dir, dummy_plugin_et);
-    
-    var configXmlPath = path.join(project_dir, 'SampleApp', 'config.xml');
-    var pluginsTxt = fs.readFileSync(configXmlPath, 'utf-8'),
-        pluginsDoc = new et.ElementTree(et.XML(pluginsTxt)),
-        expected = 'plugins/plugin[@name="WebNotifications"]' +
-                    '[@value="WebNotifications"]';
-
-    test.ok(!pluginsDoc.find(expected));
-	test.equal(pluginsDoc.findall("access").length, 1, "/access");
-
-    test.done();
-}
-
-exports['should edit the pbxproj file'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
-
-    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj';
-
-    obj = xcode.project(projPath).parseSync();
-    var fileRefSection = obj.hash.project.objects['PBXFileReference'],
-        fileRefLength = Object.keys(fileRefSection).length,
-        EXPECTED_TOTAL_REFERENCES = 70; // magic number ahoy!
-
-    test.equal(fileRefLength, EXPECTED_TOTAL_REFERENCES);
-    test.done();
-}
-
-exports['should remove the framework references from the pbxproj file'] = function (test) {
-    // run the platform-specific function
-    ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-    ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et);
-
-    
-    var projPath = test_project_dir + '/SampleApp.xcodeproj/project.pbxproj',
-        projContents = fs.readFileSync(projPath, 'utf8'),
-        projLines = projContents.split("\n"),
-        references;
-
-    references = projLines.filter(function (line) {
-        return !!(line.match("libsqlite3.dylib"));
-    })
-
-    // should be four libsqlite3 reference lines added
-    // pretty low-rent test eh
-    test.equal(references.length, 0);
-    test.done();
-}
-
-exports['should not uninstall a plugin that is not installed'] = function (test) {
-    test.throws(function(){ios.handlePlugin('uninstall', test_project_dir, test_plugin_dir, plugin_et); }, 
-                /not installed/
-               );
-    test.done();
-}


[29/54] [abbrv] git commit: Add FUTURE.md describing the goals of this branch

Posted by ti...@apache.org.
Add FUTURE.md describing the goals of this branch


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/266ea55b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/266ea55b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/266ea55b

Branch: refs/heads/future
Commit: 266ea55b229d64afa47de061b3d49eacb35cf737
Parents: 137365c
Author: Braden Shepherdson <br...@gmail.com>
Authored: Tue Mar 19 16:39:44 2013 -0400
Committer: Tim Kim <ti...@adobe.com>
Committed: Mon Apr 8 16:37:07 2013 -0700

----------------------------------------------------------------------
 FUTURE.md |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/266ea55b/FUTURE.md
----------------------------------------------------------------------
diff --git a/FUTURE.md b/FUTURE.md
new file mode 100644
index 0000000..6ff6884
--- /dev/null
+++ b/FUTURE.md
@@ -0,0 +1,42 @@
+# The Future of Plugman and CLI
+
+In this branch, Plugman is undergoing major changes to make the split of responsibilities between plugman and cordova-cli clear.
+
+## Responsibilities
+
+* cordova-cli is responsible for handling multiple platforms. That means it has the separate `platforms/{ios,android,etc}` directories, a top-level `www/` and so on.
+* plugman is responsible for everything to do with plugins: fetching them, installing native code, installing JS code, keeping track of which ones are installed, removing them.
+
+## High-level changes
+
+Plugman now holds onto the code of the plugin, instead of cloning it into a temporary folder and throwing it away. By default it uses the `cordova/plugins` directory, but this can be overridden with `--plugins_dir=some/path`. This enables cordova-cli to use its top-level `plugins/` directory.
+
+See the next section for the changes to the commands and arguments.
+
+## Commands
+
+### `--fetch`
+
+Does the actual downloading of the plugin, from Github, the repository or the local disk.
+
+This supports cordova-cli, which will want to `--fetch` once into its top-level `plugins/` directory and then `--install` once for each platform.
+
+### `--install`
+
+Takes the previously fetched plugin files and installs them into a project. Needs a path to the plugin directory, the path to the project, and the platform, similar to now.
+
+Installs the native code and makes the necessary configuration changes.
+
+### `--uninstall`
+
+Removes the native code and undoes the configuration changes and so on.
+
+Care is required here not to remove permissions that are still needed by other plugins. (Read: config changes should be cleared and recreated from the currently installed plugins every time. This applies to permissions, `<plugin>` tags and so on.)
+
+### `--prepare`
+
+Takes over part of cordova-cli's `prepare` command. Copies all plugins' Javascript files (more precisely, those specified in `<js-module>` tags rather than `<asset>` tags) into `www/plugins/com.plugin.id/whatever/path/file.js` and constructs the `plugins.json` file.
+
+`cordova.js` in this new model will have code that reads this `plugins.json` file via XHR, loads the JS files for the plugins, and does their clobbers and merges.
+
+This is something of a change from the current cordova-cli method, but necessary because we won't be working with a fresh `cordova.js` file on each run anymore.


[42/54] [abbrv] git commit: fixed some typos with ending brances and misplaced semi colon

Posted by ti...@apache.org.
fixed some typos with ending brances and misplaced semi colon


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/684788f8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/684788f8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/684788f8

Branch: refs/heads/future
Commit: 684788f8272b253b6937887bc96a2f608e80150d
Parents: 2b1f1ad
Author: Tim Kim <ti...@adobe.com>
Authored: Tue Apr 9 14:35:42 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Tue Apr 9 14:35:42 2013 -0700

----------------------------------------------------------------------
 platforms/android.js |    6 +++---
 platforms/ios.js     |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/684788f8/platforms/android.js
----------------------------------------------------------------------
diff --git a/platforms/android.js b/platforms/android.js
index ee595c4..f95f022 100644
--- a/platforms/android.js
+++ b/platforms/android.js
@@ -22,9 +22,9 @@ var fs = require('fs')  // use existsSync in 0.6.x
    , util = require('util')
    , shell = require('shelljs')
    , et = require('elementtree')
-   , getConfigChanges = require(path.join(__dirname, '..', 'util', 'config-changes')
-   , searchAndReplace = require(path.join(__dirname, '..', 'util', 'search-and-replace')
-   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'));
+   , getConfigChanges = require(path.join(__dirname, '..', 'util', 'config-changes'))
+   , searchAndReplace = require(path.join(__dirname, '..', 'util', 'search-and-replace'))
+   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'))
    , assetsDir = 'assets/www'
    , sourceDir = 'src';
 

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/684788f8/platforms/ios.js
----------------------------------------------------------------------
diff --git a/platforms/ios.js b/platforms/ios.js
index 8227830..b533e14 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -26,7 +26,7 @@ var path = require('path')
   , bplist = require('bplist-parser')
   , shell = require('shelljs')
   , xml_helpers = require(path.join(__dirname, '..', 'util', 'xml-helpers'))
-  , searchAndReplace = require(path.join(__dirname, '..', 'util', 'search-and-replace')
+  , searchAndReplace = require(path.join(__dirname, '..', 'util', 'search-and-replace'))
   , getConfigChanges = require(path.join(__dirname, '..', 'util', 'config-changes'));
   
 exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, variables) {


[47/54] [abbrv] git commit: took out console log

Posted by ti...@apache.org.
took out console log


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/140d63d3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/140d63d3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/140d63d3

Branch: refs/heads/future
Commit: 140d63d3ac420eda504b061f98b05f1dd9f94497
Parents: 0ca14e5
Author: Tim Kim <ti...@adobe.com>
Authored: Fri Apr 12 13:51:48 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Fri Apr 12 13:51:48 2013 -0700

----------------------------------------------------------------------
 test/android-two-install.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/140d63d3/test/android-two-install.js
----------------------------------------------------------------------
diff --git a/test/android-two-install.js b/test/android-two-install.js
index b0975f0..8664383 100644
--- a/test/android-two-install.js
+++ b/test/android-two-install.js
@@ -77,7 +77,7 @@ exports['should move the js file'] = function (test) {
 
     android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
     plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android');
-    console.log(wwwPath + ' ' + fs.readdirSync(wwwPath));
+
     fs.stat(jsPath, function(err, stats) {
         test.ok(!err);
         test.ok(stats.isFile());


[31/54] [abbrv] git commit: Plugin loading works correctly when using plugman solo.

Posted by ti...@apache.org.
Plugin loading works correctly when using plugman solo.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/6be1ac86
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/6be1ac86
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/6be1ac86

Branch: refs/heads/future
Commit: 6be1ac86d27a5a2fc2b0a4590b1df678a45092ca
Parents: 9ed6d43
Author: Braden Shepherdson <br...@gmail.com>
Authored: Fri Mar 22 15:39:42 2013 -0400
Committer: Tim Kim <ti...@adobe.com>
Committed: Mon Apr 8 16:46:51 2013 -0700

----------------------------------------------------------------------
 plugman.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/6be1ac86/plugman.js
----------------------------------------------------------------------
diff --git a/plugman.js b/plugman.js
index 514952e..f0ad02c 100755
--- a/plugman.js
+++ b/plugman.js
@@ -80,7 +80,7 @@ else if (cli_opts.list) {
     });
 }
 else if (cli_opts.prepare && cli_opts.project && cli_opts.www) {
-    util.handlePrepare(cli_opts.project, plugins_dir, cli_opts.www, cli_opts.platform);
+    plugin_loader.handlePrepare(cli_opts.project, plugins_dir, cli_opts.www, cli_opts.platform);
 }
 else if (!cli_opts.platform || !cli_opts.project || !cli_opts.plugin) {
     printUsage();


[39/54] [abbrv] git commit: Deleted sql plugin and got some more tests passing

Posted by ti...@apache.org.
Deleted sql plugin and got some more tests passing


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/90db4b1d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/90db4b1d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/90db4b1d

Branch: refs/heads/future
Commit: 90db4b1d11fbbe482408732ddb6d751227416be5
Parents: b256b9f
Author: Tim Kim <ti...@adobe.com>
Authored: Fri Apr 5 11:40:38 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Tue Apr 9 14:03:13 2013 -0700

----------------------------------------------------------------------
 platforms/android.js        |    2 ++
 test/android-one-install.js |   22 ++++++++++++++++++----
 test/plugins/PGSQLitePlugin |    1 -
 util/plugin_loader.js       |    1 -
 4 files changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/90db4b1d/platforms/android.js
----------------------------------------------------------------------
diff --git a/platforms/android.js b/platforms/android.js
index f099284..303c5b6 100644
--- a/platforms/android.js
+++ b/platforms/android.js
@@ -93,8 +93,10 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
                                 path.basename(sourceFile.attrib['src']));
 
         if (action == 'install') {
+            
             shell.mkdir('-p', srcDir);
             var srcFile = srcPath(plugin_dir, sourceFile.attrib['src']);
+            console.log('src file ' + srcFile);
             shell.cp(srcFile, destFile);
         } else {
             fs.unlinkSync(destFile);

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/90db4b1d/test/android-one-install.js
----------------------------------------------------------------------
diff --git a/test/android-one-install.js b/test/android-one-install.js
index bb8b2a6..8ec4da6 100644
--- a/test/android-one-install.js
+++ b/test/android-one-install.js
@@ -27,7 +27,7 @@ var fs = require('fs')
   , shell = require('shelljs')
   , et = require('elementtree')
   , android = require(path.join(__dirname, '..', 'platforms', 'android'))
-
+  , plugin_loader = require('../util/plugin_loader')
   , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
   , test_project_dir = path.join(test_dir, 'projects', 'android_one')
   , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
@@ -70,8 +70,13 @@ exports['should install webless plugin'] = function (test) {
 }
 
 exports['should move the js file'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'android_one', 'assets', 'www');
     var jsPath = path.join(test_dir, 'projects', 'android_one', 'assets', 'www', 'childbrowser.js');
+    
     android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android');
+    
     fs.stat(jsPath, function(err, stats) {
         test.ok(!err);
         test.ok(stats.isFile());
@@ -80,10 +85,13 @@ exports['should move the js file'] = function (test) {
 }
 
 exports['should move the directory'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'android_one', 'assets', 'www');
+    
     android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android');
+    
     var assetPath = path.join(test_dir, 'projects', 'android_one', 'assets', 'www', 'childbrowser');
-
     var assets = fs.statSync(assetPath);
 
     test.ok(assets.isDirectory());
@@ -92,9 +100,15 @@ exports['should move the directory'] = function (test) {
 }
 
 exports['should move the src file'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'android_one', 'assets', 'www');
+    
     android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android');
+    
+    var bahPath = path.join(test_dir, 'projects', 'android_one', 'src', 'com', 'phonegap', 'plugins', 'childBrowser');
     var javaPath = path.join(test_dir, 'projects', 'android_one', 'src', 'com', 'phonegap', 'plugins', 'childBrowser', 'ChildBrowser.java');
+    
     test.ok(fs.statSync(javaPath));
     test.done();
 }

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/90db4b1d/test/plugins/PGSQLitePlugin
----------------------------------------------------------------------
diff --git a/test/plugins/PGSQLitePlugin b/test/plugins/PGSQLitePlugin
deleted file mode 160000
index ac84255..0000000
--- a/test/plugins/PGSQLitePlugin
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit ac84255d517b3a8ea86caea1c06d4f836ab6f96d

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/90db4b1d/util/plugin_loader.js
----------------------------------------------------------------------
diff --git a/util/plugin_loader.js b/util/plugin_loader.js
index 5ea6f93..e16b863 100644
--- a/util/plugin_loader.js
+++ b/util/plugin_loader.js
@@ -45,7 +45,6 @@ exports.handlePrepare = function(projectRoot, plugins_dir, wwwDir, platform) {
     // This array holds all the metadata for each module and ends up in cordova_plugins.json
     var moduleObjects = [];
 
-    //console.log('plugins_dir ' + fs.readdirSync(plugins_dir));
     plugins && plugins.forEach(function(plugin) {
         var pluginDir = path.join(plugins_dir, plugin);
         if(fs.statSync(pluginDir).isDirectory()){


[51/54] [abbrv] git commit: removed www test

Posted by ti...@apache.org.
removed www test


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/e47bb83b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/e47bb83b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/e47bb83b

Branch: refs/heads/future
Commit: e47bb83bf4a17494847ca67707f33f5ee72a9d50
Parents: c8edc27
Author: Tim Kim <ti...@adobe.com>
Authored: Fri Apr 12 15:22:38 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Fri Apr 12 15:22:38 2013 -0700

----------------------------------------------------------------------
 test/www-only.js |   80 -------------------------------------------------
 1 files changed, 0 insertions(+), 80 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/e47bb83b/test/www-only.js
----------------------------------------------------------------------
diff --git a/test/www-only.js b/test/www-only.js
deleted file mode 100644
index e746b35..0000000
--- a/test/www-only.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *
- * Copyright 2013 Anis Kadri
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var fs = require('fs')
-  , path = require('path')
-  , plist = require('plist')
-  , xcode = require('xcode')
-  , osenv = require('osenv')
-  , shell = require('shelljs')
-  , et = require('elementtree')
-  , www = require(path.join(__dirname, '..', 'platforms', 'www'))
-
-  , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
-  , test_project_dir = path.join(test_dir, 'projects', 'www-only')
-  , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
-  , xml_path     = path.join(test_dir, 'plugins', 'ChildBrowser', 'plugin.xml')
-  , xml_text, plugin_et
-
-  //, assetsDir = path.resolve(config.projectPath, 'www')
-  , srcDir = path.resolve(test_project_dir, 'SampleApp/Plugins');
-
-
-exports.setUp = function(callback) {
-    shell.mkdir('-p', test_dir);
-    
-    // copy the ios test project to a temp directory
-    shell.cp('-r', path.join(__dirname, 'projects'), test_dir);
-
-    // copy the ios test plugin to a temp directory
-    shell.cp('-r', path.join(__dirname, 'plugins'), test_dir);
-
-    // parse the plugin.xml into an elementtree object
-    xml_text   = fs.readFileSync(xml_path, 'utf-8')
-    plugin_et  = new et.ElementTree(et.XML(xml_text));
-
-    callback();
-}
-
-exports.tearDown = function(callback) {
-    // remove the temp files (projects and plugins)
-    shell.rm('-rf', test_dir);
-    callback();
-}
-
-
-exports['should move the js file'] = function (test) {
-    var jsPath = path.join(test_dir, 'projects', 'www-only', 'childbrowser.js');
-
-    // run the platform-specific function
-    www.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-    test.ok(fs.existsSync(jsPath));
-    test.done();
-}
-
-exports['should move the directory'] = function (test) {
-    // run the platform-specific function
-    www.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-
-    var assetPath = path.resolve(test_project_dir, "childbrowser/")
-    var assets = fs.statSync(assetPath);
-    test.ok(assets.isDirectory());
-    test.ok(fs.statSync(assetPath + '/image.jpg'));
-    test.done();
-}


[13/54] [abbrv] git commit: changing iOS project root tag from cordova to widget

Posted by ti...@apache.org.
changing iOS project root tag from cordova to widget


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/77832b13
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/77832b13
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/77832b13

Branch: refs/heads/future
Commit: 77832b13db1c17d7dd191e9e04ac873fe55a26fe
Parents: b490a09
Author: Anis Kadri <an...@apache.org>
Authored: Mon Apr 1 15:27:27 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Mon Apr 1 15:27:27 2013 -0700

----------------------------------------------------------------------
 test/projects/ios-config-xml/SampleApp/config.xml |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/77832b13/test/projects/ios-config-xml/SampleApp/config.xml
----------------------------------------------------------------------
diff --git a/test/projects/ios-config-xml/SampleApp/config.xml b/test/projects/ios-config-xml/SampleApp/config.xml
index 337d38d..2858c28 100644
--- a/test/projects/ios-config-xml/SampleApp/config.xml
+++ b/test/projects/ios-config-xml/SampleApp/config.xml
@@ -19,7 +19,7 @@
 # under the License.
 #
 -->
-<cordova>
+<widget>
     <preference name="KeyboardDisplayRequiresUserAction" value="true" />
     <preference name="SuppressesIncrementalRendering" value="false" />
     <preference name="UIWebViewBounce" value="true" />
@@ -56,4 +56,4 @@
     </plugins>
 
     <access origin="*" />
-</cordova>
+</widget>


[30/54] [abbrv] git commit: --prepare with ported JS installation, cache plugins locally

Posted by ti...@apache.org.
--prepare with ported JS installation, cache plugins locally

NB: --plugins_dir argument and the --prepare command are completely
untested. I'm just committing the skeleton of this change to unblock
others.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/9ed6d439
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/9ed6d439
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/9ed6d439

Branch: refs/heads/future
Commit: 9ed6d439f37b30ac7c8689ad5aef8a66922d8406
Parents: 266ea55
Author: Braden Shepherdson <br...@gmail.com>
Authored: Tue Mar 19 14:21:16 2013 -0400
Committer: Tim Kim <ti...@adobe.com>
Committed: Mon Apr 8 16:46:51 2013 -0700

----------------------------------------------------------------------
 FUTURE.md             |    4 +-
 plugman.js            |   44 +++++++++++++-
 util/plugin_loader.js |  141 ++++++++++++++++++++++++++++++++++++++++++++
 util/plugins.js       |   21 +++----
 4 files changed, 196 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9ed6d439/FUTURE.md
----------------------------------------------------------------------
diff --git a/FUTURE.md b/FUTURE.md
index 6ff6884..41c2c62 100644
--- a/FUTURE.md
+++ b/FUTURE.md
@@ -35,8 +35,8 @@ Care is required here not to remove permissions that are still needed by other p
 
 ### `--prepare`
 
-Takes over part of cordova-cli's `prepare` command. Copies all plugins' Javascript files (more precisely, those specified in `<js-module>` tags rather than `<asset>` tags) into `www/plugins/com.plugin.id/whatever/path/file.js` and constructs the `plugins.json` file.
+Takes over part of cordova-cli's `prepare` command. Copies all plugins' Javascript files (more precisely, those specified in `<js-module>` tags rather than `<asset>` tags) into `www/plugins/com.plugin.id/whatever/path/file.js` and constructs the `cordova_plugins.json` file.
 
-`cordova.js` in this new model will have code that reads this `plugins.json` file via XHR, loads the JS files for the plugins, and does their clobbers and merges.
+`cordova.js` in this new model will have code that reads this `cordova_plugins.json` file via XHR, loads the JS files for the plugins, and does their clobbers and merges.
 
 This is something of a change from the current cordova-cli method, but necessary because we won't be working with a fresh `cordova.js` file on each run anymore.

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9ed6d439/plugman.js
----------------------------------------------------------------------
diff --git a/plugman.js b/plugman.js
index a422dab..514952e 100755
--- a/plugman.js
+++ b/plugman.js
@@ -26,6 +26,8 @@ var fs = require('fs')
   , et = require('elementtree')
   , nopt = require('nopt')
   , plugins = require('./util/plugins')
+  , shell = require('shelljs')
+  , plugin_loader = require('./util/plugin_loader')
   , platform_modules = {
         'android': require('./platforms/android'),
         'ios': require('./platforms/ios'),
@@ -40,11 +42,24 @@ var known_opts = { 'platform' : [ 'ios', 'android', 'blackberry' ,'www' ]
             , 'list' : Boolean
             , 'v' : Boolean
             , 'debug' : Boolean
+            , 'prepare' : Boolean
+            , 'plugins': path
+            , 'www': path
             , 'variable' : Array
             }, shortHands = { 'var' : 'variable' };
 
 var cli_opts = nopt(known_opts);
 
+// Default the plugins_dir to './cordova/plugins'.
+var plugins_dir;
+
+// Without these arguments, the commands will fail and print the usage anyway.
+if (cli_opts.plugins_dir || cli_opts.project) {
+    plugins_dir = typeof cli_opts.plugins_dir == 'string' ?
+        cli_opts.plugins_dir :
+        path.join(cli_opts.project, 'cordova', 'plugins');
+}
+
 // only dump stack traces in debug mode, otherwise show error message and exit
 if (!cli_opts.debug) {
     // provide clean output on exceptions rather than dumping a stack trace
@@ -64,6 +79,9 @@ else if (cli_opts.list) {
       }
     });
 }
+else if (cli_opts.prepare && cli_opts.project && cli_opts.www) {
+    util.handlePrepare(cli_opts.project, plugins_dir, cli_opts.www, cli_opts.platform);
+}
 else if (!cli_opts.platform || !cli_opts.project || !cli_opts.plugin) {
     printUsage();
 }
@@ -84,11 +102,20 @@ else {
 
 function printUsage() {
     platforms = known_opts.platform.join('|');
+<<<<<<< HEAD
     console.error('Usage\n---------');
     console.error('Add a plugin:\n\t' + package.name + ' --platform <'+ platforms +'> --project <directory> --variable <preference_name>="<substituion>" --plugin <directory|git-url|name>\n');
     console.error('Remove a plugin:\n\t' + package.name + ' --remove --platform <'+ platforms +'> --project <directory> --plugin <directory|git-url|name>\n');
     console.error('List plugins:\n\t' + package.name + ' --list\n');
     process.exit(1);
+=======
+    console.log('Usage\n---------');
+    console.log('Add a plugin:\n\t' + package.name + ' --platform <'+ platforms +'> --project <directory> --plugin <directory|git-url|name>\n');
+    console.log('Remove a plugin:\n\t' + package.name + ' --remove --platform <'+ platforms +'> --project <directory> --plugin <directory|git-url|name>\n');
+    console.log('List plugins:\n\t' + package.name + ' --list\n');
+    console.log('Prepare project:\n\t' + package.name + ' --prepare --platform <ios|android|bb10> --project <directory> --www <directory> [--plugins_dir <directory>]');
+    console.log('\n\t--plugins_dir defaults to <project>/cordova/plugins, but can be any directory containing a subdirectory for each plugin');
+>>>>>>> --prepare with ported JS installation, cache plugins locally
 }
 
 function execAction(action, platform, project_dir, plugin_dir, cli_variables) {
@@ -137,9 +164,24 @@ function execAction(action, platform, project_dir, plugin_dir, cli_variables) {
 function handlePlugin(action, platform, project_dir, plugin_dir, cli_variables) {
     var plugin_xml_path, async = false;
 
+    // Ensure the containing directory exists.
+    shell.mkdir('-p', plugins_dir);
+
     // clone from git repository
     if(plugin_dir.indexOf('https://') == 0 || plugin_dir.indexOf('git://') == 0) {
-        plugin_dir = plugins.clonePluginGitRepo(plugin_dir);
+        plugin_dir = plugins.clonePluginGitRepo(plugin_dir, plugins_dir);
+    } else { // Copy from the local filesystem.
+        var lastSlash = plugin_dir.lastIndexOf(path.sep);
+        var dest = plugin_dir;
+        if (lastSlash >= 0) {
+            dest = dest.substring(lastSlash+1);
+        }
+        dest = path.join(plugins_dir, dest);
+
+        shell.rm('-rf', dest);
+        shell.cp('-R', plugin_dir, plugins_dir); // Yes, not dest.
+
+        plugin_dir = dest;
     }
 
     plugin_xml_path = path.join(plugin_dir, 'plugin.xml');

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9ed6d439/util/plugin_loader.js
----------------------------------------------------------------------
diff --git a/util/plugin_loader.js b/util/plugin_loader.js
new file mode 100644
index 0000000..6d55694
--- /dev/null
+++ b/util/plugin_loader.js
@@ -0,0 +1,141 @@
+/**
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+*/
+
+var path            = require('path'),
+    fs              = require('fs'),
+    shell           = require('shelljs'),
+    ls              = fs.readdirSync,
+    util            = require('util'),
+    exec            = require('child_process').exec,
+    et              = require('elementtree');
+
+
+// Called on --prepare.
+// Sets up each plugin's Javascript code to be loaded properly.
+// Expects a path to the project (platforms/android in CLI, . in plugman-only),
+// a path to where the plugins are downloaded, the www dir, and the platform ('android', 'ios', etc.).
+exports.handlePrepare = function(projectRoot, plugins_dir, wwwDir, platform) {
+    // Process:
+    // - List all plugins in plugins_dir
+    // - Load and parse their plugin.xml files.
+    // - Skip those without support for this platform. (No <platform> tags means JS-only!)
+    // - Build a list of all their js-modules, including platform-specific js-modules.
+    // - For each js-module (general first, then platform) build up an object storing the path and any clobbers, merges and runs for it.
+    // - Write this object into www/plugins.json.
+    // - Cordova.js contains code to load them at runtime from that file.
+
+    var plugins = ls(plugins_dir);
+
+    // This array holds all the metadata for each module and ends up in cordova_plugins.json
+    var moduleObjects = [];
+
+
+    plugins && plugins.forEach(function(plugin) {
+        var pluginDir = path.join(plugins_dir, plugin);
+        var xml = new et.ElementTree(et.XML(fs.readFileSync(path.join(pluginDir, 'plugin.xml'), 'utf-8')));
+
+        var plugin_id = xml.getroot().attrib.id;
+
+        // Copy all the <asset>s into the platform's www/
+        var assets = xml.findall('./asset');
+        assets && assets.forEach(function(asset) {
+            var target = asset.attrib.target;
+            var lastSlash = target.lastIndexOf('/');
+            var dirname  = lastSlash < 0 ? ''     : target.substring(0, lastSlash);
+            var basename = lastSlash < 0 ? target : target.substring(lastSlash + 1);
+
+            var targetDir = path.join(wwwDir, dirname);
+            shell.mkdir('-p', targetDir);
+
+            var srcFile = path.join(pluginDir, asset.attrib.src);
+            var targetFile = path.join(targetDir, basename);
+
+            var cpOptions = fs.statSync(srcFile).isDirectory() ? '-Rf' : '-f';
+            shell.cp(cpOptions, [srcFile], targetFile);
+        });
+
+        // And then add the plugins dir to the platform's www.
+        var platformPluginsDir = path.join(wwwDir, 'plugins');
+        shell.mkdir('-p', platformPluginsDir);
+
+        var generalModules = xml.findall('./js-module');
+        var platformTag = xml.find(util.format('./platform[@name="%s"]', platform));
+
+        generalModules = generalModules || [];
+        var platformModules = platformTag ? platformTag.findall('./js-module') : [];
+        var allModules = generalModules.concat(platformModules);
+
+        allModules.forEach(function(module) {
+            // Copy the plugin's files into the www directory.
+            var dirname = module.attrib.src;
+            var lastSlash = dirname.lastIndexOf('/');
+            if (lastSlash >= 0) {
+                dirname = dirname.substring(0, lastSlash);
+            } else {
+                dirname = ''; // Just the file, no subdir.
+            }
+
+            var dir = path.join(platformPluginsDir, plugin_id, dirname);
+            shell.mkdir('-p', dir);
+
+            // Read in the file, prepend the cordova.define, and write it back out.
+            var moduleName = plugin_id + '.';
+            if (module.attrib.name) {
+                moduleName += module.attrib.name;
+            } else {
+                var result = module.attrib.src.match(/([^\/]+)\.js/);
+                moduleName += result[1];
+            }
+
+            var scriptContent = fs.readFileSync(path.join(pluginDir, module.attrib.src), 'utf-8');
+            scriptContent = 'cordova.define("' + moduleName + '", function(require, exports, module) {' + scriptContent + '});\n';
+            fs.writeFileSync(path.join(platformPluginsDir, plugin_id, module.attrib.src), scriptContent, 'utf-8');
+
+            // Prepare the object for cordova_plugins.json.
+            var obj = {
+                file: path.join('plugins', plugin_id, module.attrib.src),
+                id: moduleName
+            };
+
+            // Loop over the children of the js-module tag, collecting clobbers, merges and runs.
+            module.getchildren().forEach(function(child) {
+                if (child.tag.toLowerCase() == 'clobbers') {
+                    if (!obj.clobbers) {
+                        obj.clobbers = [];
+                    }
+                    obj.clobbers.push(child.attrib.target);
+                } else if (child.tag.toLowerCase() == 'merges') {
+                    if (!obj.merges) {
+                        obj.merges = [];
+                    }
+                    obj.merges.push(child.attrib.target);
+                } else if (child.tag.toLowerCase() == 'runs') {
+                    obj.runs = true;
+                }
+            });
+
+            // Add it to the list of module objects bound for cordova_plugins.json
+            moduleObjects.push(obj);
+        });
+    });
+
+    // Write out moduleObjects as JSON to cordova_plugins.json
+    fs.writeFileSync(path.join(wwwDir, 'cordova_plugins.json'), JSON.stringify(moduleObjects), 'utf-8');
+};
+

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9ed6d439/util/plugins.js
----------------------------------------------------------------------
diff --git a/util/plugins.js b/util/plugins.js
index 19e97a8..333fd92 100644
--- a/util/plugins.js
+++ b/util/plugins.js
@@ -66,13 +66,20 @@ exports.listAllPlugins = function(success, error) {
     });
 }
 
-exports.clonePluginGitRepo = function(plugin_git_url) {
+exports.clonePluginGitRepo = function(plugin_git_url, plugins_dir) {
     if(!shell.which('git')) {
         throw new Error('git command line is not installed');
     }
     // use osenv to get a temp directory in a portable way
-    plugin_dir = path.join(osenv.tmpdir(), 'plugin');
-    
+    var lastSlash = plugin_git_url.lastIndexOf('/');
+    var basename = plugin_git_url.substring(lastSlash+1);
+    var dotGitIndex = basename.lastIndexOf('.git');
+    if (dotGitIndex >= 0) {
+      basename = basename.substring(0, dotGitIndex);
+    }
+
+    var plugin_dir = path.join(plugins_dir, basename);
+
     // trash it if it already exists (something went wrong before probably)
     if(fs.existsSync(plugin_dir)) {
         shell.rm('-rf', plugin_dir);
@@ -82,14 +89,6 @@ exports.clonePluginGitRepo = function(plugin_git_url) {
         throw new Error('failed to get the plugin via git URL '+ plugin_git_url);
     }
     
-    process.on('exit', function() {
-        console.log('cleaning up...');
-        // clean up
-        if(fs.existsSync(plugin_dir)) {
-            shell.rm('-rf', plugin_dir);
-        }
-    });
-
     return plugin_dir;
 }
 


[52/54] [abbrv] git commit: fixed up ios plist install

Posted by ti...@apache.org.
fixed up ios plist install


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/3738b462
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/3738b462
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/3738b462

Branch: refs/heads/future
Commit: 3738b462c1529343add979af4bf98a22cf410d7a
Parents: e47bb83
Author: Tim Kim <ti...@adobe.com>
Authored: Fri Apr 12 15:46:40 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Fri Apr 12 15:46:40 2013 -0700

----------------------------------------------------------------------
 test/ios-plist-install.js |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/3738b462/test/ios-plist-install.js
----------------------------------------------------------------------
diff --git a/test/ios-plist-install.js b/test/ios-plist-install.js
index 12e0791..4ac8fbd 100644
--- a/test/ios-plist-install.js
+++ b/test/ios-plist-install.js
@@ -25,7 +25,7 @@ var fs = require('fs')
   , shell = require('shelljs')
   , et = require('elementtree')
   , ios = require(path.join(__dirname, '..', 'platforms', 'ios'))
-
+  , plugin_loader = require('../util/plugin_loader')
   , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
   , test_project_dir = path.join(test_dir, 'projects', 'ios-plist')
   , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
@@ -72,9 +72,13 @@ exports['should install webless plugin'] = function (test) {
 }
 
 exports['should move the js file'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-plist', 'www');
+    
     // run the platform-specific function
     ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+    
     var jsPath = path.join(test_dir, 'projects', 'ios-plist', 'www', 'childbrowser.js');
     test.ok(fs.existsSync(jsPath));
     test.ok(fs.statSync(jsPath).isFile());
@@ -82,23 +86,33 @@ exports['should move the js file'] = function (test) {
 }
 
 exports['should move the source files'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-plist', 'www');
+    var preserveDirPath = path.join(srcDir, 'src', 'ios');
+    
     // run the platform-specific function
     ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+    
     test.ok(fs.existsSync(srcDir + '/ChildBrowserCommand.m'))
     test.ok(fs.existsSync(srcDir + '/ChildBrowserViewController.m'))
-    test.ok(fs.existsSync(srcDir + '/preserveDirs/PreserveDirsTest.m'))
+    test.ok(fs.existsSync(preserveDirPath + '/preserveDirs/PreserveDirsTest.m'))
     test.ok(fs.existsSync(srcDir + '/targetDir/TargetDirTest.m'))
     test.done();
 }
 
 exports['should move the header files'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'ios-plist', 'www');
+    var preserveDirPath = path.join(srcDir, 'src', 'ios');
+    
     // run the platform-specific function
     ios.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
-
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
+    
     test.ok(fs.statSync(srcDir + '/ChildBrowserCommand.h'));
     test.ok(fs.statSync(srcDir + '/ChildBrowserViewController.h'));
-    test.ok(fs.statSync(srcDir + '/preserveDirs/PreserveDirsTest.h'));
+    test.ok(fs.statSync(preserveDirPath + '/preserveDirs/PreserveDirsTest.h'));
     test.ok(fs.statSync(srcDir + '/targetDir/TargetDirTest.h'));
     test.done();
 }


[43/54] [abbrv] git commit: Messed up ios merge - added some stuff back in and cleaned the ios tests up a bit

Posted by ti...@apache.org.
Messed up ios merge - added some stuff back in and cleaned the ios tests up a bit


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/e777979d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/e777979d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/e777979d

Branch: refs/heads/future
Commit: e777979d3eafe4cbe29c5337d789addef9caded6
Parents: 684788f
Author: Tim Kim <ti...@adobe.com>
Authored: Tue Apr 9 15:19:54 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Tue Apr 9 15:26:43 2013 -0700

----------------------------------------------------------------------
 platforms/ios.js               |   13 +++++++++++++
 test/ios-config-xml-install.js |    9 +--------
 2 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/e777979d/platforms/ios.js
----------------------------------------------------------------------
diff --git a/platforms/ios.js b/platforms/ios.js
index b533e14..dad76d4 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -37,6 +37,19 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
 
     variables = variables || {}
 
+    var platformTag = plugin_et.find('./platform[@name="ios"]');
+    
+    if (!platformTag) {
+       // Either this plugin doesn't support this platform, or it's a JS-only plugin.
+       // Either way, return now.
+       return;
+    }
+    
+    var sourceFiles = platformTag.findall('./source-file'),
+           headerFiles = platformTag.findall('./header-file'),
+           resourceFiles = platformTag.findall('./resource-file'),
+           frameworks = platformTag.findall('./framework');
+           
     // grab and parse pbxproj
     // we don't want CordovaLib's xcode project
     var project_files = glob.sync(path.join(project_dir, '*.xcodeproj', 'project.pbxproj'));

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/e777979d/test/ios-config-xml-install.js
----------------------------------------------------------------------
diff --git a/test/ios-config-xml-install.js b/test/ios-config-xml-install.js
index 68ec169..2a65268 100644
--- a/test/ios-config-xml-install.js
+++ b/test/ios-config-xml-install.js
@@ -65,23 +65,16 @@ exports['should install webless plugin'] = function (test) {
     var dummy_plugin_dir = path.join(test_dir, 'plugins', 'WeblessPlugin')
     var dummy_xml_path = path.join(test_dir, 'plugins', 'WeblessPlugin', 'plugin.xml')
     var dummy_plugin_et  = new et.ElementTree(et.XML(fs.readFileSync(dummy_xml_path, 'utf-8')));
-    
-// out var/folders/k5/p44x4yn122s_gk2s0p0c7rm00000gn/T/test_plugman/projects/ios/SampleApp/Plugins/
-
-// test project dir var/folders/k5/p44x4yn122s_gk2s0p0c7rm00000gn/T/test_plugman/projects/ios
 
     ios.handlePlugin('install', test_project_dir, dummy_plugin_dir, dummy_plugin_et, { APP_ID: 12345 });
     plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'ios');
     
-    var huh =  path.join(test_project_dir, 'SampleApp');
-    console.log(huh);
-    console.log('contents ' + fs.readdirSync(huh));
-    
     test.done();
 }
 
 exports['should move the js file'] = function (test) {
     // run the platform-specific function
+    var pluginsPath = path.join(test_dir, 'plugins');
     var wwwPath = path.join(test_dir, 'projects', 'ios', 'www');
     var jsPath = path.join(test_dir, 'projects', 'ios-config-xml', 'www', 'childbrowser.js');
     


[19/54] [abbrv] git commit: does not create a directory for files

Posted by ti...@apache.org.
does not create a directory for files


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/c2c528e1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/c2c528e1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/c2c528e1

Branch: refs/heads/future
Commit: c2c528e17a6b22f98dfc8257c13e2e3796c5d802
Parents: 9b83bc3
Author: Anis Kadri <an...@apache.org>
Authored: Tue Apr 2 20:03:07 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Tue Apr 2 20:03:07 2013 -0700

----------------------------------------------------------------------
 platforms/ios.js |   17 +++--
 test/plugman.js  |  150 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 160 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/c2c528e1/platforms/ios.js
----------------------------------------------------------------------
diff --git a/platforms/ios.js b/platforms/ios.js
index edddbeb..6473936 100644
--- a/platforms/ios.js
+++ b/platforms/ios.js
@@ -96,13 +96,16 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
         var targetPath = path.resolve(
                             project_dir,
                             assetsDir, asset.attrib['target']);
-        var stat = fs.statSync(srcPath);
-        if(stat.isDirectory()) {
-            shell.mkdir('-p', targetPath);
-            checkLastCommand();
-        }
         if (action == 'install') {
-            shell.cp('-r', srcPath, targetPath);
+            var stat = fs.statSync(srcPath);
+            if(stat.isDirectory()) {
+              shell.mkdir('-p', targetPath);
+              checkLastCommand();
+              shell.cp('-r', srcPath, targetPath);
+              checkLastCommand();
+            } else {
+              shell.cp(srcPath, targetPath);
+            }
             checkLastCommand();
         } else {
             shell.rm('-rf', targetPath);
@@ -364,7 +367,7 @@ function updateConfig(action, config_path, plugin_et) {
         updatePlistFile(action, config_path, plugin_et);
     }
 }
-
+// throws error if last command returns code != 0
 function checkLastCommand() {
     if(shell.error() != null) throw {name: "ShellError", message: shell.error()};
 }

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/c2c528e1/test/plugman.js
----------------------------------------------------------------------
diff --git a/test/plugman.js b/test/plugman.js
new file mode 100644
index 0000000..0222085
--- /dev/null
+++ b/test/plugman.js
@@ -0,0 +1,150 @@
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+
+var fs = require('fs')
+  , path = require('path')
+  , osenv = require('osenv')
+  , shell = require('shelljs')
+  , util = require('util')
+  , plugman_exe = path.join(__dirname, '..', 'plugman.js')
+  , test_dir = path.join(osenv.tmpdir(), 'test_plugman');
+
+exports.setUp = function(callback) {
+    shell.mkdir('-p', test_dir);
+    callback();
+}
+
+exports.tearDown = function(callback) {
+    // remove the temp files (projects and plugins)
+    shell.rm('-rf', test_dir);
+    callback();
+}
+
+exports['should list all plugins'] = function (test) {
+    
+    var command = util.format('%s %s --list', shell.which('node'), plugman_exe),
+        options = {silent: true},
+        ret = shell.exec(command, options); 
+    test.equal(0, ret.code);
+    test.ok(ret.output);
+    test.done();
+
+}
+
+exports['should install and uninstall ios plugin'] = function (test) {
+  var test_project_dir = path.join(test_dir, 'ios-config-xml'),
+      test_plugin_dir = path.join(test_dir, 'WebNotifications'),
+      srcDir = path.resolve(test_project_dir, 'SampleApp/Plugins'),
+      options = {silent: true},
+      command;
+
+    // copy the ios test project to a temp directory
+    shell.cp('-r', path.join(__dirname, 'projects', 'ios-config-xml'), test_dir);
+
+    // copy the ios test plugin to a temp directory
+    shell.cp('-r', path.join(__dirname, 'plugins', 'WebNotifications'), test_dir);
+
+    command = util.format('%s %s --platform ios --project %s --plugin %s', shell.which('node'),
+                                                                           plugman_exe, 
+                                                                           test_project_dir, 
+                                                                           test_plugin_dir
+                         ); 
+    var ret = shell.exec(command, options); 
+    test.equal(0, ret.code);
+    test.equal("plugin installed\n", ret.output);
+    
+    test.ok(fs.existsSync(srcDir + '/WebNotifications.m'))
+    test.ok(fs.existsSync(srcDir + '/WebNotifications.h'));
+    
+    command = util.format('%s %s --remove --platform ios --project %s --plugin %s', shell.which('node'),
+                                                                                    plugman_exe, 
+                                                                                    test_project_dir, 
+                                                                                    test_plugin_dir
+                         ); 
+    var ret = shell.exec(command, options); 
+    test.equal(0, ret.code);
+    test.equal("plugin uninstalled\n", ret.output);
+    
+    test.ok(!fs.existsSync(srcDir + '/WebNotifications.m'))
+    test.ok(!fs.existsSync(srcDir + '/WebNotifications.h'));
+   
+    test.done();
+}
+
+exports['should revert ios install on failures'] = function (test) {
+  var test_project_dir = path.join(test_dir, 'ios-config-xml'),
+      test_plugin_dir = path.join(test_dir, 'FaultyPlugin'),
+      srcDir = path.resolve(test_project_dir, 'SampleApp/Plugins'),
+      options = {silent: false},
+      command;
+
+    // copy the ios test project to a temp directory
+    shell.cp('-r', path.join(__dirname, 'projects', 'ios-config-xml'), test_dir);
+
+    // copy the ios test plugin to a temp directory
+    shell.cp('-r', path.join(__dirname, 'plugins', 'FaultyPlugin'), test_dir);
+
+    command = util.format('%s %s --platform ios --project %s --plugin %s', shell.which('node'),
+                                                                           plugman_exe, 
+                                                                           test_project_dir, 
+                                                                           test_plugin_dir
+                         ); 
+    var ret = shell.exec(command, options);
+    test.equal(0, ret.code);
+    //console.log(ret.output);
+    test.notEqual("plugin installed\n", ret.output);
+    
+    test.ok(!fs.existsSync(srcDir + '/FaultyPlugin.m'))
+    test.ok(!fs.existsSync(srcDir + '/FaultyPlugin.h'));
+    
+    test.done();
+}
+
+exports['should install and uninstall android plugin'] = function (test) {
+  var test_project_dir = path.join(test_dir, 'android_two'),
+      test_plugin_dir = path.join(test_dir, 'ChildBrowser'),
+      options = {silent: true},
+      command;
+
+    // copy the ios test project to a temp directory
+    shell.cp('-r', path.join(__dirname, 'projects', 'android_two'), test_dir);
+
+    // copy the ios test plugin to a temp directory
+    shell.cp('-r', path.join(__dirname, 'plugins', 'ChildBrowser'), test_dir);
+
+    command = util.format('%s %s --platform android --project %s --plugin %s', shell.which('node'),
+                                                                           plugman_exe, 
+                                                                           test_project_dir, 
+                                                                           test_plugin_dir
+                         ); 
+    var ret = shell.exec(command, options); 
+    test.equal(0, ret.code);
+    test.equal("plugin installed\n", ret.output);
+    
+    command = util.format('%s %s --remove --platform android --project %s --plugin %s', shell.which('node'),
+                                                                                    plugman_exe, 
+                                                                                    test_project_dir, 
+                                                                                    test_plugin_dir
+                         ); 
+    var ret = shell.exec(command, options); 
+    test.equal(0, ret.code);
+    test.equal("plugin uninstalled\n", ret.output);
+   
+    test.done();
+}


[46/54] [abbrv] git commit: fixed android two install tests

Posted by ti...@apache.org.
fixed android two install tests


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/0ca14e5c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/0ca14e5c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/0ca14e5c

Branch: refs/heads/future
Commit: 0ca14e5c2a680324ceddb941744e841cda6f1789
Parents: 9383c7b
Author: Tim Kim <ti...@adobe.com>
Authored: Fri Apr 12 13:51:01 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Fri Apr 12 13:51:01 2013 -0700

----------------------------------------------------------------------
 test/android-two-install.js |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/0ca14e5c/test/android-two-install.js
----------------------------------------------------------------------
diff --git a/test/android-two-install.js b/test/android-two-install.js
index b8b4c9d..b0975f0 100644
--- a/test/android-two-install.js
+++ b/test/android-two-install.js
@@ -27,7 +27,7 @@ var fs = require('fs')
   , shell = require('shelljs')
   , et = require('elementtree')
   , android = require(path.join(__dirname, '..', 'platforms', 'android'))
-
+  , plugin_loader = require('../util/plugin_loader')
   , test_dir = path.join(osenv.tmpdir(), 'test_plugman')
   , test_project_dir = path.join(test_dir, 'projects', 'android_two')
   , test_plugin_dir = path.join(test_dir, 'plugins', 'ChildBrowser')
@@ -71,9 +71,13 @@ exports['should install webless plugin'] = function (test) {
 }
 
 exports['should move the js file'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'android_two', 'assets', 'www');
     var jsPath = path.join(test_dir, 'projects', 'android_two', 'assets', 'www', 'childbrowser.js');
 
     android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android');
+    console.log(wwwPath + ' ' + fs.readdirSync(wwwPath));
     fs.stat(jsPath, function(err, stats) {
         test.ok(!err);
         test.ok(stats.isFile());
@@ -82,10 +86,13 @@ exports['should move the js file'] = function (test) {
 }
 
 exports['should move the directory'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'android_two', 'assets', 'www');
+    
     android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);
-
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android');
+    
     var assetPath = path.join(test_dir, 'projects', 'android_two', 'assets', 'www', 'childbrowser');
-
     var assets = fs.statSync(assetPath);
 
     test.ok(assets.isDirectory());
@@ -94,7 +101,11 @@ exports['should move the directory'] = function (test) {
 }
 
 exports['should move the src file'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'android_two', 'assets', 'www');
+    
     android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android');
 
     var javaPath = path.join(test_dir, 'projects', 'android_two', 'src', 'com', 'phonegap', 'plugins', 'childBrowser', 'ChildBrowser.java');
     test.ok(fs.statSync(javaPath));
@@ -134,9 +145,12 @@ exports['should add ChildBrowser to AndroidManifest.xml'] = function (test) {
 }
 
 exports['should not install a plugin that is already installed'] = function (test) {
+    var pluginsPath = path.join(test_dir, 'plugins');
+    var wwwPath = path.join(test_dir, 'projects', 'android_two', 'assets', 'www');
     var jsPath = path.join(test_dir, 'projects', 'android_two', 'assets', 'www', 'childbrowser.js');
 
     android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
+    plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android');
     
     test.throws(function() {android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et);}, /already installed/);
 


[27/54] [abbrv] git commit: updating plugin with tag

Posted by ti...@apache.org.
updating plugin with <info> tag


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/3fd646e2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/3fd646e2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/3fd646e2

Branch: refs/heads/future
Commit: 3fd646e2fc0dcda086f1ff91d02a8513893385d6
Parents: 2799c84
Author: Anis Kadri <an...@apache.org>
Authored: Thu Apr 4 14:54:55 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Thu Apr 4 14:54:55 2013 -0700

----------------------------------------------------------------------
 test/plugins/ChildBrowser/plugin.xml |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/3fd646e2/test/plugins/ChildBrowser/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/ChildBrowser/plugin.xml b/test/plugins/ChildBrowser/plugin.xml
index 37ed744..7641ec0 100644
--- a/test/plugins/ChildBrowser/plugin.xml
+++ b/test/plugins/ChildBrowser/plugin.xml
@@ -55,6 +55,9 @@
 
         <source-file src="ChildBrowser.java"
                 target-dir="src/com/phonegap/plugins/childBrowser" />
+        <info>
+          Please make sure you read this because it is very important to complete the installation of your plugin
+        </info>
     </platform>
 
     <!-- ios -->


[50/54] [abbrv] git commit: fixed config changes

Posted by ti...@apache.org.
fixed config changes


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/c8edc273
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/c8edc273
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/c8edc273

Branch: refs/heads/future
Commit: c8edc273c96f49392ac7e906df391dd6770dfb9b
Parents: 51a4de2
Author: Tim Kim <ti...@adobe.com>
Authored: Fri Apr 12 14:37:09 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Fri Apr 12 14:37:09 2013 -0700

----------------------------------------------------------------------
 test/config-changes.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/c8edc273/test/config-changes.js
----------------------------------------------------------------------
diff --git a/test/config-changes.js b/test/config-changes.js
index 4031199..f460cd6 100644
--- a/test/config-changes.js
+++ b/test/config-changes.js
@@ -20,7 +20,7 @@
 var configChanges = require('../util/config-changes'),
     fs = require('fs'),
     et = require('elementtree'),
-    xmlText = fs.readFileSync('test/dummy.xml', 'utf-8'),
+    xmlText = fs.readFileSync('dummy.xml', 'utf-8'),
     xmlDoc = new et.ElementTree(et.XML(xmlText)),
     platformTag = null;
 


[40/54] [abbrv] git commit: fixed tests to the point all android-one-install will work

Posted by ti...@apache.org.
fixed tests to the point all android-one-install will work


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/db66171d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/db66171d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/db66171d

Branch: refs/heads/future
Commit: db66171dc2dc6c43a36bcb5dbbe76d18e2b22bc7
Parents: 90db4b1
Author: Tim Kim <ti...@adobe.com>
Authored: Fri Apr 5 14:45:40 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Tue Apr 9 14:05:40 2013 -0700

----------------------------------------------------------------------
 platforms/android.js                  |    3 +--
 test/android-one-install.js           |    1 -
 test/plugins/ChildBrowser/plugin.xml  |   22 +++++++++++-----------
 test/plugins/WeblessPlugin/plugin.xml |   14 +++++++-------
 4 files changed, 19 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/db66171d/platforms/android.js
----------------------------------------------------------------------
diff --git a/platforms/android.js b/platforms/android.js
index 303c5b6..ee595c4 100644
--- a/platforms/android.js
+++ b/platforms/android.js
@@ -87,16 +87,15 @@ exports.handlePlugin = function (action, project_dir, plugin_dir, plugin_et, var
 
     // move source files
     sourceFiles.forEach(function (sourceFile) {
+        
         var srcDir = path.resolve(project_dir,
                                 sourceFile.attrib['target-dir'])
           , destFile = path.resolve(srcDir,
                                 path.basename(sourceFile.attrib['src']));
 
         if (action == 'install') {
-            
             shell.mkdir('-p', srcDir);
             var srcFile = srcPath(plugin_dir, sourceFile.attrib['src']);
-            console.log('src file ' + srcFile);
             shell.cp(srcFile, destFile);
         } else {
             fs.unlinkSync(destFile);

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/db66171d/test/android-one-install.js
----------------------------------------------------------------------
diff --git a/test/android-one-install.js b/test/android-one-install.js
index 8ec4da6..ade18a2 100644
--- a/test/android-one-install.js
+++ b/test/android-one-install.js
@@ -106,7 +106,6 @@ exports['should move the src file'] = function (test) {
     android.handlePlugin('install', test_project_dir, test_plugin_dir, plugin_et, { APP_ID: 12345 });
     plugin_loader.handlePrepare(test_project_dir, pluginsPath, wwwPath, 'android');
     
-    var bahPath = path.join(test_dir, 'projects', 'android_one', 'src', 'com', 'phonegap', 'plugins', 'childBrowser');
     var javaPath = path.join(test_dir, 'projects', 'android_one', 'src', 'com', 'phonegap', 'plugins', 'childBrowser', 'ChildBrowser.java');
     
     test.ok(fs.statSync(javaPath));

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/db66171d/test/plugins/ChildBrowser/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/ChildBrowser/plugin.xml b/test/plugins/ChildBrowser/plugin.xml
index 7641ec0..caff701 100644
--- a/test/plugins/ChildBrowser/plugin.xml
+++ b/test/plugins/ChildBrowser/plugin.xml
@@ -53,7 +53,7 @@
                 value="com.phonegap.plugins.childBrowser.ChildBrowser"/>
         </config-file>
 
-        <source-file src="ChildBrowser.java"
+        <source-file src="src/android/ChildBrowser.java"
                 target-dir="src/com/phonegap/plugins/childBrowser" />
         <info>
           Please make sure you read this because it is very important to complete the installation of your plugin
@@ -70,18 +70,18 @@
                 value="ChildBrowserCommand" />
         </config-file>
 
-        <resource-file src="ChildBrowser.bundle" />
-        <resource-file src="ChildBrowserViewController.xib" />
+        <resource-file src="src/ios/ChildBrowser.bundle" />
+        <resource-file src="src/ios/ChildBrowserViewController.xib" />
 
-        <header-file src="ChildBrowserCommand.h" />
-        <header-file src="ChildBrowserViewController.h" />
-        <header-file src="preserveDirs/PreserveDirsTest.h" preserve-dirs="true" />
-        <header-file src="TargetDirTest.h" target-dir="targetDir"/>
+        <header-file src="src/ios/ChildBrowserCommand.h" />
+        <header-file src="src/ios/ChildBrowserViewController.h" />
+        <header-file src="src/ios/preserveDirs/PreserveDirsTest.h" preserve-dirs="true" />
+        <header-file src="src/ios/TargetDirTest.h" target-dir="targetDir"/>
 
-        <source-file src="ChildBrowserCommand.m" />
-        <source-file src="ChildBrowserViewController.m" />
-        <source-file src="preserveDirs/PreserveDirsTest.m" preserve-dirs="true" />
-        <header-file src="TargetDirTest.m" target-dir="targetDir"/>
+        <source-file src="src/ios/ChildBrowserCommand.m" />
+        <source-file src="src/ios/ChildBrowserViewController.m" />
+        <source-file src="src/ios/preserveDirs/PreserveDirsTest.m" preserve-dirs="true" />
+        <header-file src="src/ios/TargetDirTest.m" target-dir="targetDir"/>
 
         <!-- framework for testing (not actual dependency of ChildBrowser -->
         <framework src="libsqlite3.dylib" />

http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/db66171d/test/plugins/WeblessPlugin/plugin.xml
----------------------------------------------------------------------
diff --git a/test/plugins/WeblessPlugin/plugin.xml b/test/plugins/WeblessPlugin/plugin.xml
index d0f3bd9..0056636 100644
--- a/test/plugins/WeblessPlugin/plugin.xml
+++ b/test/plugins/WeblessPlugin/plugin.xml
@@ -50,7 +50,7 @@
                 value="com.phonegap.plugins.weblessplugin.WeblessPlugin"/>
         </config-file>
 
-        <source-file src="WeblessPlugin.java"
+        <source-file src="src/android/WeblessPlugin.java"
                 target-dir="src/com/phonegap/plugins/weblessplugin" />
     </platform>
 
@@ -66,14 +66,14 @@
                 value="WeblessPluginCommand"/>
         </config-file>
 
-        <resource-file src="WeblessPlugin.bundle" />
-        <resource-file src="WeblessPluginViewController.xib" />
+        <resource-file src="src/ios/WeblessPlugin.bundle" />
+        <resource-file src="src/ios/WeblessPluginViewController.xib" />
 
-        <header-file src="WeblessPluginCommand.h" />
-        <header-file src="WeblessPluginViewController.h" />
+        <header-file src="src/ios/WeblessPluginCommand.h" />
+        <header-file src="src/ios/WeblessPluginViewController.h" />
 
-        <source-file src="WeblessPluginCommand.m" />
-        <source-file src="WeblessPluginViewController.m" />
+        <source-file src="src/ios/WeblessPluginCommand.m" />
+        <source-file src="src/ios/WeblessPluginViewController.m" />
 
         <!-- framework for testing (not actual dependency of WeblessPlugin -->
         <framework src="libsqlite3.dylib" />