Exemplo n.º 1
0
        /// <summary>
        /// Retrieves images of all sticker groups in the database.
        /// </summary>
        /// <since_tizen> 10 </since_tizen>
        /// <feature>http://tizen.org/feature/ui_service.sticker</feature>
        /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
        /// <exception cref="InvalidOperationException">This exception can be due to operation failed.</exception>
        public static IEnumerable <GroupImage> GetGroupImageList()
        {
            var imageList = new List <GroupImage>();
            StickerConsumerGroupImageListForeachCallback _groupImageForeachDelegate = (IntPtr group, UriType type, IntPtr uri, IntPtr userData) =>
            {
                imageList.Add(new GroupImage(Marshal.PtrToStringAnsi(group), type, Marshal.PtrToStringAnsi(uri)));
            };
            ErrorCode error = StickerConsumerGroupImageListForeachAll(_handle, _groupImageForeachDelegate, IntPtr.Zero);

            if (error != ErrorCode.None)
            {
                Log.Error(LogTag, "GetGroupImageList Failed with error " + error);
                throw ExceptionFactory.CreateException(error);
            }

            return(imageList);
        }
Exemplo n.º 2
0
 internal static extern ErrorCode StickerConsumerGroupImageListForeachAll(IntPtr stickerConsumer, StickerConsumerGroupImageListForeachCallback callback, IntPtr userData);