Change login’s type param to login_type
It is for not to clash with some languages (like Python).
This commit is contained in:
		@@ -1679,7 +1679,7 @@ matrix_api_versions(MatrixAPI *api,
 | 
				
			|||||||
 *            finished
 | 
					 *            finished
 | 
				
			||||||
 * @user_data: (closure): user data to pass to the callback function
 | 
					 * @user_data: (closure): user data to pass to the callback function
 | 
				
			||||||
 *             @callback
 | 
					 *             @callback
 | 
				
			||||||
 * @type: the login type to use
 | 
					 * @login_type: the login type to use
 | 
				
			||||||
 * @content: (allow-none): parameters to pass for the login request
 | 
					 * @content: (allow-none): parameters to pass for the login request
 | 
				
			||||||
 * @error: return location for a #GError, or %NULL
 | 
					 * @error: return location for a #GError, or %NULL
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@@ -1690,14 +1690,14 @@ void
 | 
				
			|||||||
matrix_api_login(MatrixAPI *api,
 | 
					matrix_api_login(MatrixAPI *api,
 | 
				
			||||||
                 MatrixAPICallback callback,
 | 
					                 MatrixAPICallback callback,
 | 
				
			||||||
                 gpointer user_data,
 | 
					                 gpointer user_data,
 | 
				
			||||||
                 const gchar *type,
 | 
					                 const gchar *login_type,
 | 
				
			||||||
                 const JsonNode *content,
 | 
					                 const JsonNode *content,
 | 
				
			||||||
                 GError **error)
 | 
					                 GError **error)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    g_return_if_fail(MATRIX_IS_API(api));
 | 
					    g_return_if_fail(MATRIX_IS_API(api));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    MATRIX_API_GET_IFACE(api)
 | 
					    MATRIX_API_GET_IFACE(api)
 | 
				
			||||||
        ->login(api, callback, user_data, type, content, error);
 | 
					        ->login(api, callback, user_data, login_type, content, error);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -368,7 +368,7 @@ struct _MatrixAPIInterface {
 | 
				
			|||||||
    void (*login)(MatrixAPI *api,
 | 
					    void (*login)(MatrixAPI *api,
 | 
				
			||||||
                  MatrixAPICallback callback,
 | 
					                  MatrixAPICallback callback,
 | 
				
			||||||
                  gpointer user_data,
 | 
					                  gpointer user_data,
 | 
				
			||||||
                  const gchar *type,
 | 
					                  const gchar *login_type,
 | 
				
			||||||
                  const JsonNode *content,
 | 
					                  const JsonNode *content,
 | 
				
			||||||
                  GError **error);
 | 
					                  GError **error);
 | 
				
			||||||
    void (*token_refresh)(MatrixAPI *api,
 | 
					    void (*token_refresh)(MatrixAPI *api,
 | 
				
			||||||
@@ -789,7 +789,7 @@ void matrix_api_versions(MatrixAPI *api,
 | 
				
			|||||||
void matrix_api_login(MatrixAPI *api,
 | 
					void matrix_api_login(MatrixAPI *api,
 | 
				
			||||||
                      MatrixAPICallback callback,
 | 
					                      MatrixAPICallback callback,
 | 
				
			||||||
                      gpointer user_data,
 | 
					                      gpointer user_data,
 | 
				
			||||||
                      const gchar *type,
 | 
					                      const gchar *login_type,
 | 
				
			||||||
                      const JsonNode *content,
 | 
					                      const JsonNode *content,
 | 
				
			||||||
                      GError **error);
 | 
					                      GError **error);
 | 
				
			||||||
void matrix_api_token_refresh(MatrixAPI *api,
 | 
					void matrix_api_token_refresh(MatrixAPI *api,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -837,7 +837,7 @@ static void
 | 
				
			|||||||
i_login(MatrixAPI *api,
 | 
					i_login(MatrixAPI *api,
 | 
				
			||||||
        MatrixAPICallback callback,
 | 
					        MatrixAPICallback callback,
 | 
				
			||||||
        gpointer user_data,
 | 
					        gpointer user_data,
 | 
				
			||||||
        const gchar *type,
 | 
					        const gchar *login_type,
 | 
				
			||||||
        const JsonNode *content,
 | 
					        const JsonNode *content,
 | 
				
			||||||
        GError **error)
 | 
					        GError **error)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@@ -846,7 +846,7 @@ i_login(MatrixAPI *api,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    body = json_node_copy((JsonNode *)content);
 | 
					    body = json_node_copy((JsonNode *)content);
 | 
				
			||||||
    root_object = json_node_get_object(body);
 | 
					    root_object = json_node_get_object(body);
 | 
				
			||||||
    json_object_set_string_member(root_object, "type", type);
 | 
					    json_object_set_string_member(root_object, "type", login_type);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    _send(MATRIX_HTTP_API(api),
 | 
					    _send(MATRIX_HTTP_API(api),
 | 
				
			||||||
          callback, user_data,
 | 
					          callback, user_data,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user