1 /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 
16 #ifndef TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_PUBLIC_SIGNATURE_DEF_FUNCTION_METADATA_H_
17 #define TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_PUBLIC_SIGNATURE_DEF_FUNCTION_METADATA_H_
18 
19 #include "tensorflow/c/c_api_macros.h"
20 #include "tensorflow/c/experimental/saved_model/public/signature_def_param_list.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif  // __cplusplus
25 
26 // An opaque type that corresponds to a SignatureDefFunction loaded from a
27 // SavedModel.
28 typedef struct TF_SignatureDefFunctionMetadata TF_SignatureDefFunctionMetadata;
29 
30 // Retrieves the arguments of the SignatureDefFunction. The caller is not
31 // responsible for freeing the returned pointer.
32 TF_CAPI_EXPORT extern const TF_SignatureDefParamList*
33 TF_SignatureDefFunctionMetadataArgs(
34     const TF_SignatureDefFunctionMetadata* list);
35 
36 // Retrieves the returns of the SignatureDefFunction. The caller is not
37 // responsible for freeing the returned pointer.
38 TF_CAPI_EXPORT extern const TF_SignatureDefParamList*
39 TF_SignatureDefFunctionMetadataReturns(
40     const TF_SignatureDefFunctionMetadata* list);
41 
42 #ifdef __cplusplus
43 }  // end extern "C"
44 #endif  // __cplusplus
45 
46 #endif  // TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_PUBLIC_SIGNATURE_DEF_FUNCTION_METADATA_H_
47