Skip to content

Commit 56a83bf

Browse files
committed
doc: various doc cleanup for distcheck.
1 parent 2f475c5 commit 56a83bf

5 files changed

+131
-37
lines changed

doc/mongoc_stream.txt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,16 @@ OpenSSL based TLS support with x509 certificate verification.
5353
The TLS stream type has a few non-standard methods that involve negotiating the
5454
SSL handshake and cert verification.
5555

56-
UNIX
56+
FILE
5757
~~~~
5858

59-
The bread and butter stream type. This can correlate to a unix domain socket
60-
or a tcp socket.
59+
A stream for communicating with local files on disk.
60+
61+
SOCKET
62+
~~~~~~
63+
64+
The primary stream interface. This is used for communicating with a a peer
65+
over an AF_INET, AF_INET6, or AF_UNIX socket.
6166

6267

6368
SEE ALSO
@@ -70,10 +75,13 @@ linkmongoc:mongoc_stream_buffered_new[3]
7075
linkmongoc:mongoc_stream_close[3]
7176
linkmongoc:mongoc_stream_cork[3]
7277
linkmongoc:mongoc_stream_destroy[3]
78+
linkmongoc:mongoc_stream_file_new[3]
79+
linkmongoc:mongoc_stream_file_new_for_path[3]
7380
linkmongoc:mongoc_stream_flush[3]
7481
linkmongoc:mongoc_stream_gridfs_new[3]
7582
linkmongoc:mongoc_stream_read[3]
7683
linkmongoc:mongoc_stream_readv[3]
84+
linkmongoc:mongoc_stream_socket_new[3]
7785
linkmongoc:mongoc_stream_setsockopt[3]
7886
linkmongoc:mongoc_stream_tls_check_cert[3]
7987
linkmongoc:mongoc_stream_tls_do_handshake[3]
@@ -86,6 +94,9 @@ RELATED
8694
~~~~~~~
8795

8896
linkmongoc:mongoc_client[7]
97+
linkmongoc:mongoc_socket[7]
98+
linkmongoc:mongoc_stream_file[7]
99+
linkmongoc:mongoc_stream_socket[7]
89100

90101

91102
AUTHORS

doc/mongoc_stream_file.txt

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,47 @@
1-
mongoc_stream_file(3)
1+
mongoc_stream_file(7)
22
=====================
33

44

55
NAME
66
----
7-
mongoc_stream_file_new, mongoc_stream_file_new_for_path, mongoc_stream_file_get_fd - create a new mongoc file stream
7+
mongoc_stream_file - MongoDB stream IO abstraction for local files
88

99

1010
SYNOPSIS
1111
--------
12-
[source,c]
13-
-----------------------
14-
mongoc_stream_t *mongoc_stream_file_new (int fd);
15-
mongoc_stream_t *mongoc_stream_file_new_for_path (const char *path,
16-
int flags,
17-
int mode);
18-
int mongoc_stream_file_get_fd (mongoc_stream_t *stream);
19-
-----------------------
2012

13+
[source, c]
14+
---------------
15+
#include <mongoc.h>
2116

22-
DESCRIPTION
23-
-----------
24-
The _mongoc_stream_file_new()_ function shall create a new
25-
linkmongoc:mongoc_stream[7], taking ownership of the file-descriptor _fd_.
17+
typedef struct _mongoc_stream_file_t mongoc_stream_file_t;
18+
---------------
2619

27-
fd::
28-
The file descriptor to take ownership of.
29-
fd will be closed when the stream is disposed.
3020

21+
DESCRIPTION
22+
-----------
23+
_mongoc_stream_file_t_ can be considered a subclass of _mongoc_stream_t_. It
24+
is used for local files using a UNIX style file-descriptor.
3125

32-
The _mongoc_stream_file_new_for_path()_ function shall create a new
33-
linkmongoc:mongoc_stream[7], using the path, flags and mode provided.
34-
This calls _open()_ and the semantics are the same.
3526

27+
SEE ALSO
28+
--------
3629

