Пример #1
0
 public static extern void plist_dict_new_iter(PlistHandle node, out PlistDictIterHandle iter);
Пример #2
0
 /// <summary>
 /// Helper function to check the value of a PLIST_BOOL node.
 /// </summary>
 /// <param name="boolnode">
 /// node of type PLIST_BOOL
 /// </param>
 /// <returns>
 /// 1 if the boolean node has a value of TRUE, 0 if FALSE,
 /// or -1 if the node is not of type PLIST_BOOL
 /// </returns>
 public virtual int plist_bool_val_is_true(PlistHandle boolnode)
 {
     return(PlistNativeMethods.plist_bool_val_is_true(boolnode));
 }
Пример #3
0
 /// <summary>
 /// Helper function to compare the value of a PLIST_REAL node against
 /// a given value.
 /// </summary>
 /// <param name="realnode">
 /// node of type PLIST_REAL
 /// </param>
 /// <param name="cmpval">
 /// value to compare against
 /// </param>
 /// <returns>
 /// 0 if the node's value and cmpval are (almost) equal,
 /// 1 if the node's value is greater than cmpval,
 /// or -1 if the node's value is less than cmpval.
 /// </returns>
 /// <remarks>
 /// WARNING: Comparing floating point values can give inaccurate
 /// results because of the nature of floating point values on computer
 /// systems. While this function is designed to be as accurate as
 /// possible, please don't rely on it too much.
 /// </remarks>
 public virtual int plist_real_val_compare(PlistHandle realnode, double cmpval)
 {
     return(PlistNativeMethods.plist_real_val_compare(realnode, cmpval));
 }
 public static void plist_dict_next_item(PlistHandle node, PlistDictIterHandle iter, out string key, out PlistHandle val)
 {
     System.Runtime.InteropServices.ICustomMarshaler keyMarshaler = NativeStringMarshaler.GetInstance(null);
     System.IntPtr keyNative = System.IntPtr.Zero;
     PlistNativeMethods.plist_dict_next_item(node, iter, out keyNative, out val);
     key = ((string)keyMarshaler.MarshalNativeToManaged(keyNative));
     keyMarshaler.CleanUpNativeData(keyNative);
 }
Пример #5
0
 /// <summary>
 /// Import the #plist_t structure from memory data.
 /// This method will look at the first bytes of plist_data
 /// to determine if plist_data contains a binary or XML plist.
 /// </summary>
 /// <param name="plist_data">
 /// a pointer to the memory buffer containing plist data.
 /// </param>
 /// <param name="length">
 /// length of the buffer to read.
 /// </param>
 /// <param name="plist">
 /// a pointer to the imported plist.
 /// </param>
 public virtual void plist_from_memory(string plistData, uint length, out PlistHandle plist)
 {
     PlistNativeMethods.plist_from_memory(plistData, length, out plist);
     plist.Api = this.Parent;
 }
