private static int DoSetAccount(IntPtr aPtr, IntPtr aInvocation)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvProviderAvOpenhomeOrgPins1 self = (DvProviderAvOpenhomeOrgPins1)gch.Target;
            DvInvocation invocation           = new DvInvocation(aInvocation);
            uint         index;
            string       mode;
            string       type;
            string       uri;
            string       title;
            string       description;
            string       artworkUri;
            bool         shuffle;

            try
            {
                invocation.ReadStart();
                index       = invocation.ReadUint("Index");
                mode        = invocation.ReadString("Mode");
                type        = invocation.ReadString("Type");
                uri         = invocation.ReadString("Uri");
                title       = invocation.ReadString("Title");
                description = invocation.ReadString("Description");
                artworkUri  = invocation.ReadString("ArtworkUri");
                shuffle     = invocation.ReadBool("Shuffle");
                invocation.ReadEnd();
                self.SetAccount(invocation, index, mode, type, uri, title, description, artworkUri, shuffle);
            }
            catch (ActionError e)
            {
                invocation.ReportActionError(e, "SetAccount");
                return(-1);
            }
            catch (PropertyUpdateError)
            {
                invocation.ReportError(501, String.Format("Invalid value for property {0}", new object[] { "SetAccount" }));
                return(-1);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "SetAccount" });
                System.Diagnostics.Debug.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
                return(-1);
            }
            try
            {
                invocation.WriteStart();
                invocation.WriteEnd();
            }
            catch (ActionError)
            {
                return(-1);
            }
            catch (System.Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "SetAccount" });
                System.Diagnostics.Debug.WriteLine("       Only ActionError can be thrown by action response writer");
            }
            return(0);
        }
        private static int DoReadList(IntPtr aPtr, IntPtr aInvocation)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvProviderAvOpenhomeOrgPins1 self = (DvProviderAvOpenhomeOrgPins1)gch.Target;
            DvInvocation invocation           = new DvInvocation(aInvocation);
            string       ids;
            string       list;

            try
            {
                invocation.ReadStart();
                ids = invocation.ReadString("Ids");
                invocation.ReadEnd();
                self.ReadList(invocation, ids, out list);
            }
            catch (ActionError e)
            {
                invocation.ReportActionError(e, "ReadList");
                return(-1);
            }
            catch (PropertyUpdateError)
            {
                invocation.ReportError(501, String.Format("Invalid value for property {0}", new object[] { "ReadList" }));
                return(-1);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "ReadList" });
                System.Diagnostics.Debug.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
                return(-1);
            }
            try
            {
                invocation.WriteStart();
                invocation.WriteString("List", list);
                invocation.WriteEnd();
            }
            catch (ActionError)
            {
                return(-1);
            }
            catch (System.Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "ReadList" });
                System.Diagnostics.Debug.WriteLine("       Only ActionError can be thrown by action response writer");
            }
            return(0);
        }
        private static int DoGetDeviceAccountMax(IntPtr aPtr, IntPtr aInvocation)
        {
            GCHandle gch = GCHandle.FromIntPtr(aPtr);
            DvProviderAvOpenhomeOrgPins1 self = (DvProviderAvOpenhomeOrgPins1)gch.Target;
            DvInvocation invocation           = new DvInvocation(aInvocation);
            uint         deviceMax;
            uint         accountMax;

            try
            {
                invocation.ReadStart();
                invocation.ReadEnd();
                self.GetDeviceAccountMax(invocation, out deviceMax, out accountMax);
            }
            catch (ActionError e)
            {
                invocation.ReportActionError(e, "GetDeviceAccountMax");
                return(-1);
            }
            catch (PropertyUpdateError)
            {
                invocation.ReportError(501, String.Format("Invalid value for property {0}", new object[] { "GetDeviceAccountMax" }));
                return(-1);
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "GetDeviceAccountMax" });
                System.Diagnostics.Debug.WriteLine("         Only ActionError or PropertyUpdateError should be thrown by actions");
                return(-1);
            }
            try
            {
                invocation.WriteStart();
                invocation.WriteUint("DeviceMax", deviceMax);
                invocation.WriteUint("AccountMax", accountMax);
                invocation.WriteEnd();
            }
            catch (ActionError)
            {
                return(-1);
            }
            catch (System.Exception e)
            {
                System.Diagnostics.Debug.WriteLine("WARNING: unexpected exception {0} thrown by {1}", new object[] { e, "GetDeviceAccountMax" });
                System.Diagnostics.Debug.WriteLine("       Only ActionError can be thrown by action response writer");
            }
            return(0);
        }