ObjFW  Update of "API Review for 1.0"

Overview

Artifact ID: e8d9e5493326520b4bc8fd38013cad021e1264faae0a587faedcc4f59b63cbd3
Page Name:API Review for 1.0
Date: 2021-04-08 02:08:51
Original User: js
Mimetype:text/x-markdown
Parent: 76498a783091375f60ee73f15710f264d0fc1a42e7d96496bfcd15a14fd1bfeb (diff)
Next 419b37dbf90cbf2a2206950d2248524fa6d2072c5a181975499ef08afa7de105
Content

API Review for 1.0

For the 1.0 release, all APIs should be reviewed, as starting 1.0, they are supposed to be stable.

Right now, we have fhe following:

Protocols

  • ✅ OFApplicationDelegate
  • ✅ OFCollection
  • ✅ OFComparing
  • ✅ OFCopying
  • ✅ OFCryptographicHash
  • ❌ OFDatagramSocketDelegate
  • ❌ OFDNSResolverHostDelegate
  • ❌ OFDNSResolverQueryDelegate
  • ✅ OFEnumeration
  • ✅ OFFastEnumeration
    • API given by the compiler
  • ❌ OFHTTPClientDelegate
  • ❌ OFHTTPServerDelegate
  • ✅ OFIPSocketAsyncConnecting
    • Private
  • ❌ OFIPXSocketDelegate
  • ❌ OFJSONRepresentation
  • ❌ OFKernelEventObserverDelegate
  • ❌ OFKeyValueCoding
  • ✅ OFLocking
  • ❌ OFMessagePackRepresentation
  • ✅ OFMutableCopying
  • ❌ OFObject
  • ❌ OFReadyForReadingObserving
  • ❌ OFReadyForWritingObserving
  • ❌ OFSequencedPacketSocketDelegate
  • ❌ OFSerialization
  • ❌ OFSPXSocketDelegate
  • ❌ OFSPXStreamSocketDelegate
  • ❌ OFStreamDelegate
  • ❌ OFStreamSocketDelegate
  • ❌ OFStringXMLUnescapingDelegate
  • ❌ OFTCPSocketDelegate
  • ❌ OFTLSSocket
  • ❌ OFTLSSocketDelegate
  • ❌ OFUDPSocketDelegate
  • ❌ OFXMLElementBuilderDelegate
  • ❌ OFXMLParserDelegate

