Skip to content
Snippets Groups Projects
Commit 9c0b35e1 authored by Stanley Cheung's avatar Stanley Cheung
Browse files

php: rename credentials to channel_credentials

parent aeea1028
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* *
*/ */
#include "credentials.h" #include "channel_credentials.h"
#include "call_credentials.h" #include "call_credentials.h"
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
...@@ -95,9 +95,9 @@ zval *grpc_php_wrap_call_credentials(grpc_call_credentials *wrapped) { ...@@ -95,9 +95,9 @@ zval *grpc_php_wrap_call_credentials(grpc_call_credentials *wrapped) {
/** /**
* Create composite credentials from two existing credentials. * Create composite credentials from two existing credentials.
* @param Credentials cred1 The first credential * @param CallCredentials cred1 The first credential
* @param Credentials cred2 The second credential * @param CallCredentials cred2 The second credential
* @return Credentials The new composite credentials object * @return CallCredentials The new composite credentials object
*/ */
PHP_METHOD(CallCredentials, createComposite) { PHP_METHOD(CallCredentials, createComposite) {
zval *cred1_obj; zval *cred1_obj;
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
#include "completion_queue.h" #include "completion_queue.h"
#include "credentials.h" #include "channel_credentials.h"
#include "server.h" #include "server.h"
#include "timeval.h" #include "timeval.h"
...@@ -125,14 +125,15 @@ void php_grpc_read_args_array(zval *args_array, grpc_channel_args *args) { ...@@ -125,14 +125,15 @@ void php_grpc_read_args_array(zval *args_array, grpc_channel_args *args) {
/** /**
* Construct an instance of the Channel class. If the $args array contains a * Construct an instance of the Channel class. If the $args array contains a
* "credentials" key mapping to a Credentials object, a secure channel will be * "credentials" key mapping to a ChannelCredentials object, a secure channel
* created with those credentials. * will be created with those credentials.
* @param string $target The hostname to associate with this channel * @param string $target The hostname to associate with this channel
* @param array $args The arguments to pass to the Channel (optional) * @param array $args The arguments to pass to the Channel (optional)
*/ */
PHP_METHOD(Channel, __construct) { PHP_METHOD(Channel, __construct) {
wrapped_grpc_channel *channel = wrapped_grpc_channel *channel =
(wrapped_grpc_channel *)zend_object_store_get_object(getThis() TSRMLS_CC); (wrapped_grpc_channel *)zend_object_store_get_object(
getThis() TSRMLS_CC);
char *target; char *target;
int target_length; int target_length;
zval *args_array = NULL; zval *args_array = NULL;
...@@ -153,7 +154,8 @@ PHP_METHOD(Channel, __construct) { ...@@ -153,7 +154,8 @@ PHP_METHOD(Channel, __construct) {
array_hash = Z_ARRVAL_P(args_array); array_hash = Z_ARRVAL_P(args_array);
if (zend_hash_find(array_hash, "credentials", sizeof("credentials"), if (zend_hash_find(array_hash, "credentials", sizeof("credentials"),
(void **)&creds_obj) == SUCCESS) { (void **)&creds_obj) == SUCCESS) {
if (zend_get_class_entry(*creds_obj TSRMLS_CC) != grpc_ce_channel_credentials) { if (zend_get_class_entry(*creds_obj TSRMLS_CC) !=
grpc_ce_channel_credentials) {
zend_throw_exception(spl_ce_InvalidArgumentException, zend_throw_exception(spl_ce_InvalidArgumentException,
"credentials must be a ChannelCredentials object", "credentials must be a ChannelCredentials object",
1 TSRMLS_CC); 1 TSRMLS_CC);
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* *
*/ */
#include "credentials.h" #include "channel_credentials.h"
#include "call_credentials.h" #include "call_credentials.h"
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
......
...@@ -72,6 +72,6 @@ if test "$PHP_GRPC" != "no"; then ...@@ -72,6 +72,6 @@ if test "$PHP_GRPC" != "no"; then
PHP_SUBST(GRPC_SHARED_LIBADD) PHP_SUBST(GRPC_SHARED_LIBADD)
PHP_NEW_EXTENSION(grpc, byte_buffer.c call.c call_credentials.c channel.c \ PHP_NEW_EXTENSION(grpc, byte_buffer.c call.c call_credentials.c channel.c \
completion_queue.c credentials.c timeval.c server.c server_credentials.c \ channel_credentials.c completion_queue.c timeval.c server.c \
php_grpc.c, $ext_shared, , -Wall -Werror -std=c11) server_credentials.c php_grpc.c, $ext_shared, , -Wall -Werror -std=c11)
fi fi
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<active>yes</active> <active>yes</active>
</lead> </lead>
<date>2015-10-21</date> <date>2015-10-21</date>
<time>16:58:38</time> <time>17:04:32</time>
<version> <version>
<release>0.6.1</release> <release>0.6.1</release>
<api>0.6.0</api> <api>0.6.0</api>
...@@ -30,18 +30,18 @@ ...@@ -30,18 +30,18 @@
<file baseinstalldir="/" md5sum="c8de0f819499c48adfc8d7f472c0196b" name="byte_buffer.h" role="src" /> <file baseinstalldir="/" md5sum="c8de0f819499c48adfc8d7f472c0196b" name="byte_buffer.h" role="src" />
<file baseinstalldir="/" md5sum="d64c9005993de02abac55664b0b9e0b2" name="call.c" role="src" /> <file baseinstalldir="/" md5sum="d64c9005993de02abac55664b0b9e0b2" name="call.c" role="src" />
<file baseinstalldir="/" md5sum="26acbf04c30162c2d2aca4688bb2aec8" name="call.h" role="src" /> <file baseinstalldir="/" md5sum="26acbf04c30162c2d2aca4688bb2aec8" name="call.h" role="src" />
<file baseinstalldir="/" md5sum="cc48804689564aa1e18095f957f06685" name="call_credentials.c" role="src" /> <file baseinstalldir="/" md5sum="6fa13d260dfde216f795225644f04e7a" name="call_credentials.c" role="src" />
<file baseinstalldir="/" md5sum="e45269975f9a30fd349a90daf6b31aa2" name="call_credentials.h" role="src" /> <file baseinstalldir="/" md5sum="e45269975f9a30fd349a90daf6b31aa2" name="call_credentials.h" role="src" />
<file baseinstalldir="/" md5sum="00b3dc982f9171e03758ff12ddb6729b" name="channel.c" role="src" /> <file baseinstalldir="/" md5sum="0779db3b196c98081b2260ceec22cd4d" name="channel.c" role="src" />
<file baseinstalldir="/" md5sum="ed4b00c0cf3702b115d0cfa87450dc09" name="channel.h" role="src" /> <file baseinstalldir="/" md5sum="ed4b00c0cf3702b115d0cfa87450dc09" name="channel.h" role="src" />
<file baseinstalldir="/" md5sum="1b40f50fa6184ad7d24a961ac76151ff" name="channel_credentials.c" role="src" />
<file baseinstalldir="/" md5sum="a86250e03f610ce6c2c7595a84e08821" name="channel_credentials.h" role="src" />
<file baseinstalldir="/" md5sum="55ab7a42f9dd9bfc7e28a61cfc5fca63" name="completion_queue.c" role="src" /> <file baseinstalldir="/" md5sum="55ab7a42f9dd9bfc7e28a61cfc5fca63" name="completion_queue.c" role="src" />
<file baseinstalldir="/" md5sum="f10b5bb232d74a6878e829e2e76cdaa2" name="completion_queue.h" role="src" /> <file baseinstalldir="/" md5sum="f10b5bb232d74a6878e829e2e76cdaa2" name="completion_queue.h" role="src" />
<file baseinstalldir="/" md5sum="7d80c71737336f4548574da2a6f306d3" name="config.m4" role="src" /> <file baseinstalldir="/" md5sum="c7bba7f0f00d1b1483de457d55311382" name="config.m4" role="src" />
<file baseinstalldir="/" md5sum="f9c2e18949c809acdc8ee1a17cfb7320" name="credentials.c" role="src" />
<file baseinstalldir="/" md5sum="a86250e03f610ce6c2c7595a84e08821" name="credentials.h" role="src" />
<file baseinstalldir="/" md5sum="38a1bc979d810c36ebc2a52d4b7b5319" name="CREDITS" role="doc" /> <file baseinstalldir="/" md5sum="38a1bc979d810c36ebc2a52d4b7b5319" name="CREDITS" role="doc" />
<file baseinstalldir="/" md5sum="3f35b472bbdef5a788cd90617d7d0847" name="LICENSE" role="doc" /> <file baseinstalldir="/" md5sum="3f35b472bbdef5a788cd90617d7d0847" name="LICENSE" role="doc" />
<file baseinstalldir="/" md5sum="c35ad9b424b18a5fb5eb9bd3e07893c5" name="php_grpc.c" role="src" /> <file baseinstalldir="/" md5sum="3131a8af38fe5918e5409016b89d6cdb" name="php_grpc.c" role="src" />
<file baseinstalldir="/" md5sum="673b07859d9f69232f8a754c56780686" name="php_grpc.h" role="src" /> <file baseinstalldir="/" md5sum="673b07859d9f69232f8a754c56780686" name="php_grpc.h" role="src" />
<file baseinstalldir="/" md5sum="7533a6d3ea02c78cad23a9651de0825d" name="README.md" role="doc" /> <file baseinstalldir="/" md5sum="7533a6d3ea02c78cad23a9651de0825d" name="README.md" role="doc" />
<file baseinstalldir="/" md5sum="3e4e960454ebb2fc7b78a840493f5315" name="server.c" role="src" /> <file baseinstalldir="/" md5sum="3e4e960454ebb2fc7b78a840493f5315" name="server.c" role="src" />
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "channel.h" #include "channel.h"
#include "server.h" #include "server.h"
#include "timeval.h" #include "timeval.h"
#include "credentials.h" #include "channel_credentials.h"
#include "call_credentials.h" #include "call_credentials.h"
#include "server_credentials.h" #include "server_credentials.h"
#include "completion_queue.h" #include "completion_queue.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment