-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from respoke/feature/MER-4340-add-respoke-sdk-…
…header Add Respoke-SDK header to ws connect and requests
- Loading branch information
Showing
4 changed files
with
91 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Respoke - Web communications made easy | ||
* | ||
* Copyright (C) 2015, D.C.S. LLC | ||
* | ||
* Chad McElligott <[email protected]> | ||
* | ||
* See https://www.respoke.io for more information about | ||
* Respoke. Please do not directly contact any of the | ||
* maintainers of this project for assistance. | ||
* Respoke offers a community forum to submit and discuss | ||
* issues at http://community.respoke.io; please raise any | ||
* issues there. | ||
* | ||
* See http://www.asterisk.org for more information about | ||
* the Asterisk project. Please do not directly contact | ||
* any of the maintainers of this project for assistance; | ||
* the project provides a web site, mailing lists and IRC | ||
* channels for your use. | ||
* | ||
* This program is free software, distributed under the terms of | ||
* the GNU General Public License Version 2. See the LICENSE file | ||
* at the top of the source tree. | ||
*/ | ||
|
||
#ifndef RESPOKE_SDK_HEADER_H_ | ||
#define RESPOKE_SDK_HEADER_H_ | ||
|
||
#include <stddef.h> | ||
|
||
int respoke_get_sdk_header(char *buf, size_t len); | ||
|
||
#endif /* RESPOKE_SDK_HEADER_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Respoke - Web communications made easy | ||
* | ||
* Copyright (C) 2015, D.C.S. LLC | ||
* | ||
* Chad McElligott <[email protected]> | ||
* | ||
* See https://www.respoke.io for more information about | ||
* Respoke. Please do not directly contact any of the | ||
* maintainers of this project for assistance. | ||
* Respoke offers a community forum to submit and discuss | ||
* issues at http://community.respoke.io; please raise any | ||
* issues there. | ||
* | ||
* See http://www.asterisk.org for more information about | ||
* the Asterisk project. Please do not directly contact | ||
* any of the maintainers of this project for assistance; | ||
* the project provides a web site, mailing lists and IRC | ||
* channels for your use. | ||
* | ||
* This program is free software, distributed under the terms of | ||
* the GNU General Public License Version 2. See the LICENSE file | ||
* at the top of the source tree. | ||
*/ | ||
|
||
#include <stddef.h> | ||
#include <sys/utsname.h> | ||
#include <stdio.h> | ||
#include "asterisk/ast_version.h" | ||
#include "include/respoke_version.h" | ||
|
||
int respoke_get_sdk_header(char *buf, size_t len) { | ||
const char *asterisk_version = ast_get_version(); | ||
const char *respoke_version = respoke_get_version(); | ||
struct utsname un; | ||
uname(&un); | ||
|
||
return snprintf(buf, len-1, | ||
"Respoke-Asterisk/%s (%s %s) Asterisk/%s", | ||
respoke_version, un.sysname, un.release, asterisk_version); | ||
} |