Overview
Comment: | More documentation improvements. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
242b1ccd710e80871414cc1236be6b3c |
User & Date: | js on 2011-05-08 17:19:29 |
Other Links: | manifest | tags |
Context
2011-05-08
| ||
17:33 | Get rid of appendCStringWithoutUTF8Checking:encoding:length:]. check-in: 1eedeefc72 user: js tags: trunk | |
17:19 | More documentation improvements. check-in: 242b1ccd71 user: js tags: trunk | |
13:10 | Fix a typo in OFMD5Hash.m. check-in: b8052b3f65 user: js tags: trunk | |
Changes
Modified src/OFEnumerator.h from [49a8f37445] to [b57af49ccd].
︙ | ︙ | |||
60 61 62 63 64 65 66 67 68 69 70 | /** * \brief A protocol for fast enumeration. * * The OFFastEnumeration protocol needs to be implemented by all classes * supporting fast enumeration. */ @protocol OFFastEnumeration - (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state objects: (id*)objects count: (int)count; @end | > > > > > > > > > > | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | /** * \brief A protocol for fast enumeration. * * The OFFastEnumeration protocol needs to be implemented by all classes * supporting fast enumeration. */ @protocol OFFastEnumeration /** * \brief A method which is called by the code produced by the compiler when * doing a fast enumeration. * * \param state Context information for the enumeration * \param objects A pointer to an array where to put the objects * \param count The number of objects that can be stored at objects * \return The number of objects returned in objects or 0 when the enumeration * finished. */ - (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state objects: (id*)objects count: (int)count; @end |
Modified src/OFFile.h from [f7c069ca7f] to [e4a6ab01fe].
︙ | ︙ | |||
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | { int fileDescriptor; BOOL closable; BOOL isAtEndOfStream; } /** * \param path The path to the file to open as a string * \param mode The mode in which the file should be opened as a string * \return A new autoreleased OFFile */ + fileWithPath: (OFString*)path mode: (OFString*)mode; /** * \param fileDescriptor A file descriptor, returned from for example open(). * It is not closed when the OFFile object is deallocated! * \return A new autoreleased OFFile */ + fileWithFileDescriptor: (int)fileDescriptor; /** * \return The path of the current working directory */ + (OFString*)currentDirectoryPath; /** * \param path The path to check * \return A boolean whether there is a file at the specified path */ + (BOOL)fileExistsAtPath: (OFString*)path; /** * \param path The path to check * \return A boolean whether there is a directory at the specified path */ + (BOOL)directoryExistsAtPath: (OFString*)path; /** | > > > > > > > > > > | > > | > > | | | | | | | | | | | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | { int fileDescriptor; BOOL closable; BOOL isAtEndOfStream; } /** * \brief Creates a new OFFile with the specified path and mode. * * \param path The path to the file to open as a string * \param mode The mode in which the file should be opened as a string * \return A new autoreleased OFFile */ + fileWithPath: (OFString*)path mode: (OFString*)mode; /** * \brief Creates a new OFFile with the specified file descriptor. * * \param fileDescriptor A file descriptor, returned from for example open(). * It is not closed when the OFFile object is deallocated! * \return A new autoreleased OFFile */ + fileWithFileDescriptor: (int)fileDescriptor; /** * \brief Returns the path fo the current working directory. * * \return The path of the current working directory */ + (OFString*)currentDirectoryPath; /** * \brief Checks whether a file exists at the specified path. * * \param path The path to check * \return A boolean whether there is a file at the specified path */ + (BOOL)fileExistsAtPath: (OFString*)path; /** * \brief Checks whether a directory exists at the specified path. * * \param path The path to check * \return A boolean whether there is a directory at the specified path */ + (BOOL)directoryExistsAtPath: (OFString*)path; /** * \brief Creates a directory at the specified path. * * \param path The path of the directory */ + (void)createDirectoryAtPath: (OFString*)path; /** * \brief Returns an array with the files in the specified directory. * * \param path The path of the directory * \return An array of OFStrings with the files at the specified path */ + (OFArray*)filesInDirectoryAtPath: (OFString*)path; /** * \brief Changes the current working directory. * * \param path The new directory to change to */ + (void)changeToDirectory: (OFString*)path; /** * \brief Returns the date of the last modification of the file. * * \return The date of the last modification of the file */ + (OFDate*)modificationDateOfFile: (OFString*)path; #ifndef _PSP /** * \brief Changes the mode of a file. * * Only changes read-only flag on Windows. * * \param path The path to the file of which the mode should be changed as a * string * \param mode The new mode for the file */ + (void)changeModeOfFile: (OFString*)path toMode: (mode_t)mode; #endif #if !defined(_WIN32) && !defined(_PSP) /** * \brief Changes the owner of a file. * * Not available on Windows. * * \param path The path to the file of which the owner should be changed as a * string * \param owner The new owner for the file * \param group The new group for the file */ + (void)changeOwnerOfFile: (OFString*)path toOwner: (OFString*)owner group: (OFString*)group; #endif /** * \brief Copies a file. * * \param source The file to copy * \param destination The destination path */ + (void)copyFileAtPath: (OFString*)source toPath: (OFString*)destination; /** * \brief Renames a file. * * \param source The file to rename * \param destination The new name */ + (void)renameFileAtPath: (OFString*)source toPath: (OFString*)destination; /** * \brief Deletes a file. * * \param path The path to the file of which should be deleted as a string */ + (void)deleteFileAtPath: (OFString*)path; /** * \brief Deletes an empty directory. * * \param path The path to the directory which should be deleted as a string */ + (void)deleteDirectoryAtPath: (OFString*)path; #ifndef _WIN32 /** * \brief Creates a hard link for a file. * * Not available on Windows. * * \param source The path to the file of which should be linked as a string * \param destination The path to where the file should be linked as a string */ + (void)linkFileAtPath: (OFString*)source toPath: (OFString*)destination; #endif #if !defined(_WIN32) && !defined(_PSP) /** * \brief Creates a symbolink link for a file. * * Not available on Windows. * * \param source The path to the file of which should be symlinked as a string * \param destination The path to where the file should be symlinked as a string */ + (void)symlinkFileAtPath: (OFString*)source toPath: (OFString*)destination; #endif /** * \brief Initializes an already allocated OFFile. * * \param path The path to the file to open as a string * \param mode The mode in which the file should be opened as a string * \return An initialized OFFile */ - initWithPath: (OFString*)path mode: (OFString*)mode; /** * \brief Initializes an already allocated OFFile. * * \param fileDescriptor A file descriptor, returned from for example open(). * It is not closed when the OFFile object is deallocated! */ - initWithFileDescriptor: (int)fileDescriptor; @end |
︙ | ︙ |
Modified src/OFHTTPRequest.h from [55acdcf8df] to [73f77fc69e].
︙ | ︙ | |||
37 38 39 40 41 42 43 | #else @protocol OFHTTPRequestDelegate #endif #ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional #endif /** | | | | > | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | #else @protocol OFHTTPRequestDelegate #endif #ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional #endif /** * \brief A callback which is called when an OFHTTPRequest received headers. * * \param request The OFHTTPRequest which received the headers * \param headers The headers received * \param statusCode The status code received */ - (void)request: (OFHTTPRequest*)request didReceiveHeaders: (OFDictionary*)headers withStatusCode: (int)statusCode; /** * \brief A callback which is called when an OFHTTPRequest received data. * * This is useful for example if you want to update a status display. * * \param request The OFHTTPRequest which received data * \param data The data the OFHTTPRequest received * \param length The length of the data received, in bytes */ - (void)request: (OFHTTPRequest*)request didReceiveData: (const char*)data withLength: (size_t)length; /** * \brief A callback which is called when an OFHTTPRequest will follow a * redirect. * * If you want to get the headers and data for each redirect, set the number of * redirects to 0 and perform a new OFHTTPRequest for each redirect. However, * this callback will not be called then and you have to look at the status code * to detect a redirect. * * This callback will only be called if the OFHTTPRequest will follow a |
︙ | ︙ | |||
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | @property (copy) OFDictionary *headers; @property (assign) BOOL redirectsFromHTTPSToHTTPAllowed; @property (retain) id <OFHTTPRequestDelegate> delegate; @property (assign) BOOL storesData; #endif /** * \return A new, autoreleased OFHTTPRequest */ + request; /** * \param URL The URL for the request * \return A new, autoreleased OFHTTPRequest */ + requestWithURL: (OFURL*)URL; /** | > > > > | | | > > | | | > > | | | > > | | > > | > > | | | > > | | > > | | | | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | @property (copy) OFDictionary *headers; @property (assign) BOOL redirectsFromHTTPSToHTTPAllowed; @property (retain) id <OFHTTPRequestDelegate> delegate; @property (assign) BOOL storesData; #endif /** * \brief Creates a new OFHTTPRequest. * * \return A new, autoreleased OFHTTPRequest */ + request; /** * \brief Creates a new OFHTTPRequest with the specified URL. * * \param URL The URL for the request * \return A new, autoreleased OFHTTPRequest */ + requestWithURL: (OFURL*)URL; /** * \brief Initializes an already allocated OFHTTPRequest with the specified URL. * * \param URL The URL for the request * \return An initialized OFHTTPRequest */ - initWithURL: (OFURL*)URL; /** * \brief Sets the URL of the HTTP request. * * \param URL The URL of the HTTP request */ - (void)setURL: (OFURL*)URL; /** * \brief Returns the URL of the HTTP request. * * \return The URL of the HTTP request */ - (OFURL*)URL; /** * \brief Sets the request type of the HTTP request. * * \param requestType The request type of the HTTP request */ - (void)setRequestType: (of_http_request_type_t)requestType; /** * \brief Returns the request type of the HTTP request. * * \return The request type of the HTTP request */ - (of_http_request_type_t)requestType; /** * \brief Sets the query string of the HTTP request. * * \param queryString The query string of the HTTP request */ - (void)setQueryString: (OFString*)queryString; /** * \brief Returns the query string of the HTTP request. * * \return The query string of the HTTP request */ - (OFString*)queryString; /** * \brief Sets a dictionary with headers for the HTTP request. * * \param headers A dictionary with headers for the HTTP request */ - (void)setHeaders: (OFDictionary*)headers; /** * \brief Retrusn a dictionary with headers for the HTTP request. * * \return A dictionary with headers for the HTTP request. */ - (OFDictionary*)headers; /** * \brief Sets whether redirects from HTTPS to HTTP are allowed. * * \param allowed Whether redirects from HTTPS to HTTP are allowed */ - (void)setRedirectsFromHTTPSToHTTPAllowed: (BOOL)allowed; /** * \brief Returns whether redirects from HTTPS to HTTP will be allowed * * \return Whether redirects from HTTPS to HTTP will be allowed */ - (BOOL)redirectsFromHTTPSToHTTPAllowed; /** * \brief Sets the delegate of the HTTP request. * * \param delegate The delegate of the HTTP request */ - (void)setDelegate: (id <OFHTTPRequestDelegate>)delegate; /** * \brief Returns the delegate of the HTTP reqeust. * * \return The delegate of the HTTP request */ - (id <OFHTTPRequestDelegate>)delegate; /** * \brief Sets whether an OFDataArray with the data should be created. * * Setting this to NO is only useful if you are using the delegate to handle the * data. * * \param storesData Whether to store the data in an OFDataArray */ - (void)setStoresData: (BOOL)storesData; /** * \brief Returns whether an OFDataArray with the date should be created. * * \return Whether an OFDataArray with the data should be created */ - (BOOL)storesData; /** * \brief Performs the HTTP request and returns an OFHTTPRequestResult. * * \return An OFHTTPRequestResult with the result of the HTTP request */ - (OFHTTPRequestResult*)perform; /** * \brief Performs the HTTP request and returns an OFHTTPRequestResult. * * \param redirects The maximum number of redirects after which no further * attempt is done to follow the redirect, but instead the * redirect is returned as an OFHTTPRequest * \return An OFHTTPRequestResult with the result of the HTTP request */ - (OFHTTPRequestResult*)performWithRedirects: (size_t)redirects; |
︙ | ︙ | |||
251 252 253 254 255 256 257 258 259 260 261 262 | /// \cond internal - initWithStatusCode: (short)status headers: (OFDictionary*)headers data: (OFDataArray*)data; /// \endcond /** * \return The status code of the result of the HTTP request */ - (short)statusCode; /** | > > > > | > > > > | | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | /// \cond internal - initWithStatusCode: (short)status headers: (OFDictionary*)headers data: (OFDataArray*)data; /// \endcond /** * \brief Returns the state code of the result of the HTTP request. * * \return The status code of the result of the HTTP request */ - (short)statusCode; /** * \brief Returns the headers of the result of the HTTP request. * * \return The headers of the result of the HTTP request */ - (OFDictionary*)headers; /** * \brief Returns the data received for the HTTP request. * * Returns nil if storesData was set to NO. * * \return The data received for the HTTP request */ - (OFDataArray*)data; @end @interface OFObject (OFHTTPRequestDelegate) <OFHTTPRequestDelegate> @end extern Class of_http_request_tls_socket_class; |
Modified src/OFHash.h from [0b332e5a5e] to [7ac882f338].
︙ | ︙ | |||
25 26 27 28 29 30 31 | } #ifdef OF_HAVE_PROPERTIES @property (readonly) BOOL isCalculated; #endif /** | > > | > > | | > > > > > | < > > | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | } #ifdef OF_HAVE_PROPERTIES @property (readonly) BOOL isCalculated; #endif /** * \brief Returns the digest size of the hash, in bytes. * * \return The digest size of the hash, in bytes */ + (size_t)digestSize; /** * \brief Returns the block size of the hash, in bytes. * * \return The block size of the hash, in bytes */ + (size_t)blockSize; /** * \brief Adds a buffer to the hash to be calculated. * * \param buf The buffer which should be included into the calculation. * \param length The length of the buffer */ - (void)updateWithBuffer: (const char*)buf length: (size_t)length; /** * \brief Returns a buffer containing the hash. * * The size of the buffer depends on the hash used. The buffer is part of the * receiver's memory pool. * * \return A buffer containing the hash */ - (uint8_t*)digest; /** * \brief Returns a boolean whether the hash has already been calculated. * * \return A boolean whether the hash has already been calculated */ - (BOOL)isCalculated; @end |
Modified src/OFList.h from [e94ed80ca6] to [36f81a72ce].
︙ | ︙ | |||
47 48 49 50 51 52 53 54 55 56 57 58 | #ifdef OF_HAVE_PROPERTIES @property (readonly) of_list_object_t *firstListObject; @property (readonly) of_list_object_t *lastListObject; #endif /** * \return A new autoreleased OFList */ + list; /** | > > > > | > > | | | | > | > | | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | #ifdef OF_HAVE_PROPERTIES @property (readonly) of_list_object_t *firstListObject; @property (readonly) of_list_object_t *lastListObject; #endif /** * \brief Creates a new OFList. * * \return A new autoreleased OFList */ + list; /** * \brief Returns the first list object of the list. * * \return The first list object of the list */ - (of_list_object_t*)firstListObject; /** * \brief Retrusn the last list object of the list. * * \return The last list object of the list */ - (of_list_object_t*)lastListObject; /** * \brief Appends an object to the list. * * \param object The object to append * \return An of_list_object_t, needed to identify the object inside the list. * For example, if you want to remove an object from the list, you need * its of_list_object_t. */ - (of_list_object_t*)appendObject: (id)object; /** * \brief Prepends an object to the list. * * \param object The object to prepend * \return An of_list_object_t, needed to identify the object inside the list. * For example, if you want to remove an object from the list, you need * its of_list_object_t. */ - (of_list_object_t*)prependObject: (id)object; /** * \brief Inserts an object before another list object. * * \param object The object to insert * \param listObject The of_list_object_t of the object before which it should be * inserted * \return An of_list_object_t, needed to identify the object inside the list. * For example, if you want to remove an object from the list, you need * its of_list_object_t. */ - (of_list_object_t*)insertObject: (id)object beforeListObject: (of_list_object_t*)listObject; /** * \brief Inserts an object after another list object. * * \param object The object to insert * \param listObject The of_list_object_t of the object after which it should be * inserted * \return An of_list_object_t, needed to identify the object inside the list. * For example, if you want to remove an object from the list, you need * its of_list_object_t. */ - (of_list_object_t*)insertObject: (id)object afterListObject: (of_list_object_t*)listObject; /** * \brief Removes the object with the specified list object from the list. * * \param listObject The list object returned by append / prepend */ - (void)removeListObject: (of_list_object_t*)listObject; @end @interface OFListEnumerator: OFEnumerator |
︙ | ︙ |
Modified src/OFMD5Hash.h from [483543b630] to [a9b4a2c9de].
︙ | ︙ | |||
28 29 30 31 32 33 34 | union { uint8_t u8[64]; uint32_t u32[16]; } in; } /** | > > | | 28 29 30 31 32 33 34 35 36 37 38 39 40 | union { uint8_t u8[64]; uint32_t u32[16]; } in; } /** * \brief Creates a new OFMD5Hash. * * \return A new autoreleased OFMD5Hash */ + MD5Hash; @end |
Modified src/OFMutableArray.h from [1c792f75c6] to [17e878ade7].
︙ | ︙ | |||
25 26 27 28 29 30 31 | */ @interface OFMutableArray: OFArray { unsigned long mutations; } /** | | | | | | | | | | > | | | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | */ @interface OFMutableArray: OFArray { unsigned long mutations; } /** * \brief Adds an object to the OFArray. * * \param object An object to add */ - (void)addObject: (id)object; /** * \brief Adds an object to the OFArray at the specified index. * * \param object An object to add * \param index The index where the object should be added */ - (void)addObject: (id)object atIndex: (size_t)index; /** * \brief Replaces the first object equivalent to the specified object with the * other specified object. * * \param oldObject The object to replace * \param newObject The replacement object */ - (void)replaceObject: (id)oldObject withObject: (id)newObject; /** * \brief Replaces the object at the specified index with the specified object. * * \param index The index of the object to replace * \param object The replacement object */ - (void)replaceObjectAtIndex: (size_t)index withObject: (id)object; /** * \brief Replaces the first object that has the same address as the specified * object with the other specified object. * * \param oldObject The object to replace * \param newObject The replacement object */ - (void)replaceObjectIdenticalTo: (id)oldObject withObject: (id)newObject; /** * \brief Removes the first object equivalent to the specified object. * * \param object The object to remove */ - (void)removeObject: (id)object; /** * \brief Removes the first object that has the same address as the specified * object. * * \param object The object to remove */ - (void)removeObjectIdenticalTo: (id)object; /** * \brief Removes the object at the specified index. * * \param index The index of the object to remove */ - (void)removeObjectAtIndex: (size_t)index; /** * \brief Removes the specified amount of objects from the end of the OFArray. * * \param nObjects The number of objects to remove */ - (void)removeNObjects: (size_t)nObjects; /** * \brief Removes the specified amount of objects at the specified index. * * \param nobjects The number of objects to remove * \param index The index at which the objects are removed */ - (void)removeNObjects: (size_t)nObjects atIndex: (size_t)index; #ifdef OF_HAVE_BLOCKS /** * \brief Replaces each object with the object returned by the block. * * \param block The block which returns a new object for each object */ - (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block; #endif @end |
Modified src/OFMutableDictionary.h from [fcd7b9f568] to [b7198b1755].
︙ | ︙ | |||
25 26 27 28 29 30 31 | */ @interface OFMutableDictionary: OFDictionary { unsigned long mutations; } /** | | > | | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | */ @interface OFMutableDictionary: OFDictionary { unsigned long mutations; } /** * \brief Sets an object for a key. * * A key can be any object that conforms to the OFCopying protocol. * * \param key The key to set * \param object The object to set the key to */ - (void)setObject: (id)object forKey: (id <OFCopying>)key; /** * \brief Removes the object for the specified key from the dictionary. * * \param key The key whose object should be removed */ - (void)removeObjectForKey: (id)key; #ifdef OF_HAVE_BLOCKS /** * \brief Replaces each object with the object returned by the block. * * \param block The block which returns a new object for each object */ - (void)replaceObjectsUsingBlock: (of_dictionary_replace_block_t)block; #endif @end |