Skip to content

Commit dfe3dde

Browse files
authored
DOC-8240-C9 -- rationalize declaration of snippet attribute (#437)
* DOC-8240-C9 -- Remove use of separate P2P snippets module * DOC-8240-C9 -- rationalize declaration of snippet attribute
1 parent 2ac0b69 commit dfe3dde

File tree

62 files changed

+113
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+113
-110
lines changed

modules/ROOT/.DS_Store

0 Bytes
Binary file not shown.

modules/ROOT/pages/_partials/_std-cbl-hdr-root.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ include::ROOT:partial$_glossary-links.adoc[]
2222
// :module: {param-module}
2323
// :packageNm: couchbase-lite-{module}
2424
// :source-language: {param-name}
25-
// :snippet: {snippets-content--all}
26-
// :snippet-p2psync-ws: {snippets-p2psync-ws--all}
25+
// snippet: {snippets-content--all}
26+
// // :snippet-p2psync-ws: {snippets-p2psync-ws--all}
2727
// :url-download-package: {url-download-all}
2828
// END::Local page attributes

modules/ROOT/pages/_partials/commons/common-logging.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// Begin required attributes
99
// :cbl-log-version: the required cbl-log version number (eg 2.7.0)
10-
// :snippet: the path to the language specific example code_snippets
10+
// snippet: the path to the language specific example code_snippets
1111
// :fn-2x5: footnote content
1212
:fn-2x5: footnote:fn-2x5[From version 2.5]
1313
ifndef::version-full[:version-full: UNDEFINED-VERSION]

modules/ROOT/pages/_partials/commons/common-p2psync-websocket-manage-tls-id.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Use the {url-api-class-tlsidentity} class's {url-api-method-tls-identity-import
5858
[source, {source-language}]
5959
----
6060
61-
include::{snippet-p2psync-ws}[tag=p2p-tlsid-check-keychain, indent=0]
61+
include::{snippet}[tag=p2p-tlsid-check-keychain, indent=0]
6262
6363
----
6464
--
@@ -71,7 +71,7 @@ include::{snippet-p2psync-ws}[tag=p2p-tlsid-check-keychain, indent=0]
7171
7272
----
7373
74-
include::{snippet-p2psync-ws}[tag=p2p-tlsid-check-bundled, indent=0]
74+
include::{snippet}[tag=p2p-tlsid-check-bundled, indent=0]
7575
7676
----
7777
--
@@ -84,7 +84,7 @@ include::{snippet-p2psync-ws}[tag=p2p-tlsid-check-bundled, indent=0]
8484
8585
----
8686
87-
include::{snippet-p2psync-ws}[tag=p2p-tlsid-import-from-bundled, indent=0]
87+
include::{snippet}[tag=p2p-tlsid-import-from-bundled, indent=0]
8888
8989
----
9090
--
@@ -95,7 +95,7 @@ include::{snippet-p2psync-ws}[tag=p2p-tlsid-import-from-bundled, indent=0]
9595
[source, {source-language}]
9696
----
9797
98-
include::{snippet-p2psync-ws}[tag=p2p-tlsid-store-in-keychain, indent=0]
98+
include::{snippet}[tag=p2p-tlsid-store-in-keychain, indent=0]
9999
100100
----
101101
--
@@ -106,7 +106,7 @@ include::{snippet-p2psync-ws}[tag=p2p-tlsid-store-in-keychain, indent=0]
106106
[source, {source-language}]
107107
----
108108
109-
include::{snippet-p2psync-ws}[tag=p2p-tlsid-return-id-from-keychain, indent=0]
109+
include::{snippet}[tag=p2p-tlsid-return-id-from-keychain, indent=0]
110110
111111
----
112112
--
@@ -119,7 +119,7 @@ include::{snippet-p2psync-ws}[tag=p2p-tlsid-return-id-from-keychain, indent=0]
119119
[source, {source-language}]
120120
----
121121
122-
include::{snippet-p2psync-ws}[tag=p2p-tlsid-delete-id-from-keychain,indent=0]
122+
include::{snippet}[tag=p2p-tlsid-delete-id-from-keychain,indent=0]
123123
124124
----
125125

modules/ROOT/pages/_partials/commons/common-p2psync-websocket-using-active.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ You should configure and initialize a replicator for each Couchbase Lite databas
4040
[source, {source-language}]
4141
----
4242
43-
include::{snippet-p2psync-ws}[tags=p2p-act-rep-func, indent=0]
43+
include::{snippet}[tags=p2p-act-rep-func, indent=0]
4444
4545
----
4646
ifdef::is-android[]
@@ -132,7 +132,7 @@ This example shows basic authentication using user name and password:
132132
133133
[source, {source-language}]
134134
----
135-
include::{snippet-p2psync-ws}[tags="p2p-act-rep-auth", indent=0]
135+
include::{snippet}[tags="p2p-act-rep-auth", indent=0]
136136
137137
----
138138
====
@@ -161,7 +161,7 @@ This example shows client certificate authentication using an identity from secu
161161
[source, {source-language}]
162162
----
163163
164-
include::{snippet-p2psync-ws}[tags=p2p-tlsid-tlsidentity-with-label, indent=0]
164+
include::{snippet}[tags=p2p-tlsid-tlsidentity-with-label, indent=0]
165165
166166
----
167167

modules/ROOT/pages/_partials/commons/common-p2psync-websocket-using-passive.adoc

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ You should configure and initialize a listener for each Couchbase Lite database
3131
There is no limit on the number of listeners you may configure -- <<simple-listener-initialization>> shows a simple initialization and configuration process.
3232

3333
// Example 1
34-
// include::{snippet-p2psync-ws}[tags="listener-initialize;!listener-local-db;!listener-config-tls-disable;!listener-config-tls-id-caCert;!listener-config-tls-id-SelfSigned;!listener-config-tls-id-set;!listener-config-client-auth-root;!listener-config-client-auth-lambda", indent=0]
34+
// include::{snippet}[tags="listener-initialize;!listener-local-db;!listener-config-tls-disable;!listener-config-tls-id-caCert;!listener-config-tls-id-SelfSigned;!listener-config-tls-id-set;!listener-config-client-auth-root;!listener-config-client-auth-lambda", indent=0]
3535
[#simple-listener-initialization]
3636
.Listener configuration and initialization
3737
====
3838
3939
[source, {source-language}]
4040
----
4141
42-
include::{snippet-p2psync-ws}[tags=listener-initialize, indent=0]
42+
include::{snippet}[tags=listener-initialize, indent=0]
4343
4444
----
4545
@@ -115,7 +115,7 @@ In this example `thisDB` has previously been declared as an object of type Datab
115115
[source, {source-language}]
116116
----
117117
118-
include::{snippet-p2psync-ws}[tags=listener-config-db, indent=0]
118+
include::{snippet}[tags=listener-config-db, indent=0]
119119
120120
----
121121
@@ -139,7 +139,7 @@ The Listener will automatically select an available port if you do not specify o
139139
====
140140
[source, {source-language}]
141141
----
142-
include::{snippet-p2psync-ws}[tags=listener-config-port, indent=0]
142+
include::{snippet}[tags=listener-config-port, indent=0]
143143
----
144144
145145
*Notes on example:*
@@ -161,7 +161,7 @@ The Listener will listen on all network interfaces by default.
161161
====
162162
[source, {source-language}]
163163
----
164-
include::{snippet-p2psync-ws}[tags=listener-config-netw-iface, indent=0]
164+
include::{snippet}[tags=listener-config-netw-iface, indent=0]
165165
----
166166
====
167167

@@ -190,7 +190,7 @@ ifdef::param-include[]
190190
[source, {source-language}]
191191
----
192192
193-
include::{snippet-p2psync-ws}[tags=listener-get-network-interfaces, indent=0]
193+
include::{snippet}[tags=listener-get-network-interfaces, indent=0]
194194
195195
----
196196
@@ -210,7 +210,7 @@ Both valuable benefits, especially when network bandwidth is constrained.
210210
[source, {source-language}]
211211
----
212212
213-
include::{snippet-p2psync-ws}[tags=listener-config-delta-sync, indent=0]
213+
include::{snippet}[tags=listener-config-delta-sync, indent=0]
214214
215215
----
216216
@@ -279,8 +279,8 @@ Import an identity from a secure key and certificate data source.
279279
[source, {source-language}]
280280
----
281281
282-
include::{snippet-p2psync-ws}[tags=listener-config-tls-enable, indent=0]
283-
include::{snippet-p2psync-ws}[tags="listener-config-tls-id-full;!listener-config-tls-id-SelfSigned;!listener-config-tls-id-anon", indent=0]
282+
include::{snippet}[tags=listener-config-tls-enable, indent=0]
283+
include::{snippet}[tags="listener-config-tls-id-full;!listener-config-tls-id-SelfSigned;!listener-config-tls-id-anon", indent=0]
284284
285285
----
286286

@@ -313,8 +313,8 @@ The system generates a self-signed certificate.
313313
[source, {source-language}]
314314
----
315315
316-
include::{snippet-p2psync-ws}[tags=listener-config-tls-enable, indent=0]
317-
include::{snippet-p2psync-ws}[tags="listener-config-tls-id-full;!listener-config-tls-id-caCert;!listener-config-tls-id-anon", indent=0]
316+
include::{snippet}[tags=listener-config-tls-enable, indent=0]
317+
include::{snippet}[tags="listener-config-tls-id-full;!listener-config-tls-id-caCert;!listener-config-tls-id-anon", indent=0]
318318
319319
----
320320

@@ -337,8 +337,8 @@ Generated certificates are held in {securestorage}.
337337
[source, {source-language}]
338338
----
339339
340-
include::{snippet-p2psync-ws}[tags=listener-config-tls-enable, indent=0]
341-
include::{snippet-p2psync-ws}[tags=listener-config-tls-id-anon, indent=0]
340+
include::{snippet}[tags=listener-config-tls-enable, indent=0]
341+
include::{snippet}[tags=listener-config-tls-id-anon, indent=0]
342342
343343
----
344344

@@ -392,7 +392,7 @@ include::{root-partials}p2p-api.adoc[tag=ListenerPasswordAuthenticator]
392392
[source, {source-language}]
393393
----
394394
395-
include::{snippet-p2psync-ws}[tags=listener-config-client-auth-pwd, indent=0]
395+
include::{snippet}[tags=listener-config-client-auth-pwd, indent=0]
396396
397397
----
398398
@@ -429,7 +429,7 @@ Configure the server (listener) to authenticate the client against a list of one
429429
[source, {source-language}]
430430
----
431431
432-
include::{snippet-p2psync-ws}[tag=listener-config-client-auth-root, indent=0]
432+
include::{snippet}[tag=listener-config-client-auth-root, indent=0]
433433
434434
----
435435

@@ -454,7 +454,7 @@ Configure the server (listener) to authenticate the client using user-supplied l
454454
[source, {source-language}]
455455
----
456456
457-
include::{snippet-p2psync-ws}[tags=listener-config-client-auth-lambda, indent=0]
457+
include::{snippet}[tags=listener-config-client-auth-lambda, indent=0]
458458
459459
----
460460

@@ -487,7 +487,7 @@ endif::[]
487487
[source, {source-language}]
488488
----
489489
490-
include::{snippet-p2psync-ws}[tag=p2p-tlsid-delete-id-from-keychain]
490+
include::{snippet}[tag=p2p-tlsid-delete-id-from-keychain]
491491
492492
----
493493
// include::{snippet}[tags=listener-config-delete-cert-full, indent=0]
@@ -554,7 +554,7 @@ Once you have completed the Listener's configuration settings you can initialize
554554
====
555555
[source, {source-language}]
556556
----
557-
include::{snippet-p2psync-ws}[tags=listener-start, indent=0]
557+
include::{snippet}[tags=listener-start, indent=0]
558558
559559
----
560560
include::{module-callouts}[tags=listener-start, indent=0]
@@ -573,7 +573,7 @@ You should note that these counts can be extremely volatile. So, the actual numb
573573
====
574574
[source, {source-language}]
575575
----
576-
include::{snippet-p2psync-ws}[tags=listener-status-check, indent=0]
576+
include::{snippet}[tags=listener-status-check, indent=0]
577577
----
578578
579579
*Notes on example:*
@@ -589,19 +589,19 @@ include::{example_callouts}[tags=listener-status-check, indent=0]
589589

590590
// [source, {source-language}]
591591
// ----
592-
// include::{snippet-p2psync-ws}[tags=listener-pv-cfg-conflict, indent=0]
592+
// include::{snippet}[tags=listener-pv-cfg-conflict, indent=0]
593593
// ----
594594

595595
== Stop Listener
596-
// include::{snippet-p2psync-ws}[tags=stopWebsocketsListener"]config
596+
// include::{snippet}[tags=stopWebsocketsListener"]config
597597
It is best practice to check tha status of the listener's connections and stop only when you have confirmed that there are no active connections -- see <<get-connection-counts>>.
598598

599599
// Example 12
600600
.Stop listener using `stop` method
601601
====
602602
[source, {source-language}]
603603
----
604-
include::{snippet-p2psync-ws}[tags=listener-stop, indent=0]
604+
include::{snippet}[tags=listener-stop, indent=0]
605605
----
606606
====
607607

modules/ROOT/pages/_partials/commons/common-p2psync-websocket.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ endif::[]
123123
== Basic Setup
124124
You can configure a peer-to-peer synchronization with just a few lines of code as shown in <<simple-configuration>>.
125125

126-
// include::{snippet-p2psync-ws}[tags=listener-initialize, indent=0]
126+
// include::{snippet}[tags=listener-initialize, indent=0]
127127
[#simple-configuration]
128128
.Simple configuration
129129
=====
@@ -139,7 +139,7 @@ This simple configuration will give you a listener ready to participate in an en
139139
[source, {source-language}]
140140
----
141141
142-
include::{snippet-p2psync-ws}[tags=listener-simple, indent=0]
142+
include::{snippet}[tags=listener-simple, indent=0]
143143
144144
----
145145

@@ -158,7 +158,7 @@ This simple replicator configuration will give you an encrypted, bi-directional
158158
[source, {source-language}]
159159
----
160160
161-
include::{snippet-p2psync-ws}[tags=replicator-simple, indent=0]
161+
include::{snippet}[tags=replicator-simple, indent=0]
162162
163163
----
164164

modules/ROOT/pages/_partials/commons/common-p2psync-workflow.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// :module: {lang-mod-swift}
1818
// :packageNm: couchbase-lite-{module}
1919
// :source-language: {lang-name-swift}
20-
// :snippet: {snippets-content--swift}
20+
// snippet: {snippets-content--swift}
2121
// :url-issues: {url-github-cbl}{module}/issues
2222
//
2323
// // END::Local page attributes

modules/ROOT/pages/_partials/commons/common-query.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// :this-lang-title: {par-lang-title}
2121
// :this-packageNm: {par-packageNm}
2222
// :this-source-language: {par-source-language}
23-
// :snippet: {par-snippet}
23+
// snippet: {par-snippet}
2424
//:this-url-issues: {par-url-issues}
2525
// END::REQUIRED EXTERNALS
2626

modules/ROOT/pages/_partials/commons/common-set-server-authentication.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Set the client to expect and accept only CA attested certificates.
3030
[source, {source-language}]
3131
----
3232
33-
include::{snippet-p2psync-ws}[tags=p2p-act-rep-config-cacert, indent=0]
33+
include::{snippet}[tags=p2p-act-rep-config-cacert, indent=0]
3434
3535
----
3636
*Notes on Example*
@@ -49,7 +49,7 @@ Set the client to expect and accept only self-signed certificates
4949
[source, {source-language}]
5050
----
5151
52-
include::{snippet-p2psync-ws}[tags=p2p-act-rep-config-self-cert, indent=0]
52+
include::{snippet}[tags=p2p-act-rep-config-self-cert, indent=0]
5353
5454
----
5555
*Notes on Example*
@@ -68,11 +68,11 @@ Set the client to expect and accept only a pinned certificate.
6868
[source, {source-language}]
6969
----
7070
71-
include::{snippet-p2psync-ws}[tag=p2p-act-rep-config-cacert-pinned, indent=0]
71+
include::{snippet}[tag=p2p-act-rep-config-cacert-pinned, indent=0]
7272
7373
----
7474

75-
include::{snippet-p2psync-ws}[tag=p2p-act-rep-config-cacert-pinned-callouts, indent=0]
75+
include::{snippet}[tag=p2p-act-rep-config-cacert-pinned-callouts, indent=0]
7676

7777
--
7878
====

0 commit comments

Comments
 (0)