Don't dabble with io structure

This lets libcouchbase use its default IO options and functions.

Change-Id: I12a644bf5b96f5c1f61fdecb27106415c8b4d3fe
Reviewed-on: http://review.couchbase.org/22485
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fixup compression tests

- No longer need to check for version > 1.1 on compression
- Don't check for a 'fastlz' extension to be loaded

Change-Id: Ib5973bdb70efa0372de7093f4fd93ca7b3e5cd58
Reviewed-on: http://review.couchbase.org/22592
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Allow runwrap to use alternate locations of PHP and phpunit

Change-Id: Ib72e55fd7559a53f8c9949df3447c3fa6b05138e
Reviewed-on: http://review.couchbase.org/22615
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
PCBC-147: Fix segfault on HTTP returns without any data

Change-Id: Idc3ba6a7b9bebe686ffc334cb57d766c10d31447
Reviewed-on: http://review.couchbase.org/22573
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Sort TEST_CLASSES to reduce risk of merge conflict

Change-Id: If4106a7609357b77bdb76ff104f3ccaf333eec2c
Reviewed-on: http://review.couchbase.org/22630
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Initial bucket API

Change-Id: I539edefb5d824815cda4eb6838cc6046eaeaeb43
Reviewed-on: http://review.couchbase.org/22014
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Fix buildbreak caused by duplicate symbol

Change-Id: I8df5710d65db9bb67ecb4c863b2006afbf43d273
Reviewed-on: http://review.couchbase.org/22665
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Correct the exception type for Cluster test

It throws CouchbaseException, not ErrorException

Change-Id: I82aa56f61f6f947aa7c44fdec96d3b0c9f0395c1
Reviewed-on: http://review.couchbase.org/22670
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Move PHP glue declarations to a different file

Change-Id: I4e1c25f2e2638407835b462c08ce50b61639ca1e
Reviewed-on: http://review.couchbase.org/22617
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Refactor operation entrypoints and callbacks into their own files

There are still some 'impl' functions which live in the main couchbase.c
- these are the fairly trivial ones and may be migrated in subsequent
  commits

Change-Id: Icd28a924e7a4974950af2b3b0a6fec473b9e09d3
Reviewed-on: http://review.couchbase.org/22618
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Refactor huge php parameter boilerplate

Now the code is much easier to read

Change-Id: I4624530e21604f474f6f27c9c9f121df46323a14
Reviewed-on: http://review.couchbase.org/22620
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Make includes from management be relative

Build fails on win32 (and possibly others) without this

Change-Id: I41695c620bd7563aa5f5697c1d0464f67323419b
Reviewed-on: http://review.couchbase.org/22649
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Place connection code in its own file

Change-Id: I7717bd11997a5918456e546a19ca878d627c1eea
Reviewed-on: http://review.couchbase.org/22616
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fixup some compiler warnings

Now builds under -Wall -Werror -Wno-error=format (we need inttypes.h for
this, and it won't work on win32)

Change-Id: I2b9a1b6ce52a525a77a37deace23ec179d9aaa02
Reviewed-on: http://review.couchbase.org/22657
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
PCBC-148, PCBC-149 - Fix observe correctness

Fixes two major issues (but simple fixes) in observe:

- Persist requirements always include master if persist_to > 1
- Code was wrongly checking against replicate_to rather than persist_to

Change-Id: I6154f2ebfa3a34afe6fd51a187c3ea0af567eafe
Reviewed-on: http://review.couchbase.org/22658
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
PCBC-87, PCBC-13, PCBC-137, PCBC-57 - View Option Handling

This implements query-time checking for view options, along with
automatic serialization for keys to their uri-encoded and jsonified
equivalents.

Change-Id: I01a43abd7305e87bf0a31c94f13cf97ce7019f64
Reviewed-on: http://review.couchbase.org/22608
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Centralized json functions

-- I'm not sure we even support 5.2, but it's rather useful to have

Change-Id: I84da543a48f1d69b59db4b2141ba3ecf3fb44a7a
Reviewed-on: http://review.couchbase.org/22662
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Fixed build error from recent changeset.

Change-Id: I9e4c2daa3c8050c456b35f7e8731b1d6ff90d642
Reviewed-on: http://review.couchbase.org/22687
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Add comment sections used by editors

Given that the source use TAB for indentation we need
(or at least I need) the editor to render the TAB character
with an indent of 4.

Change-Id: I79a5f5a763bc195c8da786e46d27c3f71b74029f
Reviewed-on: http://review.couchbase.org/22699
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Fixup whitespace

Run astyle on the code to enforce our coding style guide

Change-Id: Idf5eb41cafe1ec481ea91706ba2170723e01d818
Reviewed-on: http://review.couchbase.org/22700
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>