Forward declare 'struct ast_json' in asterisk.h

The ast_json structure is used in many Asterisk headers and is often the
only part of json.h used.  This adds a forward declaration to asterisk.h
and removes the include of json.h from many headers.  The declaration
has been left in endpoints.h and stasis.h to avoid problems with source
files that use ast_json functions without directly including json.h.

ari.h continues to include json.h as it uses enum
ast_json_encoding_format.

Change-Id: Id766aabce6bed56626d27e8d29f559b5e687b769
This commit is contained in:
Corey Farrell
2017-03-30 19:28:18 -04:00
parent f040eb0502
commit c701550803
6 changed files with 1 additions and 5 deletions

View File

@@ -317,6 +317,7 @@ struct ast_module;
struct ast_variable;
struct ast_str;
struct ast_sched_context;
struct ast_json;
/* Some handy macros for turning a preprocessor token into (effectively) a quoted string */
#define __stringify_1(x) #x

View File

@@ -178,7 +178,6 @@ extern "C" {
#include "asterisk/ccss.h"
#include "asterisk/framehook.h"
#include "asterisk/stasis.h"
#include "asterisk/json.h"
#include "asterisk/endpoints.h"
#define DATASTORE_INHERIT_FOREVER INT_MAX

View File

@@ -51,7 +51,6 @@
*/
#include "asterisk/channel.h"
#include "asterisk/json.h"
/*! @{ */

View File

@@ -22,7 +22,6 @@
#include "asterisk/stringfields.h"
#include "asterisk/stasis.h"
#include "asterisk/json.h"
#include "asterisk/channel.h"
/*! \addtogroup StasisTopicsAndMessages

View File

@@ -28,7 +28,6 @@
*/
#include "asterisk/endpoints.h"
#include "asterisk/json.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_cache_pattern.h"
#include "asterisk/stringfields.h"

View File

@@ -19,7 +19,6 @@
#ifndef _ASTERISK_STASIS_SYSTEM_H
#define _ASTERISK_STASIS_SYSTEM_H
#include "asterisk/json.h"
#include "asterisk/stasis.h"
/*!