evolution-sharp r203 - in trunk: . evolution/src



Author: jjohnny
Date: Tue Jan 13 18:30:32 2009
New Revision: 203
URL: http://svn.gnome.org/viewvc/evolution-sharp?rev=203&view=rev

Log:
(PChenthill) Added support for some task fields and vtype.

Modified:
   trunk/ChangeLog
   trunk/evolution/src/CalComponent.cs

Modified: trunk/evolution/src/CalComponent.cs
==============================================================================
--- trunk/evolution/src/CalComponent.cs	(original)
+++ trunk/evolution/src/CalComponent.cs	Tue Jan 13 18:30:32 2009
@@ -250,6 +250,17 @@
 				e_cal_component_set_uid (Handle, value);
 			}
 		}
+		
+		[DllImport("ecal")]
+			static extern CalComponentVType e_cal_component_get_vtype (IntPtr handle);
+
+		public CalComponentVType VType 
+		{
+			get
+			{
+				return e_cal_component_get_vtype (Handle);
+			}
+		}
 
 		[DllImport ("ecal")]
 			static extern IntPtr e_cal_component_get_id (IntPtr handle);
@@ -356,6 +367,23 @@
 				e_cal_component_set_status (Handle, (int) value);
 			}
 		}
+		
+		[DllImport("ecal")]
+			static extern int e_cal_component_get_percent_as_int (IntPtr raw);
+		[DllImport("ecal")]
+			static extern void e_cal_component_set_percent_as_int (IntPtr raw, int percent);
+
+		public int Percent
+		{
+			get
+			{
+				return e_cal_component_get_percent_as_int (Handle);
+			}
+			set
+			{
+				e_cal_component_set_percent_as_int (Handle, value);
+			}
+		}
 
 		[DllImport("evolutionglue")]
 			static extern int e_cal_component_get_priority2 (IntPtr raw);
@@ -498,6 +526,24 @@
 				Marshal.FreeHGlobal (native_dt);
 			}
 		}
+		
+		public CalComponentDateTime DueDate {
+			get {
+				CalComponentDateTime dt = new CalComponentDateTime ();
+				IntPtr native_dt = GLib.Marshaller.StructureToPtrAlloc (dt);
+				e_cal_component_get_due (Handle, native_dt);
+				dt = (CalComponentDateTime) Marshal.PtrToStructure (native_dt, typeof (CalComponentDateTime));
+				Marshal.FreeHGlobal (native_dt);
+				
+				return dt;
+			}
+			set {	
+				IntPtr native_dt = GLib.Marshaller.StructureToPtrAlloc (value);
+				e_cal_component_set_due (Handle, native_dt);
+				Marshal.FreeHGlobal (native_dt);
+			}
+		}
+
 
 #endif		
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]