You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2013/08/01 20:58:16 UTC

[02/11] git commit: doc: convert TSInstallDirGet(3) to sphinx

doc: convert TSInstallDirGet(3) to sphinx


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cdddf8ba
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cdddf8ba
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cdddf8ba

Branch: refs/heads/master
Commit: cdddf8ba70f7f305a40f10dd6702a1f301655c40
Parents: fbe22e4
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 10:18:23 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 10:18:23 2013 -0700

----------------------------------------------------------------------
 doc/conf.py                              |  1 +
 doc/reference/api/TSInstallDirGet.en.rst | 62 +++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cdddf8ba/doc/conf.py
----------------------------------------------------------------------
diff --git a/doc/conf.py b/doc/conf.py
index cc449e0..f8b7ad8 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -218,6 +218,7 @@ man_pages = [
    ('reference/api/TSHttpParserCreate.en', 'TSHttpParserCreate', u'Parse HTTP headers from memory buffers', None, u'3ts'),
    ('reference/api/TSHttpTxnMilestoneGet.en', 'TSHttpTxnMilestoneGet', u'Get a specified milestone timer value for the current transaction', None, u'3ts'),
    ('reference/api/TSIOBufferCreate.en', 'TSIOBufferCreate', u'Traffic Server IO buffer API', None, u'3ts'),
+   ('reference/api/TSInstallDirGet.en', 'TSInstallDirGet', u'Return Traffic Server installation directories', None, u'3ts'),
 
    ('reference/commands/traffic_cop.en', 'traffic_cop', u'Traffic Server watchdog', None, '8'),
    ('reference/commands/traffic_line.en', 'traffic_line', u'Traffic Server command line', None, '8'),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cdddf8ba/doc/reference/api/TSInstallDirGet.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSInstallDirGet.en.rst b/doc/reference/api/TSInstallDirGet.en.rst
new file mode 100644
index 0000000..502f172
--- /dev/null
+++ b/doc/reference/api/TSInstallDirGet.en.rst
@@ -0,0 +1,62 @@
+.. Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+.. default-domain:: c
+
+===============
+TSInstallDirGet
+===============
+
+Library
+=======
+Apache Traffic Server plugin API
+
+Synopsis
+========
+
+`#include <ts/ts.h>`
+
+.. function:: const char * TSInstallDirGet(void)
+.. function:: const char * TSConfigDirGet(void)
+.. function:: const char * TSPluginDirGet(void)
+
+Description
+===========
+
+:func:`TSInstallDirGet` returns the path to the root of the Traffic
+Server installation. :func:`TSConfigDirGet` and :func:`TSPluginDirGet`
+return the complete, absolute path to the configuration directory
+and the plugin installation directory respectively.
+
+Return values
+=============
+
+These functions all return a NUL-terminated string that must not be modified or freed.
+
+Examples
+========
+
+To load a file that is located in the Traffic Server configuration directory::
+
+    #include <ts/ts.h>
+    #include <stdio.h>
+
+    char * path;
+    asprintf(&path, "%s/example.conf", TSConfigDirGet());
+
+See also
+========
+:manpage:`TSAPI(3ts)`