Exemple #1
0
        /// <summary>
        /// Retrieves all keywords in the sticker 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 <string> GetAllKeywords()
        {
            var keywords = new List <string>();
            StickerConsumerKeywordListForeachCallback _keywordForeachDelegate = (IntPtr keyword, IntPtr userData) =>
            {
                string stickerKeyword = Marshal.PtrToStringAnsi(keyword);
                keywords.Add(stickerKeyword);
            };
            ErrorCode error = StickerConsumerKeywordListForeachAll(_handle, _keywordForeachDelegate, IntPtr.Zero);

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

            return(keywords);
        }
 internal static extern ErrorCode StickerConsumerKeywordListForeachAll(IntPtr stickerConsumer, StickerConsumerKeywordListForeachCallback callback, IntPtr userData);