//// BXConstants.h// BaseTen//// Copyright (C) 2006-2008 Marko Karppinen & Co. LLC.//// Before using this software, please review the available licensing options// by visiting http://basetenframework.org/licensing/ or by contacting// us at sales@karppinen.fi. Without an additional license, this software// may be distributed only in compliance with the GNU General Public License.////// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License, version 2.0,// as published by the Free Software Foundation.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA//// $Id$//#import <Foundation/Foundation.h>#import <BaseTen/BXExport.h>/** * \file * Various constants used by BaseTen */BX_EXPORTNSString*constkBXNoDatabaseURIException;BX_EXPORTNSString*constkBXUnsupportedDatabaseException;BX_EXPORTNSString*constkBXExceptionUnhandledError;BX_EXPORTNSString*constkBXFailedToExecuteQueryException;BX_EXPORTNSString*constkBXPGUnableToObserveModificationsException;BX_EXPORTNSString*constkBXDatabaseContextKey;BX_EXPORTNSString*constkBXURIKey;BX_EXPORTNSString*constkBXObjectIDsKey;BX_EXPORTNSString*constkBXInsertNotification;BX_EXPORTNSString*constkBXDeleteNotification;BX_EXPORTNSString*constkBXUpdateNotification;BX_EXPORTNSString*constkBXLockNotification;BX_EXPORTNSString*constkBXUnlockNotification;BX_EXPORTNSString*constkBXObjectsKey;BX_EXPORTNSString*constkBXEntityDescriptionKey;BX_EXPORTNSString*constkBXContextKey;BX_EXPORTNSString*constkBXErrorKey;BX_EXPORTNSString*constkBXObjectKey;BX_EXPORTNSString*constkBXObjectLockStatusKey;BX_EXPORTNSString*constkBXObjectIDKey;BX_EXPORTNSString*constkBXPrimaryKeyFieldsKey;BX_EXPORTNSString*constkBXStreamErrorKey;BX_EXPORTNSString*constkBXConnectionSuccessfulNotification;BX_EXPORTNSString*constkBXConnectionFailedNotification;BX_EXPORTNSString*constkBXConnectionSetupAlertDidEndNotification;BX_EXPORTNSString*constkBXGotDatabaseURINotification;BX_EXPORTNSString*constkBXAttributeKey;BX_EXPORTNSString*constkBXUnknownPredicatesKey;BX_EXPORTNSString*constkBXRelationshipKey;BX_EXPORTNSString*constkBXRelationshipsKey;BX_EXPORTNSString*constkBXPredicateKey;BX_EXPORTNSString*constkBXOwnerObjectVariableName;BX_EXPORTNSString*constkBXErrorDomain;BX_EXPORTNSString*constkBXErrorMessageKey;enumBXErrorCode{kBXErrorNone=0,kBXErrorUnsuccessfulQuery,kBXErrorConnectionFailed,kBXErrorNoPrimaryKey,kBXErrorNoTableForEntity,kBXErrorLockNotAcquired,kBXErrorNoDatabaseURI,kBXErrorObservingFailed,kBXErrorObjectNotFound,kBXErrorMalformedDatabaseURI,kBXErrorAuthenticationFailed,kBXErrorNullConstraintNotSatisfied,kBXErrorSSLError,kBXErrorConnectionLost,kBXErrorUnknown,kBXErrorIncompleteDatabaseURI,kBXErrorPredicateNotAllowedForUpdateDelete,kBXErrorGenericNetworkError,kBXErrorObjectAlreadyDeleted,kBXErrorSSLUnavailable,kBXErrorSSLCertificateVerificationFailed,kBXErrorUserCancel,kBXErrorHostResolutionFailed};enumBXModificationType{kBXNoModification=0,kBXInsertModification,kBXUpdateModification,kBXDeleteModification,kBXUndefinedModification};enumBXRelationshipType{kBXRelationshipUndefined=0,kBXRelationshipOneToOne=(1<<0),kBXRelationshipOneToMany=(1<<1),kBXRelationshipManyToMany=(1<<2)};/** \brief SSL certificate policy. */enumBXCertificatePolicy{kBXCertificatePolicyUndefined=0,/**< Certificate policy is unspecified. */kBXCertificatePolicyAllow,/**< Untrusted certificates are allowed. */kBXCertificatePolicyDeny,/**< Untrusted certificates are denied. */kBXCertificatePolicyDisplayTrustPanel/**< A trust panel will be displayed to the user. */};/** \brief SSL connection mode. */enumBXSSLMode{kBXSSLModeUndefined=0,/**< SSL mode is unspecified. */kBXSSLModeRequire,/**< SSL is required. */kBXSSLModeDisable,/**< SSL has been disabled. */kBXSSLModePrefer/**< A secure connection will be attempted at first. */};enumBXConnectionErrorHandlingState{kBXConnectionErrorNone=0,kBXConnectionErrorResolving,kBXConnectionErrorNoReconnect};enumBXEntityCapability{kBXEntityCapabilityNone=0,kBXEntityCapabilityAutomaticUpdate=(1<<0),kBXEntityCapabilityRelationships=(1<<1)};enumBXDatabaseObjectKeyType{kBXDatabaseObjectNoKeyType=0,kBXDatabaseObjectUnknownKey,kBXDatabaseObjectPrimaryKey,kBXDatabaseObjectKnownKey,kBXDatabaseObjectForeignKey};/** \brief Property kind. */enumBXPropertyKind{kBXPropertyNoKind=0,/**< Kind is unspecified. */kBXPropertyKindAttribute,/**< The property is an attribute. */kBXPropertyKindRelationship/**< The property is a relationship. */};enumBXDatabaseObjectModelSerializationOptions{kBXDatabaseObjectModelSerializationOptionNone=0,kBXDatabaseObjectModelSerializationOptionRelationshipsUsingFkeyNames=(1<<0),kBXDatabaseObjectModelSerializationOptionRelationshipsUsingTargetRelationNames=(1<<1),kBXDatabaseObjectModelSerializationOptionExcludeForeignKeyAttributes=(1<<2),kBXDatabaseObjectModelSerializationOptionCreateRelationshipsAsOptional=(1<<3),kBXDatabaseObjectModelSerializationOptionIncludeSuperEntities=(1<<4)};