Skip to content
Browse files

Merge branch 'touchdb'

  • Loading branch information...
2 parents 16b15de + 6b538d8 commit 7c27434867513991a2fc0b93d7aac5e9ca068d5c @deepwinter committed May 22, 2012
Showing with 208 additions and 2,600 deletions.
  1. BIN Frameworks/CouchCocoa.framework/CouchCocoa
  2. +1 −1 Frameworks/CouchCocoa.framework/Headers/CouchAttachment.h
  3. +1 −1 Frameworks/CouchCocoa.framework/Headers/CouchCocoa.h
  4. +14 −10 Frameworks/CouchCocoa.framework/Headers/CouchDatabase.h
  5. +7 −0 Frameworks/CouchCocoa.framework/Headers/CouchDesignDocument.h
  6. +18 −13 Frameworks/CouchCocoa.framework/Headers/CouchDesignDocument_Embedded.h
  7. +1 −0 Frameworks/CouchCocoa.framework/Headers/CouchDocument.h
  8. +12 −0 Frameworks/CouchCocoa.framework/Headers/CouchDynamicObject.h
  9. +0 −50 Frameworks/CouchCocoa.framework/Headers/CouchEmbeddedServer.h
  10. +17 −2 Frameworks/CouchCocoa.framework/Headers/CouchModel.h
  11. +26 −0 Frameworks/CouchCocoa.framework/Headers/CouchPersistentReplication.h
  12. +29 −0 Frameworks/CouchCocoa.framework/Headers/CouchQuery.h
  13. +33 −8 Frameworks/CouchCocoa.framework/Headers/CouchReplication.h
  14. +3 −0 Frameworks/CouchCocoa.framework/Headers/CouchServer.h
  15. +10 −0 Frameworks/CouchCocoa.framework/Headers/CouchUITableSource.h
  16. +3 −0 Frameworks/CouchCocoa.framework/Headers/RESTBody.h
  17. +8 −0 Frameworks/CouchCocoa.framework/Headers/RESTOperation.h
  18. +25 −1 Frameworks/CouchCocoa.framework/Headers/RESTResource.h
  19. BIN Frameworks/CouchCocoa.framework/Info.plist
  20. BIN Frameworks/Couchbase.framework/Couchbase
  21. +0 −159 Frameworks/Couchbase.framework/CouchbaseResources/default.ini
  22. +0 −66 Frameworks/Couchbase.framework/CouchbaseResources/default_ios.ini
  23. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/bin/start.boot
  24. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/bin/start_clean.boot
  25. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/bin/start_sasl.boot
  26. +0 −756 Frameworks/Couchbase.framework/CouchbaseResources/erlang/emonk_app.js
  27. +0 −368 Frameworks/Couchbase.framework/CouchbaseResources/erlang/emonk_mapred.js
  28. +0 −5 Frameworks/Couchbase.framework/CouchbaseResources/erlang/erl_inetrc
  29. +0 −29 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch.app
  30. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch.beam
  31. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_api_wrap.beam
  32. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_api_wrap_httpc.beam
  33. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_app.beam
  34. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_app_server.beam
  35. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_app_server_emonk.beam
  36. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_app_server_erlang.beam
  37. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_app_server_objc.beam
  38. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_auth_cache.beam
  39. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_btree.beam
  40. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_changes.beam
  41. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_compaction_daemon.beam
  42. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_compress.beam
  43. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_compress_types.beam
  44. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_config.beam
  45. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_config_writer.beam
  46. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_db.beam
  47. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_db_frontend.beam
  48. BIN ...eworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_db_update_notifier.beam
  49. BIN ...ks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_db_update_notifier_sup.beam
  50. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_db_updater.beam
  51. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_doc.beam
  52. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_drv.beam
  53. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_event_sup.beam
  54. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_external_manager.beam
  55. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_external_server.beam
  56. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_file.beam
  57. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpc_pool.beam
  58. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd.beam
  59. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_auth.beam
  60. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_db.beam
  61. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_external.beam
  62. BIN ...works/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_misc_handlers.beam
  63. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_oauth.beam
  64. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_proxy.beam
  65. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_replicator.beam
  66. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_rewrite.beam
  67. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_show.beam
  68. BIN ...orks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_stats_handlers.beam
  69. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_vhost.beam
  70. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_view.beam
  71. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_httpd_view_merger.beam
  72. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_internal_load_gen.beam
  73. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_ios.beam
  74. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_key_tree.beam
  75. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_log.beam
  76. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_native_process.beam
  77. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_os_daemons.beam
  78. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_os_process.beam
  79. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_primary_sup.beam
  80. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_query_servers.beam
  81. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_ref_counter.beam
  82. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_rep_sup.beam
  83. BIN ...works/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_replication_manager.beam
  84. BIN ...orks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_replication_notifier.beam
  85. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_replicator.beam
  86. BIN ...rks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_replicator_doc_copier.beam
  87. BIN ...rks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_replicator_rev_finder.beam
  88. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_replicator_utils.beam
  89. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_secondary_sup.beam
  90. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_server.beam
  91. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_server_sup.beam
  92. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_stats_aggregator.beam
  93. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_stats_collector.beam
  94. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_stream.beam
  95. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_task_status.beam
  96. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_util.beam
  97. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_uuids.beam
  98. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_view.beam
  99. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_view_compactor.beam
  100. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_view_group.beam
  101. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_view_merger.beam
  102. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_view_server.beam
  103. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_view_server_emonk.beam
  104. BIN ...eworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_view_server_erlang.beam
  105. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_view_server_objc.beam
  106. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_view_server_os.beam
  107. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_view_updater.beam
  108. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/couch_work_queue.beam
  109. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/ebin/json_stream_parse.beam
  110. +0 −20 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/priv/couchspawnkillable
  111. +0 −41 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/priv/lib/couch_icu_driver.la
  112. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/priv/lib/libcouch_icu_driver.a
  113. +0 −49 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/couch/priv/stat_descriptions.cfg
  114. +0 −31 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/crypto-1.6.4/ebin/crypto.app
  115. +0 −22 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/crypto-1.6.4/ebin/crypto.appup
  116. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/crypto-1.6.4/ebin/crypto.beam
  117. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/crypto-1.6.4/ebin/crypto_app.beam
  118. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/crypto-1.6.4/ebin/crypto_server.beam
  119. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/crypto-1.6.4/ebin/crypto_sup.beam
  120. +0 −78 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/crypto-1.6.4/priv/obj/Makefile
  121. +0 −9 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ejson/ebin/ejson.app
  122. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ejson/ebin/ejson.beam
  123. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ejson/ebin/mochijson2.beam
  124. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ejson/ebin/mochinum.beam
  125. +0 −8 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/emonk/ebin/emonk.app
  126. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/emonk/ebin/emonk.beam
  127. +0 −20 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erlang-oauth/ebin/oauth.app
  128. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erlang-oauth/ebin/oauth.beam
  129. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erlang-oauth/ebin/oauth_hmac_sha1.beam
  130. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erlang-oauth/ebin/oauth_http.beam
  131. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erlang-oauth/ebin/oauth_plaintext.beam
  132. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erlang-oauth/ebin/oauth_rsa_sha1.beam
  133. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erlang-oauth/ebin/oauth_unix.beam
  134. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erlang-oauth/ebin/oauth_uri.beam
  135. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erts-5.7.5/ebin/erl_prim_loader.beam
  136. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erts-5.7.5/ebin/erlang.beam
  137. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erts-5.7.5/ebin/init.beam
  138. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erts-5.7.5/ebin/otp_ring0.beam
  139. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erts-5.7.5/ebin/prim_file.beam
  140. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erts-5.7.5/ebin/prim_inet.beam
  141. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erts-5.7.5/ebin/prim_zip.beam
  142. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/erts-5.7.5/ebin/zlib.beam
  143. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/geocouch/ebin/couch_httpd_spatial.beam
  144. BIN ...rks/Couchbase.framework/CouchbaseResources/erlang/lib/geocouch/ebin/couch_httpd_spatial_list.beam
  145. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/geocouch/ebin/couch_spatial.beam
  146. BIN ...orks/Couchbase.framework/CouchbaseResources/erlang/lib/geocouch/ebin/couch_spatial_compactor.beam
  147. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/geocouch/ebin/couch_spatial_group.beam
  148. BIN ...eworks/Couchbase.framework/CouchbaseResources/erlang/lib/geocouch/ebin/couch_spatial_updater.beam
  149. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/geocouch/ebin/geocouch_duplicates.beam
  150. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/geocouch/ebin/vtree.beam
  151. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/geocouch/ebin/vtree_bulk.beam
  152. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/geocouch/ebin/vtree_insbench.beam
  153. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/geocouch/ebin/vtreestats.beam
  154. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/geocouch/ebin/vtreeviz.beam
  155. +0 −13 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ibrowse/ibrowse.app
  156. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ibrowse/ibrowse.beam
  157. +0 −12 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ibrowse/ibrowse.hrl
  158. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ibrowse/ibrowse_app.beam
  159. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ibrowse/ibrowse_http_client.beam
  160. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ibrowse/ibrowse_lb.beam
  161. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ibrowse/ibrowse_lib.beam
  162. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ibrowse/ibrowse_sup.beam
  163. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/ibrowse/ibrowse_test.beam
  164. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/ftp.beam
  165. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/ftp_progress.beam
  166. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/ftp_response.beam
  167. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/ftp_sup.beam
  168. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/http.beam
  169. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/http_chunk.beam
  170. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/http_request.beam
  171. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/http_response.beam
  172. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/http_transport.beam
  173. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/http_uri.beam
  174. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/http_util.beam
  175. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpc.beam
  176. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpc_cookie.beam
  177. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpc_handler.beam
  178. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpc_handler_sup.beam
  179. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpc_manager.beam
  180. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpc_profile_sup.beam
  181. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpc_request.beam
  182. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpc_response.beam
  183. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpc_sup.beam
  184. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd.beam
  185. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_acceptor.beam
  186. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_acceptor_sup.beam
  187. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_cgi.beam
  188. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_conf.beam
  189. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_esi.beam
  190. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_example.beam
  191. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_file.beam
  192. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_instance_sup.beam
  193. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_log.beam
  194. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_manager.beam
  195. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_misc_sup.beam
  196. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_request.beam
  197. BIN ...works/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_request_handler.beam
  198. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_response.beam
  199. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_script_env.beam
  200. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_socket.beam
  201. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_sup.beam
  202. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/httpd_util.beam
  203. +0 −111 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/inets.app
  204. +0 −54 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/inets.appup
  205. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/inets.beam
  206. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/inets_app.beam
  207. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/inets_regexp.beam
  208. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/inets_service.beam
  209. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/inets_sup.beam
  210. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_actions.beam
  211. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_alias.beam
  212. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_auth.beam
  213. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_auth_dets.beam
  214. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_auth_mnesia.beam
  215. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_auth_plain.beam
  216. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_auth_server.beam
  217. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_browser.beam
  218. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_cgi.beam
  219. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_dir.beam
  220. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_disk_log.beam
  221. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_esi.beam
  222. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_get.beam
  223. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_head.beam
  224. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_htaccess.beam
  225. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_include.beam
  226. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_log.beam
  227. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_range.beam
  228. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_responsecontrol.beam
  229. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_security.beam
  230. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_security_server.beam
  231. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/mod_trace.beam
  232. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/tftp.beam
  233. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/tftp_binary.beam
  234. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/tftp_engine.beam
  235. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/tftp_file.beam
  236. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/tftp_lib.beam
  237. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/tftp_logger.beam
  238. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/ebin/tftp_sup.beam
  239. +0 −4 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/priv/bin/runcgi.sh
  240. +0 −31 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/src/ftp_internal.hrl
  241. +0 −108 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/src/http_internal.hrl
  242. +0 −140 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/src/httpc_internal.hrl
  243. +0 −82 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/src/httpd.hrl
  244. +0 −31 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/src/httpd_internal.hrl
  245. +0 −49 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/src/inets_internal.hrl
  246. +0 −29 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/src/mod_auth.hrl
  247. +0 −68 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/inets-5.3/src/tftp.hrl
  248. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/application.beam
  249. BIN .../Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/application_controller.beam
  250. BIN ...orks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/application_master.beam
  251. BIN ...rks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/application_starter.beam
  252. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/auth.beam
  253. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/code.beam
  254. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/code_server.beam
  255. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/disk_log.beam
  256. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/disk_log_1.beam
  257. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/disk_log_server.beam
  258. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/disk_log_sup.beam
  259. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/dist_ac.beam
  260. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/dist_util.beam
  261. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/erl_boot_server.beam
  262. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/erl_ddll.beam
  263. BIN ...eworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/erl_distribution.beam
  264. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/erl_epmd.beam
  265. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/erl_reply.beam
  266. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/error_handler.beam
  267. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/error_logger.beam
  268. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/erts_debug.beam
  269. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/file.beam
  270. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/file_io_server.beam
  271. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/file_server.beam
  272. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/gen_sctp.beam
  273. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/gen_tcp.beam
  274. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/gen_udp.beam
  275. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/global.beam
  276. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/global_group.beam
  277. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/global_search.beam
  278. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/group.beam
  279. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/heart.beam
  280. BIN ...rks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/hipe_unified_loader.beam
  281. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet.beam
  282. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet6_sctp.beam
  283. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet6_tcp.beam
  284. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet6_tcp_dist.beam
  285. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet6_udp.beam
  286. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet_config.beam
  287. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet_db.beam
  288. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet_dns.beam
  289. BIN ...rks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet_gethost_native.beam
  290. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet_hosts.beam
  291. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet_parse.beam
  292. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet_res.beam
  293. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet_sctp.beam
  294. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet_tcp.beam
  295. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet_tcp_dist.beam
  296. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/inet_udp.beam
  297. +0 −120 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/kernel.app
  298. +0 −1 Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/kernel.appup
  299. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/kernel.beam
  300. BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/lib/kernel-2.13.5/ebin/kernel_config.beam