Пример #6
0
 public static extern void plist_from_memory([System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string plistData, uint length, out PlistHandle plist);
Пример #7
0
 public static extern PlistHandle plist_access_pathv(PlistHandle plist, uint length, System.IntPtr v);
Пример #8
0
 public static extern PlistType plist_get_node_type(PlistHandle node);
Пример #9
0
 public static extern void plist_get_string_val(PlistHandle node, out System.IntPtr val);
Пример #10
0
 public static extern void plist_dict_merge(out PlistHandle target, PlistHandle source);
Пример #11
0
 public static extern PlistHandle plist_get_parent(PlistHandle node);
Пример #12
0
 public static extern void plist_dict_remove_item(PlistHandle node, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string key);
Пример #13
0
 public static extern void plist_dict_get_item_key(PlistHandle node, out System.IntPtr key);
Пример #14
0
 public static extern void plist_dict_next_item(PlistHandle node, PlistDictIterHandle iter, out System.IntPtr key, out PlistHandle val);
Пример #15
0
 public static extern void plist_to_xml(PlistHandle plist, out System.IntPtr plistXml, ref uint length);
Пример #16
0
 public static extern void plist_get_uint_val(PlistHandle node, ref ulong val);
Пример #17
0
 public static extern void plist_to_bin(PlistHandle plist, out System.IntPtr plistBin, ref uint length);
Пример #18
0
 public static extern void plist_get_data_val(PlistHandle node, out System.IntPtr val, ref ulong length);
Пример #19
0
 public static extern PlistHandle plist_access_path(PlistHandle plist, uint length);
Пример #20
0
 public static extern void plist_set_bool_val(PlistHandle node, char val);
Пример #21
0
 public static extern sbyte plist_compare_node_value(PlistHandle nodeL, PlistHandle nodeR);
Пример #22
0
 public static extern void plist_set_real_val(PlistHandle node, double val);
Пример #23
0
 /// <summary>
 /// Import the #plist_t structure from binary format.
 /// </summary>
 /// <param name="plist_bin">
 /// a pointer to the xml buffer.
 /// </param>
 /// <param name="length">
 /// length of the buffer to read.
 /// </param>
 /// <param name="plist">
 /// a pointer to the imported plist.
 /// </param>
 public virtual void plist_from_bin(string plistBin, uint length, out PlistHandle plist)
 {
     PlistNativeMethods.plist_from_bin(plistBin, length, out plist);
     plist.Api = this.Parent;
 }
Пример #24
0
 public static extern void plist_set_data_val(PlistHandle node, [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string val, ulong length);
Пример #25
0
 /// <summary>
 /// Compare two node values
 /// </summary>
 /// <param name="node_l">
 /// left node to compare
 /// </param>
 /// <param name="node_r">
 /// rigth node to compare
 /// </param>
 /// <returns>
 /// TRUE is type and value match, FALSE otherwise.
 /// </returns>
 public virtual sbyte plist_compare_node_value(PlistHandle nodeL, PlistHandle nodeR)
 {
     return(PlistNativeMethods.plist_compare_node_value(nodeL, nodeR));
 }
Пример #26
0
 public static extern void plist_set_date_val(PlistHandle node, int sec, int usec);
Пример #27
0
 /// <summary>
 /// Helper function to compare the value of a PLIST_UID node against
 /// a given value.
 /// </summary>
 /// <param name="uidnode">
 /// node of type PLIST_UID
 /// </param>
 /// <param name="cmpval">
 /// value to compare against
 /// </param>
 /// <returns>
 /// 0 if the node's value and cmpval are equal,
 /// 1 if the node's value is greater than cmpval,
 /// or -1 if the node's value is less than cmpval.
 /// </returns>
 public virtual int plist_uid_val_compare(PlistHandle uidnode, ulong cmpval)
 {
     return(PlistNativeMethods.plist_uid_val_compare(uidnode, cmpval));
 }
Пример #28
0
 public static extern void plist_set_uid_val(PlistHandle node, ulong val);
Пример #29
0
 /// <summary>
 /// Helper function to compare the value of a PLIST_DATE node against
 /// a given set of seconds and fraction of a second since epoch.
 /// </summary>
 /// <param name="datenode">
 /// node of type PLIST_DATE
 /// </param>
 /// <param name="cmpsec">
 /// number of seconds since epoch to compare against
 /// </param>
 /// <param name="cmpusec">
 /// fraction of a second in microseconds to compare against
 /// </param>
 /// <returns>
 /// 0 if the node's date is equal to the supplied values,
 /// 1 if the node's date is greater than the supplied values,
 /// or -1 if the node's date is less than the supplied values.
 /// </returns>
 public virtual int plist_date_val_compare(PlistHandle datenode, int cmpsec, int cmpusec)
 {
     return(PlistNativeMethods.plist_date_val_compare(datenode, cmpsec, cmpusec));
 }
Пример #30
0
 public static extern uint plist_dict_get_size(PlistHandle node);