Classes

  • ✅ NSString
    • Fake class has no API and is only used to make string boxing via @(cString) work.
  • ❌ OFAAAADNSResourceRecord
  • ❌ OFAcceptFailedException
  • ✅ OFAdjacentArray
    • Private
  • ✅ OFAdjacentSubarray
    • Private
  • ❌ OFADNSResourceRecord
  • ❌ OFAllocFailedException
  • ❌ OFAlreadyConnectedException
  • ❌ OFApplication
    • Needs a better method (name) to get argc/argv
  • ❌ OFArray
  • ❌ OFBindFailedException
  • ✅ OFBitSetCharacterSet
    • Private
  • ✅ OFBlock
    • Has no API
  • ✅ OFBytesValue
    • Private
  • ❌ OFChangeCurrentDirectoryPathFailedException
  • ❌ OFCharacterSet
  • ❌ OFCharacterSet (URLCharacterSets)
  • ❌ OFChecksumMismatchException
  • ❌ OFCNAMEDNSResourceRecord
  • ❌ OFColor
  • ❌ OFCondition
  • ❌ OFConditionBroadcastFailedException
  • ❌ OFConditionSignalFailedException
  • ❌ OFConditionStillWaitingException
  • ❌ OFConditionWaitFailedException
  • ❌ OFConnectionFailedException
  • ❌ OFConstantString
  • ❌ OFCopyItemFailedException
  • ✅ OFCountedMapTableSet
    • Private
  • ❌ OFCountedSet
  • ❌ OFCreateDirectoryFailedException
  • ❌ OFCreateSymbolicLinkFailedException
  • ❌ OFCreateWindowsRegistryKeyFailedException
  • ❌ OFData
  • ✅ OFData (CryptographicHashing)
  • ❌ OFDatagramSocket
  • ❌ OFData (MessagePackParsing)
  • ❌ OFDate
  • ❌ OFDeleteWindowsRegistryKeyFailedException
  • ❌ OFDeleteWindowsRegistryValueFailedException
  • ❌ OFDictionary
  • ❌ OFDictionary (FileAttributes)
  • ✅ OFDimensionValue
    • Private
  • ❌ OFDNSQuery
  • ❌ OFDNSQueryFailedException
  • ❌ OFDNSResolver
  • ✅ OFDNSResolverSettings
    • Private
  • ❌ OFDNSResourceRecord
  • ❌ OFDNSResponse
  • ❌ OFEnumerationMutationException
  • ❌ OFEnumerator
  • ✅ OFEpollKernelEventObserver
    • Private
  • ❌ OFException
  • ❌ OFFile
  • ❌ OFFileManager
  • ✅ OFFileURLHandler
    • Private
  • ❌ OFGetCurrentDirectoryPathFailedException
  • ❌ OFGetOptionFailedException
  • ❌ OFGetWindowsRegistryValueFailedException
  • ✅ OFGlobalBlock
    • Doesn't have an API
  • ❌ OFGZIPStream
  • ❌ OFHashAlreadyCalculatedException
  • ❌ OFHINFODNSResourceRecord
  • ❌ OFHMAC
  • ✅ OFHostAddressResolver
    • Private
  • ❌ OFHTTPClient
  • ❌ OFHTTPCookie
  • ❌ OFHTTPCookieManager
  • ❌ OFHTTPRequest
  • ❌ OFHTTPRequestFailedException
  • ❌ OFHTTPResponse
  • ❌ OFHTTPServer
  • ✅ OFHTTPURLHandler
    • Private
  • ❌ OFInflate64Stream
  • ❌ OFInflateStream
  • ❌ OFINICategory
  • ❌ OFINIFile
  • ✅ OFINIFileSettings
    • Private
  • ❌ OFInitializationFailedException
  • ❌ OFInvalidArgumentException
  • ❌ OFInvalidEncodingException
  • ❌ OFInvalidFormatException
  • ❌ OFInvalidJSONException
  • ❌ OFInvalidServerReplyException
  • ✅ OFInvertedCharacterSet
    • Private
  • ❌ OFInvocation
  • ✅ OFIPSocketAsyncConnector
    • Private
  • ❌ OFIPXSocket
  • ❌ OFKernelEventObserver
  • ✅ OFKqueueKernelEventObserver
    • Private
  • ❌ OFLHAArchive
  • ❌ OFLHAArchiveEntry
  • ✅ OFLHADecompressingStream
    • Private
  • ❌ OFLinkFailedException
  • ❌ OFList
  • ❌ OFListenFailedException
  • ❌ OFLoadPluginFailedException
  • ❌ OFLocale
  • ❌ OFLockFailedException
  • ❌ OFMalformedXMLException
  • ✅ OFMallocBlock
    • Doesn't have an API
  • ❌ OFMapTable
  • ✅ OFMapTableDictionary
    • Private
  • ❌ OFMapTableEnumerator
  • ✅ OFMapTableSet
    • Private
  • ✅ OFMD5Hash
    • Only overrides methods from superclass
  • ❌ OFMemoryNotPartOfObjectException
  • ❌ OFMessagePackExtension
  • ❌ OFMethodSignature
  • ❌ OFMoveItemFailedException
  • ✅ OFMutableAdjacentArray
    • Private
  • ❌ OFMutableArray
  • ❌ OFMutableData
  • ❌ OFMutableDictionary
  • ❌ OFMutableLHAArchiveEntry
  • ✅ OFMutableMapTableDictionary
    • Private
  • ✅ OFMutableMapTableSet
    • Private
  • ❌ OFMutablePair
  • ❌ OFMutableSet
  • ❌ OFMutableString
  • ❌ OFMutableTarArchiveEntry
  • ❌ OFMutableTriple
  • ❌ OFMutableURL
  • ✅ OFMutableUTF8String
    • Private
  • ❌ OFMutableZIPArchiveEntry
  • ✅ OFMutex
  • ❌ OFMXDNSResourceRecord
  • ✅ OFNonretainedObjectValue
    • Private
  • ❌ OFNotImplementedException
  • ❌ OFNotOpenException
  • ❌ OFNSDNSResourceRecord
  • ✅ OFNull
  • ❌ OFNumber
  • ❌ OFObject (KeyValueCoding) <OFKeyValueCoding>
  • ❌ OFObject <OFObject>
  • ❌ OFObject (OFSerialization)
  • ❌ OFObserveFailedException
  • ❌ OFOpenItemFailedException
  • ❌ OFOpenWindowsRegistryKeyFailedException
  • ❌ OFOptionsParser
  • ❌ OFOutOfMemoryException
  • ❌ OFOutOfRangeException
  • ❌ OFPair
    • Should be an OFCollection
    • Should conform to OFComparing
  • ❌ OFPlugin
  • ✅ OFPointerValue
    • Private
  • ✅ OFPointValue
    • Private
  • ✅ OFPollKernelEventObserver
    • Private
  • ❌ OFPTRDNSResourceRecord
  • ✅ OFRangeCharacterSet
    • Private
  • ✅ OFRangeValue
    • Private
  • ❌ OFReadFailedException
  • ❌ OFReadOrWriteFailedException
  • ✅ OFRectangleValue
    • Private
  • ✅ OFRecursiveMutex
  • ❌ OFRemoveItemFailedException
  • ❌ OFResolveHostFailedException
  • ❌ OFRetrieveItemAttributesFailedException
  • ✅ OFRIPEMD160Hash
    • Only overrides methods from superclass
  • ❌ OFRPDNSResourceRecord
  • ❌ OFRunLoop
  • ✅ OFSandbox
    • Private in 1.0 (but public in trunk)
  • ✅ OFSandboxActivationFailedException
    • Private in 1.0 (but public in trunk)
  • ❌ OFSecureData
  • ❌ OFSeekableStream
  • ❌ OFSeekFailedException
  • ✅ OFSelectKernelEventObserver
    • Private
  • ❌ OFSequencedPacketSocket
  • ❌ OFSet
  • ❌ OFSetItemAttributesFailedException
  • ❌ OFSetOptionFailedException
  • ❌ OFSettings
  • ❌ OFSetWindowsRegistryValueFailedException
  • ✅ OFSHA1Hash
    • Only overrides methods from superclass
  • ✅ OFSHA224Hash
    • Only overrides methods from superclass
  • ✅ OFSHA224Or256Hash
    • Has no API - only public because its subclasses are public
  • ✅ OFSHA256Hash
    • Only overrides methods from superclass
  • ✅ OFSHA384Hash
    • Only overrides methods from superclass
  • ✅ OFSHA384Or512Hash
    • Has no API - only public because its subclasses are public
  • ✅ OFSHA512Hash
    • Only overrides methods from superclass
  • ❌ OFSOADNSResourceRecord
  • ❌ OFSortedList
  • ❌ OFSPXSocket
  • ❌ OFSPXStreamSocket
  • ❌ OFSRVDNSResourceRecord
  • ✅ OFStackBlock
    • Doesn't have an API
  • ❌ OFStdIOStream
  • ❌ OFStillLockedException
  • ❌ OFStream
  • ❌ OFStreamSocket
  • ❌ OFString
  • ✅ OFString (CryptographicHashing)
  • ❌ OFString (JSONParsing)
  • ❌ OFString (PathAdditions)
  • ❌ OFString (PropertyListParsing)
  • ❌ OFString (Serialization)
  • ❌ OFString (URLEncoding)
  • ❌ OFString (XMLEscaping)
  • ❌ OFString (XMLUnescaping)
  • ✅ OFSubarray
    • Private
  • ❌ OFSubprocess
  • ❌ OFSystemInfo
  • ❌ OFTarArchive
  • ❌ OFTarArchiveEntry
  • ❌ OFTCPSocket
  • ✅ OFTCPSocketSOCKS5Connector
    • Private
  • ❌ OFThread
  • ❌ OFThreadJoinFailedException
  • ✅ OFThreadPool
  • ❌ OFThreadStartFailedException
  • ❌ OFThreadStillRunningException
  • ❌ OFTimer
  • ❌ OFTriple
    • Should be an OFCollection
    • Should conform to OFComparing
  • ❌ OFTruncatedDataException
  • ❌ OFTXTDNSResourceRecord
  • ❌ OFUDPSocket
  • ❌ OFUnboundNamespaceException
  • ❌ OFUnboundPrefixException
  • ❌ OFUndefinedKeyException
  • ❌ OFUnknownXMLEntityException
  • ❌ OFUnlockFailedException
  • ❌ OFUnsupportedProtocolException
  • ❌ OFUnsupportedVersionException
  • ❌ OFURL
  • ❌ OFURLHandler
  • ✅ OFUTF8String
    • Private
  • ❌ OFValue
  • ✅ OFWin32ConsoleStdIOStream
    • Private
  • ❌ OFWindowsRegistryKey
  • ❌ OFWriteFailedException
  • ❌ OFXMLAttribute
  • ✅ OFXMLCDATA
  • ✅ OFXMLCharacters
  • ❌ OFXMLComment
    • Needs a property to access the comment - -[stringValue] is just @""
  • ❌ OFXMLElement
  • ❌ OFXMLElementBuilder
  • ❌ OFXMLElement (OFSerialization)
  • ❌ OFXMLNode
  • ❌ OFXMLParser
  • ❌ OFXMLProcessingInstructions
  • ❌ OFZIPArchive
  • ❌ OFZIPArchiveEntry

Commands

Get all protocols

find src -name '*.h' -and -not -name '*+Private.h' -and -not -wholename 'src/bridge/*' -and -not -wholename 'src/runtime/*' -exec grep '^@protocol ' {} \; | grep -v '^@protocol.*;' | sed 's/^@protocol /* ❌ /' | sed 's/:.*//' | sed 's/<.*>//' | sort

Get all classes

find src -name '*.h' -and -not -name '*+Private.h' -and -not -wholename 'src/bridge/*' -and -not -wholename 'src/runtime/*' -exec grep '^@interface ' {} \; | sed 's/^@interface /* ❌ /' | sed 's/:.*//' | sed 's/OF_GENERIC(.*)//' | sed 's/</\&lt;/' | sed 's/>/\&gt;/' | sort