Esempio n. 1
0
        /// <summary>
        /// Adds a condition for a double type property.
        /// </summary>
        /// <param name="logicalOperator">The operator type.</param>
        /// <param name="propertyId">The property ID to add a condition.</param>
        /// <param name="matchType">The match flag.</param>
        /// <param name="matchValue">The match value.</param>
        /// <feature>http://tizen.org/feature/contact</feature>
        /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid.</exception>
        /// <since_tizen> 4 </since_tizen>
        public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, double matchValue)
        {
            int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);

            if ((int)ContactsError.None != error)
            {
                Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
                throw ContactsErrorFactory.CheckAndCreateException(error);
            }

            error = Interop.Filter.ContactsFilterAddDouble(_filterHandle, propertyId, matchType, matchValue);
            if ((int)ContactsError.None != error)
            {
                Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
                throw ContactsErrorFactory.CheckAndCreateException(error);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Adds a condition for the double type.
        /// </summary>
        /// <since_tizen> 4 </since_tizen>
        /// <feature>http://tizen.org/feature/calendar</feature>
        /// <param name="logicalOperator">The operator type.</param>
        /// <param name="propertyId">The property ID to add a condition.</param>
        /// <param name="matchType">The match flag.</param>
        /// <param name="matchValue">The match value.</param>
        /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid.</exception>
        public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, double matchValue)
        {
            int error = Interop.Filter.AddOperator(_filterHandle, logicalOperator);

            if (CalendarError.None != (CalendarError)error)
            {
                Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
                throw CalendarErrorFactory.GetException(error);
            }

            error = Interop.Filter.AddDouble(_filterHandle, propertyId, matchType, matchValue);
            if (CalendarError.None != (CalendarError)error)
            {
                Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
                throw CalendarErrorFactory.GetException(error);
            }
        }
Esempio n. 3
0
        public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, int matchValue)
        {
            int error = Interop.Filter.ContactsFilterCreate(viewUri, out _filterHandle);

            if ((int)ContactsError.None != error)
            {
                Log.Error(Globals.LogTag, "ContactsFilter Failed with error " + error);
                throw ContactsErrorFactory.CheckAndCreateException(error);
            }

            error = Interop.Filter.ContactsFilterAddInt(_filterHandle, propertyId, matchType, matchValue);
            if ((int)ContactsError.None != error)
            {
                Interop.Filter.ContactsFilterDestroy(_filterHandle);
                Log.Error(Globals.LogTag, "ContactsFilter Failed with error " + error);
                throw ContactsErrorFactory.CheckAndCreateException(error);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Adds a condition for the CalendarTime type.
        /// </summary>
        /// <since_tizen> 4 </since_tizen>
        /// <feature>http://tizen.org/feature/calendar</feature>
        /// <param name="logicalOperator">The operator type.</param>
        /// <param name="propertyId">The property ID to add a condition.</param>
        /// <param name="matchType">The match flag.</param>
        /// <param name="matchValue">The match value.</param>
        /// <exception cref="NotSupportedException">Thrown when the feature is not supported.</exception>
        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid.</exception>
        public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, CalendarTime matchValue)
        {
            int error = Interop.Filter.AddOperator(_filterHandle, logicalOperator);

            if (CalendarError.None != (CalendarError)error)
            {
                Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
                throw CalendarErrorFactory.GetException(error);
            }

            Interop.Record.DateTime time = CalendarRecord.ConvertCalendarTimeToStruct(matchValue);
            error = Interop.Filter.AddCalendarTime(_filterHandle, propertyId, matchType, time);
            if (CalendarError.None != (CalendarError)error)
            {
                Log.Error(Globals.LogTag, "AddCondition Failed with error " + error);
                throw CalendarErrorFactory.GetException(error);
            }
        }
Esempio n. 5
0
        public CalendarFilter(string viewUri, uint propertyId, IntegerMatchType matchType, int matchValue)
        {
            int error = 0;

            error = Interop.Filter.Create(viewUri, out _filterHandle);
            if (CalendarError.None != (CalendarError)error)
            {
                Log.Error(Globals.LogTag, "CalendarFilter Failed with error " + error);
                throw CalendarErrorFactory.GetException(error);
            }

            error = Interop.Filter.AddInteger(_filterHandle, propertyId, matchType, matchValue);
            if (CalendarError.None != (CalendarError)error)
            {
                Interop.Filter.Destroy(_filterHandle);
                Log.Error(Globals.LogTag, "CalendarFilter Failed with error " + error);
                throw CalendarErrorFactory.GetException(error);
            }
        }
Esempio n. 6
0
        public CalendarFilter(string viewUri, uint propertyId, IntegerMatchType matchType, CalendarTime matchValue)
        {
            int error = 0;

            error = Interop.Filter.Create(viewUri, out _filterHandle);
            if (CalendarError.None != (CalendarError)error)
            {
                Log.Error(Globals.LogTag, "CalendarFilter Failed with error " + error);
                throw CalendarErrorFactory.GetException(error);
            }

            Interop.Record.DateTime time = CalendarRecord.ConvertCalendarTimeToStruct(matchValue);
            error = Interop.Filter.AddCalendarTime(_filterHandle, propertyId, matchType, time);
            if (CalendarError.None != (CalendarError)error)
            {
                Interop.Filter.Destroy(_filterHandle);
                Log.Error(Globals.LogTag, "CalendarFilter Failed with error " + error);
                throw CalendarErrorFactory.GetException(error);
            }
        }
Esempio n. 7
0
 internal static extern int AddCalendarTime(IntPtr filterHandle, uint propertyId, IntegerMatchType match, IntPtr value);
Esempio n. 8
0
 internal static extern int AddLong(IntPtr filterHandle, uint propertyId, IntegerMatchType match, long value);
Esempio n. 9
0
 internal static extern int AddDouble(IntPtr filterHandle, uint propertyId, IntegerMatchType match, double value);
Esempio n. 10
0
 internal static extern int AddInteger(IntPtr filterHandle, uint propertyId, IntegerMatchType match, int value);
Esempio n. 11
0
 internal static extern int ContactsFilterAddDouble(IntPtr filterHandle, uint propertyId, IntegerMatchType match, double matchValue);
Esempio n. 12
0
 internal static extern int ContactsFilterAddLli(IntPtr filterHandle, uint propertyId, IntegerMatchType match, long matchValue);