Skip to content

Commit

Permalink
pre-rebar3: move some headers from kazoo to kazoo_stdlib (2600hz#3959)
Browse files Browse the repository at this point in the history
* pre-rebar3: move kazoo headers to kazoo_stdlib

* pre-rebar3: update paths to kz_log.hrl

* pre-rebar3: update paths to kz_types.hrl

* pre-rebar3: update paths to kz_databases.hrl

* pre-rebar3: move kz_media.hrl to a sensible place + remove duplicated/dead header

* pre-rebar3: fix Dialyzer warnings
  • Loading branch information
fenollp authored and lazedo committed Jul 20, 2017
1 parent 22b161f commit f8223ba
Show file tree
Hide file tree
Showing 212 changed files with 372 additions and 381 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Some 2600Hz specifics:
lists:foldl(fun(F, Acc) -> F(Acc) end, lookup(), [fun do_y/1, do_z/1]).
```
* No [magic numbers](https://en.wikipedia.org/wiki/Magic_number_(programming)#Unnamed_numerical_constants) please
* If you are doing timeouts and similar, there are [macros](https://github.com/2600hz/kazoo/blob/master/core/kazoo/include/kz_types.hrl#L4-L15) that can help make it more apparent what the unit of time is, for instance:
* If you are doing timeouts and similar, there are [macros](https://github.com/2600hz/kazoo/blob/master/core/kazoo_stdlib/include/kz_types.hrl#L4-L15) that can help make it more apparent what the unit of time is, for instance:
```erlang
receive
X -> do_something_with(X)
Expand Down
2 changes: 1 addition & 1 deletion applications/acdc/include/acdc_config.hrl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-ifndef(ACDC_CONFIG_HRL).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

%% Save data to the DB
-define(ACDC_ARCHIVE_WINDOW,
Expand Down
6 changes: 3 additions & 3 deletions applications/acdc/src/acdc.hrl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-ifndef(ACDC_HRL).
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").
-include_lib("kazoo/include/kz_api_literals.hrl").
-include("acdc_config.hrl").

Expand Down
2 changes: 1 addition & 1 deletion applications/acdc/src/acdc_queue_thief.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

-export([connect/2]).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-spec connect(kapps_call:call(), ne_binary()) -> 'ok'.
connect(_Call, _QueueId) ->
Expand Down
2 changes: 1 addition & 1 deletion applications/acdc/src/kapi_acdc_agent.erl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
,publish_login_resp/2, publish_login_resp/3
]).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_amqp/include/kz_api.hrl").

%%------------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions applications/ananke/src/ananke.hrl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-ifndef(ANANKE_HRL).
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").

-define(APP_NAME, <<"ananke">>).
-define(APP_VERSION, <<"4.0.0">>).
Expand Down
2 changes: 1 addition & 1 deletion applications/ananke/src/ananke_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
-module(ananke_app).
-behaviour(application).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-export([start/2, stop/1]).

Expand Down
6 changes: 3 additions & 3 deletions applications/blackhole/src/blackhole.hrl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-ifndef(BLACKHOLE_HRL).

%% Typical includes needed
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").
-include_lib("kazoo_apps/include/kz_hooks.hrl").

-define(APP_NAME, <<"blackhole">>).
Expand Down
2 changes: 1 addition & 1 deletion applications/blackhole/src/blackhole_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

-behaviour(application).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-export([start/2, stop/1]).

Expand Down
6 changes: 3 additions & 3 deletions applications/call_inspector/src/call_inspector.hrl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-ifndef(CALL_INSPECTOR_HRL).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").

-define(APP, call_inspector).
-define(APP_NAME, atom_to_binary(?APP, utf8)).
Expand Down
2 changes: 1 addition & 1 deletion applications/call_inspector/src/call_inspector_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

-behaviour(application).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-export([start/2, stop/1]).

Expand Down
2 changes: 1 addition & 1 deletion applications/call_inspector/src/kapi_inspector.erl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
-export([bind_q/2, unbind_q/2]).
-export([declare_exchanges/0]).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-define(LOOKUP_REQ_HEADERS, [<<"Call-ID">>]).
-define(OPTIONAL_LOOKUP_REQ_HEADERS, []).
Expand Down
4 changes: 2 additions & 2 deletions applications/call_inspector/src/parsers/ci_parsers_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

-export_type([parser_args/0]).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").

%% API

Expand Down
4 changes: 2 additions & 2 deletions applications/callflow/src/callflow.hrl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-ifndef(CALLFLOW_HRL).
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo/include/kz_api_literals.hrl").
-include_lib("kazoo_number_manager/include/knm_phone_number.hrl").
-include_lib("kazoo_call/include/kapps_call_command_types.hrl").
Expand Down
2 changes: 1 addition & 1 deletion applications/callflow/src/callflow_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

-behaviour(application).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-export([start/2, stop/1]).

Expand Down
4 changes: 2 additions & 2 deletions applications/camper/src/camper.hrl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-ifndef(CAMPER_HRL).
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").

-define(APP_NAME, <<"camper">>).
-define(APP_VERSION, <<"4.0.0">> ).
Expand Down
2 changes: 1 addition & 1 deletion applications/camper/src/camper_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

-behaviour(application).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

%% Application callbacks
-export([start/2, stop/1]).
Expand Down
6 changes: 3 additions & 3 deletions applications/cccp/src/cccp.hrl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-ifndef(CCCP_HRL).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").
-include_lib("kazoo_number_manager/include/knm_phone_number.hrl").

-define(APP_NAME, <<"cccp">>).
Expand Down
2 changes: 1 addition & 1 deletion applications/cccp/src/cccp_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

