data.h

作者: 李潇南 | 来源:发表于2017-09-11 09:38 被阅读14次
DISPATCH_DATA_DECL(dispatch_data);

#define dispatch_data_empty \
        DISPATCH_GLOBAL_OBJECT(dispatch_data_t, _dispatch_data_empty)
__OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0)
DISPATCH_EXPORT struct dispatch_data_s _dispatch_data_empty;

__OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0)
DISPATCH_EXPORT DISPATCH_RETURNS_RETAINED DISPATCH_WARN_RESULT DISPATCH_NOTHROW
dispatch_data_t
dispatch_data_create(const void *buffer,
    size_t size,
    dispatch_queue_t _Nullable queue,
    dispatch_block_t _Nullable destructor);
#endif /* __BLOCKS__ */

/*!
 * @function dispatch_data_get_size
 * Returns the logical size of the memory region(s) represented by the specified
 * dispatch data object.
 *
 * @param data  The dispatch data object to query.
 * @result  The number of bytes represented by the data object.
 */
__OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0)
DISPATCH_EXPORT DISPATCH_PURE DISPATCH_NONNULL1 DISPATCH_NOTHROW
size_t
dispatch_data_get_size(dispatch_data_t data);

__OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0)
DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_RETURNS_RETAINED
DISPATCH_WARN_RESULT DISPATCH_NOTHROW
dispatch_data_t
dispatch_data_create_map(dispatch_data_t data,
    const void *_Nullable *_Nullable buffer_ptr,
    size_t *_Nullable size_ptr);

__OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0)
DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_RETURNS_RETAINED
DISPATCH_WARN_RESULT DISPATCH_NOTHROW
dispatch_data_t
dispatch_data_create_concat(dispatch_data_t data1, dispatch_data_t data2);

__OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0)
DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_RETURNS_RETAINED
DISPATCH_WARN_RESULT DISPATCH_NOTHROW
dispatch_data_t
dispatch_data_create_subrange(dispatch_data_t data,
    size_t offset,
    size_t length);


typedef bool (^dispatch_data_applier_t)(dispatch_data_t region,
    size_t offset,
    const void *buffer,
    size_t size);

__OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0)
DISPATCH_EXPORT DISPATCH_NONNULL_ALL DISPATCH_NOTHROW
bool
dispatch_data_apply(dispatch_data_t data, dispatch_data_applier_t applier);
#endif /* __BLOCKS__ */

__OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0)
DISPATCH_EXPORT DISPATCH_NONNULL1 DISPATCH_NONNULL3 DISPATCH_RETURNS_RETAINED
DISPATCH_WARN_RESULT DISPATCH_NOTHROW
dispatch_data_t
dispatch_data_copy_region(dispatch_data_t data,
    size_t location,
    size_t *offset_ptr);


相关文章

  • data.h

  • dispatch data.h

    版本:iOS13.5 data.h dispatch其他文件通道 索引 从给定的连续内存缓冲区中创建一个调度数据对...

网友评论

      本文标题:data.h

      本文链接:https://www.haomeiwen.com/subject/uypxsxtx.html