Example #1
0
        /// <summary>
        /// A public constructor for Oem class to create a Oem instance for the given tapi handle.
        /// </summary>
        /// <param name="handle">The tapi handle.</param>
        public Oem(TapiHandle handle)
        {
            if (handle == null)
            {
                throw new ArgumentNullException("TapiHandle parameter is null");
            }

            _handle = handle._handle;
        }
Example #2
0
        /// <summary>
        /// Gets the instance of Phonebook class.
        /// </summary>
        /// <since_tizen> 4 </since_tizen>
        /// <param name="handle">An instance of TapiHandle obtained from InitTapi in TapiManager API.</param>
        /// <exception cref="ArgumentNullException">Thrown when handle is passed as null.</exception>
        public Phonebook(TapiHandle handle)
        {
            if (handle == null)
            {
                throw new ArgumentNullException("Handle is null");
            }

            _handle = handle._handle;
        }
Example #3
0
        /// <summary>
        /// Deinitializes the TAPI Handle.
        /// </summary>
        /// <since_tizen> 4 </since_tizen>
        /// <feature>http://tizen.org/feature/network.telephony</feature>
        /// <exception cref="NotSupportedException">Thrown when telephony feature is not supported.</exception>
        /// <exception cref="ArgumentException">Thrown when it is failed due to invalid parameter.</exception>
        /// <exception cref="InvalidOperationException">Thrown when it is failed due to invalid operation.</exception>
        public static void DeinitTapi(TapiHandle handle)
        {
            int ret = Interop.Tapi.DeinitTapi(handle._handle);

            if (ret != (int)TapiError.Success)
            {
                Log.Error(TapiUtility.LogTag, "Failed to deinitialize tapi, Error: " + (TapiError)ret);
                TapiUtility.ThrowTapiException(ret, handle._handle);
            }

            handle._handle = IntPtr.Zero;
        }