37-
RETURN VALUE
38-
------------
39-
The _mongoc_stream_file_new()_ and _mongoc_stream_file_new_for_path()_
40-
functions return a new linkmongoc:mongoc_stream[7].
30+
FUNCTIONS
31+
~~~~~~~~~
4132

42-
The _mongoc_stream_file_get_fd()_ returns the underlying file-descriptor.
33+
linkmongoc:mongoc_stream_file_new[3]
34+
linkmongoc:mongoc_stream_file_new_for_path[3]
35+
linkmongoc:mongoc_stream_file_new_get_fd[3]
4336

44-
ERRORS
45-
------
46-
No errors are defined.
4737

38+
RELATED
39+
~~~~~~~
4840

49-
SEE ALSO
50-
--------
5141
linkmongoc:mongoc_stream[7]
42+
linkmongoc:mongoc_client[7]
5243

5344

5445
AUTHORS
5546
-------
56-
5747
This page was written by MongoDB, Inc.

doc/mongoc_stream_file_get_fd.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/mongoc_stream_file_get_fd.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
mongoc_stream_file_get_fd(3)
2+
============================
3+
4+
5+
NAME
6+
----
7+
mongoc_stream_file_get_fd - Get underlying file descriptor for file stream
8+
9+
10+
SYNOPSIS
11+
--------
12+
[source,c]
13+
-----------------------
14+
int mongoc_stream_file_get_fd (mongoc_stream_t *stream);
15+
-----------------------
16+
17+
18+
DESCRIPTION
19+
-----------
20+
The _mongoc_stream_file_get_fd()_ function shall return the underlying
21+
file descriptor used by a _mongoc_stream_file_t_.
22+
23+
24+
RETURN VALUE
25+
------------
26+
A file descriptor or -1 if the file has been closed.
27+
28+
29+
SEE ALSO
30+
--------
31+
linkmongoc:mongoc_stream[7]
32+
linkmongoc:mongoc_stream_file[7]
33+
34+
35+
AUTHORS
36+
-------
37+
This page was written by MongoDB, Inc.

doc/mongoc_stream_file_new.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/mongoc_stream_file_new.txt

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
mongoc_stream_file_new(3)
2+
=========================
3+
4+
5+
NAME
6+
----
7+
mongoc_stream_file_new, mongoc_stream_file_new_for_path - create a new mongoc file stream
8+
9+
10+
SYNOPSIS
11+
--------
12+
[source,c]
13+
-----------------------
14+
mongoc_stream_t *mongoc_stream_file_new (int fd);
15+
mongoc_stream_t *mongoc_stream_file_new_for_path (const char *path,
16+
int flags,
17+
int mode);
18+
-----------------------
19+
20+
21+
DESCRIPTION
22+
-----------
23+
The _mongoc_stream_file_new()_ function shall create a new
24+
linkmongoc:mongoc_stream[7], taking ownership of the file-descriptor _fd_.
25+
26+
fd::
27+
The file descriptor to take ownership of.
28+
fd will be closed when the stream is disposed.
29+
30+
31+
The _mongoc_stream_file_new_for_path()_ function shall create a new
32+
linkmongoc:mongoc_stream[7], using the path, flags and mode provided.
33+
This calls _open()_ and the semantics are the same.
34+
35+
36+
RETURN VALUE
37+
------------
38+
The _mongoc_stream_file_new()_ and _mongoc_stream_file_new_for_path()_
39+
functions return a new linkmongoc:mongoc_stream[7].
40+
41+
If there was a failure to open the file, NULL is returned and errno
42+
is set.
43+
44+
45+
ERRORS
46+
------
47+
errno is set if NULL is returned.
48+
49+
50+
SEE ALSO
51+
--------
52+
linkmongoc:mongoc_stream[7]
53+
linkmongoc:mongoc_stream_file[7]
54+
55+
56+
AUTHORS
57+
-------
58+
This page was written by MongoDB, Inc.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mongoc_stream_file.txt
1+
mongoc_stream_file_new.txt

0 commit comments

Comments
 (0)