SmokeTest: Disable terse URI for simple ENOENT test

CouchbaseMock has issues with 404 URLs for some reason.

Change-Id: Ia058e3d409ea0e79935f4aaf093f2c4735a80234
Reviewed-on: http://review.couchbase.org/38844
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
callback.c: windows build fix

Change-Id: I4a670d8d476c0c4503faee38235362670934b781
Reviewed-on: http://review.couchbase.org/38897
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Add lcb_MULTICMD_CTX for observe

This is a new 'v3' API which allows the stuffing of multiple commands
into a temporary structure, with a final 'done' phase which actually
assembles the packet. It fits well with how OBSERVE works and may be
fitted for endure in a subsequent commit.

Change-Id: If5a6478c49615355ac97bab106e58a19e1312f05
Reviewed-on: http://review.couchbase.org/38859
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Make durability operations use the new multicmd API

Change-Id: I2b6a5bc31268b7c850030e09772ba766b60eb802
Reviewed-on: http://review.couchbase.org/38898
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
General endure fixups and tidying

Change-Id: Id383d79517d0b0e01d7eb7d86107e4ccd5242452
Reviewed-on: http://review.couchbase.org/38899
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
cbc: Use the newer callbacks API

Change-Id: Ie0943e252b3ccba4982cb0189ce7669a53ed3dd9
Reviewed-on: http://review.couchbase.org/38900
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
netbuf: Fix curblocks/maxblocks

We previously didn't use these variables resulting in high amounts of
malloc/free.

Change-Id: Iaeae2f462d93707f3baec286c6231529d191c95b
Reviewed-on: http://review.couchbase.org/38925
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
api3: Remove lcb_CMDOPTIONS

Let all the options be at the same level, this lets us better optimize
the layout.

Change-Id: I4b81b35c0d68b01d8f2cb3731808d4836ba8e46d
Reviewed-on: http://review.couchbase.org/38926
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Better document v3 API

This reworks the entire api3 file (but not changing anything else in the
code) by reorgaizing the sections of the file. It also moves the more
low level buffer stuff to kvbuf.h.

Change-Id: I765b18a410c2591edecd61040e96c1d6fb16b4b5
Reviewed-on: http://review.couchbase.org/38927
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
api3/touch: command is const

Change-Id: Ie8f6c16d3a80d72d45046c8f3507a8a8ace9b51e
Reviewed-on: http://review.couchbase.org/38935
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Populate 'bufh' in get responses

This forms the basis of "Futures" for gets

Change-Id: Ifec6416601b489eb3151a69f098910535d217c8e
Reviewed-on: http://review.couchbase.org/38982
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
ioctx: Don't invoke flush_ready() callback when entered

This saves a lot of performance for being able to pipeline writes

Change-Id: Ie757d3aa700d801973c900be974b72668d829f60
CCBC-459: Add error categories for server load and server responses

[ Ported from release23 ]

This commit adds two new error classifiers:

- LCB_ERRTYPE_SRVGEN for replies which are mapped one-to-one with a
  server reply.
- LCB_ERRTYPE_SRVLOAD for replies which unequivocally indicate the
  server is under load.

Change-Id: I51b3e8a843cf48276dbd4735526f78154f502d32
api3: Normalize command names

- lcb_counter3(), lcb_CMDCOUNTER, lcb_RESPCOUNTER,
  LCB_CALLBACKTYPE_COUNTER

- lcb_remove3(), lcb_CMDREMOVE, lcb_RESPREMOVE, LCB_CALLBACKTYPE_REMOVE

Change-Id: Ieb14ed062d20736c4f03e548184bdf976f84d2a7
api3: Pass int as callbacktype, rather than enum

int is more ABI-safe and shorter to type. We should convert most of our
APIs requesting 'enum' as a type over to 'int'.. that's another story
though

Change-Id: Id20755d14744a59b9fc8313d691b70121e738cae
select: stylistic changes

While trying to fork the select plugin, I realized the original could
do with some better naming conventions and use of proper typedefs for
handler types.

None of the logic was actually changed, just some whitespace and naming
fixes:

- We should use either unqualified or sel_-prefixed functions. There is
  no reason for each function to be prefixed with lcb_io_foo. Not only
  does this make the name longer, it also makes it sound like this
  function is actually exported somewhere rather than being static.

- Use prefixed names rather than the '_t' suffix.

Change-Id: I2b7f6a50a36ddaf7e30ef00425bcfaded175ccef
Use newer fixed-width numeric typedefs in header files

We want to show a unified API system in our header files. We still have
a long way to go with other stuff, but the lcb_Uxx has proliferated most
of the codebase already so it's time to just change everything over.

Change-Id: I3890bc050b3b5a77356fcbc9e56e1c04464ef7e2
cliopts: don't assign progname if NULL

Logic should be inverted

Change-Id: Iec46673a75801adff5a565dd361255611f427e3a
Expose retry interval and backoff settings

- LCB_CNTL_RETRY_INTERVAL (how often to retry)
- LCB_CNTL_RETRY_BACKOFF (factor by which interval increases for each
  additional retry)

Change-Id: I12a8a791f2897d17acf85ebec5da91c4f38730c7
Default retry interval should be 10ms, not 100ms

Change-Id: Idcd865054c7743d5e9a844706958ffc1846e73d0