Skip to content

Commit

Permalink
Firestore project: Import of API interfaces.
Browse files Browse the repository at this point in the history
Import of firebase-ios-sdk from Github.

  - 07f4695 Updates Changelog for 4.5.0 release (firebase#908) by Zsika Phillip <protocol86@users.noreply.github.com>
  - 2b82a2e Allow serializing arbitrary length FieldValues (firebase#889) by rsgowman <rgowman@google.com>
  - 3e41f25 Fix test failures that occur during prod build (firebase#910) by rsgowman <rgowman@google.com>
  - f122cf7 Fix MutationQueue issue resulting in re-sending acknowled... by Michael Lehenbauer <mikelehen@gmail.com>
  - 7522314 Partial wrapping of pb_ostream_t (pt2) (firebase#903) by rsgowman <rgowman@google.com>
  - 0d3adb1 Partial wrapping of pb_ostream_t (pt1) (firebase#899) by rsgowman <rgowman@google.com>
  - e41f4b1 Merge Release 4.10.1 into Master (firebase#896) by zxu <zxu@google.com>
  - 2ae36f1 [De]Serialize FieldValue map_values ("Objects") (firebase#878) by rsgowman <rgowman@google.com>
  - 5930ad2 Factor out a universal build script (firebase#884) by Gil <mcg@google.com>
  - 8ef0f14 Adds Email link sign-in (firebase#882) by Paul Beusterien <paulbeusterien@google.com>
  - 0b8f216 Merge pull request firebase#880 from firebase/release-4.10.0 by Paul Beusterien <paulbeusterien@google.com>
  - 8311c64 port paths to FSTDocumentKey (firebase#877) by zxu <zxu@google.com>
  - 34ebf10 Add 10 second timeout waiting for connection before clien... by Michael Lehenbauer <mikelehen@gmail.com>
  - 1c40e7a add converters and port paths to FSTQuery (firebase#869) by zxu <zxu@google.com>
  - 9b5b4d8 Serialize (and deserialize) string values (firebase#864) by rsgowman <rgowman@google.com>
  - c6f73f7 Fix the issue completion handler is not triggered in subs... by Chen Liang <chliang@google.com>
  - 1ecf690 Add FieldValue.boolean_value() (firebase#862) by rsgowman <rgowman@google.com>
  - 3e7c062 replacing Auth by C++ auth implementation (firebase#802) by zxu <zxu@google.com>
  - 13aeb61 Eliminate TypedValue and serialize direct from FieldValue... by rsgowman <rgowman@google.com>

ORIGINAL_AUTHOR=Gil <wilhuff@github.com>
PiperOrigin-RevId: 188809445
  • Loading branch information
Gil authored and zxu123 committed May 23, 2018
1 parent 9332916 commit 16ecaaf
Showing 1 changed file with 115 additions and 0 deletions.
115 changes: 115 additions & 0 deletions Firestore/core/include/firebase/firestore/firestore_errors.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/*
* Copyright 2018 Google
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_FIRESTORE_ERRORS_H_
#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_FIRESTORE_ERRORS_H_

namespace firebase {
namespace firestore {

/**
* Error codes used by Cloud Firestore.
*
* The codes are in sync with the Firestore iOS client SDK header file
* FIRFirestoreErrors.h.
*/
enum FirestoreErrorCode {
/**
* The operation completed successfully. NSError objects will never have a
* code with this value.
*/
Ok = 0,

/** The operation was cancelled (typically by the caller). */
Cancelled = 1,

/** Unknown error or an error from a different error domain. */
Unknown = 2,

/**
* Client specified an invalid argument. Note that this differs from
* FailedPrecondition. InvalidArgument indicates arguments that are
* problematic regardless of the state of the system (e.g., an invalid field
* name).
*/
InvalidArgument = 3,

/**
* Deadline expired before operation could complete. For operations that
* change the state of the system, this error may be returned even if the
* operation has completed successfully. For example, a successful response
* from a server could have been delayed long enough for the deadline to
* expire.
*/
DeadlineExceeded = 4,

/** Some requested document was not found. */
NotFound = 5,

/** Some document that we attempted to create already exists. */
AlreadyExists = 6,

/** The caller does not have permission to execute the specified operation. */
PermissionDenied = 7,

/**
* Some resource has been exhausted, perhaps a per-user quota, or perhaps the
* entire file system is out of space.
*/
ResourceExhausted = 8,

/**
* Operation was rejected because the system is not in a state required for
* the operation's execution.
*/
FailedPrecondition = 9,

/**
* The operation was aborted, typically due to a concurrency issue like
* transaction aborts, etc.
*/
Aborted = 10,

/** Operation was attempted past the valid range. */
OutOfRange = 11,

/** Operation is not implemented or not supported/enabled. */
Unimplemented = 12,

/**
* Internal errors. Means some invariants expected by underlying system has
* been broken. If you see one of these errors, something is very broken.
*/
Internal = 13,

/**
* The service is currently unavailable. This is a most likely a transient
* condition and may be corrected by retrying with a backoff.
*/
Unavailable = 14,

/** Unrecoverable data loss or corruption. */
DataLoss = 15,

/** The request does not have valid authentication credentials for the
operation. */
Unauthenticated = 16
};

} // namespace firestore
} // namespace firebase

#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_FIRESTORE_ERRORS_H_

0 comments on commit 16ecaaf

Please sign in to comment.