[asterisk-commits] mjordan: branch mjordan/12-channel-func r403253 - in /team/mjordan/12-channel...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Dec 1 07:47:08 CST 2013
Author: mjordan
Date: Sun Dec 1 07:47:06 2013
New Revision: 403253
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403253
Log:
Merge in revs from 12 branch
Modified:
team/mjordan/12-channel-func/ (props changed)
team/mjordan/12-channel-func/res/ari/ari_model_validators.c
team/mjordan/12-channel-func/res/ari/ari_model_validators.h
team/mjordan/12-channel-func/rest-api/api-docs/events.json
Propchange: team/mjordan/12-channel-func/
------------------------------------------------------------------------------
svn:mergeinfo = /branches/12:403239-403252
Modified: team/mjordan/12-channel-func/res/ari/ari_model_validators.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/12-channel-func/res/ari/ari_model_validators.c?view=diff&rev=403253&r1=403252&r2=403253
==============================================================================
--- team/mjordan/12-channel-func/res/ari/ari_model_validators.c (original)
+++ team/mjordan/12-channel-func/res/ari/ari_model_validators.c Sun Dec 1 07:47:06 2013
@@ -3032,6 +3032,15 @@
if (strcmp("PlaybackStarted", discriminator) == 0) {
return ast_ari_validate_playback_started(json);
} else
+ if (strcmp("RecordingFailed", discriminator) == 0) {
+ return ast_ari_validate_recording_failed(json);
+ } else
+ if (strcmp("RecordingFinished", discriminator) == 0) {
+ return ast_ari_validate_recording_finished(json);
+ } else
+ if (strcmp("RecordingStarted", discriminator) == 0) {
+ return ast_ari_validate_recording_started(json);
+ } else
if (strcmp("StasisEnd", discriminator) == 0) {
return ast_ari_validate_stasis_end(json);
} else
@@ -3179,6 +3188,15 @@
if (strcmp("PlaybackStarted", discriminator) == 0) {
return ast_ari_validate_playback_started(json);
} else
+ if (strcmp("RecordingFailed", discriminator) == 0) {
+ return ast_ari_validate_recording_failed(json);
+ } else
+ if (strcmp("RecordingFinished", discriminator) == 0) {
+ return ast_ari_validate_recording_finished(json);
+ } else
+ if (strcmp("RecordingStarted", discriminator) == 0) {
+ return ast_ari_validate_recording_started(json);
+ } else
if (strcmp("StasisEnd", discriminator) == 0) {
return ast_ari_validate_stasis_end(json);
} else
@@ -3440,9 +3458,40 @@
{
int res = 1;
struct ast_json_iter *iter;
+ int has_type = 0;
+ int has_application = 0;
int has_recording = 0;
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
+ if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
+ int prop_is_valid;
+ has_type = 1;
+ prop_is_valid = ast_ari_validate_string(
+ ast_json_object_iter_value(iter));
+ if (!prop_is_valid) {
+ ast_log(LOG_ERROR, "ARI RecordingFailed field type failed validation\n");
+ res = 0;
+ }
+ } else
+ if (strcmp("application", ast_json_object_iter_key(iter)) == 0) {
+ int prop_is_valid;
+ has_application = 1;
+ prop_is_valid = ast_ari_validate_string(
+ ast_json_object_iter_value(iter));
+ if (!prop_is_valid) {
+ ast_log(LOG_ERROR, "ARI RecordingFailed field application failed validation\n");
+ res = 0;
+ }
+ } else
+ if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {
+ int prop_is_valid;
+ prop_is_valid = ast_ari_validate_date(
+ ast_json_object_iter_value(iter));
+ if (!prop_is_valid) {
+ ast_log(LOG_ERROR, "ARI RecordingFailed field timestamp failed validation\n");
+ res = 0;
+ }
+ } else
if (strcmp("recording", ast_json_object_iter_key(iter)) == 0) {
int prop_is_valid;
has_recording = 1;
@@ -3461,6 +3510,16 @@
}
}
+ if (!has_type) {
+ ast_log(LOG_ERROR, "ARI RecordingFailed missing required field type\n");
+ res = 0;
+ }
+
+ if (!has_application) {
+ ast_log(LOG_ERROR, "ARI RecordingFailed missing required field application\n");
+ res = 0;
+ }
+
if (!has_recording) {
ast_log(LOG_ERROR, "ARI RecordingFailed missing required field recording\n");
res = 0;
@@ -3478,9 +3537,40 @@
{
int res = 1;
struct ast_json_iter *iter;
+ int has_type = 0;
+ int has_application = 0;
int has_recording = 0;
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
+ if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
+ int prop_is_valid;
+ has_type = 1;
+ prop_is_valid = ast_ari_validate_string(
+ ast_json_object_iter_value(iter));
+ if (!prop_is_valid) {
+ ast_log(LOG_ERROR, "ARI RecordingFinished field type failed validation\n");
+ res = 0;
+ }
+ } else
+ if (strcmp("application", ast_json_object_iter_key(iter)) == 0) {
+ int prop_is_valid;
+ has_application = 1;
+ prop_is_valid = ast_ari_validate_string(
+ ast_json_object_iter_value(iter));
+ if (!prop_is_valid) {
+ ast_log(LOG_ERROR, "ARI RecordingFinished field application failed validation\n");
+ res = 0;
+ }
+ } else
+ if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {
+ int prop_is_valid;
+ prop_is_valid = ast_ari_validate_date(
+ ast_json_object_iter_value(iter));
+ if (!prop_is_valid) {
+ ast_log(LOG_ERROR, "ARI RecordingFinished field timestamp failed validation\n");
+ res = 0;
+ }
+ } else
if (strcmp("recording", ast_json_object_iter_key(iter)) == 0) {
int prop_is_valid;
has_recording = 1;
@@ -3499,6 +3589,16 @@
}
}
+ if (!has_type) {
+ ast_log(LOG_ERROR, "ARI RecordingFinished missing required field type\n");
+ res = 0;
+ }
+
+ if (!has_application) {
+ ast_log(LOG_ERROR, "ARI RecordingFinished missing required field application\n");
+ res = 0;
+ }
+
if (!has_recording) {
ast_log(LOG_ERROR, "ARI RecordingFinished missing required field recording\n");
res = 0;
@@ -3516,9 +3616,40 @@
{
int res = 1;
struct ast_json_iter *iter;
+ int has_type = 0;
+ int has_application = 0;
int has_recording = 0;
for (iter = ast_json_object_iter(json); iter; iter = ast_json_object_iter_next(json, iter)) {
+ if (strcmp("type", ast_json_object_iter_key(iter)) == 0) {
+ int prop_is_valid;
+ has_type = 1;
+ prop_is_valid = ast_ari_validate_string(
+ ast_json_object_iter_value(iter));
+ if (!prop_is_valid) {
+ ast_log(LOG_ERROR, "ARI RecordingStarted field type failed validation\n");
+ res = 0;
+ }
+ } else
+ if (strcmp("application", ast_json_object_iter_key(iter)) == 0) {
+ int prop_is_valid;
+ has_application = 1;
+ prop_is_valid = ast_ari_validate_string(
+ ast_json_object_iter_value(iter));
+ if (!prop_is_valid) {
+ ast_log(LOG_ERROR, "ARI RecordingStarted field application failed validation\n");
+ res = 0;
+ }
+ } else
+ if (strcmp("timestamp", ast_json_object_iter_key(iter)) == 0) {
+ int prop_is_valid;
+ prop_is_valid = ast_ari_validate_date(
+ ast_json_object_iter_value(iter));
+ if (!prop_is_valid) {
+ ast_log(LOG_ERROR, "ARI RecordingStarted field timestamp failed validation\n");
+ res = 0;
+ }
+ } else
if (strcmp("recording", ast_json_object_iter_key(iter)) == 0) {
int prop_is_valid;
has_recording = 1;
@@ -3535,6 +3666,16 @@
ast_json_object_iter_key(iter));
res = 0;
}
+ }
+
+ if (!has_type) {
+ ast_log(LOG_ERROR, "ARI RecordingStarted missing required field type\n");
+ res = 0;
+ }
+
+ if (!has_application) {
+ ast_log(LOG_ERROR, "ARI RecordingStarted missing required field application\n");
+ res = 0;
}
if (!has_recording) {
Modified: team/mjordan/12-channel-func/res/ari/ari_model_validators.h
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/12-channel-func/res/ari/ari_model_validators.h?view=diff&rev=403253&r1=403252&r2=403253
==============================================================================
--- team/mjordan/12-channel-func/res/ari/ari_model_validators.h (original)
+++ team/mjordan/12-channel-func/res/ari/ari_model_validators.h Sun Dec 1 07:47:06 2013
@@ -1212,10 +1212,19 @@
* - timestamp: Date
* - playback: Playback (required)
* RecordingFailed
+ * - type: string (required)
+ * - application: string (required)
+ * - timestamp: Date
* - recording: LiveRecording (required)
* RecordingFinished
+ * - type: string (required)
+ * - application: string (required)
+ * - timestamp: Date
* - recording: LiveRecording (required)
* RecordingStarted
+ * - type: string (required)
+ * - application: string (required)
+ * - timestamp: Date
* - recording: LiveRecording (required)
* StasisEnd
* - type: string (required)
Modified: team/mjordan/12-channel-func/rest-api/api-docs/events.json
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/12-channel-func/rest-api/api-docs/events.json?view=diff&rev=403253&r1=403252&r2=403253
==============================================================================
--- team/mjordan/12-channel-func/rest-api/api-docs/events.json (original)
+++ team/mjordan/12-channel-func/rest-api/api-docs/events.json Sun Dec 1 07:47:06 2013
@@ -79,6 +79,9 @@
"DeviceStateChanged",
"PlaybackStarted",
"PlaybackFinished",
+ "RecordingStarted",
+ "RecordingFinished",
+ "RecordingFailed",
"ApplicationReplaced",
"BridgeCreated",
"BridgeDestroyed",
More information about the asterisk-commits
mailing list