-behaviour(application).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-export([start/2, stop/1]).

Expand Down
6 changes: 3 additions & 3 deletions applications/cdr/src/cdr.hrl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-ifndef(CDR_HRL).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").

-define(APP_NAME, <<"cdr">>).
-define(APP_VERSION, <<"4.0.0">>).
Expand Down
2 changes: 1 addition & 1 deletion applications/cdr/src/cdr_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

-behaviour(application).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

%% Application callbacks
-export([start/2, stop/1]).
Expand Down
4 changes: 2 additions & 2 deletions applications/conference/src/conference.hrl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-ifndef(CONFERENCE_HRL).
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo/include/kz_api_literals.hrl").

-define(APP_NAME, <<"conference">>).
Expand Down
2 changes: 1 addition & 1 deletion applications/conference/src/conference_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

-behaviour(application).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-export([start/2, stop/1]).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
-define(IN, ?OUT ++ ".src").

-include_lib("erlang_localtime/include/tz_index.hrl").
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

main(_) ->
{ok, SchemaBin} = file:read_file(?IN),
Expand Down
6 changes: 3 additions & 3 deletions applications/crossbar/src/crossbar.hrl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-ifndef(CROSSBAR_HRL).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").
-include_lib("kazoo/include/kz_system_config.hrl").
-include_lib("kazoo_documents/include/kazoo_documents.hrl").

Expand Down
2 changes: 1 addition & 1 deletion applications/crossbar/src/crossbar_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
-module(crossbar_app).
-behaviour(application).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

%% Application callbacks
-export([start/2, stop/1]).
Expand Down
2 changes: 1 addition & 1 deletion applications/crossbar/src/crossbar_types.hrl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-ifndef(CROSSBAR_TYPES_INCLUDED).
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-define(CATCH_ALL, <<"_">>).

Expand Down
6 changes: 3 additions & 3 deletions applications/doodle/src/doodle.hrl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-ifndef(DOODLE_HRL).
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").
-include_lib("kazoo/include/kz_api_literals.hrl").
-include_lib("kazoo_number_manager/include/knm_phone_number.hrl").
-include_lib("kazoo_call/include/kapps_call_command_types.hrl").
Expand Down
4 changes: 2 additions & 2 deletions applications/dth/src/dth.hrl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-ifndef(DTH_HRL).

-include_lib("detergent/include/detergent.hrl").
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").

-include("include/dthsoap.hrl").
-include("include/dth_amqp.hrl").
Expand Down
2 changes: 1 addition & 1 deletion applications/dth/src/dth_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

-behaviour(application).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-export([start/2, stop/1]).

Expand Down
4 changes: 2 additions & 2 deletions applications/ecallmgr/src/ecallmgr.hrl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-ifndef(ECALLMGR_HRL).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo_documents/include/kazoo_documents.hrl").

-include("fs_event_filters.hrl").
Expand Down
2 changes: 1 addition & 1 deletion applications/ecallmgr/src/ecallmgr_auxiliary_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
-behaviour(supervisor).

-include("ecallmgr.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").

-define(SERVER, ?MODULE).

Expand Down
2 changes: 1 addition & 1 deletion applications/ecallmgr/src/ecallmgr_config.erl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
-compile([{'no_auto_import', [get/1]}]).

-include("ecallmgr.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").

-spec flush() -> 'ok'.
-spec flush(kz_json:path()) -> 'ok' | {'error', any()}.
Expand Down
2 changes: 1 addition & 1 deletion applications/ecallmgr/src/ecallmgr_fs_fax.erl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

-export([receive_fax/3]).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-spec receive_fax(atom(), ne_binary(), kz_json:object()) -> kz_proplist().
receive_fax(Node, UUID, JObj) ->
Expand Down
2 changes: 1 addition & 1 deletion applications/ecallmgr/src/ecallmgr_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

-include("ecallmgr.hrl").
-include_lib("kazoo_amqp/src/api/kapi_dialplan.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").
-include_lib("kazoo_sip/include/kzsip_uri.hrl").

-define(HTTP_GET_PREFIX, "http_cache://").
Expand Down
6 changes: 3 additions & 3 deletions applications/fax/src/fax.hrl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-ifndef(FAX_HRL).

%% Typical includes needed
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").

-define(APP_NAME, <<"fax">>).
-define(APP_VERSION, <<"4.0.0">>).
Expand Down
2 changes: 1 addition & 1 deletion applications/fax/src/fax_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

-behaviour(application).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-export([start/2, stop/1]).

Expand Down
6 changes: 3 additions & 3 deletions applications/frontier/src/frontier.hrl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-ifndef(FRONTIER_HRL).
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").

-define(APP_NAME, <<"frontier">>).
-define(APP_VERSION, <<"4.0.0">> ).
Expand Down
2 changes: 1 addition & 1 deletion applications/frontier/src/frontier_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

-behaviour(application).

-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").

-export([start/2, stop/1]).

Expand Down
6 changes: 3 additions & 3 deletions applications/hangups/src/hangups.hrl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-ifndef(HANGUPS_HRL).

-include_lib("kazoo/include/kz_log.hrl").
-include_lib("kazoo/include/kz_types.hrl").
-include_lib("kazoo/include/kz_databases.hrl").
-include_lib("kazoo_stdlib/include/kz_log.hrl").
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-include_lib("kazoo_stdlib/include/kz_databases.hrl").

-define(APP_NAME, <<"hangups">>).
-define(APP_VERSION, <<"4.0.0">>).
Expand Down
Loading

0 comments on commit f8223ba

Please sign in to comment.