Updated formatting

This commit is contained in:
Prianka Liz Kariat 2023-01-13 21:18:10 +05:30
parent c4c07acc1e
commit 95f9f0fb88
2 changed files with 30 additions and 6 deletions

View File

@ -18,8 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
/** /**
* @enum MPPTasksErrorCode * @enum MPPTasksErrorCode
* This enum specifies error codes for MediaPipe Task Library. * This enum specifies error codes for errors thrown by iOS MediaPipe Task Library.
* It maintains a 1:1 mapping to MediaPipeTasksStatus of the C ++libray.
*/ */
typedef NS_ENUM(NSUInteger, MPPTasksErrorCode) { typedef NS_ENUM(NSUInteger, MPPTasksErrorCode) {
@ -27,35 +26,60 @@ typedef NS_ENUM(NSUInteger, MPPTasksErrorCode) {
/** Indicates the operation was cancelled, typically by the caller. */ /** Indicates the operation was cancelled, typically by the caller. */
MPPTasksErrorCodeCancelledError = 1, MPPTasksErrorCodeCancelledError = 1,
/** Indicates an unknown error occurred. */ /** Indicates an unknown error occurred. */
MPPTasksErrorCodeUnknownError = 2, MPPTasksErrorCodeUnknownError = 2,
/** Indicates the caller specified an invalid argument, such as a malformed filename. */ /** Indicates the caller specified an invalid argument, such as a malformed filename. */
MPPTasksErrorCodeInvalidArgumentError = 3, MPPTasksErrorCodeInvalidArgumentError = 3,
/** Indicates a deadline expired before the operation could complete. */ /** Indicates a deadline expired before the operation could complete. */
MPPTasksErrorCodeDeadlineExceededError = 4, MPPTasksErrorCodeDeadlineExceededError = 4,
/** Indicates some requested entity (such as a file or directory) was not found. */ /** Indicates some requested entity (such as a file or directory) was not found. */
MPPTasksErrorCodeNotFoundError = 5, MPPTasksErrorCodeNotFoundError = 5,
/** Indicates that the entity a caller attempted to create (such as a file or directory) is already present. */
/** Indicates that the entity a caller attempted to create (such as a file or directory) is
already present. */
MPPTasksErrorCodeAlreadyExistsError = 6, MPPTasksErrorCodeAlreadyExistsError = 6,
/** Indicates that the caller does not have permission to execute the specified operation. */ /** Indicates that the caller does not have permission to execute the specified operation. */
MPPTasksErrorCodePermissionDeniedError = 7, MPPTasksErrorCodePermissionDeniedError = 7,
/** Indicates some resource has been exhausted, perhaps a per-user quota, or perhaps the entire
file system is out of space. */
MPPTasksErrorCodeResourceExhaustedError = 8, MPPTasksErrorCodeResourceExhaustedError = 8,
/** Indicates that the operation was rejected because the system is not in a state required for
the operation's execution. For example, a directory to be deleted may be non-empty, an "rmdir"
operation is applied to a non-directory, etc. */
MPPTasksErrorCodeFailedPreconditionError = 9, MPPTasksErrorCodeFailedPreconditionError = 9,
/** Indicates the operation was aborted, typically due to a concurrency issue such as a sequencer
check failure or a failed transaction. */
MPPTasksErrorCodeAbortedError = 10, MPPTasksErrorCodeAbortedError = 10,
/** Indicates the operation was attempted past the valid range, such as seeking or reading past an
end-of-file. */
MPPTasksErrorCodeOutOfRangeError = 11, MPPTasksErrorCodeOutOfRangeError = 11,
/** Indicates the operation is not implemented or supported in this service. In this case, the
operation should not be re-attempted. */
MPPTasksErrorCodeUnimplementedError = 12, MPPTasksErrorCodeUnimplementedError = 12,
/** Indicates an internal error has occurred and some invariants expected by the underlying system
have not been satisfied. This error code is reserved for serious errors. */
MPPTasksErrorCodeInternalError = 13, MPPTasksErrorCodeInternalError = 13,
/** Indicates the service is currently unavailable and that this is most likely a transient
condition. */
MPPTasksErrorCodeUnavailableError = 14, MPPTasksErrorCodeUnavailableError = 14,
/** Indicates that unrecoverable data loss or corruption has occurred. */
MPPTasksErrorCodeDataLossError = 15, MPPTasksErrorCodeDataLossError = 15,
/** Indicates that the request does not have valid authentication credentials for the operation.
*/
MPPTasksErrorCodeUnauthenticatedError = 16, MPPTasksErrorCodeUnauthenticatedError = 16,
// The first error code in MPPTasksErrorCode (for internal use only). // The first error code in MPPTasksErrorCode (for internal use only).

View File

@ -79,7 +79,7 @@ NS_SWIFT_NAME(TextClassifier)
* error in initializing the text classifier. * error in initializing the text classifier.
*/ */
- (nullable instancetype)initWithOptions:(MPPTextClassifierOptions *)options - (nullable instancetype)initWithOptions:(MPPTextClassifierOptions *)options
error:(NSError **)error NS_DESIGNATED_INITIALIZER; error:(NSError **)error NS_DESIGNATED_INITIALIZER;
/** /**
* Performs classification on the input text. * Performs classification on the input text.
@ -90,8 +90,8 @@ NS_SWIFT_NAME(TextClassifier)
* *
* @return A `MPPTextClassifierResult` object that contains a list of text classifications. * @return A `MPPTextClassifierResult` object that contains a list of text classifications.
*/ */
- (nullable MPPTextClassifierResult *)classifyText:(NSString *)text error:(NSError **)error NS_SWIFT_NAME(classify(text:)); - (nullable MPPTextClassifierResult *)classifyText:(NSString *)text
error:(NSError **)error NS_SWIFT_NAME(classify(text:));
- (instancetype)init NS_UNAVAILABLE; - (instancetype)init NS_UNAVAILABLE;