Upgrade to latest libcouchbase API (fixes build)

Change-Id: Ib6cf61c7e72f242012c412dd3cb834508c369518
Reviewed-on: http://review.couchbase.org/21544
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Remove compiler warnings

Part of the code for building up error messages used the
wrong formatting options.

Change-Id: I1ac360d51bdb942452e168a49f6bfe66b0837b58
Reviewed-on: http://review.couchbase.org/21811
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Update to use the names in the current lcb api

We changed the name of the function related to the http
callbacks so that they are generic.

Change-Id: I488ac49f7b1ae98570b149983d0e3778b02c10e0
Reviewed-on: http://review.couchbase.org/21812
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Update metadata for 1.1.0-dp5 release.

Change-Id: Ie3638591923d03ab8f855c0c0b7fea6dff59ab3b
Reviewed-on: http://review.couchbase.org/21854
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Help editors print the correct size of the tabs

Change-Id: Ia811e1034b8480a0887d3d00f172edabe3de12c7
Reviewed-on: http://review.couchbase.org/21874
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Build views.c as a separate file

Change-Id: I92a9f29fd0d356cfb3cd0e5d3d05a81e6e16f7e1
Reviewed-on: http://review.couchbase.org/21875
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Sort .gitignore

Change-Id: I97ab0ad4c0bf39de42eb9e7356c2ea42062abae1
Reviewed-on: http://review.couchbase.org/21876
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Ignore files generated by build and tests

Change-Id: I094d950c928cd88e43f97d2cd5aa5ce508014dc6
Reviewed-on: http://review.couchbase.org/21877
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Improve the textual description of a configure printout

Previously one could interpret the:

Checking for zlib... no

in such a way that zlib wasn't found, but it actually means
that the user didn't add --with-zlib=

Change-Id: I2064c8811f54b486e4b19fb8c4c0aeaa67e4d2fd
Reviewed-on: http://review.couchbase.org/21916
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Use the same search path for libcouchbase and zlib

And add /usr/pkg (pkgsrc default) as part of this path

Change-Id: I54a29a153755ae82af4726f69be8cb9972da5ebf
Reviewed-on: http://review.couchbase.org/21917
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Improve the readability for the checks for zlib and fastlz

Change-Id: I95929288792d5463c675e7cc089cfb66eed1ff24
Reviewed-on: http://review.couchbase.org/21918
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Remove the dependency to libvbucket for win32

Change-Id: Ib0344cd499dbf69ce6e10b6b5efc0b1f0c084363
Reviewed-on: http://review.couchbase.org/22193
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
The code needs to be C89 compatible

Change-Id: If6cd01a45d5386ee57d4f0a848ae6848fd6bb865
Reviewed-on: http://review.couchbase.org/22194
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fix compression test

There was multiple errors here. First of all the code didn't work
because it didn't specify the size of the compression buffer, but
the test would never work given that we always inflate object
if we've got support for the compression algorithm even if it is
disabled for the connection.

Change-Id: I3b4dfd67c1d7f4c24ad6ac2d61288363f2d3b35a
Reviewed-on: http://review.couchbase.org/21920
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fix Delay ContentCb test

The missing assignment to $values caused a coredump when
we tried to call the destructor for a NIL pointer. We've better
guard the code for such crashes caused by incorrect php code.

Change-Id: I525c604cae27ace9ca025a7705cf7a1321ded164
Reviewed-on: http://review.couchbase.org/21921
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Michael Jackson <mjackson@omniti.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fixup constants in test due to changes in libcouchbase

Change-Id: I72a319c3667e98ea2646a2f244e9d82df7d5c29d
Reviewed-on: http://review.couchbase.org/22212
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
PCBC-140 FDs not being closed on destruction

Mark the self-created iops structure as needing cleanup by lcb
This avoids the fd leaks.

(indentation for the entire file is messed up and will be fixed in later
commits)

Change-Id: I3558aef0d1fd8d071c5c7fd3f9e86b1c424affb4
Reviewed-on: http://review.couchbase.org/22255
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Add a script to indent the source code

Change-Id: I19a41a9f4624e1a435624217f3eba2171bd92bc4
Reviewed-on: http://review.couchbase.org/22260
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
PCBC-82: Observe commands

This changeset implements the observe command in both a snapshot version
as well as a poll-till-satisfied version. The functions include

- observe
- key_durability

There remains some effectively 'stubbed' code for mutation wrappers (see
PCBC-83)

Together with this implementation comes several code infrastructure
additions and changes which are likely to serve as a basis for
subsequent refactorings. Specifically enhancements include

- associative array helper functions (ht)
- reduced boilerplate for extracting couchbase resource objects (resget)

Additionally, some informative functions (getNumReplicas, getServers)
have been added in order to test observe functionality.

Change-Id: I35b675d4c7afcc4d99f950c0ed51369c23600e22
Reviewed-on: http://review.couchbase.org/21677
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Move most of the includes to a separate header

This makes it easier to split the source into multiple
implementation files

Change-Id: Ib356fe7fe661b93391549d42e99921bff363cb20
Reviewed-on: http://review.couchbase.org/22013
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>