Sorry, we could not display the entire diff because too many files (522) changed.
View
BIN Frameworks/CouchCocoa.framework/CouchCocoa
Binary file not shown.
View
2 Frameworks/CouchCocoa.framework/Headers/CouchAttachment.h
@@ -18,7 +18,7 @@
/** A binary attachment to a document.
- Actually a CouchAttachment is a child of a CouchRevision, since attachments (like all document contents) are versioned. This means that each instance represents an attachment immutably as it appeared in one revision of its document. So if you PUT a change to an attachment, the updated attachment will have a new CouchAttachment object. */
+ Actually a CouchAttachment may be a child of either a CouchDocument or a CouchRevision. The latter represents an attachment immutably as it appeared in one revision of its document. So if you PUT a change to an attachment, the updated attachment will have a new CouchAttachment object. */
@interface CouchAttachment : CouchResource
{
@private
View
2 Frameworks/CouchCocoa.framework/Headers/CouchCocoa.h
@@ -23,7 +23,7 @@
#import "CouchQuery.h"
#import "CouchRevision.h"
#import "CouchServer.h"
-#import "CouchEmbeddedServer.h"
+#import "CouchTouchDBServer.h"
/** @mainpage About CouchCocoa
View
24 Frameworks/CouchCocoa.framework/Headers/CouchDatabase.h
@@ -15,8 +15,10 @@
#import "CouchResource.h"
#import "CouchReplication.h"
-@class RESTCache, CouchChangeTracker, CouchDocument, CouchDesignDocument, CouchPersistentReplication, CouchQuery, CouchServer;
+@class RESTCache, CouchChangeTracker, CouchDocument, CouchDesignDocument, CouchModelFactory,
+ CouchPersistentReplication, CouchQuery, CouchServer;
+typedef NSString* (^CouchDocumentPathMap)(NSString* documentID);
/** A CouchDB database; contains CouchDocuments.
The CouchServer is the factory object for CouchDatabases. */
@@ -30,6 +32,8 @@
BOOL _lastSequenceNumberKnown;
id _onChangeBlock;
NSMutableArray* _deferredChanges;
+ CouchDocumentPathMap _documentPathMap;
+ CouchModelFactory* _modelFactory;
}
/** A convenience to instantiate a CouchDatabase directly from a URL, without having to first instantiate a CouchServer.
@@ -43,6 +47,10 @@
@property (readonly) CouchServer* server;
+/** Allows retrieving documents from the CouchDatabase using a different path from the documentID. This is useful for
+ accessing a document using a Couch rewrite. The result of the CouchDocumentPathMap is the path relative to the database. */
+@property (copy) CouchDocumentPathMap documentPathMap;
+
/** Creates the database on the server.
Fails with an HTTP status 412 (Conflict) if a database with this name already exists. */
- (RESTOperation*) create;
@@ -77,7 +85,7 @@
/** Bulk-writes multiple documents in one HTTP call.
@param properties An array specifying the new properties of each item in revisions. Each item must be an NSDictionary, or an NSNull object which means to delete the corresponding document.
- @param revisions A parallel array to 'properties', containing each CouchRevision to be updated. Can be nil, in which case the method acts as described in the docs for -putChanges:. */
+ @param revisions A parallel array to 'properties', containing each CouchRevision or CouchDocument to be updated. Can be nil, in which case the method acts as described in the docs for -putChanges:. */
- (RESTOperation*) putChanges: (NSArray*)properties toRevisions: (NSArray*)revisions;
/** Bulk-writes multiple documents in one HTTP call.
@@ -133,17 +141,13 @@
/** Triggers replication from a source database, to this database.
@param sourceURL The URL of the database to replicate from.
- @param options Zero or more option flags affecting the replication.
- @return The CouchReplication object managing the replication. It will already have been started. */
-- (CouchReplication*) pullFromDatabaseAtURL: (NSURL*)sourceURL
- options: (CouchReplicationOptions)options;
+ @return The CouchReplication object managing the replication. You have a chance to customize its properties (like .continuous and .filter) before it starts. */
+- (CouchReplication*) pullFromDatabaseAtURL: (NSURL*)sourceURL;
/** Triggers replication from this database to a target database.
@param targetURL The URL of the database to replicate to.
- @param options Zero or more option flags affecting the replication.
- @return The CouchReplication object managing the replication. It will already have been started. */
-- (CouchReplication*) pushToDatabaseAtURL: (NSURL*)targetURL
- options: (CouchReplicationOptions)options;
+ @return The CouchReplication object managing the replication. You have a chance to customize its properties (like .continuous and .filter) before it starts.*/
+- (CouchReplication*) pushToDatabaseAtURL: (NSURL*)targetURL;
/** Configures this database to replicate bidirectionally (sync to and from) a database at the given URL.
@param otherURL The URL of the other database, or nil to indicate no replication.
View
7 Frameworks/CouchCocoa.framework/Headers/CouchDesignDocument.h
@@ -31,9 +31,11 @@ extern NSString* const kCouchLanguageErlang;
NSString* _language;
NSMutableDictionary* _views;
NSString* _validation;
+ NSMutableDictionary* _viewOptions;
NSString* _viewsRevisionID;
BOOL _changed;
BOOL _changedValidation;
+ BOOL _changedViewOptions;
RESTOperation* _savingOp;
}
@@ -79,6 +81,11 @@ extern NSString* const kCouchLanguageErlang;
/** The validation function, a JavaScript function that validates document contents. */
@property (copy) NSString* validation;
+/** Should view query results include the document local sequence number in the index?
+ Setting this to YES sets the 'local_seq' property of the design document's 'options' property to 'true'.
+ This affects every view in this design document. */
+@property (nonatomic, assign) BOOL includeLocalSequence;
+
/** Have the contents of the design document been changed in-memory but not yet saved? */
@property (readonly) BOOL changed;
View
31 Frameworks/CouchCocoa.framework/Headers/CouchDesignDocument_Embedded.h
@@ -8,21 +8,21 @@
#import "CouchDesignDocument.h"
#ifdef COUCHCOCOA_IMPL
-#import "CouchbaseCallbacks.h"
-#elif TARGET_OS_IPHONE
-#import <Couchbase/CouchbaseCallbacks.h>
+typedef id TDMapBlock;
+typedef id TDReduceBlock;
+typedef id TDFilterBlock;
+typedef id TDValidationBlock;
#else
-#import <CouchbaseMac/CouchbaseCallbacks.h>
+#import <TouchDB/TDDatabase+Insertion.h>
+#import <TouchDB/TDView.h>
#endif
-extern NSString* const kCouchLanguageObjectiveC;
-
-
#define MAPBLOCK(BLOCK) ^(NSDictionary* doc, void (^emit)(id key, id value)){BLOCK}
#define REDUCEBLOCK(BLOCK) ^id(NSArray* keys, NSArray* values, BOOL rereduce){BLOCK}
-#define VALIDATIONBLOCK(BLOCK) ^BOOL(NSDictionary* doc, id<CouchbaseValidationContext> context)\
+#define VALIDATIONBLOCK(BLOCK) ^BOOL(TDRevision* newRevision, id<TDValidationContext> context)\
{BLOCK}
+#define FILTERBLOCK(BLOCK) ^BOOL(TDRevision* revision) {BLOCK}
/** Optional support for native Objective-C map/reduce functions.
@@ -35,15 +35,20 @@ extern NSString* const kCouchLanguageObjectiveC;
It is very important that this block be a law-abiding map function! As in other languages, it must be a "pure" function, with no side effects, that always emits the same values given the same input document. That means that it should not access or change any external state; be careful, since blocks make that so easy that you might do it inadvertently!
The block may be called on any thread, or on multiple threads simultaneously. This won't be a problem if the code is "pure" as described above, since it will as a consequence also be thread-safe. */
- (void) defineViewNamed: (NSString*)viewName
- mapBlock: (CouchMapBlock)mapBlock;
+ mapBlock: (TDMapBlock)mapBlock
+ version: (NSString*)version;
/** Defines or deletes a native view with both a map and a reduce function.
For details, read the documentation of the -defineViewNamed:mapBlock: method.*/
- (void) defineViewNamed: (NSString*)viewName
- mapBlock: (CouchMapBlock)mapBlock
- reduceBlock: (CouchReduceBlock)reduceBlock;
+ mapBlock: (TDMapBlock)mapBlock
+ reduceBlock: (TDReduceBlock)reduceBlock
+ version: (NSString*)version;
+
+- (void) defineFilterNamed: (NSString*)filterName
+ block: (TDFilterBlock)filterBlock;
-/** An Objective-C block that can validate any document being added/updated to this database. */
-@property (copy) CouchValidateUpdateBlock validationBlock;
+/** An Objective-C block that can validate any document being added/updated/deleted in this database. */
+- (void) setValidationBlock: (TDValidationBlock)validationBlock;
@end
View
1 Frameworks/CouchCocoa.framework/Headers/CouchDocument.h
@@ -26,6 +26,7 @@
BOOL _isDeleted;
NSString* _currentRevisionID;
CouchRevision* _currentRevision;
+ NSString *_documentID;
}
/** The unique ID of this document; its key in the database. */
View
12 Frameworks/CouchCocoa.framework/Headers/CouchDynamicObject.h
@@ -14,6 +14,9 @@
The dynamic accessors will be bridged to calls to -getValueOfProperty: and setValue:ofProperty:, allowing you to easily store property values in an NSDictionary or other container. */
@interface CouchDynamicObject : NSObject
+/** Returns the names of all properties defined in this class and superclasses up to CouchDynamicObject. */
++ (NSSet*) propertyNames;
+
/** Returns the value of a named property.
This method will only be called for properties that have been declared in the class's @interface using @property.
You must override this method -- the base implementation just raises an exception.*/
@@ -27,6 +30,15 @@
- (BOOL) setValue: (id)value ofProperty: (NSString*)property;
+// FOR SUBCLASSES TO CALL:
+
+/** Given the name of an object-valued property, returns the class of the property's value.
+ Returns nil if the property doesn't exist, or if its type isn't an object pointer or is 'id'. */
++ (Class) classOfProperty: (NSString*)propertyName;
+
++ (NSString*) getterKey: (SEL)sel;
++ (NSString*) setterKey: (SEL)sel;
+
// ADVANCED STUFF FOR SUBCLASSES TO OVERRIDE:
+ (IMP) impForGetterOfClass: (Class)propertyClass;
View
50 Frameworks/CouchCocoa.framework/Headers/CouchEmbeddedServer.h
@@ -1,50 +0,0 @@
-//
-// CouchEmbeddedServer.h
-// CouchCocoa
-//
-// Created by Jens Alfke on 10/13/11.
-// Copyright (c) 2011 Couchbase, Inc. All rights reserved.
-//
-
-#import "CouchServer.h"
-@class CouchbaseMobile;
-
-/** A convenience class that glues Couchbase Mobile into CouchCocoa.
- On creation, starts up an instance of Couchbase (or CouchbaseMobile).
- This object will have a placeholder URL until the embedded server has started up, so you can't access it (i.e. creating any databases) until then. */
-@interface CouchEmbeddedServer : CouchServer
-{
- @private
- CouchbaseMobile* _couchbase;
- NSError* _error;
- void(^_onStartBlock)();
-}
-
-/** A shared per-process instance. Remember that CouchCocoa is not thread-safe so you can't
- use this shared instance among multiple threads. */
-+ (CouchEmbeddedServer*) sharedInstance;
-
-/** Preferred initializer. Starts up an in-process server. */
-- (id) init;
-
-/** Inherited initializer, if you want to connect to a remote server for debugging purposes.
- (If you call -start:, the block will still be called.) */
-- (id) initWithURL:(NSURL *)url;
-
-/** Starts the server, asynchronously.
- @param onStartBlock A block to be called when the server finishes starting up (or fails to). At that point you can start to access databases, etc.
- @return YES if startup began, NO if a fatal error occurred. */
-- (BOOL) start: (void(^)())onStartBlock;
-
-/** Is the embedded Couchbase server running? */
-@property (readonly) BOOL running;
-
-/** If the server fails to start up, this will give the reason why. */
-@property (readonly, retain) NSError* error;
-
-@end
-
-
-extern NSString* const CouchEmbeddedServerWillSuspendNotification;
-extern NSString* const CouchEmbeddedServerDidStartNotification;
-extern NSString* const CouchEmbeddedServerDidRestartNotification;
View
19 Frameworks/CouchCocoa.framework/Headers/CouchModel.h
@@ -14,7 +14,8 @@
There's a 1::1 mapping between these and CouchDocuments; call +modelForDocument: to get (or create) a model object for a document, and .document to get the document of a model.
You should subclass this and declare properties in the subclass's @interface. As with NSManagedObject, you don't need to implement their accessor methods or declare instance variables; simply note them as '@dynamic' in the @implementation. The property value will automatically be fetched from or stored to the document, using the same name.
Supported scalar types are bool, char, short, int, double. These map to JSON numbers, except 'bool' which maps to JSON 'true' and 'false'. (Use bool instead of BOOL.)
- Supported object types are NSString, NSNumber, NSData, NSDate, NSArray, NSDictionary. (NSData and NSDate are not native JSON; they will be automatically converted to/from strings in base64 and ISO date formats, respectively.) */
+ Supported object types are NSString, NSNumber, NSData, NSDate, NSArray, NSDictionary. (NSData and NSDate are not native JSON; they will be automatically converted to/from strings in base64 and ISO date formats, respectively.)
+ Additionally, a property's type can be a pointer to a CouchModel subclass. This provides references between model objects. The raw property value in the document must be a string whose value is interpreted as a document ID. */
@interface CouchModel : CouchDynamicObject
{
@private
@@ -30,7 +31,9 @@
}
/** Returns the CouchModel associated with a CouchDocument, or creates & assigns one if necessary.
- Don't call this on CouchModel itself, rather on the subclass you want to instantiate for that document, e.g. [MyWidgetModel modelForDocument: doc]. It always returns an instance of the class it's called on. */
+ If the CouchDocument already has an associated model, it's returned. Otherwise a new one is instantiated.
+ If you call this on CouchModel itself, it'll delegate to the CouchModelFactory to decide what class to instantiate; this lets you map different classes to different "type" property values, for instance.
+ If you call this method on a CouchModel subclass, it will always instantiate an instance of that class; e.g. [MyWidgetModel modelForDocument: doc] always creates a MyWidgetModel. */
+ (id) modelForDocument: (CouchDocument*)document;
/** Creates a new "untitled" model with a new unsaved document.
@@ -77,6 +80,14 @@
This value can be used to highlight recently-changed objects in the UI. */
@property (readonly) NSTimeInterval timeSinceExternallyChanged;
+/** Bulk-saves changes to multiple model objects (which must all be in the same database).
+ This invokes -[CouchDatabase putChanges:], which sends a single request to _bulk_docs.
+ Any unchanged models in the array are ignored.
+ @param models An array of CouchModel objects, which must all be in the same database.
+ @return A RESTOperation that saves all changes, or nil if none of the models need saving. */
++ (RESTOperation*) saveModels: (NSArray*)models;
+
+/** Resets the timeSinceExternallyChanged property to zero. */
- (void) markExternallyChanged;
#pragma mark - PROPERTIES & ATTACHMENTS:
@@ -126,4 +137,8 @@
This happens both when initialized from a document, and after an external change. */
- (void) didLoadFromDocument;
+/** Returns the database in which to look up the document ID of a model-valued property.
+ Defaults to the same database as the receiver's document. You should override this if a document property contains the ID of a document in a different database. */
+- (CouchDatabase*) databaseForModelProperty: (NSString*)propertyName;
+
@end
View
26 Frameworks/CouchCocoa.framework/Headers/CouchPersistentReplication.h
@@ -7,6 +7,7 @@
//
#import "CouchModel.h"
+#import "CouchReplication.h"
/** Possible current states of a replication. */
@@ -27,6 +28,8 @@ typedef enum {
CouchReplicationState _state;
unsigned _completed, _total;
NSString* _statusString;
+ NSError* _error;
+ CouchReplicationMode _mode;
}
/** The source URL for the replication.
@@ -37,6 +40,8 @@ typedef enum {
This will be either a complete HTTP(s) URL or the name of a database on this server. */
@property (readonly, copy) NSString* target;
+@property (readonly) NSURL* remoteURL;
+
/** Should the target database be created if it doesn't already exist? (Defaults to NO). */
@property bool create_target;
@@ -52,6 +57,23 @@ typedef enum {
Should be a JSON-compatible dictionary. */
@property (copy) NSDictionary* query_params;
+/** Sets the documents to specify as part of the replication. */
+@property (copy) NSArray *doc_ids;
+
+/** Sets the "user_ctx" property of the replication, which identifies what privileges it will run with when accessing the local server. To replicate design documents, this should be set to a value with "_admin" in the list of roles.
+ The server will not let you specify privileges you don't have, so the request to create the replication must be made with credentials that match what you're setting here, unless the server is in no-authentication "admin party" mode.
+ See <https://gist.github.com/832610>, section 8, for details.
+ If both 'user' and 'roles' are nil, the user_ctx will be cleared.
+ @param user A server username, or nil
+ @param roles An array of CouchDB role name strings, or nil */
+- (void) actAsUser: (NSString*)username withRoles: (NSArray*)roles;
+
+/** A convenience that calls -actAsUser:withRoles: to specify the _admin role. */
+- (void) actAsAdmin;
+
+/** Restarts a replication; this is most useful to make a non-continuous replication run again after it's stopped. */
+- (void) restart;
+
/** The current state of replication activity. */
@property (readonly) CouchReplicationState state;
@@ -61,4 +83,8 @@ typedef enum {
/** The total number of changes to be processed, if the task is active, else 0 (observable). */
@property (nonatomic, readonly) unsigned total;
+@property (nonatomic, readonly, retain) NSError* error;
+
+@property (nonatomic, readonly) CouchReplicationMode mode;
+
@end
View
29 Frameworks/CouchCocoa.framework/Headers/CouchQuery.h
@@ -18,12 +18,23 @@
@class CouchLiveQuery, CouchQueryEnumerator, CouchQueryRow;
+/** Options for CouchQuery.stale property, to allow out-of-date results to be returned. */
+typedef enum {
+ kCouchStaleNever, /**< Never return stale view results (default) */
+ kCouchStaleOK, /**< Return stale results as long as view is already populated */
+ kCouchStaleUpdateAfter /**< Return stale results, then update view afterwards */
+} CouchStaleness;
+
+
/** Represents a CouchDB 'view', or a view-like resource like _all_documents. */
@interface CouchQuery : CouchResource
{
@private
NSUInteger _limit, _skip;
id _startKey, _endKey;
+ NSString* _startKeyDocID;
+ NSString* _endKeyDocID;
+ CouchStaleness _stale;
BOOL _descending, _prefetch;
NSArray *_keys;
NSUInteger _groupLevel;
@@ -48,6 +59,17 @@
/** If non-nil, the key value to end after. */
@property (copy) id endKey;
+/** If non-nil, the document ID to start at.
+ (Useful if the view contains multiple identical keys, making .startKey ambiguous.) */
+@property (copy) NSString* startKeyDocID;
+
+/** If non-nil, the document ID to end at.
+ (Useful if the view contains multiple identical keys, making .endKey ambiguous.) */
+@property (copy) NSString* endKeyDocID;
+
+/** If set, allows faster results at the expense of returning possibly out-of-date data. */
+@property CouchStaleness stale;
+
/** If non-nil, the query will fetch only the rows with the given keys. */
@property (copy) NSArray* keys;
@@ -137,8 +159,15 @@
@property (readonly) id key;
@property (readonly) id value;
+/** The ID of the document described by this view row.
+ (This is not necessarily the same as the document that caused this row to be emitted; see the discussion of the .sourceDocumentID property for details.) */
@property (readonly) NSString* documentID;
+/** The ID of the document that caused this view row to be emitted.
+ This is the value of the "id" property of the JSON view row.
+ It will be the same as the .documentID property, unless the map function caused a related document to be linked by adding an "_id" key to the emitted value; in this case .documentID will refer to the linked document, while sourceDocumentID always refers to the original document. */
+@property (readonly) NSString* sourceDocumentID;
+
/** The revision ID of the document this row was mapped from. */
@property (readonly) NSString* documentRevision;
View
41 Frameworks/CouchCocoa.framework/Headers/CouchReplication.h
@@ -18,35 +18,58 @@
@class CouchDatabase, RESTOperation;
-/** Option flags for replication (push/pull). */
-enum {
- kCouchReplicationCreateTarget = 1, /**< Create the destination database if it doesn't exist */
- kCouchReplicationContinuous = 2, /**< Continuous mode; remains active till canceled */
-};
-typedef NSUInteger CouchReplicationOptions;
+typedef enum {
+ kCouchReplicationStopped,
+ kCouchReplicationOffline,
+ kCouchReplicationIdle,
+ kCouchReplicationActive
+} CouchReplicationMode;
/** Tracks a CouchDB replication. Can be used to observe its progress. */
@interface CouchReplication : NSObject
{
CouchDatabase* _database;
NSURL* _remote;
- BOOL _pull;
- CouchReplicationOptions _options;
+ bool _pull, _createTarget, _continuous;
+ NSString* _filter;
+ NSDictionary* _filterParams;
BOOL _running;
NSString* _taskID;
NSString* _status;
unsigned _completed, _total;
+ CouchReplicationMode _mode;
NSError* _error;
}
+/** Should the target database be created if it doesn't already exist? (Defaults to NO). */
+@property (nonatomic) bool createTarget;
+
+/** Should the replication operate continuously, copying changes as soon as the source database is modified? (Defaults to NO). */
+@property (nonatomic) bool continuous;
+
+/** Path of an optional filter function to run on the source server.
+ Only documents for which the function returns true are replicated.
+ The path looks like "designdocname/filtername". */
+@property (nonatomic, copy) NSString* filter;
+
+/** Parameters to pass to the filter function.
+ Should be a JSON-compatible dictionary. */
+@property (nonatomic, copy) NSDictionary* filterParams;
+
+
/** Starts the replication, asynchronously.
@return The operation to start replication, or nil if replication is already started. */
- (RESTOperation*) start;
/** Stops replication, asynchronously. */
- (void) stop;
+@property (nonatomic, readonly) NSURL* remoteURL;
+
+/** Does the replication pull from (as opposed to push to) the target? */
+@property (nonatomic, readonly) bool pull;
+
@property (nonatomic, readonly) BOOL running;
/** The current status string from the server, if active, else nil (observable).
@@ -61,4 +84,6 @@ typedef NSUInteger CouchReplicationOptions;
@property (nonatomic, readonly, retain) NSError* error;
+@property (nonatomic, readonly) CouchReplicationMode mode;
+
@end
View
3 Frameworks/CouchCocoa.framework/Headers/CouchServer.h
@@ -25,6 +25,7 @@
RESTResource* _activityRsrc;
int _activeTasksObserverCount;
NSArray* _activeTasks;
+ RESTOperation* _activeTasksOp;
NSTimer* _activityPollTimer;
CouchLiveQuery* _replicationsQuery;
}
@@ -55,6 +56,8 @@
This is updated asynchronously while the activityPollInterval is nonzero. */
@property (nonatomic, readonly, retain) NSArray* activeTasks;
+- (void) checkActiveTasks;
+
/** How often to poll the server's list of active tasks and update .activeTasks. */
@property NSTimeInterval activityPollInterval;
View
10 Frameworks/CouchCocoa.framework/Headers/CouchUITableSource.h
@@ -61,10 +61,20 @@
@protocol CouchUITableDelegate <UITableViewDelegate>
@optional
+/** Allows delegate to return its own custom cell, just like -tableView:cellForRowAtIndexPath:.
+ If this returns nil the table source will create its own cell, as if this method were not implemented. */
+- (UITableViewCell *)couchTableSource:(CouchUITableSource*)source
+ cellForRowAtIndexPath:(NSIndexPath *)indexPath;
+
/** Called after the query's results change, before the table view is reloaded. */
- (void)couchTableSource:(CouchUITableSource*)source
willUpdateFromQuery:(CouchLiveQuery*)query;
+/** Called after the query's results change to update the table view. If this method is not implemented by the delegate, reloadData is called on the table view.*/
+- (void)couchTableSource:(CouchUITableSource*)source
+ updateFromQuery:(CouchLiveQuery*)query
+ previousRows:(NSArray *)previousRows;
+
/** Called from -tableView:cellForRowAtIndexPath: just before it returns, giving the delegate a chance to customize the new cell. */
- (void)couchTableSource:(CouchUITableSource*)source
willUseCell:(UITableViewCell*)cell
View
3 Frameworks/CouchCocoa.framework/Headers/RESTBody.h
@@ -86,6 +86,9 @@
/** Converts an object to a JSON string.
JSON 'fragments' (NSString / NSNumber) are allowed. Returns nil on nil input. */
+ (NSString*) stringWithJSONObject: (id)obj;
+/** Converts an object to a pretty-printed JSON string.
+ JSON 'fragments' (NSString / NSNumber) are allowed. Returns nil on nil input. */
++ (NSString*) prettyStringWithJSONObject: (id)obj;
/** Parses JSON data into a Foundation object tree.
If parsing fails, returns nil. */
+ (id) JSONObjectWithData: (NSData*)data;
View
8 Frameworks/CouchCocoa.framework/Headers/RESTOperation.h
@@ -96,6 +96,11 @@ typedef void (^OnCompleteBlock)();
@return YES on success, NO on error. */
- (BOOL) wait;
+/** Same as -wait but also returns any resulting error in the outError parameter.
+ This is useful if the receiver is an intermediate value not accessible in a variable, for instance if you do something like
+ [[resource GET] wait: &error] */
+- (BOOL) wait: (NSError**)outError;
+
/** Blocks until all of the given operations have finished.
@param operations A set of RESTOperations.
@return YES if all operations succeeded; NO if any of them failed. */
@@ -129,6 +134,9 @@ typedef void (^OnCompleteBlock)();
/** The body of the response, with its entity headers (Synchronous.) */
@property (readonly) RESTBody* responseBody;
+/** The raw NSHTTPURLResponse object, in case you need it. */
+@property (readonly) NSHTTPURLResponse* response;
+
/** Object associated with this response.
A client can store anything it wants here, typically a value parsed from or represented by the response body; often this property will be set by an onCompletion block. */
View
26 Frameworks/CouchCocoa.framework/Headers/RESTResource.h
@@ -15,6 +15,7 @@
#import <Foundation/Foundation.h>
@class RESTCache, RESTOperation;
+@protocol RESTResourceDelegate;
/** Represents an HTTP resource identified by a specific URL.
@@ -27,13 +28,15 @@
RESTResource* _parent;
NSString* _relativePath;
RESTCache* _owningCache;
+ id<RESTResourceDelegate> _delegate;
NSMutableSet* _activeOperations;
NSString* _eTag;
NSString* _lastModified;
NSURL* _cachedURL;
NSURLCredential* _credential;
+ NSURLProtectionSpace* _protectionSpace;
}
/** Creates an instance with an absolute URL and no parent. */
@@ -54,9 +57,15 @@
/** The relative path from the parent (as given in the initializer.) */
@property (readonly) NSString* relativePath;
-/** Sets the login credential (e.g. username/password) to be used for authentication by this resource and its children. */
+@property (assign, nonatomic) id<RESTResourceDelegate> delegate;
+
+/** Sets the login credential (e.g. username/password) to be used for authentication by this resource and its children.
+ IMPORTANT: CouchDB's default configuration unfortunately doesn't support this type of programmatic auth. To make it work, you'll need to add a "WWW-Authenticate" property to the server's [httpd] configuration section, as described at <https://groups.google.com/d/msg/mobile-couchbase/GiSnos0Hx54/q5JGepLaQBgJ>. */
- (void) setCredential: (NSURLCredential*)credential;
+/** Sets a protection space for operations on this resource. */
+- (void) setProtectionSpace: (NSURLProtectionSpace*)protectionSpace;
+
#pragma mark HTTP METHODS:
/** Starts an asynchronous HTTP GET operation, with no parameters.
@@ -144,3 +153,18 @@
- (void) createdByPOST: (RESTOperation*)op;
@end
+
+
+/** An object that registers as the delegate of a RESTResource.
+ The delegate will be called by the resource it's attached to, and by all child resources. If multiple resources in the hierarchy have delegates, the child resources' delegates are called before their parents'. */
+@protocol RESTResourceDelegate <NSObject>
+
+/** Called immediately before a resource sends a request.
+ The delegate may modify the request, carefully. For example, it could add headers. */
+- (void) resource: (RESTResource*)resource willSendRequest: (NSMutableURLRequest*)request;
+
+/** Called immediately after a response arrives, before the associated RESTOperation's onCompletion block.
+ This is called even for responses that contain HTTP errors, though not for ones that fail below the HTTP layer (i.e. unreachable host.) */
+- (void) resource: (RESTResource*)resource didReceiveResponse: (NSHTTPURLResponse*)response;
+
+@end
View
BIN Frameworks/CouchCocoa.framework/Info.plist
Binary file not shown.
View
BIN Frameworks/Couchbase.framework/Couchbase
Binary file not shown.
View
159 Frameworks/Couchbase.framework/CouchbaseResources/default.ini
@@ -1,159 +0,0 @@
-;
-; default.ini
-; Couchbase Mobile
-;
-; Copyright 2011 Couchbase, Inc.
-;
-; 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.
-;
-; Upgrading CouchDB will overwrite this file.
-
-[couchdb]
-;; This will be statically linked anyway, so will be ignored
-util_driver_dir = meh
-max_document_size = 4294967296 ; 4 GB
-max_attachment_chunk_size = 4294967296 ; 4GB
-os_process_timeout = 10000 ; 10 seconds. for view and external servers.
-max_dbs_open = 100
-delayed_commits = true ; set this to false to ensure an fsync before 201 Created is returned
-
-[httpd]
-port = 0
-bind_address = 0.0.0.0
-max_connections = 256
-authentication_handlers = {couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}
-default_handler = {couch_httpd_db, handle_request}
-secure_rewrites = true
-vhost_global_handlers = _utils, _uuids, _session, _oauth, _users
-allow_jsonp = false
-
-[ssl]
-port = 6984
-
-[log]
-level = info
-include_sasl = false
-
-[couch_httpd_auth]
-authentication_db = _users
-authentication_redirect = /_utils/session.html
-require_valid_user = false
-timeout = 600 ; number of seconds before automatic logout
-auth_cache_size = 50 ; size is number of cache entries
-
-[view_servers]
-javascript = {couch_view_server_emonk, nil}
-erlang = {couch_view_server_erlang, nil}
-
-[view_servers_os]
-max_processes = 32
-idle_processes = 4
-
-[app_servers]
-javascript = {couch_app_server_emonk, nil}
-erlang = {couch_app_server_erlang, nil}
-
-[query_servers]
-javascript = nocouchjs/on/iphone
-
-; Changing reduce_limit to false will disable reduce_limit.
-; If you think you're hitting reduce_limit with a "good" reduce function,
-; please let us know on the mailing list so we can fine tune the heuristic.
-[query_server_config]
-reduce_limit = true
-os_process_limit = 25
-
-; enable external as an httpd handler, then link it with commands here.
-; note, this api is still under consideration.
-; [external]
-; mykey = /path/to/mycommand
-
-[daemons]
-view_manager={couch_view, start_link, []}
-external_manager={couch_external_manager, start_link, []}
-query_servers={couch_query_servers, start_link, []}
-vhosts={couch_httpd_vhost, start_link, []}
-; view_server_os={couch_view_server_os, start_link, []}
-httpd={couch_httpd, start_link, []}
-; stats_aggregator={couch_stats_aggregator, start, []}
-; stats_collector={couch_stats_collector, start, []}
-uuids={couch_uuids, start, []}
-auth_cache={couch_auth_cache, start_link, []}
-replication_manager={couch_replication_manager, start_link, []}
-os_daemons={couch_os_daemons, start_link, []}
-; Cannot use compaction daemon on iOS (requires checking disk space via erlang's disksup, which calls out to df, not possible on iOS
-; compaction_daemon={couch_compaction_daemon, start_link, []}
-
-[httpd_global_handlers]
-/ = {couch_httpd_misc_handlers, handle_welcome_req, <<"Welcome">>}
-_utils = {couch_httpd_misc_handlers, handle_utils_dir_req, "%localdatadir%/www"}
-_all_dbs = {couch_httpd_misc_handlers, handle_all_dbs_req}
-_active_tasks = {couch_httpd_misc_handlers, handle_task_status_req}
-_config = {couch_httpd_misc_handlers, handle_config_req}
-_replicate = {couch_httpd_replicator, handle_req}
-_uuids = {couch_httpd_misc_handlers, handle_uuids_req}
-_restart = {couch_httpd_misc_handlers, handle_restart_req}
-_stats = {couch_httpd_stats_handlers, handle_stats_req}
-_log = {couch_httpd_misc_handlers, handle_log_req}
-_session = {couch_httpd_auth, handle_session_req}
-_oauth = {couch_httpd_oauth, handle_oauth_req}
-_generate_load = {couch_internal_load_gen, handle_req}
-_view_merge = {couch_httpd_view_merger, handle_req}
-
-[httpd_db_handlers]
-_view_cleanup = {couch_httpd_db, handle_view_cleanup_req}
-_compact = {couch_httpd_db, handle_compact_req}
-_design = {couch_httpd_db, handle_design_req}
-_temp_view = {couch_httpd_view, handle_temp_view_req}
-_changes = {couch_httpd_db, handle_changes_req}
-
-; The external module takes an optional argument allowing you to narrow it to a
-; single script. Otherwise the script name is inferred from the first path section
-; after _external's own path.
-; _mypath = {couch_httpd_external, handle_external_req, <<"mykey">>}
-; _external = {couch_httpd_external, handle_external_req}
-
-[httpd_design_handlers]
-_view = {couch_httpd_view, handle_view_req}
-_show = {couch_httpd_show, handle_doc_show_req}
-_list = {couch_httpd_show, handle_view_list_req}
-_info = {couch_httpd_db, handle_design_info_req}
-_rewrite = {couch_httpd_rewrite, handle_rewrite_req}
-_update = {couch_httpd_show, handle_doc_update_req}
-
-[uuids]
-; Known algorithms:
-; random - 128 bits of random awesome
-; All awesome, all the time.
-; sequential - monotonically increasing ids with random increments
-; First 26 hex characters are random. Last 6 increment in
-; random amounts until an overflow occurs. On overflow, the
-; random prefix is regenerated and the process starts over.
-; utc_random - Time since Jan 1, 1970 UTC with microseconds
-; First 14 characters are the time in hex. Last 18 are random.
-algorithm = sequential
-
-[stats]
-; rate is in milliseconds
-rate = 1000
-; sample intervals are in seconds
-samples = [0, 60, 300, 900]
-
-[attachments]
-compression_level = 8 ; from 1 (lowest, fastest) to 9 (highest, slowest), 0 to disable compression
-compressible_types = text/*, application/javascript, application/json, application/xml
-
-[replicator]
-db = _replicator
-max_http_sessions = 10
-max_http_pipeline_size = 10
View
66 Frameworks/Couchbase.framework/CouchbaseResources/default_ios.ini
@@ -1,66 +0,0 @@
-;
-; default_ios.ini
-; Couchbase Mobile
-;
-; This file overrides default.ini.
-; It contains default configuration settings for Mobile Couchbase on iOS.
-;
-; Application-specific configuration should go into a separate .ini file in the app bundle,
-; which can then be registered by setting the CouchbaseEmbeddedServer.iniFilePath property.
-; That file will then override the settings here.
-;
-; Applications can also alter the configuration persistently at runtime by writing to the
-; server's _config URI.
-;
-; This file is preprocessed before being shown to CouchDB:
-; $INSTALLDIR --> Application's 'Documents' directory
-; $BUNDLEDIR --> The "CouchbaseResources" directory in the app bundle
-; $LOGLEVEL --> The log level CouchDB should use ('none' or 'info')
-;
-
-[couchdb]
-database_dir = $INSTALLDIR/couchdb
-view_index_dir = $INSTALLDIR/couchdb
-uri_file = $INSTALLDIR/couch.uri
-
-[log]
-level = $LOGLEVEL
-file = $INSTALLDIR/log/couch.log
-
-[view_server_emonk]
-num_threads = 2
-mapred_js = $BUNDLEDIR/erlang/emonk_mapred.js
-
-[view_servers]
-objc = {couch_view_server_objc, nil}
-
-[app_servers]
-objc = {couch_app_server_objc, nil}
-
-[app_server_emonk]
-source = $BUNDLEDIR/erlang/emonk_app.js
-
-[httpd_global_handlers]
-favicon.ico = {couch_httpd_misc_handlers, handle_favicon_req, "$INSTALLDIR/utils"}
-_utils = {couch_httpd_misc_handlers, handle_utils_dir_req, "$INSTALLDIR/utils"}
-
-[daemons]
-ios_driver={couch_ios, start_link, []}
-
-[httpd]
-bind_address = 127.0.0.1 ; only local clients: will not accept HTTP connections over WiFi
-port = 0 ; means server will pick an available port when it starts
-
-[daemons]
-spatial_manager={couch_spatial, start_link, []}
-
-[httpd_db_handlers]
-_spatial_cleanup = {couch_httpd_spatial, handle_spatial_cleanup_req}
-
-[httpd_design_handlers]
-_spatial = {couch_httpd_spatial, handle_spatial_req}
-_spatial/_list = {couch_httpd_spatial_list, handle_spatial_list_req}
-_spatial/_info = {couch_httpd_spatial, handle_design_info_req}
-_spatial/_compact = {couch_httpd_spatial, handle_compact_req}
-;deprecated API
-_spatiallist = {couch_httpd_spatial_list, handle_spatial_list_req_deprecated}
View
BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/bin/start.boot
Binary file not shown.
View
BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/bin/start_clean.boot
Binary file not shown.
View
BIN Frameworks/Couchbase.framework/CouchbaseResources/erlang/bin/start_sasl.boot
Binary file not shown.
View
756 Frameworks/Couchbase.framework/CouchbaseResources/erlang/emonk_app.js
@@ -1,756 +0,0 @@
-// 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 resolveModule = function(names, mod, root) {
- if (names.length == 0) {
- if (typeof mod.current != "string") {
- throw ["error","invalid_require_path",
- 'Must require a JavaScript string, not: '+(typeof mod.current)];
- }
- return {
- current : mod.current,
- parent : mod.parent,
- id : mod.id,
- exports : {}
- };
- }
- // we need to traverse the path
- var n = names.shift();
- if (n == '..') {
- if (!(mod.parent && mod.parent.parent)) {
- throw ["error", "invalid_require_path", 'Object has no parent '+JSON.stringify(mod.current)];
- }
- return resolveModule(names, {
- id : mod.id.slice(0, mod.id.lastIndexOf('/')),
- parent : mod.parent.parent,
- current : mod.parent.current
- });
- } else if (n == '.') {
- if (!mod.parent) {
- throw ["error", "invalid_require_path", 'Object has no parent '+JSON.stringify(mod.current)];
- }
- return resolveModule(names, {
- parent : mod.parent,
- current : mod.current,
- id : mod.id
- });
- } else if (root) {
- mod = {current : root};
- }
- if (!mod.current[n]) {
- throw ["error", "invalid_require_path", 'Object has no property "'+n+'". '+JSON.stringify(mod.current)];
- }
- return resolveModule(names, {
- current : mod.current[n],
- parent : mod,
- id : mod.id ? mod.id + '/' + n : n
- });
-};
-
-var Couch = {
- // moving this away from global so we can move to json2.js later
- toJSON : function (val) {
- return JSON.stringify(val);
- },
- compileFunction : function(source, ddoc) {
- if (!source) throw(["error","not_found","missing function"]);
-
- var evaluate_function_source = function(source, evalFunction, sandbox) {
- sandbox = sandbox || {};
- if(typeof CoffeeScript === "undefined") {
- return evalFunction(source, sandbox);
- } else {
- coffee = CoffeeScript.compile(source, {bare: true});
- return evalFunction(coffee, sandbox);
- }
- }
-
- try {
- if (sandbox) {
- if (ddoc) {
- if (!ddoc._module_cache) {
- ddoc._module_cache = {};
- }
- var require = function(name, module) {
- module = module || {};
- var newModule = resolveModule(name.split('/'), module.parent, ddoc);
- if (!ddoc._module_cache.hasOwnProperty(newModule.id)) {
- // create empty exports object before executing the module,
- // stops circular requires from filling the stack
- ddoc._module_cache[newModule.id] = {};
- var s = "function (module, exports, require) { " + newModule.current + " }";
- try {
- var func = sandbox ? evalcx(s, sandbox) : eval(s);
- func.apply(sandbox, [newModule, newModule.exports, function(name) {
- return require(name, newModule);
- }]);
- } catch(e) {
- throw ["error","compilation_error","Module require('"+name+"') raised error "+e.toSource()];
- }
- ddoc._module_cache[newModule.id] = newModule.exports;
- }
- return ddoc._module_cache[newModule.id];
- };
- sandbox.require = require;
- }
- var functionObject = evaluate_function_source(source, evalcx, sandbox);
- } else {
- var functionObject = evaluate_function_source(source, eval);
- }
- } catch (err) {
- throw(["error", "compilation_error", err.toSource() + " (" + source + ")"]);
- };
- if (typeof(functionObject) == "function") {
- return functionObject;
- } else {
- throw(["error","compilation_error",
- "Expression does not eval to a function. (" + source.toSource() + ")"]);
- };
- },
- recursivelySeal : function(obj) {
- // seal() is broken in current Spidermonkey
- try {
- seal(obj);
- } catch (x) {
- // Sealing of arrays broken in some SpiderMonkey versions.
- // https://bugzilla.mozilla.org/show_bug.cgi?id=449657
- }
- for (var propname in obj) {
- if (typeof obj[propname] == "object") {
- arguments.callee(obj[propname]);
- }
- }
- }
-};
-
-// prints the object as JSON, and rescues and logs any toJSON() related errors
-function respond(obj) {
- try {
- print(Couch.toJSON(obj));
- } catch(e) {
- log("Error converting object to JSON: " + e.toString());
- log("error on obj: "+ obj.toSource());
- }
-};
-
-function log(message) {
- // idea: query_server_config option for log level
- if (typeof message == "xml") {
- message = message.toXMLString();
- } else if (typeof message != "string") {
- message = Couch.toJSON(message);
- }
- respond(["log", String(message)]);
-};
-
-function isArray(obj) {
- return toString.call(obj) === "[object Array]";
-}
-// 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 ddoc = null;
-var sandbox = null;
-var compiled = {};
-var started = false;
-var finished = false;
-var start_resp = {};
-var row = null;
-var chunks = [];
-var view_did_emit = false;
-
-//
-// Erlang Functions
-//
-
-var init = function(ctx_ddoc) {
- try {
- ddoc = ctx_ddoc;
- init_sandbox();
- return true;
- } catch(e) {
- return handleError(e);
- }
-};
-
-var show_doc = function(fname, doc, req) {
- try {
- resetState();
-
- var func = get_func(["shows", fname])
- var resp = func.apply(ddoc, [doc, req]) || {};
-
- if(chunks.length && chunks.length > 0) {
- resp = wrapResp(resp);
- resp.headers = resp.headers || {};
- for(var header in start_resp) {
- resp.headers[header] = start_resp[header];
- }
- resp.body = chunks.join("") + (resp.body || "");
- }
-
- if(Mime.providesUsed) {
- resp = Mime.runProvides(req);
- resp = setContentType(wrapResp(resp), Mime.responseContentType);
- }
-
- if (typeOf(resp) == 'object' || typeOf(resp) == 'string') {
- return ["resp", wrapResp(resp)];
- } else {
- throw(["error", "render_error", "show function returned invalid value."]);
- }
- } catch(e) {
- log("ERROR: " + JSON.stringify(e));
- if (doc === null && req.path) {
- return handleError(["error", "not_found", "document not found"]);
- } else {
- return handleError(e);
- }
- }
-};
-
-var list_view = function(fname, head, req) {
- try {
- resetState();
- var func = get_func(["lists", fname]);
- var tail = func.apply(ddoc, [head, req]);
- if(Mime.providesUsed) tail = Mime.runProvides(req);
- if(!started) getRow();
- if(typeof tail != "undefined") chunks.push(tail);
- return chunks;
- } catch(e) {
- return handleError(e);
- }
-};
-
-var update_doc = function(fname, doc, req) {
- try {
- if(req.method == "GET") {
- throw(["error","method_not_allowed","Update functions do not allow GET"]);
- }
- var func = get_func(["updates", fname]);
- var result = func.apply(ddoc, [doc, req]);
- var doc = result[0];
- var resp = result[1];
- if(typeOf(resp) === "object" || typeOf(resp) === "string") {
- return [doc, wrapResp(resp)];
- } else {
- throw(["error", "render_error", "update function returned bad value."]);
- }
- } catch(e) {
- return handleError(e);
- }
-};
-
-var validate_update = function(editdoc, diskdoc, ctx, secobj) {
- try {
- var func = get_func(["validate_doc_update"]);
- func.apply(ddoc, [editdoc, diskdoc, ctx, secobj]);
- return 1;
- } catch(e) {
- return e;
- }
-};
-
-var filter_docs = function(fname, docs, req) {
- try {
- var func = get_func(["filters", fname]);
- var results = [];
- for(var i = 0; i < docs.length; i++) {
- results.push((func.apply(ddoc, [docs[i], req]) && true) || false);
- }
- return results;
- } catch(e) {
- return handleError(e);
- }
-};
-
-var filter_view = function(vname, docs) {
- try {
- var func = get_func(["views", vname, "map"]);
- var results = [];
- for(var i = 0; i < docs.length; i++) {
- view_did_emit = false;
- func.apply(ddoc, [docs[i]]);
- results.push(view_did_emit);
- }
- return results;
- } catch(e) {
- return handleError(e);
- }
-};
-
-//
-// Sandbox Functions
-//
-
-var init_sandbox = function() {
- try {
- sandbox = erlang.evalcx("");
- sandbox.log = log;
- sandbox.JSON = JSON;
- sandbox.toJSON = JSON.stringify;
- sandbox.provides = Mime.provides;
- sandbox.registerType = Mime.registerType;
- sandbox.start = start;
- sandbox.send = send;
- sandbox.getRow = getRow;
- sandbox.require = require;
- sandbox.isArray = isArray;
- sandbox.emit = emit;
- } catch(e) {
- throw(e);
- }
-};
-
-var log = function(msg) {
- erlang.send(["log", msg]);
-}
-
-var require = function(name, parent) {
- parent = parent || {};
- var resolved = resolve(name.split("/"), parent.actual, ddoc, parent.id);
- var src = "function(module, exports, require) {" + resolved[0] + "}";
- var func = erlang.evalcx(src, sandbox);
- var module = {"id": resolved[2], "actual": resolved[1], "exports": []};
-
- try {
- var reqfunc = function(name) {return require(name, module);};
- func.apply(null, [module, module.exports, reqfunc]);
- } catch(e) {
- var msg = "require('" + name + "') raised error " + e.toSource();
- throw(["error", "compilation_error", msg]);
- }
-
- return module.exports;
-};
-
-var start = function(resp) {
- start_resp = resp || {};
-};
-
-var send = function(chunk) {
- chunks.push(chunk.toString());
-};
-
-var getRow = function() {
- if(finished) return null;
-
- if(!started) {
- started = true;
- sendStart();
- } else {
- sendChunks();
- }
-
- if(row[0] === "list_end") {
- finished = true;
- return null;
- };
-
- if(row[0] != "list_row") {
- throw(["fatal", "list_error", "not a row '" + row[0] + "'"]);
- }
-
- return row[1];
-};
-
-var emit = function() {
- view_did_emit = true;
-};
-
-//
-// Internal Functions
-//
-
-var typeOf = function(value) {
- var t = typeof value;
- if(t === "object") {
- if(value && value instanceof Array) {
- return "array";
- } else if(!value) {
- return "null";
- }
- }
- return t;
-};
-
-var resetState = function() {
- started = false;
- finished = false;
- start_resp = {};
- row = null;
- chunks = [];
- Mime.resetProvides();
-};
-
-var handleError = function(e) {
- var type = e[0];
- if(type == "fatal") {
- e[0] = "error";
- return e;
- } else if(type === "error") {
- return e;
- } else if(e.error && e.reason) {
- return ["error", e.error, e.reason];
- } else {
- return ["error", "unnamed_error", e.toSource()];
- }
-};
-
-var wrapResp = function(resp) {
- var type = typeOf(resp);
- if((type === "string") || (type === "xml")) {
- return {"body": resp};
- } else {
- return resp;
- }
-};
-
-var setContentType = function(resp, ctype) {
- resp["headers"] = resp["headers"] || {};
- if(ctype) {
- ctype = resp["headers"]["Content-Type"] || ctype;
- resp["headers"]["Content-Type"] = ctype;
- }
- return resp;
-};
-
-var sendStart = function() {
- start_resp = setContentType(start_resp || {}, Mime.responseContentType);
- row = erlang.send([chunks, start_resp]);
- chunks = [];
- resp = {};
-};
-
-var sendChunks = function(label) {
- row = erlang.send(chunks);
- chunks = [];
-};
-
-var resolve = function(names, parent, current, path) {
- if(names.length == 0) {
- if(typeof current != "string") {
- throw(["error", "bad_require_path", "Require paths must be a string."]);
- }
- return [current, parent, path];
- }
-
- var n = names.shift();
- if(n == '..') {
- if(!(parent && parent.parent)) {
- var obj = JSON.stringify(current);
- throw(["error", "bad_require_path", "Object has no parent: " + obj]);
- }
- path = path.slice(0, path.lastIndexOf("/"));
- return resolve(names, parent.parent.parent, parent.parent, path);
- } else if(n == ".") {
- if(!parent) {
- var obj = JSON.stringify(current);
- throw(["error", "bad_require_path", "Object has no parent: " + obj]);
- }
- return resolve(names, parent.parent, parent, path);
- }
-
- if(!current[n]) {
- throw(["error", "bad_require_path", "No such property " + n + ": " + obj]);
- }
-
- var p = current;
- current = current[n];
- current.parent = p;
- path = path ? path + '/' + n : n;
- return resolve(names, p, current, path);
-};
-
-var get_func = function(path) {
- curr = ddoc;
- comp = compiled;
- for(var i = 0; i < path.length-1; i++) {
- if(!curr[path[i]]) {
- throw(["error", "not_found", "Missing function: " + path.join(".")]);
- }
- curr = curr[path[i]];
- comp[path[i]] = comp[path[i]] || {};
- comp = comp[path[i]];
- }
- var i = path.length - 1;
- if(!curr[path[i]]) {
- throw(["error", "not_found", "Missing function: " + path.join(".")]);
- }
- comp[path[i]] = erlang.evalcx(curr[path[i]], sandbox);
- return comp[path[i]];
-}
-
-var Mime = (function() {
- var mimesByKey = {};
- var keysByMime = {};
- function registerType() {
- var mimes = [], key = arguments[0];
- for (var i=1; i < arguments.length; i++) {
- mimes.push(arguments[i]);
- };
- mimesByKey[key] = mimes;
- for (var i=0; i < mimes.length; i++) {
- keysByMime[mimes[i]] = key;
- };
- }
-
- registerType("all", "*/*");
- registerType("text", "text/plain; charset=utf-8", "txt");
- registerType("html", "text/html; charset=utf-8");
- registerType("xhtml", "application/xhtml+xml", "xhtml");
- registerType("xml", "application/xml", "text/xml", "application/x-xml");
- registerType("js", "text/javascript", "application/javascript", "application/x-javascript");
- registerType("css", "text/css");
- registerType("ics", "text/calendar");
- registerType("csv", "text/csv");
- registerType("rss", "application/rss+xml");
- registerType("atom", "application/atom+xml");
- registerType("yaml", "application/x-yaml", "text/yaml");
- registerType("multipart_form", "multipart/form-data");
- registerType("url_encoded_form", "application/x-www-form-urlencoded");
- registerType("json", "application/json", "text/x-json");
-
- var mimeFuns = [];
- function provides(type, fun) {
- Mime.providesUsed = true;
- mimeFuns.push([type, fun]);
- };
-
- function resetProvides() {
- // set globals
- Mime.providesUsed = false;
- mimeFuns = [];
- Mime.responseContentType = null;
- };
-
- function runProvides(req) {
- var supportedMimes = [],
- bestFun,
- bestKey = null,
- accept = req.headers["Accept"];
-
- if (req.query && req.query.format) {
- bestKey = req.query.format;
- Mime.responseContentType = mimesByKey[bestKey][0];
- } else if (accept) {
- // log("using accept header: "+accept);
- mimeFuns.reverse().forEach(function(mimeFun) {
- var mimeKey = mimeFun[0];
- if (mimesByKey[mimeKey]) {
- supportedMimes = supportedMimes.concat(mimesByKey[mimeKey]);
- }
- });
- Mime.responseContentType = Mimeparse.bestMatch(supportedMimes, accept);
- bestKey = keysByMime[Mime.responseContentType];
- } else {
- // just do the first one
- bestKey = mimeFuns[0][0];
- Mime.responseContentType = mimesByKey[bestKey][0];
- }
-
- if (bestKey) {
- for (var i=0; i < mimeFuns.length; i++) {
- if (mimeFuns[i][0] == bestKey) {
- bestFun = mimeFuns[i][1];
- break;
- }
- };
- };
-
- if (bestFun) {
- return bestFun();
- } else {
- var supportedTypes = mimeFuns.map(function(mf) {
- return mimesByKey[mf[0]].join(', ') || mf[0]
- });
- var msg = "Content-Type " + (accept||bestKey) +
- " not supported, try one of: "+supportedTypes.join(', ');
- throw(["error","not_acceptable", msg]);
- }
- };
-
- return {
- registerType : registerType,
- provides : provides,
- resetProvides : resetProvides,
- runProvides : runProvides
- }
-})();
-
-// This module provides basic functions for handling mime-types. It can
-// handle matching mime-types against a list of media-ranges. See section
-// 14.1 of the HTTP specification [RFC 2616] for a complete explanation.
-//
-// http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
-//
-// A port to JavaScript of Joe Gregorio's MIME-Type Parser:
-//
-// http://code.google.com/p/mimeparse/
-//
-// Ported by J. Chris Anderson <jchris@apache.org>, targeting the Spidermonkey runtime.
-//
-// To run the tests, open mimeparse-js-test.html in a browser.
-// Ported from version 0.1.2
-// Comments are mostly excerpted from the original.
-
-var Mimeparse = (function() {
- // private helpers
- function strip(string) {
- return string.replace(/^\s+/, '').replace(/\s+$/, '')
- };
-
- function parseRanges(ranges) {
- var parsedRanges = [], rangeParts = ranges.split(",");
- for (var i=0; i < rangeParts.length; i++) {
- parsedRanges.push(publicMethods.parseMediaRange(rangeParts[i]))
- };
- return parsedRanges;
- };
-
- var publicMethods = {
- // Carves up a mime-type and returns an Array of the
- // [type, subtype, params] where "params" is a Hash of all
- // the parameters for the media range.
- //
- // For example, the media range "application/xhtml;q=0.5" would
- // get parsed into:
- //
- // ["application", "xhtml", { "q" : "0.5" }]
- parseMimeType : function(mimeType) {
- var fullType, typeParts, params = {}, parts = mimeType.split(';');
- for (var i=0; i < parts.length; i++) {
- var p = parts[i].split('=');
- if (p.length == 2) {
- params[strip(p[0])] = strip(p[1]);
- }
- };
- fullType = parts[0].replace(/^\s+/, '').replace(/\s+$/, '');
- if (fullType == '*') fullType = '*/*';
- typeParts = fullType.split('/');
- return [typeParts[0], typeParts[1], params];
- },
-
- // Carves up a media range and returns an Array of the
- // [type, subtype, params] where "params" is a Object with
- // all the parameters for the media range.
- //
- // For example, the media range "application/*;q=0.5" would
- // get parsed into:
- //
- // ["application", "*", { "q" : "0.5" }]
- //
- // In addition this function also guarantees that there
- // is a value for "q" in the params dictionary, filling it
- // in with a proper default if necessary.
- parseMediaRange : function(range) {
- var q, parsedType = this.parseMimeType(range);
- if (!parsedType[2]['q']) {
- parsedType[2]['q'] = '1';
- } else {