/// <summary> /// Retrieves all sticker data in the sticker database. /// </summary> /// <since_tizen> 10 </since_tizen> /// <feature>http://tizen.org/feature/ui_service.sticker</feature> /// <param name="offset">The start position (Starting from zero).</param> /// <param name="count">The number of stickers to be retrieved with respect to the offset.</param> /// <exception cref="NotSupportedException">The required feature is not supported.</exception> /// <exception cref="ArgumentException">This exception can be due to an invalid parameter.</exception> /// <exception cref="InvalidOperationException"> /// This can occur due to the following reasons: /// 1) This exception can be due to out of memory. /// 2) This exception can be due to operation failed. /// </exception> public static IEnumerable <StickerData> GetAllStickers(int offset, int count) { var stickers = new List <StickerData>(); StickerProviderDataForeachCallback _dataForeachDelegate = (IntPtr stickerData, IntPtr userData) => { StickerData data = new StickerData(stickerData); stickers.Add(data); }; ErrorCode error = StickerProviderDataForeachAll(_handle, offset, count, out var result, _dataForeachDelegate, IntPtr.Zero); if (error != ErrorCode.None) { Log.Error(LogTag, "GetAllStickers Failed with error " + error); throw ExceptionFactory.CreateException(error); } return(stickers); }
internal static extern ErrorCode StickerProviderDataForeachAll(IntPtr stickerProvider, int offset, int count, out int result, StickerProviderDataForeachCallback callback, IntPtr userData);