Couchbase Lite C
Couchbase Lite C API
Fleece+CoreFoundation.h
Go to the documentation of this file.
1//
2// Fleece+CoreFoundation.h
3//
4// Copyright 2016-Present Couchbase, Inc.
5//
6// Use of this software is governed by the Business Source License included
7// in the file licenses/BSL-Couchbase.txt. As of the Change Date specified
8// in that file, in accordance with the Business Source License, use of this
9// software will be governed by the Apache License, Version 2.0, included in
10// the file licenses/APL2.txt.
11//
12
13#pragma once
14#include <CoreFoundation/CFBase.h>
15#include "Fleece.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
27
28
32
33
36
37
38#ifdef __OBJC__
39#import <Foundation/NSMapTable.h>
40
41 // Equivalents of the above functions that take & return Objective-C object types:
42
45 bool FLEncoder_WriteNSObject(FLEncoder, id) FLAPI;
46
47
49 NSMapTable* FLCreateSharedStringsTable(void) FLAPI;
50
51
53 id FLValue_GetNSObject(FLValue, NSMapTable *sharedStrings) FLAPI;
54
55
57 FLValue FLDict_GetWithNSString(FLDict, NSString*) FLAPI;
58
59
61 NSString* FLDictIterator_GetKeyAsNSString(const FLDictIterator *i,
62 NSMapTable *sharedStrings) FLAPI;
63
65 NSData* FLEncoder_FinishWithNSData(FLEncoder, NSError**) FLAPI;
66
67
69 extern NSString* const FLErrorDomain;
70
71
72 @interface NSObject (Fleece)
77 - (void) fl_encodeToFLEncoder: (FLEncoder)enc;
78 @end
79
80
81#endif
82
85#ifdef __cplusplus
86}
87#endif
#define FLAPI
Definition: FLSlice.h:31
FLValue FLDict_GetWithCFString(FLDict, CFStringRef)
Same as FLDictGet, but takes the key as a CFStringRef.
bool FLEncoder_WriteCFObject(FLEncoder, CFTypeRef)
Writes a Core Foundation (or Objective-C) object to an Encoder.
CFTypeRef FLValue_CopyCFObject(FLValue)
Returns a Value as a corresponding CoreFoundation object.
const struct _FLDict * FLDict
A reference to a dictionary (map) value.
Definition: Fleece.h:51
struct _FLEncoder * FLEncoder
A reference to an encoder.
Definition: Fleece.h:55
const struct _FLValue * FLValue
A reference to a value of any type.
Definition: Fleece.h:49
Opaque dictionary iterator.
Definition: Fleece.h:639