diff --git a/LICENSE.txt b/LICENSE.txt index 7f531b43..8d64b630 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2011, Outercurve Foundation. +Copyright (c) 2012, Outercurve Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel.Installer/Sources/Setup/Setup.vdproj b/WebsitePanel.Installer/Sources/Setup/Setup.vdproj index c8bcd76d..5dfe2cf1 100644 --- a/WebsitePanel.Installer/Sources/Setup/Setup.vdproj +++ b/WebsitePanel.Installer/Sources/Setup/Setup.vdproj @@ -45,42 +45,42 @@ } "Entry" { - "MsmKey" = "8:_8358EC0621F48BC59677CAE4E2FA8FC3" - "OwnerKey" = "8:_05F59A142DD147798C90054A203C0EE9" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_8358EC0621F48BC59677CAE4E2FA8FC3" - "OwnerKey" = "8:_1239E87E938248B1BAF9BF75C32D3EDC" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_B0491B1356193E1DEAF528DAD55FD861" - "OwnerKey" = "8:_05F59A142DD147798C90054A203C0EE9" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_B0491B1356193E1DEAF528DAD55FD861" - "OwnerKey" = "8:_1239E87E938248B1BAF9BF75C32D3EDC" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_B0491B1356193E1DEAF528DAD55FD861" - "OwnerKey" = "8:_8358EC0621F48BC59677CAE4E2FA8FC3" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_BD9DC4338DFD4472BE5D099C388608B6" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { + "MsmKey" = "8:_D1E9D2FA126C6929E2B4AD4D3D6B2B30" + "OwnerKey" = "8:_05F59A142DD147798C90054A203C0EE9" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_D1E9D2FA126C6929E2B4AD4D3D6B2B30" + "OwnerKey" = "8:_E0E145E0B464F51A66C25ABBABC52B7D" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_D1E9D2FA126C6929E2B4AD4D3D6B2B30" + "OwnerKey" = "8:_1239E87E938248B1BAF9BF75C32D3EDC" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_E0E145E0B464F51A66C25ABBABC52B7D" + "OwnerKey" = "8:_05F59A142DD147798C90054A203C0EE9" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_E0E145E0B464F51A66C25ABBABC52B7D" + "OwnerKey" = "8:_1239E87E938248B1BAF9BF75C32D3EDC" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_1239E87E938248B1BAF9BF75C32D3EDC" "MsmSig" = "8:_UNDEFINED" @@ -88,21 +88,21 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_D1E9D2FA126C6929E2B4AD4D3D6B2B30" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_E0E145E0B464F51A66C25ABBABC52B7D" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_05F59A142DD147798C90054A203C0EE9" "MsmSig" = "8:_UNDEFINED" } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_8358EC0621F48BC59677CAE4E2FA8FC3" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_B0491B1356193E1DEAF528DAD55FD861" - "MsmSig" = "8:_UNDEFINED" - } } "Configurations" { @@ -153,7 +153,7 @@ "DisplayName" = "8:Release" "IsDebugOnly" = "11:FALSE" "IsReleaseOnly" = "11:TRUE" - "OutputFilename" = "8:..\\..\\..\\WebsitePanel\\Deploy\\Release\\WebsitePanelInstaller121.msi" + "OutputFilename" = "8:..\\..\\..\\WebsitePanel\\Deploy\\Release\\WebsitePanelInstaller122.msi" "PackageFilesAs" = "3:2" "PackageFileSize" = "3:-2147483648" "CabType" = "3:1" @@ -177,6 +177,11 @@ "Name" = "8:Microsoft .NET Framework 4 (x86 and x64)" "ProductCode" = "8:.NETFramework,Version=v4.0" } + "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.4.5" + { + "Name" = "8:Windows Installer 4.5" + "ProductCode" = "8:Microsoft.Windows.Installer.4.5" + } } } } @@ -268,16 +273,10 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_8358EC0621F48BC59677CAE4E2FA8FC3" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_BD9DC4338DFD4472BE5D099C388608B6" { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:WebsitePanel.Installer.Core, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL" - "ScatterAssemblies" - { - } - "SourcePath" = "8:WebsitePanel.Installer.Core.dll" - "TargetName" = "8:" + "SourcePath" = "8:Banner.bmp" + "TargetName" = "8:Banner.bmp" "Tag" = "8:" "Folder" = "8:_E742E59BFE4D43C59AA65A07792B89FB" "Condition" = "8:" @@ -290,22 +289,17 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" + "Exclude" = "11:TRUE" + "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_B0491B1356193E1DEAF528DAD55FD861" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_D1E9D2FA126C6929E2B4AD4D3D6B2B30" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" "AssemblyAsmDisplayName" = "8:Ionic.Zip.Reduced, Version=1.8.4.28, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL" "ScatterAssemblies" { - "_B0491B1356193E1DEAF528DAD55FD861" - { - "Name" = "8:Ionic.Zip.Reduced.dll" - "Attributes" = "3:512" - } } "SourcePath" = "8:Ionic.Zip.Reduced.dll" "TargetName" = "8:" @@ -325,10 +319,16 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_BD9DC4338DFD4472BE5D099C388608B6" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_E0E145E0B464F51A66C25ABBABC52B7D" { - "SourcePath" = "8:Banner.bmp" - "TargetName" = "8:Banner.bmp" + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:WebsitePanel.Installer.Core, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + } + "SourcePath" = "8:WebsitePanel.Installer.Core.dll" + "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_E742E59BFE4D43C59AA65A07792B89FB" "Condition" = "8:" @@ -341,8 +341,8 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:FALSE" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } } @@ -412,19 +412,19 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:WebsitePanel Installer" - "ProductCode" = "8:{A22F374C-4AFC-4B5D-A509-7456A6107588}" - "PackageCode" = "8:{62AE518E-85D1-4D7E-9642-660FB1794974}" + "ProductCode" = "8:{A09C3303-E60E-4A3E-B0F9-96CEE379FFF7}" + "PackageCode" = "8:{C49F3454-E18F-4146-A97C-7951FBB6C9B3}" "UpgradeCode" = "8:{2950A907-11E7-436C-86CE-049C414AFD08}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" - "RemovePreviousVersions" = "11:FALSE" + "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:FALSE" "InstallAllUsers" = "11:TRUE" - "ProductVersion" = "8:1.2.1" + "ProductVersion" = "8:1.2.2" "Manufacturer" = "8:Outercurve Foundation" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" - "Title" = "8:WebsitePanel Installer" + "Title" = "8:WebsitePanel Installer (Beta)" "Subject" = "8:" "ARPCONTACT" = "8:Outercurve Foundation" "Keywords" = "8:" @@ -972,7 +972,7 @@ { "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_05F59A142DD147798C90054A203C0EE9" { - "SourcePath" = "8:..\\WebsitePanel.Installer\\obj\\Debug\\WebsitePanel.Installer.exe" + "SourcePath" = "8:..\\WebsitePanel.Installer\\obj\\Release\\WebsitePanel.Installer.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_E742E59BFE4D43C59AA65A07792B89FB" @@ -1000,7 +1000,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_1239E87E938248B1BAF9BF75C32D3EDC" { - "SourcePath" = "8:..\\WebsitePanel.SilentInstaller\\obj\\x86\\Debug\\WebsitePanel.SilentInstaller.exe" + "SourcePath" = "8:..\\WebsitePanel.SilentInstaller\\obj\\x86\\Release\\WebsitePanel.SilentInstaller.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_E742E59BFE4D43C59AA65A07792B89FB" diff --git a/WebsitePanel.Installer/Sources/Setup/WebsitePanel Help.url b/WebsitePanel.Installer/Sources/Setup/WebsitePanel Help.url index a2e9a73d..4247fa7b 100644 --- a/WebsitePanel.Installer/Sources/Setup/WebsitePanel Help.url +++ b/WebsitePanel.Installer/Sources/Setup/WebsitePanel Help.url @@ -1,7 +1,7 @@ [DEFAULT] -BASEURL=http://help.websitepanel.net/ +BASEURL=http://www.websitepanel.net/ [InternetShortcut] -URL=http://help.websitepanel.net/ +URL=http://www.websitepanel.net/ IDList= [{000214A0-0000-0000-C000-000000000046}] Prop3=19,2 diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Properties/Settings.Designer.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Properties/Settings.Designer.cs index 77d00e5e..26d7262a 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Properties/Settings.Designer.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.1 +// Runtime Version:4.0.30319.269 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/App.config b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/App.config index 60bc4b39..18e7f2ee 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/App.config +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/App.config @@ -9,7 +9,7 @@ - + diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/ApplicationForm.Designer.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/ApplicationForm.Designer.cs index 1eba1298..a6ed5690 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/ApplicationForm.Designer.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/ApplicationForm.Designer.cs @@ -28,198 +28,200 @@ namespace WebsitePanel.Installer /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ApplicationForm)); - this.statusBar = new System.Windows.Forms.StatusStrip(); - this.statusBarLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.splitContainer = new System.Windows.Forms.SplitContainer(); - this.scopeTree = new System.Windows.Forms.TreeView(); - this.smallImages = new System.Windows.Forms.ImageList(this.components); - this.pnlRight = new System.Windows.Forms.Panel(); - this.pnlResultView = new System.Windows.Forms.Panel(); - this.pnlDescription = new System.Windows.Forms.Panel(); - this.lblResultViewPath = new System.Windows.Forms.Label(); - this.lblResultViewTitle = new System.Windows.Forms.Label(); - this.pictureBox = new System.Windows.Forms.PictureBox(); - this.backgroundWorker = new System.ComponentModel.BackgroundWorker(); - this.lineBox2 = new WebsitePanel.Installer.LineBox(); - this.topLogoControl = new WebsitePanel.Installer.TopLogoControl(); - this.statusBar.SuspendLayout(); - this.splitContainer.Panel1.SuspendLayout(); - this.splitContainer.Panel2.SuspendLayout(); - this.splitContainer.SuspendLayout(); - this.pnlRight.SuspendLayout(); - this.pnlDescription.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); - this.SuspendLayout(); - // - // statusBar - // - this.statusBar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible; - this.statusBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ApplicationForm)); + this.statusBar = new System.Windows.Forms.StatusStrip(); + this.statusBarLabel = new System.Windows.Forms.ToolStripStatusLabel(); + this.splitContainer = new System.Windows.Forms.SplitContainer(); + this.scopeTree = new System.Windows.Forms.TreeView(); + this.smallImages = new System.Windows.Forms.ImageList(this.components); + this.pnlRight = new System.Windows.Forms.Panel(); + this.pnlResultView = new System.Windows.Forms.Panel(); + this.pnlDescription = new System.Windows.Forms.Panel(); + this.lineBox2 = new WebsitePanel.Installer.LineBox(); + this.lblResultViewPath = new System.Windows.Forms.Label(); + this.lblResultViewTitle = new System.Windows.Forms.Label(); + this.pictureBox = new System.Windows.Forms.PictureBox(); + this.backgroundWorker = new System.ComponentModel.BackgroundWorker(); + this.topLogoControl = new WebsitePanel.Installer.TopLogoControl(); + this.statusBar.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); + this.splitContainer.Panel1.SuspendLayout(); + this.splitContainer.Panel2.SuspendLayout(); + this.splitContainer.SuspendLayout(); + this.pnlRight.SuspendLayout(); + this.pnlDescription.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); + this.SuspendLayout(); + // + // statusBar + // + this.statusBar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible; + this.statusBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.statusBarLabel}); - this.statusBar.Location = new System.Drawing.Point(0, 431); - this.statusBar.Name = "statusBar"; - this.statusBar.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; - this.statusBar.Size = new System.Drawing.Size(632, 22); - this.statusBar.TabIndex = 1; - // - // statusBarLabel - // - this.statusBarLabel.Name = "statusBarLabel"; - this.statusBarLabel.Size = new System.Drawing.Size(39, 17); - this.statusBarLabel.Text = "Ready"; - // - // splitContainer - // - this.splitContainer.BackColor = System.Drawing.SystemColors.Control; - this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer.Location = new System.Drawing.Point(0, 63); - this.splitContainer.Name = "splitContainer"; - // - // splitContainer.Panel1 - // - this.splitContainer.Panel1.Controls.Add(this.scopeTree); - this.splitContainer.Panel1.Padding = new System.Windows.Forms.Padding(0, 1, 0, 0); - // - // splitContainer.Panel2 - // - this.splitContainer.Panel2.Controls.Add(this.pnlRight); - this.splitContainer.Panel2.Padding = new System.Windows.Forms.Padding(0, 1, 0, 0); - this.splitContainer.Size = new System.Drawing.Size(632, 368); - this.splitContainer.SplitterDistance = 250; - this.splitContainer.SplitterWidth = 2; - this.splitContainer.TabIndex = 2; - // - // scopeTree - // - this.scopeTree.Dock = System.Windows.Forms.DockStyle.Fill; - this.scopeTree.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.scopeTree.HideSelection = false; - this.scopeTree.ImageIndex = 0; - this.scopeTree.ImageList = this.smallImages; - this.scopeTree.ItemHeight = 19; - this.scopeTree.Location = new System.Drawing.Point(0, 1); - this.scopeTree.Name = "scopeTree"; - this.scopeTree.SelectedImageIndex = 0; - this.scopeTree.ShowLines = false; - this.scopeTree.Size = new System.Drawing.Size(250, 367); - this.scopeTree.TabIndex = 0; - this.scopeTree.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.OnScopeTreeBeforeExpand); - this.scopeTree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnScopeTreeAfterSelect); - // - // smallImages - // - this.smallImages.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; - this.smallImages.ImageSize = new System.Drawing.Size(16, 16); - this.smallImages.TransparentColor = System.Drawing.Color.Transparent; - // - // pnlRight - // - this.pnlRight.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.pnlRight.Controls.Add(this.pnlResultView); - this.pnlRight.Controls.Add(this.pnlDescription); - this.pnlRight.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlRight.Location = new System.Drawing.Point(0, 1); - this.pnlRight.Name = "pnlRight"; - this.pnlRight.Size = new System.Drawing.Size(380, 367); - this.pnlRight.TabIndex = 0; - // - // pnlResultView - // - this.pnlResultView.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlResultView.Location = new System.Drawing.Point(0, 63); - this.pnlResultView.Name = "pnlResultView"; - this.pnlResultView.Size = new System.Drawing.Size(376, 300); - this.pnlResultView.TabIndex = 14; - // - // pnlDescription - // - this.pnlDescription.Controls.Add(this.lineBox2); - this.pnlDescription.Controls.Add(this.lblResultViewPath); - this.pnlDescription.Controls.Add(this.lblResultViewTitle); - this.pnlDescription.Controls.Add(this.pictureBox); - this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlDescription.Location = new System.Drawing.Point(0, 0); - this.pnlDescription.Name = "pnlDescription"; - this.pnlDescription.Size = new System.Drawing.Size(376, 63); - this.pnlDescription.TabIndex = 13; - // - // lblResultViewPath - // - this.lblResultViewPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblResultViewPath.AutoEllipsis = true; - this.lblResultViewPath.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.lblResultViewPath.Location = new System.Drawing.Point(47, 28); - this.lblResultViewPath.Name = "lblResultViewPath"; - this.lblResultViewPath.Size = new System.Drawing.Size(251, 21); - this.lblResultViewPath.TabIndex = 15; - this.lblResultViewPath.Text = "Path"; - // - // lblResultViewTitle - // - this.lblResultViewTitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblResultViewTitle.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.lblResultViewTitle.Location = new System.Drawing.Point(47, 8); - this.lblResultViewTitle.Name = "lblResultViewTitle"; - this.lblResultViewTitle.Size = new System.Drawing.Size(318, 20); - this.lblResultViewTitle.TabIndex = 14; - this.lblResultViewTitle.Text = "Title"; - // - // pictureBox - // - this.pictureBox.Location = new System.Drawing.Point(9, 8); - this.pictureBox.Name = "pictureBox"; - this.pictureBox.Size = new System.Drawing.Size(32, 32); - this.pictureBox.TabIndex = 13; - this.pictureBox.TabStop = false; - // - // lineBox2 - // - this.lineBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lineBox2.Location = new System.Drawing.Point(6, 51); - this.lineBox2.Name = "lineBox2"; - this.lineBox2.Size = new System.Drawing.Size(366, 2); - this.lineBox2.TabIndex = 16; - this.lineBox2.TabStop = false; - this.lineBox2.Text = "lineBox2"; - // - // topLogoControl - // - this.topLogoControl.BackColor = System.Drawing.Color.White; - this.topLogoControl.Dock = System.Windows.Forms.DockStyle.Top; - this.topLogoControl.Location = new System.Drawing.Point(0, 0); - this.topLogoControl.Name = "topLogoControl"; - this.topLogoControl.Size = new System.Drawing.Size(632, 63); - this.topLogoControl.TabIndex = 3; - // - // ApplicationForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(632, 453); - this.Controls.Add(this.splitContainer); - this.Controls.Add(this.statusBar); - this.Controls.Add(this.topLogoControl); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MinimumSize = new System.Drawing.Size(640, 480); - this.Name = "ApplicationForm"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "WebsitePanel Installer"; - this.Shown += new System.EventHandler(this.OnApplicationFormShown); - this.statusBar.ResumeLayout(false); - this.statusBar.PerformLayout(); - this.splitContainer.Panel1.ResumeLayout(false); - this.splitContainer.Panel2.ResumeLayout(false); - this.splitContainer.ResumeLayout(false); - this.pnlRight.ResumeLayout(false); - this.pnlDescription.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); + this.statusBar.Location = new System.Drawing.Point(0, 431); + this.statusBar.Name = "statusBar"; + this.statusBar.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; + this.statusBar.Size = new System.Drawing.Size(632, 22); + this.statusBar.TabIndex = 1; + // + // statusBarLabel + // + this.statusBarLabel.Name = "statusBarLabel"; + this.statusBarLabel.Size = new System.Drawing.Size(39, 17); + this.statusBarLabel.Text = "Ready"; + // + // splitContainer + // + this.splitContainer.BackColor = System.Drawing.SystemColors.Control; + this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer.Location = new System.Drawing.Point(0, 63); + this.splitContainer.Name = "splitContainer"; + // + // splitContainer.Panel1 + // + this.splitContainer.Panel1.Controls.Add(this.scopeTree); + this.splitContainer.Panel1.Padding = new System.Windows.Forms.Padding(0, 1, 0, 0); + // + // splitContainer.Panel2 + // + this.splitContainer.Panel2.Controls.Add(this.pnlRight); + this.splitContainer.Panel2.Padding = new System.Windows.Forms.Padding(0, 1, 0, 0); + this.splitContainer.Size = new System.Drawing.Size(632, 368); + this.splitContainer.SplitterDistance = 250; + this.splitContainer.SplitterWidth = 2; + this.splitContainer.TabIndex = 2; + // + // scopeTree + // + this.scopeTree.Dock = System.Windows.Forms.DockStyle.Fill; + this.scopeTree.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.scopeTree.HideSelection = false; + this.scopeTree.ImageIndex = 0; + this.scopeTree.ImageList = this.smallImages; + this.scopeTree.ItemHeight = 19; + this.scopeTree.Location = new System.Drawing.Point(0, 1); + this.scopeTree.Name = "scopeTree"; + this.scopeTree.SelectedImageIndex = 0; + this.scopeTree.ShowLines = false; + this.scopeTree.Size = new System.Drawing.Size(250, 367); + this.scopeTree.TabIndex = 0; + this.scopeTree.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.OnScopeTreeBeforeExpand); + this.scopeTree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnScopeTreeAfterSelect); + // + // smallImages + // + this.smallImages.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; + this.smallImages.ImageSize = new System.Drawing.Size(16, 16); + this.smallImages.TransparentColor = System.Drawing.Color.Transparent; + // + // pnlRight + // + this.pnlRight.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.pnlRight.Controls.Add(this.pnlResultView); + this.pnlRight.Controls.Add(this.pnlDescription); + this.pnlRight.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlRight.Location = new System.Drawing.Point(0, 1); + this.pnlRight.Name = "pnlRight"; + this.pnlRight.Size = new System.Drawing.Size(380, 367); + this.pnlRight.TabIndex = 0; + // + // pnlResultView + // + this.pnlResultView.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlResultView.Location = new System.Drawing.Point(0, 63); + this.pnlResultView.Name = "pnlResultView"; + this.pnlResultView.Size = new System.Drawing.Size(376, 300); + this.pnlResultView.TabIndex = 14; + // + // pnlDescription + // + this.pnlDescription.Controls.Add(this.lineBox2); + this.pnlDescription.Controls.Add(this.lblResultViewPath); + this.pnlDescription.Controls.Add(this.lblResultViewTitle); + this.pnlDescription.Controls.Add(this.pictureBox); + this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlDescription.Location = new System.Drawing.Point(0, 0); + this.pnlDescription.Name = "pnlDescription"; + this.pnlDescription.Size = new System.Drawing.Size(376, 63); + this.pnlDescription.TabIndex = 13; + // + // lineBox2 + // + this.lineBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lineBox2.Location = new System.Drawing.Point(6, 51); + this.lineBox2.Name = "lineBox2"; + this.lineBox2.Size = new System.Drawing.Size(366, 2); + this.lineBox2.TabIndex = 16; + this.lineBox2.TabStop = false; + this.lineBox2.Text = "lineBox2"; + // + // lblResultViewPath + // + this.lblResultViewPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblResultViewPath.AutoEllipsis = true; + this.lblResultViewPath.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.lblResultViewPath.Location = new System.Drawing.Point(47, 28); + this.lblResultViewPath.Name = "lblResultViewPath"; + this.lblResultViewPath.Size = new System.Drawing.Size(251, 21); + this.lblResultViewPath.TabIndex = 15; + this.lblResultViewPath.Text = "Path"; + // + // lblResultViewTitle + // + this.lblResultViewTitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblResultViewTitle.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.lblResultViewTitle.Location = new System.Drawing.Point(47, 8); + this.lblResultViewTitle.Name = "lblResultViewTitle"; + this.lblResultViewTitle.Size = new System.Drawing.Size(318, 20); + this.lblResultViewTitle.TabIndex = 14; + this.lblResultViewTitle.Text = "Title"; + // + // pictureBox + // + this.pictureBox.Location = new System.Drawing.Point(9, 8); + this.pictureBox.Name = "pictureBox"; + this.pictureBox.Size = new System.Drawing.Size(32, 32); + this.pictureBox.TabIndex = 13; + this.pictureBox.TabStop = false; + // + // topLogoControl + // + this.topLogoControl.BackColor = System.Drawing.Color.White; + this.topLogoControl.Dock = System.Windows.Forms.DockStyle.Top; + this.topLogoControl.Location = new System.Drawing.Point(0, 0); + this.topLogoControl.Name = "topLogoControl"; + this.topLogoControl.Size = new System.Drawing.Size(632, 63); + this.topLogoControl.TabIndex = 3; + // + // ApplicationForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 453); + this.Controls.Add(this.splitContainer); + this.Controls.Add(this.statusBar); + this.Controls.Add(this.topLogoControl); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MinimumSize = new System.Drawing.Size(640, 480); + this.Name = "ApplicationForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "WebsitePanel Installer (Beta)"; + this.Shown += new System.EventHandler(this.OnApplicationFormShown); + this.statusBar.ResumeLayout(false); + this.statusBar.PerformLayout(); + this.splitContainer.Panel1.ResumeLayout(false); + this.splitContainer.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); + this.splitContainer.ResumeLayout(false); + this.pnlRight.ResumeLayout(false); + this.pnlDescription.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); } diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/ApplicationForm.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/ApplicationForm.cs index 38c72590..32e08c87 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/ApplicationForm.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/ApplicationForm.cs @@ -339,7 +339,7 @@ namespace WebsitePanel.Installer internal void ShowError() { ShowError("An unexpected error has occurred. We apologize for this inconvenience.\n" + - "Please contact Technical Support at support@websitepanel.net.\n\n" + + "Please contact Technical Support at info@websitepanel.net.\n\n" + "Make sure you include a copy of the Installer.log file from the\n" + "WebsitePanel Installer home directory."); } diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/ApplicationForm.resx b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/ApplicationForm.resx index 37d70fbb..58da9be2 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/ApplicationForm.resx +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/ApplicationForm.resx @@ -112,21 +112,21 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 17, 17 - + 115, 17 - + 229, 17 - + AAABAAoAAAAAAAEACADKTwAApgAAADAwAAABAAgAqA4AAHBQAAAgIAAAAQAIAKgIAAAYXwAAGBgAAAEA diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Program.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Program.cs index a0bb0800..7e56801c 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Program.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Program.cs @@ -148,7 +148,7 @@ namespace WebsitePanel.Installer { Log.WriteError("Fatal error occured.", e.Exception); string message = "A fatal error has occurred. We apologize for this inconvenience.\n" + - "Please contact Technical Support at support@websitepanel.net.\n\n" + + "Please contact Technical Support at info@websitepanel.net.\n\n" + "Make sure you include a copy of the Installer.log file from the\n" + "WebsitePanel Installer home directory."; MessageBox.Show(message, "WebsitePanel Installer", MessageBoxButtons.OK, MessageBoxIcon.Error); @@ -162,7 +162,7 @@ namespace WebsitePanel.Installer { Log.WriteError("Fatal error occured.", (Exception)e.ExceptionObject); string message = "A fatal error has occurred. We apologize for this inconvenience.\n" + - "Please contact Technical Support at support@websitepanel.net.\n\n" + + "Please contact Technical Support at info@websitepanel.net.\n\n" + "Make sure you include a copy of the Installer.log file from the\n" + "WebsitePanel Installer home directory."; MessageBox.Show(message, "WebsitePanel Installer", MessageBoxButtons.OK, MessageBoxIcon.Error); diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Updater.exe b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Updater.exe index 201af23a..c512e8fa 100644 Binary files a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Updater.exe and b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Updater.exe differ diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/WebsitePanel.Installer.csproj b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/WebsitePanel.Installer.csproj index 2e547b11..b4f667e7 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/WebsitePanel.Installer.csproj +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/WebsitePanel.Installer.csproj @@ -247,10 +247,10 @@ Designer ProgressIcon.cs - + diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/BaseActionManager.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/BaseActionManager.cs index d17a7dcb..b30697e7 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/BaseActionManager.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/BaseActionManager.cs @@ -296,7 +296,7 @@ namespace WebsitePanel.Setup.Actions var args = new ActionErrorEventArgs { ErrorMessage = "An unexpected error has occurred. We apologize for this inconvenience.\n" + - "Please contact Technical Support at support@websitepanel.net.\n\n" + + "Please contact Technical Support at info@websitepanel.net.\n\n" + "Make sure you include a copy of the Installer.log file from the\n" + "WebsitePanel Installer home directory.", OriginalException = ex, diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/StandaloneServerActionManager.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/StandaloneServerActionManager.cs index 308ed56c..64240951 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/StandaloneServerActionManager.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/StandaloneServerActionManager.cs @@ -499,6 +499,10 @@ namespace WebsitePanel.Setup.Actions { serviceInfo.ProviderId = 202; } + else if (sqlVersion.StartsWith("11.")) + { + serviceInfo.ProviderId = 209; + } serviceId = ES.Services.Servers.AddService(serviceInfo); } else diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/EULA.rtf b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/EULA.rtf index f4dd41e7..61a0704e 100644 Binary files a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/EULA.rtf and b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/EULA.rtf differ diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/EnterpriseServer10.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/EnterpriseServer10.cs index 07551895..dd90ac25 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/EnterpriseServer10.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/EnterpriseServer10.cs @@ -5,7 +5,34 @@ using System.Windows.Forms; using WebsitePanel.Setup.Actions; namespace WebsitePanel.Setup + { + /// + /// Release 1.2.2 + /// + public class EnterpriseServer122 : EnterpriseServer + { + public static new object Install(object obj) + { + // + return EnterpriseServer.InstallBase(obj, "1.2.2"); + } + + public static new DialogResult Uninstall(object obj) + { + return EnterpriseServer.Uninstall(obj); + } + + public static new DialogResult Setup(object obj) + { + return EnterpriseServer.Setup(obj); + } + + public static new DialogResult Update(object obj) + { + return UpdateBase(obj, "1.2.2", "1.2.1", true); + } + } /// /// Release 1.2.1 /// diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Portal10.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Portal10.cs index 01854e9b..3818b293 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Portal10.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Portal10.cs @@ -6,6 +6,33 @@ using WebsitePanel.Setup.Actions; namespace WebsitePanel.Setup { + /// + /// Release 1.2.2 + /// + public class Portal122 : Portal + { + public static new object Install(object obj) + { + // + return Portal.InstallBase(obj, "1.2.2"); + } + + public static new DialogResult Uninstall(object obj) + { + return Portal.Uninstall(obj); + } + + public static new DialogResult Setup(object obj) + { + return Portal.Setup(obj); + } + + public static new DialogResult Update(object obj) + { + return UpdateBase(obj, "1.2.2", "1.2.1", false); + } + } + /// /// Release 1.2.1 /// diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Server10.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Server10.cs index bd63cb57..b5d08705 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Server10.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Server10.cs @@ -6,6 +6,33 @@ using WebsitePanel.Setup.Actions; namespace WebsitePanel.Setup { + /// + /// Release 1.2.2 + /// + public class Server122 : Server + { + public static new object Install(object obj) + { + // + return Server.InstallBase(obj, "1.2.2"); + } + + public static new object Uninstall(object obj) + { + return Server.Uninstall(obj); + } + + public static new object Setup(object obj) + { + return Server.Setup(obj); + } + + public static new object Update(object obj) + { + return Server.UpdateBase(obj, "1.2.2", "1.2.1", false); + } + } + /// /// Release 1.2.1 /// diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/StandaloneServerSetup10.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/StandaloneServerSetup10.cs index 116f45c2..24bd0e0d 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/StandaloneServerSetup10.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/StandaloneServerSetup10.cs @@ -5,6 +5,18 @@ using System.Windows.Forms; namespace WebsitePanel.Setup { + /// + /// Release 1.2.2 + /// + public class StandaloneServerSetup122 : StandaloneServerSetup + { + public static new object Install(object obj) + { + return StandaloneServerSetup.InstallBase(obj, "1.2.2"); + } + } + + /// /// Release 1.2.1 /// diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/DatabasePage.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/DatabasePage.cs index 134c9653..933c0201 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/DatabasePage.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/DatabasePage.cs @@ -124,11 +124,11 @@ namespace WebsitePanel.Setup { // check SQL server version string sqlVersion = GetSqlServerVersion(connectionString); - if (!sqlVersion.StartsWith("9.") && !sqlVersion.StartsWith("10.")) + if (!sqlVersion.StartsWith("9.") && !sqlVersion.StartsWith("10.") && !sqlVersion.StartsWith("11.")) { // SQL Server 2005 engine required e.Cancel = true; - ShowWarning("This program can be installed on SQL Server 2005/2008 only."); + ShowWarning("This program can be installed on SQL Server 2005/2008/2012 only."); return; } int securityMode = GetSqlServerSecurityMode(connectionString); diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ExpressInstallPage.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ExpressInstallPage.cs index f101d6da..6f5def75 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ExpressInstallPage.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ExpressInstallPage.cs @@ -862,6 +862,10 @@ namespace WebsitePanel.Setup { serviceInfo.ProviderId = 202; } + else if (sqlVersion.StartsWith("11.")) + { + serviceInfo.ProviderId = 209; + } serviceId = ES.Services.Servers.AddService(serviceInfo); } else diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/WizardPageBase.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/WizardPageBase.cs index aa694969..ae6d43c0 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/WizardPageBase.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/WizardPageBase.cs @@ -293,7 +293,7 @@ namespace WebsitePanel.Setup protected void ShowError() { ShowError("An unexpected error has occurred. We apologize for this inconvenience.\n" + - "Please contact Technical Support at support@websitepanel.net.\n\n" + + "Please contact Technical Support at info@websitepanel.net.\n\n" + "Make sure you include a copy of the Installer.log file from the\n" + "WebsitePanel Installer home directory."); } diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Updater/UpdaterForm.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Updater/UpdaterForm.cs index 3ffae895..f3b8230a 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Updater/UpdaterForm.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Updater/UpdaterForm.cs @@ -272,7 +272,7 @@ namespace WebsitePanel.Updater private void ShowError() { string message = "An unexpected error has occurred. We apologize for this inconvenience.\n" + - "Please contact Technical Support at support@websitepanel.net"; + "Please contact Technical Support at info@websitepanel.net"; MessageBox.Show(this, message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } } diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/ContactUs.aspx b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/ContactUs.aspx deleted file mode 100644 index 16c42ad0..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/ContactUs.aspx +++ /dev/null @@ -1,11 +0,0 @@ -<%@ Page Title="WebsitePanel - Contact Us" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ContactUs.aspx.cs" Inherits="WebsitePanel.WebSite.ContactUs" %> - - - -

Contact Us

- -

WebsitePanel project is owned and maintained by SMB SAAS Systems Inc. - privately-held company located in Richmond, BC, Canada.

-

For general inquiries please contact: info@websitepanel.net

-

Do not send support requests to the e-mail above, use online forums please.

-
diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/ContactUs.aspx.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/ContactUs.aspx.cs deleted file mode 100644 index ec3de6e8..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/ContactUs.aspx.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2011, SMB SAAS Systems Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of the SMB SAAS Systems Inc. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace WebsitePanel.WebSite -{ - public partial class ContactUs : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - - } - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/ContactUs.aspx.designer.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/ContactUs.aspx.designer.cs deleted file mode 100644 index bacf153a..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/ContactUs.aspx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WebsitePanel.WebSite { - - - public partial class ContactUs { - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/msi-icon.gif b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/msi-icon.gif deleted file mode 100644 index e53333c5..00000000 Binary files a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/msi-icon.gif and /dev/null differ diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/page_bg.jpg b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/page_bg.jpg deleted file mode 100644 index 4f567472..00000000 Binary files a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/page_bg.jpg and /dev/null differ diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/pdf-icon.png b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/pdf-icon.png deleted file mode 100644 index 340c26fc..00000000 Binary files a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/pdf-icon.png and /dev/null differ diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/wsp_logo.png b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/wsp_logo.png deleted file mode 100644 index 61c27507..00000000 Binary files a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/wsp_logo.png and /dev/null differ diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/wsp_screenshot.png b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/wsp_screenshot.png deleted file mode 100644 index a40a3e58..00000000 Binary files a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/wsp_screenshot.png and /dev/null differ diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/zip-icon.png b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/zip-icon.png deleted file mode 100644 index 037dad2d..00000000 Binary files a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Images/zip-icon.png and /dev/null differ diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Styles/Default.css b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Styles/Default.css deleted file mode 100644 index c55ca01a..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Content/Styles/Default.css +++ /dev/null @@ -1,141 +0,0 @@ -BODY -{ - font-family: Arial,sans-serif,Tahoma,Verdana,Helvetica,Helvetica-Narrow; - font-size: 0.9em; - color: #333333; - line-height: 1.166; - margin: 0px; - padding: 0px; - background: #ffffff url('../images/page_bg.jpg') repeat-x top left; -} - -#PageOutline -{ - width: 950px; - margin-left: auto; - margin-right: auto; - margin-top: 20px; -} -#PageContainer -{ - width: 920px; - padding: 10px 10px 10px 20px; - background-color: #FFFFFF; - float: right; -} - -#Header -{ - padding-top: 10px; - padding-bottom: 10px; -} - -#SideBar -{ - padding: 15px; - float: right; - width: 270px; - background-color: #f8f8f8; -} - -#Content -{ - margin-right: 320px; -} - -.Clear -{ - clear: both; -} - -#Footer -{ - font-size: 8pt; - padding-top: 10px; - text-align: center; -} -#Footer A -{ - color: #000000; -} -H1 -{ - font-size: 1.8em; - font-weight: normal; - color: #336699; -} -H2 -{ - font-size: 1.1em; - color: #336699; -} - -#SideBar H2 -{ - margin-top: 0px; -} - -A -{ - color: #4b79aa; -} -LI -{ - padding-bottom: 4px; -} -INPUT.Button -{ - font-size: 1.2em; - padding: 5px; -} -.NewFeature -{ - color: #ff0000; -} -.Red -{ - color: #ff0000; -} -.ProductOption -{ - font-size: 1.3em; - font-weight: bold; -} -.Form -{ - background-color: #f1f7fc; - padding: 10px 20px 10px 20px; -} -.FormFooter -{ - text-align: center; - margin-top: 10px; -} -.Tips LI -{ - padding-bottom: 20px; -} - -.Download -{ - padding: 10px 10px 10px 30px; - border: 1px dashed #f0f0f0; - background-color: #f9f9f9; - background-repeat: no-repeat; - background-position: 8px center; -} - -.Download.msi -{ - background-image: url('../images/msi-icon.gif'); -} - -.Download.pdf -{ - background-image: url('../images/pdf-icon.png'); -} - -.Download.zip -{ - background-image: url('../images/zip-icon.png'); -} \ No newline at end of file diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Controls/SideBar.ascx b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Controls/SideBar.ascx deleted file mode 100644 index a6db4a31..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Controls/SideBar.ascx +++ /dev/null @@ -1,31 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SideBar.ascx.cs" Inherits="WebsitePanel.WebSite.Controls.SideBar" %> - -

WebsitePanel

- - -

Support Options

- - -

Get Involved

- - -

- -

\ No newline at end of file diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Controls/SideBar.ascx.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Controls/SideBar.ascx.cs deleted file mode 100644 index 8a084035..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Controls/SideBar.ascx.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2011, SMB SAAS Systems Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of the SMB SAAS Systems Inc. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace WebsitePanel.WebSite.Controls -{ - public partial class SideBar : System.Web.UI.UserControl - { - protected void Page_Load(object sender, EventArgs e) - { - - } - } -} \ No newline at end of file diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Controls/SideBar.ascx.designer.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Controls/SideBar.ascx.designer.cs deleted file mode 100644 index 07e57472..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Controls/SideBar.ascx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WebsitePanel.WebSite.Controls { - - - public partial class SideBar { - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Data/ProductReleasesFeed.Beta.xml b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Data/ProductReleasesFeed.Beta.xml index 99a382c6..cebc7188 100644 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Data/ProductReleasesFeed.Beta.xml +++ b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Data/ProductReleasesFeed.Beta.xml @@ -1,101 +1,273 @@  - - - Express setup for standalone server configuration. It installs all components on the same server and configures WebsitePanel using recommended settings. - - - 105 - ~/Files/Beta/WebsitePanel-StandaloneServerSetup-1.1.1.1.zip - - setup\setup.dll - WebsitePanel.Setup.StandaloneServerSetup111 - - - + - - - WebsitePanel Portal is a user interface to the control panel which allows managing user accounts, hosting spaces, web sites, FTP accounts, files, etc. - - - 205 - ~/Files/Beta/WebsitePanel-Portal-1.1.1.1.zip - ~/Files/Beta/WebsitePanel-Portal-1.1.1.1-Update.zip - setup\setup.dll - WebsitePanel.Setup.Portal111 - - - 206 - ~/Files/1.1.0/release/WebsitePanel-Portal-1.1.0.10.zip - ~/Files/1.1.0/release/WebsitePanel-Portal-1.1.0.10-Update.zip - setup\setup.dll - WebsitePanel.Setup.Portal110 - - - + + + Express setup for standalone server configuration. It installs all components on the same server and configures WebsitePanel using recommended settings. + + + 109 + http://bit.ly/x5jLpO#/WebsitePanel-StandaloneServerSetup-1.2.1.6.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup121 + + + 108 + ~/Files/1.2.0/WebsitePanel-StandaloneServerSetup-1.2.0.38.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup120 + + + 107 + ~/Files/1.1.2/release/WebsitePanel-StandaloneServerSetup-1.1.2.13.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup112 + + + 106 + ~/Files/1.1.0/release/WebsitePanel-StandaloneServerSetup-1.1.0.10.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup110 + + + 103 + ~/Files/WebsitePanel-StandaloneServerSetup-1.0.2.0.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup102 + + + 102 + ~/Files/WebsitePanel-StandaloneServerSetup-1.0.1.0.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup101 + + + 101 + ~/Files/WebsitePanel-StandaloneServerSetup-1.0.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup10 + + + - - - Enterprise Server is the core of WebsitePanel system. It includes all business logic of the application. Enterprise Server should have access to Server and be accessible from Portal applications. - - - 305 - ~/Files/Beta/WebsitePanel-EnterpriseServer-1.1.1.1.zip - ~/Files/Beta/WebsitePanel-EnterpriseServer-1.1.1.1-Update.zip - setup\setup.dll - WebsitePanel.Setup.EnterpriseServer111 - - - 306 - ~/Files/1.1.0/release/WebsitePanel-EnterpriseServer-1.1.0.10.zip - ~/Files/1.1.0/release/WebsitePanel-EnterpriseServer-1.1.0.10-Update.zip - setup\setup.dll - WebsitePanel.Setup.EnterpriseServer110 - - - + + + WebsitePanel Portal is a user interface to the control panel which allows managing user accounts, hosting spaces, web sites, FTP accounts, files, etc. + + + 209 + http://bit.ly/xgkw9j#/WebsitePanel-Portal-1.2.1.6.zip + http://bit.ly/zogNeL#/WebsitePanel-Portal-1.2.1.6-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal121 + + + 208 + ~/Files/1.2.0/WebsitePanel-Portal-1.2.0.38.zip + ~/Files/1.2.0/WebsitePanel-Portal-1.2.0.38-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal120 + + + 207 + ~/Files/1.1.2/release/WebsitePanel-Portal-1.1.2.13.zip + ~/Files/1.1.2/release/WebsitePanel-Portal-1.1.2.13-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal112 + + + 206 + ~/Files/1.1.0/release/WebsitePanel-Portal-1.1.0.10.zip + ~/Files/1.1.0/release/WebsitePanel-Portal-1.1.0.10-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal110 + + + 203 + ~/Files/WebsitePanel-Portal-1.0.2.0.zip + ~/Files/WebsitePanel-Portal-1.0.2.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal102 + + + 202 + ~/Files/WebsitePanel-Portal-1.0.1.0.zip + ~/Files/WebsitePanel-Portal-1.0.1.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal101 + + + 201 + ~/Files/WebsitePanel-Portal-1.0.zip + + setup\setup.dll + WebsitePanel.Setup.Portal10 + + + - - - WebsitePanel Server is a set of services running on the remote server to be controlled. Server application should be reachable from Enterprise Server one. - - - 405 - ~/Files/Beta/WebsitePanel-Server-1.1.1.1.zip - ~/Files/Beta/WebsitePanel-Server-1.1.1.1-Update.zip - setup\setup.dll - WebsitePanel.Setup.Server111 - - - 406 - ~/Files/1.1.0/release/WebsitePanel-Server-1.1.0.10.zip - ~/Files/1.1.0/release/WebsitePanel-Server-1.1.0.10-Update.zip - setup\setup.dll - WebsitePanel.Setup.Server110 - - - + + + Enterprise Server is the core of WebsitePanel system. It includes all business logic of the application. Enterprise Server should have access to Server and be accessible from Portal applications. + + + 309 + http://bit.ly/xIuPt5#/WebsitePanel-EnterpriseServer-1.2.1.6.zip + http://bit.ly/y0ZgqF#/WebsitePanel-EnterpriseServer-1.2.1.6-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer121 + + + 308 + ~/Files/1.2.0/WebsitePanel-EnterpriseServer-1.2.0.38.zip + ~/Files/1.2.0/WebsitePanel-EnterpriseServer-1.2.0.38-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer120 + + + 307 + ~/Files/1.1.2/release/WebsitePanel-EnterpriseServer-1.1.2.13.zip + ~/Files/1.1.2/release/WebsitePanel-EnterpriseServer-1.1.2.13-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer112 + + + 306 + ~/Files/1.1.0/release/WebsitePanel-EnterpriseServer-1.1.0.10.zip + ~/Files/1.1.0/release/WebsitePanel-EnterpriseServer-1.1.0.10-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer110 + + + 303 + ~/Files/WebsitePanel-EnterpriseServer-1.0.2.0.zip + ~/Files/WebsitePanel-EnterpriseServer-1.0.2.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer102 + + + 302 + ~/Files/WebsitePanel-EnterpriseServer-1.0.1.0.zip + ~/Files/WebsitePanel-EnterpriseServer-1.0.1.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer101 + + + 301 + ~/Files/WebsitePanel-EnterpriseServer-1.0.zip + + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer10 + + + - - - Installer Core Files - - - - 501 - - - - - - - + + + WebsitePanel Server is a set of services running on the remote server to be controlled. Server application should be reachable from Enterprise Server one. + + + 409 + http://bit.ly/zxq3uj#/WebsitePanel-Server-1.2.1.6.zip + http://bit.ly/zbbHVj#/WebsitePanel-Server-1.2.1.6-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server121 + + + 408 + ~/Files/1.2.0/WebsitePanel-Server-1.2.0.38.zip + ~/Files/1.2.0/WebsitePanel-Server-1.2.0.38-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server120 + + + 407 + ~/Files/1.1.2/release/WebsitePanel-Server-1.1.2.13.zip + ~/Files/1.1.2/release/WebsitePanel-Server-1.1.2.13-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server112 + + + 406 + ~/Files/1.1.0/release/WebsitePanel-Server-1.1.0.10.zip + ~/Files/1.1.0/release/WebsitePanel-Server-1.1.0.10-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server110 + + + 403 + ~/Files/WebsitePanel-Server-1.0.2.0.zip + ~/Files/WebsitePanel-Server-1.0.2.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server102 + + + 402 + ~/Files/WebsitePanel-Server-1.0.1.0.zip + ~/Files/WebsitePanel-Server-1.0.1.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server101 + + + 401 + ~/Files/WebsitePanel-Server-1.0.zip + + setup\setup.dll + WebsitePanel.Setup.Server10 + + + + + + Installer Core Files + + + 505 + + ~/Files/1.2.1/WebsitePanel-Installer-1.2.1.1-Update.zip + + + + + + + 504 + + ~/Files/1.2.0/WebsitePanel-Installer-1.2.0.38-Update.zip + + + + + 503 + + ~/Files/1.1.2/release/WebsitePanel-Installer-1.1.2.12-Update.zip + + + + + 502 + + ~/Files/1.1.0/release/WebsitePanel-Installer-1.1.0-Update.zip + + + + + 501 + + + + + + + \ No newline at end of file diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Data/ProductReleasesFeed.Staging.xml b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Data/ProductReleasesFeed.Staging.xml index babe177c..3b4464e4 100644 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Data/ProductReleasesFeed.Staging.xml +++ b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Data/ProductReleasesFeed.Staging.xml @@ -1,101 +1,291 @@ - + - - - Express setup for standalone server configuration. It installs all components on the same server and configures WebsitePanel using recommended settings. - - - - 103 - ~/Files/WebsitePanel-StandaloneServerSetup-1.1.0.9.zip - - setup\setup.dll - WebsitePanel.Setup.StandaloneServerSetup102 - - - - - - - WebsitePanel Portal is a user interface to the control panel which allows managing user accounts, hosting spaces, web sites, FTP accounts, files, etc. - - - - 203 - ~/Files/WebsitePanel-Portal-1.1.0.9.zip - ~/Files/WebsitePanel-Portal-1.1.0.9-Update.zip - setup\setup.dll - WebsitePanel.Setup.Portal102 - - - - - - - Enterprise Server is the core of WebsitePanel system. It includes all business logic of the application. Enterprise Server should have access to Server and be accessible from Portal applications. - - - - 303 - ~/Files/WebsitePanel-EnterpriseServer-1.1.0.9.zip - ~/Files/WebsitePanel-EnterpriseServer-1.1.0.9-Update.zip - setup\setup.dll - WebsitePanel.Setup.EnterpriseServer102 - - - - - - - WebsitePanel Server is a set of services running on the remote server to be controlled. Server application should be reachable from Enterprise Server one. - - - - 403 - ~/Files/WebsitePanel-Server-1.1.0.9.zip - ~/Files/WebsitePanel-Server-1.1.0.9-Update.zip - setup\setup.dll - WebsitePanel.Setup.Server102 - - - - - - - Installer Core Files - - - 502 - - ~/Files/1.1.0/release/WebsitePanel-Installer-1.1.0-Update.zip - - - - - - + + + + Express setup for standalone server configuration. It installs all components on the same server and configures WebsitePanel using recommended settings. + + + 109 + http://bit.ly/ycuBo2#/WebsitePanel-StandaloneServerSetup-1.2.1.1.zip + + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup120 + + + 108 + ~/Files/1.2.0/WebsitePanel-StandaloneServerSetup-1.2.0.38.zip + + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup120 + + + 107 + ~/Files/1.1.2/release/WebsitePanel-StandaloneServerSetup-1.1.2.13.zip + + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup112 + + + 106 + ~/Files/1.1.0/release/WebsitePanel-StandaloneServerSetup-1.1.0.10.zip + + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup110 + + + 103 + ~/Files/WebsitePanel-StandaloneServerSetup-1.0.2.0.zip + + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup102 + + + 102 + ~/Files/WebsitePanel-StandaloneServerSetup-1.0.1.0.zip + + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup101 + + + 101 + ~/Files/WebsitePanel-StandaloneServerSetup-1.0.zip + + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup10 + + + + + + WebsitePanel Portal is a user interface to the control panel which allows managing user accounts, hosting spaces, web sites, FTP accounts, files, etc. + + + 209 + http://bit.ly/yCb0c1#/WebsitePanel-Portal-1.2.1.1.zip + http://bit.ly/yzMCDV#/WebsitePanel-Portal-1.2.1.1-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal120 + + + 208 + ~/Files/1.2.0/WebsitePanel-Portal-1.2.0.38.zip + ~/Files/1.2.0/WebsitePanel-Portal-1.2.0.38-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal120 + + + 207 + ~/Files/1.1.2/release/WebsitePanel-Portal-1.1.2.13.zip + ~/Files/1.1.2/release/WebsitePanel-Portal-1.1.2.13-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal112 + + + 206 + ~/Files/1.1.0/release/WebsitePanel-Portal-1.1.0.10.zip + ~/Files/1.1.0/release/WebsitePanel-Portal-1.1.0.10-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal110 + + + 203 + ~/Files/WebsitePanel-Portal-1.0.2.0.zip + ~/Files/WebsitePanel-Portal-1.0.2.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal102 + + + 202 + ~/Files/WebsitePanel-Portal-1.0.1.0.zip + ~/Files/WebsitePanel-Portal-1.0.1.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal101 + + + 201 + ~/Files/WebsitePanel-Portal-1.0.zip + + + setup\setup.dll + WebsitePanel.Setup.Portal10 + + + + + + Enterprise Server is the core of WebsitePanel system. It includes all business logic of the application. Enterprise Server should have access to Server and be accessible from Portal applications. + + + 309 + http://bit.ly/z4gCyP#/WebsitePanel-EnterpriseServer-1.2.1.1.zip + http://bit.ly/y2lE8O#/WebsitePanel-EnterpriseServer-1.2.1.1-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer120 + + + 308 + ~/Files/1.2.0/WebsitePanel-EnterpriseServer-1.2.0.38.zip + ~/Files/1.2.0/WebsitePanel-EnterpriseServer-1.2.0.38-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer120 + + + 307 + ~/Files/1.1.2/release/WebsitePanel-EnterpriseServer-1.1.2.13.zip + ~/Files/1.1.2/release/WebsitePanel-EnterpriseServer-1.1.2.13-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer112 + + + 306 + ~/Files/1.1.0/release/WebsitePanel-EnterpriseServer-1.1.0.10.zip + ~/Files/1.1.0/release/WebsitePanel-EnterpriseServer-1.1.0.10-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer110 + + + 303 + ~/Files/WebsitePanel-EnterpriseServer-1.0.2.0.zip + ~/Files/WebsitePanel-EnterpriseServer-1.0.2.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer102 + + + 302 + ~/Files/WebsitePanel-EnterpriseServer-1.0.1.0.zip + ~/Files/WebsitePanel-EnterpriseServer-1.0.1.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer101 + + + 301 + ~/Files/WebsitePanel-EnterpriseServer-1.0.zip + + + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer10 + + + + + + WebsitePanel Server is a set of services running on the remote server to be controlled. Server application should be reachable from Enterprise Server one. + + + 409 + http://bit.ly/A3rpyB#/WebsitePanel-Server-1.2.1.1.zip + http://bit.ly/zFwbjM#/WebsitePanel-Server-1.2.1.1-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server120 + + + 408 + ~/Files/1.2.0/WebsitePanel-Server-1.2.0.38.zip + ~/Files/1.2.0/WebsitePanel-Server-1.2.0.38-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server120 + + + 407 + ~/Files/1.1.2/release/WebsitePanel-Server-1.1.2.13.zip + ~/Files/1.1.2/release/WebsitePanel-Server-1.1.2.13-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server112 + + + 406 + ~/Files/1.1.0/release/WebsitePanel-Server-1.1.0.10.zip + ~/Files/1.1.0/release/WebsitePanel-Server-1.1.0.10-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server110 + + + 403 + ~/Files/WebsitePanel-Server-1.0.2.0.zip + ~/Files/WebsitePanel-Server-1.0.2.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server102 + + + 402 + ~/Files/WebsitePanel-Server-1.0.1.0.zip + ~/Files/WebsitePanel-Server-1.0.1.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server101 + + + 401 + ~/Files/WebsitePanel-Server-1.0.zip + + + setup\setup.dll + WebsitePanel.Setup.Server10 + + + + + + Installer Core Files + + + 505 + + ~/Files/1.2.1/WebsitePanel-Installer-1.2.1.1-Update.zip + + + + + + + 504 + + + ~/Files/1.2.0/WebsitePanel-Installer-1.2.0.38-Update.zip + + + + + + + 503 + + + ~/Files/1.1.2/release/WebsitePanel-Installer-1.1.2.12-Update.zip + + + + + + + 502 + + + ~/Files/1.1.0/release/WebsitePanel-Installer-1.1.0-Update.zip + + + + + + + 501 + + + + + + + + + + + \ No newline at end of file diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Data/ProductReleasesFeed.xml b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Data/ProductReleasesFeed.xml index 6c22b6d0..cebc7188 100644 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Data/ProductReleasesFeed.xml +++ b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Data/ProductReleasesFeed.xml @@ -1,164 +1,273 @@  - - - Express setup for standalone server configuration. It installs all components on the same server and configures WebsitePanel using recommended settings. - - - 106 - ~/Files/1.1.0/release/WebsitePanel-StandaloneServerSetup-1.1.0.10.zip - - setup\setup.dll - WebsitePanel.Setup.StandaloneServerSetup110 - - - 103 - ~/Files/WebsitePanel-StandaloneServerSetup-1.0.2.0.zip - - setup\setup.dll - WebsitePanel.Setup.StandaloneServerSetup102 - - - 102 - ~/Files/WebsitePanel-StandaloneServerSetup-1.0.1.0.zip - - setup\setup.dll - WebsitePanel.Setup.StandaloneServerSetup101 - - - 101 - ~/Files/WebsitePanel-StandaloneServerSetup-1.0.zip - - setup\setup.dll - WebsitePanel.Setup.StandaloneServerSetup10 - - - + - - - WebsitePanel Portal is a user interface to the control panel which allows managing user accounts, hosting spaces, web sites, FTP accounts, files, etc. - - - 206 - ~/Files/1.1.0/release/WebsitePanel-Portal-1.1.0.10.zip - ~/Files/1.1.0/release/WebsitePanel-Portal-1.1.0.10-Update.zip - setup\setup.dll - WebsitePanel.Setup.Portal110 - - - 203 - ~/Files/WebsitePanel-Portal-1.0.2.0.zip - ~/Files/WebsitePanel-Portal-1.0.2.0-Update.zip - setup\setup.dll - WebsitePanel.Setup.Portal102 - - - 202 - ~/Files/WebsitePanel-Portal-1.0.1.0.zip - ~/Files/WebsitePanel-Portal-1.0.1.0-Update.zip - setup\setup.dll - WebsitePanel.Setup.Portal101 - - - 201 - ~/Files/WebsitePanel-Portal-1.0.zip - - setup\setup.dll - WebsitePanel.Setup.Portal10 - - - + + + Express setup for standalone server configuration. It installs all components on the same server and configures WebsitePanel using recommended settings. + + + 109 + http://bit.ly/x5jLpO#/WebsitePanel-StandaloneServerSetup-1.2.1.6.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup121 + + + 108 + ~/Files/1.2.0/WebsitePanel-StandaloneServerSetup-1.2.0.38.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup120 + + + 107 + ~/Files/1.1.2/release/WebsitePanel-StandaloneServerSetup-1.1.2.13.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup112 + + + 106 + ~/Files/1.1.0/release/WebsitePanel-StandaloneServerSetup-1.1.0.10.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup110 + + + 103 + ~/Files/WebsitePanel-StandaloneServerSetup-1.0.2.0.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup102 + + + 102 + ~/Files/WebsitePanel-StandaloneServerSetup-1.0.1.0.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup101 + + + 101 + ~/Files/WebsitePanel-StandaloneServerSetup-1.0.zip + + setup\setup.dll + WebsitePanel.Setup.StandaloneServerSetup10 + + + - - - Enterprise Server is the core of WebsitePanel system. It includes all business logic of the application. Enterprise Server should have access to Server and be accessible from Portal applications. - - - 306 - ~/Files/1.1.0/release/WebsitePanel-EnterpriseServer-1.1.0.10.zip - ~/Files/1.1.0/release/WebsitePanel-EnterpriseServer-1.1.0.10-Update.zip - setup\setup.dll - WebsitePanel.Setup.EnterpriseServer110 - - - 303 - ~/Files/WebsitePanel-EnterpriseServer-1.0.2.0.zip - ~/Files/WebsitePanel-EnterpriseServer-1.0.2.0-Update.zip - setup\setup.dll - WebsitePanel.Setup.EnterpriseServer102 - - - 302 - ~/Files/WebsitePanel-EnterpriseServer-1.0.1.0.zip - ~/Files/WebsitePanel-EnterpriseServer-1.0.1.0-Update.zip - setup\setup.dll - WebsitePanel.Setup.EnterpriseServer101 - - - 301 - ~/Files/WebsitePanel-EnterpriseServer-1.0.zip - - setup\setup.dll - WebsitePanel.Setup.EnterpriseServer10 - - - + + + WebsitePanel Portal is a user interface to the control panel which allows managing user accounts, hosting spaces, web sites, FTP accounts, files, etc. + + + 209 + http://bit.ly/xgkw9j#/WebsitePanel-Portal-1.2.1.6.zip + http://bit.ly/zogNeL#/WebsitePanel-Portal-1.2.1.6-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal121 + + + 208 + ~/Files/1.2.0/WebsitePanel-Portal-1.2.0.38.zip + ~/Files/1.2.0/WebsitePanel-Portal-1.2.0.38-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal120 + + + 207 + ~/Files/1.1.2/release/WebsitePanel-Portal-1.1.2.13.zip + ~/Files/1.1.2/release/WebsitePanel-Portal-1.1.2.13-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal112 + + + 206 + ~/Files/1.1.0/release/WebsitePanel-Portal-1.1.0.10.zip + ~/Files/1.1.0/release/WebsitePanel-Portal-1.1.0.10-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal110 + + + 203 + ~/Files/WebsitePanel-Portal-1.0.2.0.zip + ~/Files/WebsitePanel-Portal-1.0.2.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal102 + + + 202 + ~/Files/WebsitePanel-Portal-1.0.1.0.zip + ~/Files/WebsitePanel-Portal-1.0.1.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.Portal101 + + + 201 + ~/Files/WebsitePanel-Portal-1.0.zip + + setup\setup.dll + WebsitePanel.Setup.Portal10 + + + - - - WebsitePanel Server is a set of services running on the remote server to be controlled. Server application should be reachable from Enterprise Server one. - - - 406 - ~/Files/1.1.0/release/WebsitePanel-Server-1.1.0.10.zip - ~/Files/1.1.0/release/WebsitePanel-Server-1.1.0.10-Update.zip - setup\setup.dll - WebsitePanel.Setup.Server110 - - - 403 - ~/Files/WebsitePanel-Server-1.0.2.0.zip - ~/Files/WebsitePanel-Server-1.0.2.0-Update.zip - setup\setup.dll - WebsitePanel.Setup.Server102 - - - 402 - ~/Files/WebsitePanel-Server-1.0.1.0.zip - ~/Files/WebsitePanel-Server-1.0.1.0-Update.zip - setup\setup.dll - WebsitePanel.Setup.Server101 - - - 401 - ~/Files/WebsitePanel-Server-1.0.zip - - setup\setup.dll - WebsitePanel.Setup.Server10 - - - + + + Enterprise Server is the core of WebsitePanel system. It includes all business logic of the application. Enterprise Server should have access to Server and be accessible from Portal applications. + + + 309 + http://bit.ly/xIuPt5#/WebsitePanel-EnterpriseServer-1.2.1.6.zip + http://bit.ly/y0ZgqF#/WebsitePanel-EnterpriseServer-1.2.1.6-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer121 + + + 308 + ~/Files/1.2.0/WebsitePanel-EnterpriseServer-1.2.0.38.zip + ~/Files/1.2.0/WebsitePanel-EnterpriseServer-1.2.0.38-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer120 + + + 307 + ~/Files/1.1.2/release/WebsitePanel-EnterpriseServer-1.1.2.13.zip + ~/Files/1.1.2/release/WebsitePanel-EnterpriseServer-1.1.2.13-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer112 + + + 306 + ~/Files/1.1.0/release/WebsitePanel-EnterpriseServer-1.1.0.10.zip + ~/Files/1.1.0/release/WebsitePanel-EnterpriseServer-1.1.0.10-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer110 + + + 303 + ~/Files/WebsitePanel-EnterpriseServer-1.0.2.0.zip + ~/Files/WebsitePanel-EnterpriseServer-1.0.2.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer102 + + + 302 + ~/Files/WebsitePanel-EnterpriseServer-1.0.1.0.zip + ~/Files/WebsitePanel-EnterpriseServer-1.0.1.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer101 + + + 301 + ~/Files/WebsitePanel-EnterpriseServer-1.0.zip + + setup\setup.dll + WebsitePanel.Setup.EnterpriseServer10 + + + - - - Installer Core Files - - - 502 - - ~/Files/1.1.0/release/WebsitePanel-Installer-1.1.0-Update.zip - - - - - 501 - - - - - - - + + + WebsitePanel Server is a set of services running on the remote server to be controlled. Server application should be reachable from Enterprise Server one. + + + 409 + http://bit.ly/zxq3uj#/WebsitePanel-Server-1.2.1.6.zip + http://bit.ly/zbbHVj#/WebsitePanel-Server-1.2.1.6-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server121 + + + 408 + ~/Files/1.2.0/WebsitePanel-Server-1.2.0.38.zip + ~/Files/1.2.0/WebsitePanel-Server-1.2.0.38-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server120 + + + 407 + ~/Files/1.1.2/release/WebsitePanel-Server-1.1.2.13.zip + ~/Files/1.1.2/release/WebsitePanel-Server-1.1.2.13-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server112 + + + 406 + ~/Files/1.1.0/release/WebsitePanel-Server-1.1.0.10.zip + ~/Files/1.1.0/release/WebsitePanel-Server-1.1.0.10-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server110 + + + 403 + ~/Files/WebsitePanel-Server-1.0.2.0.zip + ~/Files/WebsitePanel-Server-1.0.2.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server102 + + + 402 + ~/Files/WebsitePanel-Server-1.0.1.0.zip + ~/Files/WebsitePanel-Server-1.0.1.0-Update.zip + setup\setup.dll + WebsitePanel.Setup.Server101 + + + 401 + ~/Files/WebsitePanel-Server-1.0.zip + + setup\setup.dll + WebsitePanel.Setup.Server10 + + + + + + Installer Core Files + + + 505 + + ~/Files/1.2.1/WebsitePanel-Installer-1.2.1.1-Update.zip + + + + + + + 504 + + ~/Files/1.2.0/WebsitePanel-Installer-1.2.0.38-Update.zip + + + + + 503 + + ~/Files/1.1.2/release/WebsitePanel-Installer-1.1.2.12-Update.zip + + + + + 502 + + ~/Files/1.1.0/release/WebsitePanel-Installer-1.1.0-Update.zip + + + + + 501 + + + + + + + \ No newline at end of file diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Default.aspx b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Default.aspx deleted file mode 100644 index ac230d88..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Default.aspx +++ /dev/null @@ -1,39 +0,0 @@ -<%@ Page Title="WebsitePanel - The control panel for Windows hosting" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebsitePanel.WebSite.Default" %> - - - - -

Welcome to WebsitePanel project

- -

- WebsitePanel is an easy to use control panel for Windows hosting. It allows you to manage multiple servers, - it has a robust, scalable and secure architecture. -

- - -

WebsitePanel Home Page - With WebsitePanel you can easily manage all your web sites, FTP accounts, databases and other resources from a single place. -

- -

WebsitePanel highlights:

-
    -
  • It's an open source project under BSD license
  • -
  • Built exclusively for Windows platform
  • -
  • True multi-server architecture
  • -
  • Huge list of 3rd party software
  • -
  • Tight integration with Microsoft Web App Gallery
  • -
  • Easy to install and use
  • -
  • Great community support
  • -
  • Supported by Microsoft
  • -
- -

WebsitePanel is an ideal solution for:

-
    -
  • Developers managing their own or customer servers and web sites.
  • -
  • Providers offering Windows hosting services.
  • -
  • Individuals managing their dedicated or virtual Windows servers.
  • -
-

- Download WebsitePanel and take the most from your Windows server! -

-
\ No newline at end of file diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Default.aspx.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Default.aspx.cs deleted file mode 100644 index 3302197b..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Default.aspx.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2011, SMB SAAS Systems Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of the SMB SAAS Systems Inc. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace WebsitePanel.WebSite -{ - public partial class Default : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - - } - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Default.aspx.designer.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Default.aspx.designer.cs deleted file mode 100644 index 1ebd86ed..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Default.aspx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WebsitePanel.WebSite { - - - public partial class Default { - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Documentation.aspx b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Documentation.aspx deleted file mode 100644 index 0a1e22fa..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Documentation.aspx +++ /dev/null @@ -1,14 +0,0 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Documentation.aspx.cs" Inherits="WebsitePanel.WebSite.Documentation" %> - - - -

Documentation

- -

Essential Guides

-

User the following guide to install and configure WebsitePanel. It's primarily for users installing WebsitePanel in a standalone mode:

-

WebsitePanel Installation Guide (~3 MB)

- -

Modules

-

WebsitePanel Exchange 2010 SP1 Hosting Mode Module Guide (~300 KB)

-

Guidance for migration to Exchange 2010 SP1 Hosting Mode (~770 KB)

-
diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Documentation.aspx.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Documentation.aspx.cs deleted file mode 100644 index 903f7d5e..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Documentation.aspx.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2011, SMB SAAS Systems Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of the SMB SAAS Systems Inc. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace WebsitePanel.WebSite -{ - public partial class Documentation : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - - } - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Downloads.aspx b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Downloads.aspx deleted file mode 100644 index 1c41b23d..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Downloads.aspx +++ /dev/null @@ -1,28 +0,0 @@ -<%@ Page Title="WebsitePanel - Downloads" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Downloads.aspx.cs" Inherits="WebsitePanel.WebSite.Downloads" %> - - - -

Downloads

- -

WebsitePanel Installer

- -

WebsitePanel Installer is used for initial installation of WebsitePanel components and for their further upgrades. - WebsitePanel Installer does not include WebsitePanel distributives - they will - be downloaded during the installation or upgrade process. Use link below to - download the installer:

-

WebsitePanel Installer (~1 MB)

- -

Tools

- -

WebsitePanel Localization Toolkit helps users to build multi-lingual WebsitePanel Portal sites:

-

WebsitePanel Localization Toolkit 1.0 (~1 MB)

- -

Language Packs

-

Danish Language Pack for WebsitePanel 1.0.1
(Original author: Jeppe Richardt; updated for WebsitePanel by Klaus E. Frederiksen)

- -

German Language Pack for WebsitePanel 1.0.2
(Author: Mike Schwarz)

- -

Templates

-

Mail templates for WebsitePanel

- -
diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Downloads.aspx.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Downloads.aspx.cs deleted file mode 100644 index 663ff58e..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Downloads.aspx.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2011, SMB SAAS Systems Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of the SMB SAAS Systems Inc. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace WebsitePanel.WebSite -{ - public partial class Downloads : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - - } - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Downloads.aspx.designer.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Downloads.aspx.designer.cs deleted file mode 100644 index 3633f372..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Downloads.aspx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WebsitePanel.WebSite { - - - public partial class Downloads { - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Error.htm b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Error.htm deleted file mode 100644 index 3e806714..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Error.htm +++ /dev/null @@ -1,18 +0,0 @@ - - - - WebsitePanel Error - - - -

- Error

-

- Sorry, an error occurred while processing your request. Please try again later.

- - \ No newline at end of file diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/License.aspx b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/License.aspx deleted file mode 100644 index c24eaf8f..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/License.aspx +++ /dev/null @@ -1,23 +0,0 @@ -<%@ Page Title="WebsitePanel - License" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="License.aspx.cs" Inherits="WebsitePanel.WebSite.License" %> - - - - -

Project License

- -

Copyright (c) 2010, SMB SAAS Systems Inc. -
All rights reserved.

- -

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- -
    -
  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • - -
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • - -
  • Neither the name of the SMB SAAS Systems Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  • -
- -

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

- -
diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/License.aspx.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/License.aspx.cs deleted file mode 100644 index 62d8bafb..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/License.aspx.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2011, SMB SAAS Systems Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of the SMB SAAS Systems Inc. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace WebsitePanel.WebSite -{ - public partial class License : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - - } - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/License.aspx.designer.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/License.aspx.designer.cs deleted file mode 100644 index 106aba95..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/License.aspx.designer.cs +++ /dev/null @@ -1,16 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4927 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WebsitePanel.WebSite { - - - public partial class License { - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Properties/AssemblyInfo.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Properties/AssemblyInfo.cs index ec4d606d..17f64084 100644 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Properties/AssemblyInfo.cs +++ b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Properties/AssemblyInfo.cs @@ -8,9 +8,9 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("WebsitePanel.WebSite")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("SMB SAAS Systems Inc.")] +[assembly: AssemblyCompany("Outercurve Foundation")] [assembly: AssemblyProduct("WebsitePanel Web Site")] -[assembly: AssemblyCopyright("Copyright © 2010 SMB SAAS Systems Inc.")] +[assembly: AssemblyCopyright("Copyright © 2012 Outercurve Foundation.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Site.Master b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Site.Master deleted file mode 100644 index cd28f360..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Site.Master +++ /dev/null @@ -1,51 +0,0 @@ -<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="WebsitePanel.WebSite.Site" %> -<%@ Register src="Controls/SideBar.ascx" tagname="SideBar" tagprefix="wsp" %> - - - - - - - - - - - -
- -
-
- - - - - -
- - - - - - -
- -
- -
- - -
- -
- - - - diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Site.Master.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Site.Master.cs deleted file mode 100644 index 0748d616..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Site.Master.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2011, SMB SAAS Systems Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of the SMB SAAS Systems Inc. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace WebsitePanel.WebSite -{ - public partial class Site : System.Web.UI.MasterPage - { - protected void Page_Load(object sender, EventArgs e) - { - - } - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Site.Master.designer.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Site.Master.designer.cs deleted file mode 100644 index 285c1991..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Site.Master.designer.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4927 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WebsitePanel.WebSite { - - - public partial class Site { - - /// - /// head control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ContentPlaceHolder head; - - /// - /// AspForm control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm AspForm; - - /// - /// SideBarContent control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::WebsitePanel.WebSite.Controls.SideBar SideBarContent; - - /// - /// ContentColumn control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ContentPlaceHolder ContentColumn; - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Web.config b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Web.config deleted file mode 100644 index 0b6886f0..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/Web.config +++ /dev/null @@ -1,102 +0,0 @@ - - - - - -
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/2.0/WebsitePanelFeed.xml b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/1.1.0/WebsitePanelFeed.xml similarity index 100% rename from WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/2.0/WebsitePanelFeed.xml rename to WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/1.1.0/WebsitePanelFeed.xml diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/3.0/WebsitePanelFeed.xml b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/1.2.0/WebsitePanelFeed.xml similarity index 86% rename from WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/3.0/WebsitePanelFeed.xml rename to WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/1.2.0/WebsitePanelFeed.xml index c971c190..eede85b7 100644 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/3.0/WebsitePanelFeed.xml +++ b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/1.2.0/WebsitePanelFeed.xml @@ -1,34 +1,34 @@  - 1.0.1 - 2011-01-12T15:09:00Z - WebsitePanel 1.1.0 + 1.0.2 + 2011-07-14T12:14:00Z + WebsitePanel 1.2.0 - SMB SAAS Systems + Outercurve Foundation http://www.websitepanel.net http://www.websitepanel.net/WebPI/3.0/WebsitePanelFeed.xml - WebsitePanel - WebsitePanel 1.1.0 - 1.1.0 + WebsitePanel120 + WebsitePanel 1.2.0 + 1.2.0 WebsitePanel is an easy to use control panel for Windows hosting. It allows you to manage multiple servers, it has a robust, scalable and secure architecture. With WebsitePanel you can easily manage all your web sites, FTP accounts, databases and other resources from a single place. http://www.websitepanel.net/web/webpi/wsp - 2010-12-30T17:40:00Z + 2011-07-13T17:40:00Z WebsitePanel is an easy to use control panel for Windows hosting. It allows you to manage multiple servers, it has a robust, scalable and secure architecture. With WebsitePanel you can easily manage all your web sites, FTP accounts, databases and other resources from a single place. - 2010-12-30T17:40:00Z + 2011-07-13T17:40:00Z http://www.websitepanel.net/content/images/wsp_screenshot.png - SMB SAAS Systems + Outercurve Foundation http://www.websitepanel.net/Contact-Us - + Server ProductSpotlight @@ -38,12 +38,12 @@ - %ProgramFiles%\SMB SAAS Systems\WebsitePanel Installer\WebsitePanel.Installer.exe + %ProgramFiles%\WebsitePanel Installer\WebsitePanel.Installer.exe - %ProgramFiles(x86)%\SMB SAAS Systems\WebsitePanel Installer\WebsitePanel.Installer.exe + %ProgramFiles(x86)%\WebsitePanel Installer\WebsitePanel.Installer.exe @@ -54,10 +54,10 @@ - NETFramework20SP1 + NETFramework4 - ASPNET + IIS7 SQLExpress @@ -107,9 +107,9 @@ http://www.websitepanel.net/License - 1059 - http://www.websitepanel.net/Files/1.1.0/release/WebsitePanelInstaller11.msi - 0F6EAFE073590A9BFC190C72113B4B73A3A375F7 + 1076 + http://websitepanel.codeplex.com/releases/view/69982#DownloadId=258992 + CC6F4CF24F3BEE262EE798A9B07F54198A794CC2 @@ -118,7 +118,7 @@ /i "%InstallerFile%" /q - %ProgramFiles%\SMB SAAS Systems\WebsitePanel Installer\WebsitePanel.SilentInstaller.exe + %ProgramFiles%\WebsitePanel Installer\WebsitePanel.SilentInstaller.exe /cname:"standalone" @@ -201,10 +201,10 @@ http://www.websitepanel.net/License - 1059 - http://www.websitepanel.net/Files/1.1.0/release/WebsitePanelInstaller11.msi + 1076 + http://websitepanel.codeplex.com/releases/view/69982#DownloadId=258992 - 0F6EAFE073590A9BFC190C72113B4B73A3A375F7 + CC6F4CF24F3BEE262EE798A9B07F54198A794CC2 @@ -212,7 +212,7 @@ /i "%InstallerFile%" /q - %ProgramFiles(x86)%\SMB SAAS Systems\WebsitePanel Installer\WebsitePanel.SilentInstaller.exe + %ProgramFiles(x86)%\WebsitePanel Installer\WebsitePanel.SilentInstaller.exe /cname:"standalone" diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/1.2.1/WebsitePanelFeed.xml b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/1.2.1/WebsitePanelFeed.xml new file mode 100644 index 00000000..d49a7bc2 --- /dev/null +++ b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebPI/1.2.1/WebsitePanelFeed.xml @@ -0,0 +1,283 @@ + + + + + WebsitePanel Installer v4.0 Feed + 2012-05-02T00:00:00Z + + + Outercurve Foundation + http://www.websitepanel.net/ + + http://www.websitepanel.net/web/webpi/1.2.1/WebsitePanelList.xml + + + WebsitePanel121 + WebsitePanel 1.2.1 + 1.2.1 + WebsitePanel is an easy to use control panel for Windows hosting. It allows you to manage multiple servers, it has a robust, scalable and secure architecture. With WebsitePanel you can easily manage all your web sites, FTP accounts, databases and other resources from a single place. + http://www.websitepanel.net/web/webpi/wsp/121 + 2012-05-02T00:00:00Z + WebsitePanel is an easy to use control panel for Windows hosting. It allows you to manage multiple servers, it has a robust, scalable and secure architecture. With WebsitePanel you can easily manage all your web sites, FTP accounts, databases and other resources from a single place. + 2011-07-15T17:40:00Z + + + http://www.websitepanel.net/content/images/wsp_screenshot.png + + + Outercurve Foundation + http://www.websitepanel.net/Contact-Us + + + + Server + ProductSpotlight + + + + + + + %ProgramFiles%\WebsitePanel Installer\WebsitePanel.Installer.exe + + + + + %ProgramFiles(x86)%\WebsitePanel Installer\WebsitePanel.Installer.exe + + + + + + + + + + + IIS7 + + + ManagementService + + + + + NETFramework4 + + + NETFX4 + + + NETFramework45 + + + + + SQLExpress + + + WDeploy + + + + + + + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + http://www.websitepanel.net/License + Terms of Use + + + + + + 1 + en + + + + + + + 5 + 2 + 2 + + + 5 + 2 + + + + + 6 + 0 + 0 + + + + + + + http://www.websitepanel.net/License + + + 1104 + http://websitepanel.codeplex.com/Project/Download/FileDownload.aspx?DownloadId=339227 + 2AEE726B0CD696C08DA90246CEB5D8E3154C0333 + + + + + msiexec.exe + /i "%InstallerFile%" /q + + + %ProgramFiles%\WebsitePanel Installer\WebsitePanel.SilentInstaller.exe + /cname:"standalone" + + + 0 + + Installation operation completed successfully. + + + + -1000 + + Failed to install WebsitePanel Standalone Setup package + + + + -999 + + Unknown component name has been supplied + + + + -998 + + Another instance of WebsitePanel installation is in progress + + + + -997 + + Not enough permissions to install run the installation + + + + -996 + + No input parameters supplied + + + + -995 + + WebsitePanel Standalone Setup or one of its parts has been already installed + + + + + + http://social.msdn.microsoft.com/Forums/en-US/category/websitepanel + + + + 2 + en + + + + + + + 5 + 2 + 2 + + + 5 + 2 + + + + + 6 + 0 + 0 + + + + + + + http://www.websitepanel.net/License + + + 1104 + http://websitepanel.codeplex.com/Project/Download/FileDownload.aspx?DownloadId=339227 + + 2AEE726B0CD696C08DA90246CEB5D8E3154C0333 + + + + msiexec.exe + /i "%InstallerFile%" /q + + + %ProgramFiles(x86)%\WebsitePanel Installer\WebsitePanel.SilentInstaller.exe + /cname:"standalone" + + + 0 + + Installation operation completed successfully. + + + + -1000 + + Failed to install WebsitePanel Standalone Setup package + + + + -999 + + Unknown component name has been supplied + + + + -998 + + Another instance of WebsitePanel installation is in progress + + + + -997 + + Not enough permissions to install run the installation + + + + -996 + + No input parameters supplied + + + + -995 + + WebsitePanel Standalone Setup or one of its parts has been already installed + + + + + + http://social.msdn.microsoft.com/Forums/en-US/category/websitepanel + + + + \ No newline at end of file diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebsitePanel.WebSite.csproj b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebsitePanel.WebSite.csproj index 53a912de..2d09ef83 100644 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebsitePanel.WebSite.csproj +++ b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WebsitePanel.WebSite.csproj @@ -60,7 +60,7 @@ - + Designer @@ -70,58 +70,14 @@ Designer - - - Designer - - + + + - - ContactUs.aspx - ASPXCodeBehind - - - ContactUs.aspx - - - SideBar.ascx - ASPXCodeBehind - - - SideBar.ascx - - - Default.aspx - ASPXCodeBehind - - - Default.aspx - - - Documentation.aspx - ASPXCodeBehind - - - Documentation.aspx - - - Downloads.aspx - ASPXCodeBehind - - - Downloads.aspx - - - License.aspx - ASPXCodeBehind - - - License.aspx - InstallerService-Staging.asmx @@ -133,43 +89,9 @@ InstallerService.asmx - - Site.Master - ASPXCodeBehind - - - Site.Master - - - WorksWith.aspx - ASPXCodeBehind - - - WorksWith.aspx - - - - - - - - - - - - - - - - - - Designer - - - diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WorksWith.aspx b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WorksWith.aspx deleted file mode 100644 index 9fff2c1f..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WorksWith.aspx +++ /dev/null @@ -1,86 +0,0 @@ -<%@ Page Title="WebsitePanel - 3rd Party Software" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WorksWith.aspx.cs" Inherits="WebsitePanel.WebSite.WorksWith" %> - - - -

3rd Party Software

-

WebsitePanel works with a huge list of 3rd party products. Please note that support for the software systems managed by WebsitePanel is provided by the publisher or manufacturer of those software systems. For example support for SmarterMail is provided by SmarterTools. Likewise support for Microsoft products such as IIS is provided by Microsoft support under the standard product support channels.

- -

Operating Systems

-
    -
  • Windows Server 2008 R2 any edition, 64 bits
  • -
  • Windows Server 2008 any edition, 32 and 64 bits 
  • -
  • Windows Server 2003 R2 any edition, 32 and 64 bits
  • -
  • Windows Server 2003 any edition, 32 and 64 bits
  • -
- -

Web Servers

-
    -
  • IIS 7.5
  • -
  • IIS 7.0
  • -
  • IIS 6.0
  • -
  • ColdFusion 7/8/9
  • -
- -

FTP Servers

-
    -
  • MS FTP 7.5
  • -
  • MS FTP 7.0
  • -
  • MS FTP 6.0
  • -
  • Gene6 FTP Server
  • -
  • Serv-U FTP Server 6.x
  • -
  • FileZilla FTP Server
  • -
- -

Mail Servers

-
    -
  • SmarterMail 2.x - 7.x
  • -
  • MailEnable 2.x - 4.x
  • -
  • Merak Mail Server 8.x - 10.x
  • -
  • MDaemon 9.x - 10.x
  • -
  • hMailServer 4.x
  • -
  • ArgoMail Server 1.x
  • -
  • Ability Mail Server 2.x
  • -
- -

Database Engines

-
    -
  • Microsoft SQL Server 2008 R2 of any edition
  • -
  • Microsoft SQL Server 2000/2005/2008 of any edition
  • -
  • Microsoft SQL Server 7.0 of any edition
  • -
  • MySQL Server of 4.0.x, 4.1.x and 5.x versions
  • -
  • Microsoft Access 2000 
  • -
- -

DNS Servers

-
    -
  • Microsoft DNS Server (bundled with Windows Server)
  • -
  • Simple DNS Plus 4.x-5.x
  • -
  • ISC BIND DNS Server
  • -
  • Nettica DNS Service
  • -
- -

Statistics Servers

-
    -
  • SmarterStats 3.x - 6.x
  • -
  • AWStats Statistics (free software)
  • -
- -

Collaboration

-
    -
  • Microsoft Exchange Server 2010 SP1 installed with /hosting switch
  • -
  • Microsoft Exchange Server 2007 and 2010 -
    Please refer to this post for support status update on Exchange 2007 and 2010.
  • -
  • BlackBerry Enterprise Server
  • -
  • Windows SharePoint Services 3.0
  • -
  • SharePoint Foundation 2010
  • -
  • Office Communication Server 2007
  • -
  • Microsoft Dynamics CRM 4.0
  • -
- -

Virtualization

-
    -
  • Hyper-V Technology
  • -
- -
diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WorksWith.aspx.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WorksWith.aspx.cs deleted file mode 100644 index 1351dbfc..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WorksWith.aspx.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2011, SMB SAAS Systems Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of the SMB SAAS Systems Inc. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace WebsitePanel.WebSite -{ - public partial class WorksWith : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - - } - } -} diff --git a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WorksWith.aspx.designer.cs b/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WorksWith.aspx.designer.cs deleted file mode 100644 index 252dbc73..00000000 --- a/WebsitePanel.WebSite/Sources/WebsitePanel.WebSite/WorksWith.aspx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WebsitePanel.WebSite { - - - public partial class WorksWith { - } -} diff --git a/WebsitePanel/Database/install_db.sql b/WebsitePanel/Database/install_db.sql index e5b39fa7..db6d20f7 100644 --- a/WebsitePanel/Database/install_db.sql +++ b/WebsitePanel/Database/install_db.sql @@ -29,7 +29,7 @@ CREATE TABLE [dbo].[ExchangeAccounts]( [AccountID] [int] IDENTITY(1,1) NOT NULL, [ItemID] [int] NOT NULL, [AccountType] [int] NOT NULL, - [AccountName] [nvarchar](20) COLLATE Latin1_General_CI_AS NOT NULL, + [AccountName] [nvarchar](300) COLLATE Latin1_General_CI_AS NOT NULL, [DisplayName] [nvarchar](300) COLLATE Latin1_General_CI_AS NOT NULL, [PrimaryEmailAddress] [nvarchar](300) COLLATE Latin1_General_CI_AS NULL, [MailEnabledPublicFolder] [bit] NULL, @@ -37,6 +37,8 @@ CREATE TABLE [dbo].[ExchangeAccounts]( [SamAccountName] [nvarchar](100) COLLATE Latin1_General_CI_AS NULL, [AccountPassword] [nvarchar](200) COLLATE Latin1_General_CI_AS NULL, [CreatedDate] [datetime] NOT NULL, + [MailboxPlanId] [int] NULL, + [SubscriberNumber] [nvarchar] (32) COLLATE Latin1_General_CI_AS NULL, CONSTRAINT [PK_ExchangeAccounts] PRIMARY KEY CLUSTERED ( [AccountID] ASC @@ -54,6 +56,32 @@ SET QUOTED_IDENTIFIER ON GO +CREATE TABLE [dbo].[ExchangeMailboxPlans]( + [MailboxPlanId] [int] IDENTITY(1,1) NOT NULL, + [ItemID] [int] NOT NULL, + [MailboxPlan] [nvarchar](300) COLLATE Latin1_General_CI_AS NOT NULL, + [EnableActiveSync] [bit] NOT NULL, + [EnableIMAP] [bit] NOT NULL, + [EnableMAPI] [bit] NOT NULL, + [EnableOWA] [bit] NOT NULL, + [EnablePOP] [bit] NOT NULL, + [IsDefault] [bit] NOT NULL, + [IssueWarningPct] [int] NOT NULL, + [KeepDeletedItemsDays] [int] NOT NULL, + [MailboxSizeMB] [int] NOT NULL, + [MaxReceiveMessageSizeKB] [int] NOT NULL, + [MaxRecipients] [int] NOT NULL, + [MaxSendMessageSizeKB] [int] NOT NULL, + [ProhibitSendPct] [int] NOT NULL, + [ProhibitSendReceivePct] [int] NOT NULL, + [HideFromAddressBook] [bit] NOT NULL, + CONSTRAINT [PK_ExchangeMailboxPlans] PRIMARY KEY CLUSTERED +( + [MailboxPlanId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO @@ -80,7 +108,8 @@ SELECT AccountName, DisplayName, PrimaryEmailAddress, - MailEnabledPublicFolder + MailEnabledPublicFolder, + SubscriberNumber FROM ExchangeAccounts WHERE @@ -109,6 +138,7 @@ END + GO @@ -150,21 +180,137 @@ CREATE PROCEDURE [dbo].[GetExchangeAccounts] ) AS SELECT - AccountID, - ItemID, - AccountType, - AccountName, - DisplayName, - PrimaryEmailAddress, - MailEnabledPublicFolder + E.AccountID, + E.ItemID, + E.AccountType, + E.AccountName, + E.DisplayName, + E.PrimaryEmailAddress, + E.MailEnabledPublicFolder, + E.MailboxPlanId, + P.MailboxPlan, + E.SubscriberNumber FROM - ExchangeAccounts + ExchangeAccounts AS E +LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId WHERE - ItemID = @ItemID AND - (AccountType = @AccountType OR @AccountType IS NULL) + E.ItemID = @ItemID AND + (E.AccountType = @AccountType OR @AccountType IS NULL) ORDER BY DisplayName RETURN +GO + + + + + + + + + + + + + + + +CREATE PROCEDURE [dbo].[GetExchangeAccountByMailboxPlanId] +( + @ItemID int, + @MailboxPlanId int +) +AS + +DECLARE @condition nvarchar(64) + +IF (@MailboxPlanId < 0) +BEGIN +SELECT + E.AccountID, + E.ItemID, + E.AccountType, + E.AccountName, + E.DisplayName, + E.PrimaryEmailAddress, + E.MailEnabledPublicFolder, + E.MailboxManagerActions, + E.SamAccountName, + E.AccountPassword, + E.MailboxPlanId, + P.MailboxPlan, + E.SubscriberNumber +FROM + ExchangeAccounts AS E +LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId +WHERE + E.ItemID = @ItemID AND + E.MailboxPlanId IS NULL AND + E.AccountType IN (1,5) +RETURN + +END +ELSE +BEGIN +SELECT + E.AccountID, + E.ItemID, + E.AccountType, + E.AccountName, + E.DisplayName, + E.PrimaryEmailAddress, + E.MailEnabledPublicFolder, + E.MailboxManagerActions, + E.SamAccountName, + E.AccountPassword, + E.MailboxPlanId, + P.MailboxPlan, + E.SubscriberNumber +FROM + ExchangeAccounts AS E +LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId +WHERE + E.ItemID = @ItemID AND + E.MailboxPlanId = @MailboxPlanId AND + E.AccountType IN (1,5) +RETURN +END +GO + + + + + + + + +CREATE PROCEDURE [dbo].[GetExchangeAccountByAccountName] +( + @ItemID int, + @AccountName nvarchar(300) +) +AS +SELECT + E.AccountID, + E.ItemID, + E.AccountType, + E.AccountName, + E.DisplayName, + E.PrimaryEmailAddress, + E.MailEnabledPublicFolder, + E.MailboxManagerActions, + E.SamAccountName, + E.AccountPassword, + E.MailboxPlanId, + P.MailboxPlan, + E.SubscriberNumber +FROM + ExchangeAccounts AS E +LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId +WHERE + E.ItemID = @ItemID AND + E.AccountName = @AccountName +RETURN @@ -231,21 +377,25 @@ CREATE PROCEDURE [dbo].[GetExchangeAccount] ) AS SELECT - AccountID, - ItemID, - AccountType, - AccountName, - DisplayName, - PrimaryEmailAddress, - MailEnabledPublicFolder, - MailboxManagerActions, - SamAccountName, - AccountPassword + E.AccountID, + E.ItemID, + E.AccountType, + E.AccountName, + E.DisplayName, + E.PrimaryEmailAddress, + E.MailEnabledPublicFolder, + E.MailboxManagerActions, + E.SamAccountName, + E.AccountPassword, + E.MailboxPlanId, + P.MailboxPlan, + E.SubscriberNumber FROM - ExchangeAccounts + ExchangeAccounts AS E +LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId WHERE - ItemID = @ItemID AND - AccountID = @AccountID + E.ItemID = @ItemID AND + E.AccountID = @AccountID RETURN @@ -311,14 +461,14 @@ GO -CREATE PROCEDURE ExchangeAccountExists +CREATE PROCEDURE [dbo].[ExchangeAccountExists] ( @AccountName nvarchar(20), @Exists bit OUTPUT ) AS SET @Exists = 0 -IF EXISTS(SELECT * FROM ExchangeAccounts WHERE AccountName = @AccountName) +IF EXISTS(SELECT * FROM ExchangeAccounts WHERE sAMAccountName LIKE '%\'+@AccountName) BEGIN SET @Exists = 1 END @@ -352,6 +502,10 @@ RETURN + + + + @@ -513,6 +667,8 @@ CREATE TABLE [dbo].[Users]( [CompanyName] [nvarchar](100) COLLATE Latin1_General_CI_AS NULL, [EcommerceEnabled] [bit] NULL, [AdditionalParams] [nvarchar](max) COLLATE Latin1_General_CI_AS NULL, + [LoginStatusId] [int] NULL, + [FailedLogins] [int] NULL, CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED ( [UserID] ASC @@ -936,7 +1092,7 @@ GO -CREATE PROCEDURE SearchExchangeAccounts +CREATE PROCEDURE [dbo].[SearchExchangeAccounts] ( @ActorID int, @ItemID int, @@ -986,7 +1142,8 @@ SELECT EA.AccountName, EA.DisplayName, EA.PrimaryEmailAddress, - EA.MailEnabledPublicFolder + EA.MailEnabledPublicFolder, + EA.SubscriberNumber FROM ExchangeAccounts AS EA WHERE ' + @condition @@ -1026,6 +1183,7 @@ RETURN + GO @@ -1080,6 +1238,10 @@ END IF @SortColumn IS NULL OR @SortColumn = '' SET @SortColumn = 'EA.DisplayName ASC' +DECLARE @joincondition nvarchar(700) + SET @joincondition = ',P.MailboxPlan FROM ExchangeAccounts AS EA + LEFT OUTER JOIN ExchangeMailboxPlans AS P ON EA.MailboxPlanId = P.MailboxPlanId' + DECLARE @sql nvarchar(3500) set @sql = ' @@ -1094,9 +1256,10 @@ WITH Accounts AS ( EA.AccountName, EA.DisplayName, EA.PrimaryEmailAddress, - EA.MailEnabledPublicFolder - FROM ExchangeAccounts AS EA - WHERE ' + @condition + ' + EA.MailEnabledPublicFolder, + EA.MailboxPlanId, + EA.SubscriberNumber ' + @joincondition + + ' WHERE ' + @condition + ' ) SELECT * FROM Accounts @@ -1118,6 +1281,7 @@ RETURN + GO SET ANSI_NULLS ON GO @@ -1174,7 +1338,7 @@ INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID LEFT OUTER JOIN ServiceItems AS Z ON D.ZoneItemID = Z.ItemID LEFT OUTER JOIN Services AS S ON Z.ServiceID = S.ServiceID LEFT OUTER JOIN Servers AS SRV ON S.ServerID = SRV.ServerID -WHERE D.IsInstantAlias = 0 AND +WHERE (D.IsInstantAlias = 0 AND D.IsDomainPointer = 0) AND ((@Recursive = 0 AND D.PackageID = @PackageID) OR (@Recursive = 1 AND dbo.CheckPackageParent(@PackageID, D.PackageID) = 1)) AND (@ServerID = 0 OR (@ServerID > 0 AND S.ServerID = @ServerID)) @@ -1407,13 +1571,15 @@ CREATE PROCEDURE [dbo].[AddExchangeAccount] @AccountID int OUTPUT, @ItemID int, @AccountType int, - @AccountName nvarchar(20), + @AccountName nvarchar(300), @DisplayName nvarchar(300), @PrimaryEmailAddress nvarchar(300), @MailEnabledPublicFolder bit, @MailboxManagerActions varchar(200), @SamAccountName nvarchar(100), - @AccountPassword nvarchar(200) + @AccountPassword nvarchar(200), + @MailboxPlanId int, + @SubscriberNumber nvarchar(32) ) AS @@ -1427,7 +1593,9 @@ INSERT INTO ExchangeAccounts MailEnabledPublicFolder, MailboxManagerActions, SamAccountName, - AccountPassword + AccountPassword, + MailboxPlanId, + SubscriberNumber ) VALUES ( @@ -1439,7 +1607,9 @@ VALUES @MailEnabledPublicFolder, @MailboxManagerActions, @SamAccountName, - @AccountPassword + @AccountPassword, + @MailboxPlanId, + @SubscriberNumber ) SET @AccountID = SCOPE_IDENTITY() @@ -1475,6 +1645,7 @@ RETURN + GO @@ -3306,6 +3477,7 @@ CREATE PROCEDURE CheckDomain ( @PackageID int, @DomainName nvarchar(100), + @IsDomainPointer bit, @Result int OUTPUT ) AS @@ -3322,7 +3494,7 @@ SET @Result = 0 -- OK -- check if the domain already exists IF EXISTS( SELECT DomainID FROM Domains -WHERE DomainName = @DomainName +WHERE DomainName = @DomainName AND IsDomainPointer = @IsDomainPointer ) BEGIN SET @Result = -1 @@ -3537,9 +3709,9 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (75, 1, 8, N'OS.ExtraApplications', N'Extra Application Packs', 1, 0, NULL) GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (77, 12, 2, N'Exchange2007.DiskSpace', N'Organization Disk Space, MB', 3, 0, NULL) +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (77, 12, 2, N'Exchange2007.DiskSpace', N'Organization Disk Space, MB', 2, 0, NULL) GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (78, 12, 3, N'Exchange2007.Mailboxes', N'Mailboxes per Organization', 3, 0, NULL) +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (78, 12, 3, N'Exchange2007.Mailboxes', N'Mailboxes per Organization', 2, 0, NULL) GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (79, 12, 4, N'Exchange2007.Contacts', N'Contacts per Organization', 3, 0, NULL) GO @@ -3559,16 +3731,6 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (88, 12, 8, N'Exchange2007.MailEnabledPublicFolders', N'Mail Enabled Public Folders Allowed', 1, 0, NULL) GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (89, 12, 10, N'Exchange2007.POP3Enabled', N'POP3 Enabled by default', 1, 0, NULL) -GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (90, 12, 12, N'Exchange2007.IMAPEnabled', N'IMAP Enabled by default', 1, 0, NULL) -GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (91, 12, 14, N'Exchange2007.OWAEnabled', N'OWA Enabled by default', 1, 0, NULL) -GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (92, 12, 16, N'Exchange2007.MAPIEnabled', N'MAPI Enabled by default', 1, 0, NULL) -GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (93, 12, 18, N'Exchange2007.ActiveSyncEnabled', N'ActiveSync Enabled by default', 1, 0, NULL) -GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (94, 2, 17, N'Web.ColdFusion', N'ColdFusion', 1, 0, NULL) GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (95, 2, 1, N'Web.WebAppGallery', N'Web Application Gallery', 1, 0, NULL) @@ -3593,7 +3755,7 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (108, 11, 6, N'MySQL5.Truncate', N'Database Truncate', 1, 0, NULL) GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (200, 20, 1, N'HostedSharePoint.Sites', N'SharePoint Site Collections', 3, 0, 200) +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (200, 20, 1, N'HostedSharePoint.Sites', N'SharePoint Site Collections', 2, 0, 200) GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (203, 10, 4, N'MsSQL2005.MaxLogSize', N'Max Log Size', 3, 0, NULL) GO @@ -3601,7 +3763,7 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (205, 13, 1, N'HostedSolution.Organizations', N'Organizations', 2, 0, 29) GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (206, 13, 2, N'HostedSolution.Users', N'Users', 3, 0, 30) +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (206, 13, 2, N'HostedSolution.Users', N'Users', 2, 0, 30) GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (207, 13, 3, N'HostedSolution.Domains', N'Domains per Organizations', 3, 0, NULL) GO @@ -3625,8 +3787,22 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (217, 22, 4, N'MsSQL2008.MaxLogSize', N'Max Log Size', 3, 0, NULL) GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (218, 23, 1, N'MsSQL2012.Databases', N'Databases', 2, 0, 37) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (219, 23, 2, N'MsSQL2012.Users', N'Users', 2, 0, 38) +GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (220, 1, 5, N'OS.DomainPointers', N'Domain Pointers', 2, 0, NULL) GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (221, 23, 3, N'MsSQL2012.MaxDatabaseSize', N'Max Database Size', 3, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (222, 23, 5, N'MsSQL2012.Backup', N'Database Backups', 1, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (223, 23, 6, N'MsSQL2012.Restore', N'Database Restores', 1, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (224, 23, 7, N'MsSQL2012.Truncate', N'Database Truncate', 1, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (225, 23, 4, N'MsSQL2012.MaxLogSize', N'Max Log Size', 3, 0, NULL) +GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (300, 30, 1, N'VPS.ServersNumber', N'Number of VPS', 2, 0, 33) GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (301, 30, 2, N'VPS.ManagingAllowed', N'Allow user to create VPS', 1, 0, NULL) @@ -3693,14 +3869,6 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (332, 2, 21, N'Web.SSL', N'SSL', 1, 0, NULL) GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (340, 33, 1, N'ExchangeHostedEdition.Domains', N'Domains', 3, 0, NULL) -GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (341, 33, 2, N'ExchangeHostedEdition.Mailboxes', N'Mailboxes', 3, 0, NULL) -GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (342, 33, 3, N'ExchangeHostedEdition.Contacts', N'Contacts', 3, 0, NULL) -GO -INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (343, 33, 4, N'ExchangeHostedEdition.DistributionLists', N'Distribution Lists', 3, 0, NULL) -GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (344, 2, 9, N'Web.Htaccess', N'htaccess', 1, 0, NULL) GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (345, 40, 1, N'VPSForPC.ServersNumber', N'Number of VPS', 2, 0, 35) @@ -3741,6 +3909,43 @@ INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDe GO INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (363, 40, 12, N'VPSForPC.Bandwidth', N'Monthly bandwidth, GB', 2, 0, NULL) GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (364, 12, 19, N'Exchange2007.KeepDeletedItemsDays', N'Keep Deleted Items (days)', 3, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (365, 12, 20, N'Exchange2007.MaxRecipients', N'Maximum Recipients', 3, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (366, 12, 21, N'Exchange2007.MaxSendMessageSizeKB', N'Maximum Send Message Size (Kb)', 3, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (367, 12, 22, N'Exchange2007.MaxReceiveMessageSizeKB', N'Maximum Receive Message Size (Kb)', 3, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (368, 12, 1, N'Exchange2007.IsConsumer',N'Is Consumer Organization',1, 0 , NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (369, 12, 23,N'Exchange2007.EnablePlansEditing',N'Enable Plans Editing',1, 0 , NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (370, 41, 1, N'Lync.Users', N'Users',2 ,0 , NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (371, 41, 2, N'Lync.Federation' , N'Allow Federation', 1, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (372, 41, 3, N'Lync.Conferencing', N'Allow Conferencing', 1, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (373, 41, 4, N'Lync.MaxParticipants', N'Maximum Conference Particiapants', 3, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (374, 41, 5, N'Lync.AllowVideo', N'Allow Video in Conference', 1, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (375, 41, 6, N'Lync.EnterpriseVoice', N'Allow EnterpriseVoice', 1, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (376, 41, 7, N'Lync.EVUsers', N'Number of Enterprise Voice Users', 2, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (377, 41, 8, N'Lync.EVNational', N'Allow National Calls', 1, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (378, 41, 9, N'Lync.EVMobile', N'Allow Mobile Calls', 1, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (379, 41, 10, N'Lync.EVInternational', N'Allow International Calls', 1, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (380, 41, 11, N'Lync.EnablePlansEditing', N'Enable Plans Editing', 1, 0, NULL) +GO +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (400, 20, 3, N'HostedSharePoint.UseSharedSSL', N'Use shared SSL Root', 1, 0, NULL) +GO + SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON @@ -5856,7 +6061,7 @@ SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ExchangeOrganizations]( [ItemID] [int] NOT NULL, - [OrganizationID] [nvarchar](10) COLLATE Latin1_General_CI_AS NOT NULL, + [OrganizationID] [nvarchar](128) COLLATE Latin1_General_CI_AS NOT NULL, CONSTRAINT [PK_ExchangeOrganizations] PRIMARY KEY CLUSTERED ( [ItemID] ASC @@ -5970,8 +6175,10 @@ CREATE PROCEDURE DeleteExchangeOrganization @ItemID int ) AS -DELETE FROM ExchangeOrganizations -WHERE ItemID = @ItemID +BEGIN TRAN + DELETE FROM ExchangeMailboxPlans WHERE ItemID = @ItemID + DELETE FROM ExchangeOrganizations WHERE ItemID = @ItemID +COMMIT TRAN RETURN @@ -6043,7 +6250,7 @@ GO CREATE PROCEDURE AddExchangeOrganization ( @ItemID int, - @OrganizationID nvarchar(10) + @OrganizationID nvarchar(128) ) AS @@ -6231,7 +6438,8 @@ SELECT (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts, (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists, (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders, - (SELECT COUNT(*) FROM ExchangeOrganizationDomains WHERE ItemID = @ItemID) AS CreatedDomains + (SELECT COUNT(*) FROM ExchangeOrganizationDomains WHERE ItemID = @ItemID) AS CreatedDomains, + (SELECT SUM(B.MailboxSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedDiskSpace RETURN @@ -6262,7 +6470,6 @@ RETURN - GO @@ -6601,18 +6808,26 @@ GO CREATE PROCEDURE [dbo].[UpdateExchangeAccount] ( @AccountID int, - @AccountName nvarchar(20), + @AccountName nvarchar(300), @DisplayName nvarchar(300), @PrimaryEmailAddress nvarchar(300), @AccountType int, @SamAccountName nvarchar(100), @MailEnabledPublicFolder bit, @MailboxManagerActions varchar(200), - @Password varchar(200) + @Password varchar(200), + @MailboxPlanId int, + @SubscriberNumber varchar(32) ) AS BEGIN TRAN + +IF (@MailboxPlanId = -1) +BEGIN + SET @MailboxPlanId = NULL +END + UPDATE ExchangeAccounts SET AccountName = @AccountName, DisplayName = @DisplayName, @@ -6620,7 +6835,9 @@ UPDATE ExchangeAccounts SET MailEnabledPublicFolder = @MailEnabledPublicFolder, MailboxManagerActions = @MailboxManagerActions, AccountType =@AccountType, - SamAccountName = @SamAccountName + SamAccountName = @SamAccountName, + MailboxPlanId = @MailboxPlanId, + SubscriberNumber = @SubscriberNumber WHERE AccountID = @AccountID @@ -6657,6 +6874,10 @@ RETURN + + + + GO @@ -8889,7 +9110,8 @@ SELECT EA.AccountType, EA.AccountName, EA.DisplayName, - EA.PrimaryEmailAddress + EA.PrimaryEmailAddress, + EA.SubscriberNumber FROM ExchangeAccounts AS EA WHERE ' + @condition @@ -8926,6 +9148,8 @@ RETURN + + @@ -9527,7 +9751,7 @@ GO CREATE VIEW [dbo].[UsersDetailed] AS -SELECT U.UserID, U.RoleID, U.StatusID, U.OwnerID, U.Created, U.Changed, U.IsDemo, U.Comments, U.IsPeer, U.Username, U.FirstName, U.LastName, U.Email, +SELECT U.UserID, U.RoleID, U.StatusID, U.LoginStatusId, U.FailedLogins, U.OwnerID, U.Created, U.Changed, U.IsDemo, U.Comments, U.IsPeer, U.Username, U.FirstName, U.LastName, U.Email, U.CompanyName, U.FirstName + ' ' + U.LastName AS FullName, UP.Username AS OwnerUsername, UP.FirstName AS OwnerFirstName, UP.LastName AS OwnerLastName, UP.RoleID AS OwnerRoleID, UP.FirstName + ' ' + UP.LastName AS OwnerFullName, UP.Email AS OwnerEmail, UP.RoleID AS Expr1, (SELECT COUNT(PackageID) AS Expr1 @@ -10452,6 +10676,7 @@ CREATE TABLE [dbo].[ResourceGroups]( [GroupName] [nvarchar](100) COLLATE Latin1_General_CI_AS NOT NULL, [GroupOrder] [int] NOT NULL, [GroupController] [nvarchar](1000) COLLATE Latin1_General_CI_AS NULL, + [ShowGroup] [bit] NULL, CONSTRAINT [PK_ResourceGroups] PRIMARY KEY CLUSTERED ( [GroupID] ASC @@ -10459,47 +10684,49 @@ CREATE TABLE [dbo].[ResourceGroups]( ) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (1, N'OS', 1, N'WebsitePanel.EnterpriseServer.OperatingSystemController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (1, N'OS', 1, N'WebsitePanel.EnterpriseServer.OperatingSystemController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (2, N'Web', 2, N'WebsitePanel.EnterpriseServer.WebServerController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (2, N'Web', 2, N'WebsitePanel.EnterpriseServer.WebServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (3, N'FTP', 3, N'WebsitePanel.EnterpriseServer.FtpServerController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (3, N'FTP', 3, N'WebsitePanel.EnterpriseServer.FtpServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (4, N'Mail', 4, N'WebsitePanel.EnterpriseServer.MailServerController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (4, N'Mail', 4, N'WebsitePanel.EnterpriseServer.MailServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (5, N'MsSQL2000', 8, N'WebsitePanel.EnterpriseServer.DatabaseServerController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (5, N'MsSQL2000', 8, N'WebsitePanel.EnterpriseServer.DatabaseServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (6, N'MySQL4', 11, N'WebsitePanel.EnterpriseServer.DatabaseServerController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (6, N'MySQL4', 12, N'WebsitePanel.EnterpriseServer.DatabaseServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (7, N'DNS', 16, N'WebsitePanel.EnterpriseServer.DnsServerController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (7, N'DNS', 17, N'WebsitePanel.EnterpriseServer.DnsServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (8, N'Statistics', 17, N'WebsitePanel.EnterpriseServer.StatisticsServerController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (8, N'Statistics', 18, N'WebsitePanel.EnterpriseServer.StatisticsServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (9, N'SharePoint', 13, N'WebsitePanel.EnterpriseServer.SharePointServerController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (9, N'SharePoint', 14, N'WebsitePanel.EnterpriseServer.SharePointServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (10, N'MsSQL2005', 9, N'WebsitePanel.EnterpriseServer.DatabaseServerController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (10, N'MsSQL2005', 9, N'WebsitePanel.EnterpriseServer.DatabaseServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (11, N'MySQL5', 12, N'WebsitePanel.EnterpriseServer.DatabaseServerController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (11, N'MySQL5', 13, N'WebsitePanel.EnterpriseServer.DatabaseServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (12, N'Exchange', 5, NULL) +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (12, N'Exchange', 5, NULL, 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (13, N'Hosted Organizations', 6, NULL) +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (13, N'Hosted Organizations', 6, NULL, 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (20, N'Hosted SharePoint', 14, N'WebsitePanel.EnterpriseServer.HostedSharePointServerController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (20, N'Hosted SharePoint', 15, N'WebsitePanel.EnterpriseServer.HostedSharePointServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (21, N'Hosted CRM', 15, NULL) +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (21, N'Hosted CRM', 16, NULL, 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (22, N'MsSQL2008', 10, N'WebsitePanel.EnterpriseServer.DatabaseServerController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (22, N'MsSQL2008', 10, N'WebsitePanel.EnterpriseServer.DatabaseServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (30, N'VPS', 18, NULL) +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (23, N'MsSQL2012', 11, N'WebsitePanel.EnterpriseServer.DatabaseServerController', 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (31, N'BlackBerry', 20, NULL) +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (30, N'VPS', 19, NULL, 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (32, N'OCS', 21, NULL) +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (31, N'BlackBerry', 21, NULL, 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (33, N'ExchangeHostedEdition', 7, N'WebsitePanel.EnterpriseServer.ExchangeHostedEditionController') +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (32, N'OCS', 22, NULL, 1) GO -INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (40, N'VPSForPC', 19, NULL) +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (41, N'Lync',23, NULL, 1) +GO +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController], [ShowGroup]) VALUES (40, N'VPSForPC', 20, NULL, 1) GO SET ANSI_NULLS ON GO @@ -11758,6 +11985,8 @@ SELECT U.UserID, U.RoleID, U.StatusID, + U.LoginStatusId, + U.FailedLogins, U.OwnerID, U.Created, U.Changed, @@ -11823,6 +12052,7 @@ RETURN + GO @@ -11860,7 +12090,7 @@ GO -CREATE PROCEDURE GetUserDomainsPaged +CREATE PROCEDURE [dbo].[GetUserDomainsPaged] ( @ActorID int, @UserID int, @@ -11909,6 +12139,8 @@ SELECT U.UserID, U.RoleID, U.StatusID, + U.LoginStatusId, + U.FailedLogins, U.OwnerID, U.Created, U.Changed, @@ -11962,7 +12194,6 @@ RETURN - GO @@ -13105,6 +13336,62 @@ GO +CREATE TABLE [dbo].[LyncUserPlans]( + [LyncUserPlanId] [int] IDENTITY(1,1) NOT NULL, + [ItemID] [int] NOT NULL, + [LyncUserPlanName] [nvarchar](300) COLLATE Latin1_General_CI_AS NOT NULL, + [IM] [bit] NOT NULL, + [Mobility] [bit] NOT NULL, + [MobilityEnableOutsideVoice] [bit] NOT NULL, + [Federation] [bit] NOT NULL, + [Conferencing] [bit] NOT NULL, + [EnterpriseVoice] [bit] NOT NULL, + [VoicePolicy] [int] NOT NULL, + [IsDefault] [bit] NOT NULL, + CONSTRAINT [PK_LyncUserPlans] PRIMARY KEY CLUSTERED +( + [LyncUserPlanId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + + + + + + + + + +CREATE TABLE [dbo].[LyncUsers]( + [LyncUserID] [int] IDENTITY(1,1) NOT NULL, + [AccountID] [int] NOT NULL, + [LyncUserPlanID] [int] NOT NULL, + [CreatedDate] [datetime] NOT NULL, + [ModifiedDate] [datetime] NOT NULL, + CONSTRAINT [PK_LyncUsers] PRIMARY KEY CLUSTERED +( + [LyncUserID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + + + + + + + + + + + + + + + @@ -13920,7 +14207,7 @@ INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [D GO INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [DefaultValue], [ParameterOrder]) VALUES (N'SCHEDULE_TASK_BACKUP_DATABASE', N'BACKUP_NAME', N'String', N'database_backup.bak', 4) GO -INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [DefaultValue], [ParameterOrder]) VALUES (N'SCHEDULE_TASK_BACKUP_DATABASE', N'DATABASE_GROUP', N'List', N'MsSQL2000=SQL Server 2000;MsSQL2005=SQL Server 2005;MsSQL2008=SQL Server 2008;MySQL4=MySQL 4.0;MySQL5=MySQL 5.0', 1) +INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [DefaultValue], [ParameterOrder]) VALUES (N'SCHEDULE_TASK_BACKUP_DATABASE', N'DATABASE_GROUP', N'List', N'MsSQL2000=SQL Server 2000;MsSQL2005=SQL Server 2005;MsSQL2008=SQL Server 2008;MsSQL2012=SQL Server 2012;MySQL4=MySQL 4.0;MySQL5=MySQL 5.0', 1) GO INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [DefaultValue], [ParameterOrder]) VALUES (N'SCHEDULE_TASK_BACKUP_DATABASE', N'DATABASE_NAME', N'String', N'', 2) GO @@ -15753,6 +16040,9 @@ CREATE TABLE [dbo].[GlobalDnsRecords]( [ServerID] [int] NULL, [PackageID] [int] NULL, [IPAddressID] [int] NULL, + [SrvPriority] [int] NULL, + [SrvWeight] [int] NULL, + [SrvPort] [int] NULL, CONSTRAINT [PK_GlobalDnsRecords] PRIMARY KEY CLUSTERED ( [RecordID] ASC @@ -19206,6 +19496,8 @@ AS U.UserID, U.RoleID, U.StatusID, + U.LoginStatusId, + U.FailedLogins, U.OwnerID, U.Created, U.Changed, @@ -19252,6 +19544,8 @@ AS U.UserID, U.RoleID, U.StatusID, + U.LoginStatusId, + U.FailedLogins, U.OwnerID, U.Created, U.Changed, @@ -19613,6 +19907,8 @@ SELECT U.UserID, U.RoleID, U.StatusID, + U.LoginStatusId, + U.FailedLogins, U.OwnerID, U.Created, U.Changed, @@ -19639,7 +19935,7 @@ WHERE U.UserID <> @OwnerID AND AND U.IsPeer = 0 AND @CanGetDetails = 1 -- actor user rights -RETURN +RETURN @@ -19731,6 +20027,8 @@ SELECT U.UserID, U.RoleID, U.StatusID, + U.LoginStatusId, + U.FailedLogins, U.OwnerID, U.Created, U.Changed, @@ -20019,16 +20317,6 @@ INSERT [dbo].[ResourceGroupDnsRecords] ([RecordID], [RecordOrder], [GroupID], [R GO INSERT [dbo].[ResourceGroupDnsRecords] ([RecordID], [RecordOrder], [GroupID], [RecordType], [RecordName], [RecordData], [MXPriority]) VALUES (17, 4, 12, N'CNAME', N'owa', N'', 0) GO -INSERT [dbo].[ResourceGroupDnsRecords] ([RecordID], [RecordOrder], [GroupID], [RecordType], [RecordName], [RecordData], [MXPriority]) VALUES (18, 1, 33, N'A', N'smtp', N'[IP]', 0) -GO -INSERT [dbo].[ResourceGroupDnsRecords] ([RecordID], [RecordOrder], [GroupID], [RecordType], [RecordName], [RecordData], [MXPriority]) VALUES (19, 2, 33, N'MX', N'', N'smtp.[DOMAIN_NAME]', 10) -GO -INSERT [dbo].[ResourceGroupDnsRecords] ([RecordID], [RecordOrder], [GroupID], [RecordType], [RecordName], [RecordData], [MXPriority]) VALUES (20, 3, 33, N'CNAME', N'autodiscover', N'', 0) -GO -INSERT [dbo].[ResourceGroupDnsRecords] ([RecordID], [RecordOrder], [GroupID], [RecordType], [RecordName], [RecordData], [MXPriority]) VALUES (21, 4, 33, N'CNAME', N'owa', N'', 0) -GO -INSERT [dbo].[ResourceGroupDnsRecords] ([RecordID], [RecordOrder], [GroupID], [RecordType], [RecordName], [RecordData], [MXPriority]) VALUES (22, 5, 33, N'CNAME', N'ecp', N'', 0) -GO SET IDENTITY_INSERT [dbo].[ResourceGroupDnsRecords] OFF GO SET ANSI_NULLS ON @@ -20538,7 +20826,7 @@ GO -CREATE PROCEDURE GetPackages +CREATE PROCEDURE [dbo].[GetPackages] ( @ActorID int, @UserID int @@ -20577,8 +20865,7 @@ INNER JOIN Users AS U ON P.UserID = U.UserID INNER JOIN Servers AS S ON P.ServerID = S.ServerID INNER JOIN HostingPlans AS HP ON P.PlanID = HP.PlanID WHERE - P.UserID <> @UserID - AND dbo.CheckUserParent(@UserID, P.UserID) = 1 + P.UserID = @UserID RETURN @@ -21050,6 +21337,7 @@ and below is the summary information for its resources.
  • SQL Server 2000
  • SQL Server 2005
  • SQL Server 2008
  • +
  • SQL Server 2012
  • My SQL 4.x
  • My SQL 5.x
  • Microsoft Access
  • @@ -21497,6 +21785,34 @@ using this IP address instead of actual POP3/SMTP/IMAP servers name: + + + +

    SQL Server 2012

    + + + + + + + + + + +
    Maximum Number of Databases:
    Maximum Number of Users:
    + +

    + In order to connect to SQL Server 2012 from Management Studio, Enterprise Manager, Query Analyzer + or other client software you can use the following SQL Server address: +

    + + + + +
    #MsSQL2012Address#
    + +
    +

    MySQL 4.x

    @@ -22006,6 +22322,8 @@ INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [Property GO INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'DefaultDocuments', N'Default.htm,Default.asp,index.htm,Default.aspx') GO +INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableParkingPageTokens', N'False') +GO INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableAnonymousAccess', N'True') GO INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableBasicAuthentication', N'False') @@ -22242,7 +22560,9 @@ INSERT [dbo].[ServiceItemTypes] ([ItemTypeID], [GroupID], [DisplayName], [TypeNa GO INSERT [dbo].[ServiceItemTypes] ([ItemTypeID], [GroupID], [DisplayName], [TypeName], [TypeOrder], [CalculateDiskspace], [CalculateBandwidth], [Suspendable], [Disposable], [Searchable], [Importable], [Backupable]) VALUES (36, 40, N'VirtualSwitch', N'WebsitePanel.Providers.Virtualization.VirtualSwitch, WebsitePanel.Providers.Base', 2, 0, 0, 1, 1, 1, 0, 0) GO -INSERT [dbo].[ServiceItemTypes] ([ItemTypeID], [GroupID], [DisplayName], [TypeName], [TypeOrder], [CalculateDiskspace], [CalculateBandwidth], [Suspendable], [Disposable], [Searchable], [Importable], [Backupable]) VALUES (40, 33, N'ExchangeOrganization', N'WebsitePanel.Providers.ExchangeHostedEdition.ExchangeOrganization, WebsitePanel.Providers.Base', 1, 0, 0, 1, 1, 1, 0, 0) +INSERT [dbo].[ServiceItemTypes] ([ItemTypeID], [GroupID], [DisplayName], [TypeName], [TypeOrder], [CalculateDiskspace], [CalculateBandwidth], [Suspendable], [Disposable], [Searchable], [Importable], [Backupable]) VALUES (37, 23, N'MsSQL2012Database', N'WebsitePanel.Providers.Database.SqlDatabase, WebsitePanel.Providers.Base', 1, 1, 0, 0, 1, 1, 1, 1) +GO +INSERT [dbo].[ServiceItemTypes] ([ItemTypeID], [GroupID], [DisplayName], [TypeName], [TypeOrder], [CalculateDiskspace], [CalculateBandwidth], [Suspendable], [Disposable], [Searchable], [Importable], [Backupable]) VALUES (38, 23, N'MsSQL2012User', N'WebsitePanel.Providers.Database.SqlUser, WebsitePanel.Providers.Base', 1, 0, 0, 0, 1, 1, 1, 1) GO INSERT [dbo].[ServiceItemTypes] ([ItemTypeID], [GroupID], [DisplayName], [TypeName], [TypeOrder], [CalculateDiskspace], [CalculateBandwidth], [Suspendable], [Disposable], [Searchable], [Importable], [Backupable]) VALUES (200, 20, N'SharePointSiteCollection', N'WebsitePanel.Providers.SharePoint.SharePointSiteCollection, WebsitePanel.Providers.Base', 25, 1, 0, 0, 1, 1, 1, 1) GO @@ -23173,7 +23493,7 @@ INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName] GO INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (62, 8, N'SmarterStats', N'SmarterStats 5.x-6.x', N'WebsitePanel.Providers.Statistics.SmarterStats5, WebsitePanel.Providers.Statistics.SmarterStats', N'SmarterStats', NULL) GO -INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (63, 4, N'hMailServer5', N'hMailServer 5.x', N'WebsitePanel.Providers.Mail.hMailServer5, WebsitePanel.Providers.Mail.hMailServer5', N'hMailServer43', NULL) +INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (63, 4, N'hMailServer5', N'hMailServer 5.x', N'WebsitePanel.Providers.Mail.hMailServer5, WebsitePanel.Providers.Mail.hMailServer5', N'hMailServer5', NULL) GO INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (64, 4, N'SmarterMail', N'SmarterMail 7.x', N'WebsitePanel.Providers.Mail.SmarterMail7, WebsitePanel.Providers.Mail.SmarterMail7', N'SmarterMail60', NULL) GO @@ -23201,16 +23521,20 @@ INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName] GO INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (206, 32, N'OCSEdge', N'OCS Edge server', N'WebsitePanel.Providers.HostedSolution.OCSEdge2007R2, WebsitePanel.Providers.HostedSolution', N'OCS_Edge', 1) GO -INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (207, 33, N'Exchange2010SP1', N'Exchange Server 2010 SP1 Hosting Mode', N'WebsitePanel.Providers.ExchangeHostedEdition.Exchange2010SP1, WebsitePanel.Providers.ExchangeHostedEdition', N'Exchange2010SP1', 1) -GO INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (208, 20, N'HostedSharePoint2010', N'Hosted SharePoint Foundation 2010', N'WebsitePanel.Providers.HostedSolution.HostedSharePointServer2010, WebsitePanel.Providers.HostedSolution', N'HostedSharePoint30', NULL) GO +INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (209, 23, N'MsSQL', N'Microsoft SQL Server 2012', N'WebsitePanel.Providers.Database.MsSqlServer2012, WebsitePanel.Providers.Database.SqlServer', N'MSSQL', NULL) +GO +INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (250, 41, N'Lync2010', N'Microsoft Lync Server 2010 Multitenant Hosting Pack', 'WebsitePanel.Providers.HostedSolution.Lync2010, WebsitePanel.Providers.HostedSolution', 'Lync', 1) +GO INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (300, 30, N'HyperV', N'Microsoft Hyper-V', N'WebsitePanel.Providers.Virtualization.HyperV, WebsitePanel.Providers.Virtualization.HyperV', N'HyperV', 1) GO INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (301, 11, N'MySQL', N'MySQL Server 5.5', N'WebsitePanel.Providers.Database.MySqlServer55, WebsitePanel.Providers.Database.MySQL', N'MySQL', NULL) GO INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (400, 40, N'HyperVForPC', N'Microsoft Hyper-V For Private Cloud', N'WebsitePanel.Providers.VirtualizationForPC.HyperVForPC, WebsitePanel.Providers.VirtualizationForPC.HyperVForPC', N'HyperVForPrivateCloud', 1) GO +INSERT [dbo].[Providers] ([ProviderId], [GroupId], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES(90, 12, N'Exchange2010SP2', N'Hosted Microsoft Exchange Server 2010 SP2', N'WebsitePanel.Providers.HostedSolution.Exchange2010SP2, WebsitePanel.Providers.HostedSolution', N'Exchange', 1) +GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON @@ -23291,6 +23615,9 @@ CREATE PROCEDURE UpdateDnsRecord @RecordName nvarchar(50), @RecordData nvarchar(500), @MXPriority int, + @SrvPriority int, + @SrvWeight int, + @SrvPort int, @IPAddressID int ) AS @@ -23321,6 +23648,9 @@ SET RecordName = @RecordName, RecordData = @RecordData, MXPriority = @MXPriority, + SrvPriority = @SrvPriority, + SrvWeight = @SrvWeight, + SrvPort = @SrvPort, IPAddressID = @IPAddressID WHERE RecordID = @RecordID @@ -23428,6 +23758,9 @@ SELECT NR.RecordName, NR.RecordData, NR.MXPriority, + NR.SrvPriority, + NR.SrvWeight, + NR.SrvPort, NR.IPAddressID FROM GlobalDnsRecords AS NR @@ -23613,6 +23946,9 @@ CREATE PROCEDURE AddDnsRecord @RecordName nvarchar(50), @RecordData nvarchar(500), @MXPriority int, + @SrvPriority int, + @SrvWeight int, + @SrvPort int, @IPAddressID int ) AS @@ -23637,8 +23973,12 @@ IF EXISTS UPDATE GlobalDnsRecords SET - RecordData = RecordData, - MXPriority = MXPriority, + RecordData = @RecordData, + MXPriority = @MXPriority, + SrvPriority = @SrvPriority, + SrvWeight = @SrvWeight, + SrvPort = @SrvPort, + IPAddressID = @IPAddressID WHERE ServiceID = @ServiceID AND ServerID = @ServerID AND PackageID = @PackageID @@ -23652,6 +23992,9 @@ ELSE RecordName, RecordData, MXPriority, + SrvPriority, + SrvWeight, + SrvPort, IPAddressID ) VALUES @@ -23663,6 +24006,9 @@ ELSE @RecordName, @RecordData, @MXPriority, + @SrvPriority, + @SrvWeight, + @SrvPort, @IPAddressID ) @@ -24109,6 +24455,8 @@ INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [Property GO INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (12, N'InstallFolder', N'%PROGRAMFILES%\Gene6 FTP Server') GO +INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (12, N'LogsFolder', N'%PROGRAMFILES%\Gene6 FTP Server\Log') +GO INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (14, N'AdminPassword', N'') GO INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (14, N'AdminUsername', N'admin') @@ -24310,6 +24658,10 @@ INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [Property GO INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (62, N'Username', N'Admin') GO +INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (63, N'AdminPassword', N'') +GO +INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (63, N'AdminUsername', N'Administrator') +GO INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (64, N'AdminPassword', N'') GO INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (64, N'AdminUsername', N'admin') @@ -24386,10 +24738,6 @@ INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [Property GO INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (204, N'UtilityPath', N'C:\Program Files\Research In Motion\BlackBerry Enterprise Server Resource Kit\BlackBerry Enterprise Server User Administration Tool') GO -INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (207, N'ecpURL', N'http://ecp.[DOMAIN_NAME]') -GO -INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (207, N'location', N'en-us') -GO INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (300, N'CpuLimit', N'100') GO INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (300, N'CpuReserve', N'0') @@ -24832,6 +25180,7 @@ CREATE PROCEDURE [dbo].[AddUser] @OwnerID int, @RoleID int, @StatusID int, + @LoginStatusID int, @IsDemo bit, @IsPeer bit, @Comments ntext, @@ -24875,6 +25224,7 @@ INSERT INTO Users OwnerID, RoleID, StatusID, + LoginStatusID, Created, Changed, IsDemo, @@ -24904,6 +25254,7 @@ VALUES @OwnerID, @RoleID, @StatusID, + @LoginStatusID, GetDate(), GetDate(), @IsDemo, @@ -24931,8 +25282,7 @@ VALUES SET @UserID = SCOPE_IDENTITY() -RETURN - +RETURN @@ -25110,6 +25460,7 @@ CREATE PROCEDURE [dbo].[UpdateUser] @UserID int, @RoleID int, @StatusID int, + @LoginStatusId int, @IsDemo bit, @IsPeer bit, @Comments ntext, @@ -25139,9 +25490,17 @@ AS RETURN END + IF @LoginStatusId = 0 + BEGIN + UPDATE Users SET + FailedLogins = 0 + WHERE UserID = @UserID + END + UPDATE Users SET RoleID = @RoleID, StatusID = @StatusID, + LoginStatusId = @LoginStatusId, Changed = GetDate(), IsDemo = @IsDemo, IsPeer = @IsPeer, @@ -25188,17 +25547,44 @@ GO +CREATE PROCEDURE [dbo].[UpdateUserFailedLoginAttempt] +( + @UserID int, + @LockOut int, + @Reset int +) +AS + +IF (@Reset = 1) +BEGIN + UPDATE Users SET FailedLogins = 0 WHERE UserID = @UserID +END +ELSE +BEGIN + IF (@LockOut <= (SELECT FailedLogins FROM USERS WHERE UserID = @UserID)) + BEGIN + UPDATE Users SET LoginStatusId = 2 WHERE UserID = @UserID + END + ELSE + BEGIN + IF ((SELECT FailedLogins FROM Users WHERE UserID = @UserID) IS NULL) + BEGIN + UPDATE Users SET FailedLogins = 1 WHERE UserID = @UserID + END + ELSE + UPDATE Users SET FailedLogins = FailedLogins + 1 WHERE UserID = @UserID + END +END - - - - - - +GO +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO CREATE PROCEDURE DeleteComment @@ -25664,21 +26050,40 @@ AS INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 3) ELSE IF @QuotaID = 319 -- BB Users - SET @Result = (SELECT COUNT(ea.AccountID) - FROM - ExchangeAccounts ea - INNER JOIN - BlackBerryUsers bu - ON - ea.AccountID = bu.AccountID - INNER JOIN - ServiceItems si - ON - ea.ItemID = si.ItemID - INNER JOIN - PackagesTreeCache pt ON si.PackageID = pt.PackageID - WHERE - pt.ParentPackageID = @PackageID) + SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts ea + INNER JOIN BlackBerryUsers bu ON ea.AccountID = bu.AccountID + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE pt.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 206 -- HostedSolution.Users + SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE pt.ParentPackageID = @PackageID AND ea.AccountType IN (1,5,6,7)) + ELSE IF @QuotaID = 78 -- Exchange2007.Mailboxes + SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE pt.ParentPackageID = @PackageID AND ea.MailboxPlanId IS NOT NULL) + ELSE IF @QuotaID = 77 -- Exchange2007.DiskSpace + SET @Result = (SELECT SUM(B.MailboxSizeMB) FROM ExchangeAccounts AS ea + INNER JOIN ExchangeMailboxPlans AS B ON ea.MailboxPlanId = B.MailboxPlanId + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE pt.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 370 -- Lync.Users + SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea + INNER JOIN LyncUsers lu ON ea.AccountID = lu.AccountID + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE pt.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 376 -- Lync.EVUsers + SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea + INNER JOIN LyncUsers lu ON ea.AccountID = lu.AccountID + INNER JOIN LyncUserPlans lp ON lu.LyncUserPlanId = lp.LyncUserPlanId + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE pt.ParentPackageID = @PackageID AND lp.EnterpriseVoice = 1) ELSE SET @Result = (SELECT COUNT(SI.ItemID) FROM Quotas AS Q INNER JOIN ServiceItems AS SI ON SI.ItemTypeID = Q.ItemTypeID @@ -25687,14 +26092,10 @@ AS RETURN @Result END +GO -GO -SET ANSI_NULLS ON -GO -SET QUOTED_IDENTIFIER ON -GO @@ -25938,7 +26339,7 @@ GO -CREATE PROCEDURE GetHostingPlanQuotas +CREATE PROCEDURE [dbo].[GetHostingPlanQuotas] ( @ActorID int, @PlanID int, @@ -25968,8 +26369,9 @@ SELECT dbo.GetPackageAllocatedResource(@PackageID, RG.GroupID, @ServerID) AS ParentEnabled, ISNULL(HPR.CalculateDiskSpace, 1) AS CalculateDiskSpace, ISNULL(HPR.CalculateBandwidth, 1) AS CalculateBandwidth -FROM ResourceGroups AS RG +FROM ResourceGroups AS RG LEFT OUTER JOIN HostingPlanResources AS HPR ON RG.GroupID = HPR.GroupID AND HPR.PlanID = @PlanID +WHERE (ShowGroup = 1) ORDER BY RG.GroupOrder -- get quotas by groups @@ -26018,7 +26420,6 @@ RETURN - GO @@ -28346,6 +28747,8 @@ SELECT U.UserID, U.RoleID, U.StatusID, + U.LoginStatusId, + U.FailedLogins, U.OwnerID, U.Created, U.Changed, @@ -28512,6 +28915,8 @@ AS U.UserID, U.RoleID, U.StatusID, + U.LoginStatusId, + U.FailedLogins, U.OwnerID, U.Created, U.Changed, @@ -28563,6 +28968,8 @@ AS U.UserID, U.RoleID, U.StatusID, + U.LoginStatusId, + U.FailedLogins, U.OwnerID, U.Created, U.Changed, @@ -35616,8 +36023,8 @@ RAISERROR('You are not allowed to access this package', 16, 1) DECLARE @Records TABLE ( RecordID int, - RecordType nvarchar(10) COLLATE DATABASE_DEFAULT, - RecordName nvarchar(50) COLLATE DATABASE_DEFAULT + RecordType nvarchar(10) COLLATE Latin1_General_CI_AS, + RecordName nvarchar(50) COLLATE Latin1_General_CI_AS ) -- select PACKAGES DNS records @@ -35689,12 +36096,16 @@ SELECT NR.RecordName, NR.RecordData, NR.MXPriority, + NR.SrvPriority, + NR.SrvWeight, + NR.SrvPort, NR.IPAddressID, ISNULL(IP.ExternalIP, '') AS ExternalIP, ISNULL(IP.InternalIP, '') AS InternalIP, CASE WHEN NR.RecordType = 'A' AND NR.RecordData = '' THEN dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) WHEN NR.RecordType = 'MX' THEN CONVERT(varchar(3), NR.MXPriority) + ', ' + NR.RecordData + WHEN NR.RecordType = 'SRV' THEN CONVERT(varchar(3), NR.SrvPort) + ', ' + NR.RecordData ELSE NR.RecordData END AS FullRecordData, dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) AS IPAddress @@ -35736,6 +36147,8 @@ RETURN + + @@ -35791,10 +36204,14 @@ SELECT CASE WHEN NR.RecordType = 'A' AND NR.RecordData = '' THEN dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) WHEN NR.RecordType = 'MX' THEN CONVERT(varchar(3), NR.MXPriority) + ', ' + NR.RecordData + WHEN NR.RecordType = 'SRV' THEN CONVERT(varchar(3), NR.SrvPort) + ', ' + NR.RecordData ELSE NR.RecordData END AS FullRecordData, NR.RecordData, NR.MXPriority, + NR.SrvPriority, + NR.SrvWeight, + NR.SrvPort, NR.IPAddressID, dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) AS IPAddress, IP.ExternalIP, @@ -35894,9 +36311,13 @@ SELECT CASE WHEN NR.RecordType = 'A' AND NR.RecordData = '' THEN dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) WHEN NR.RecordType = 'MX' THEN CONVERT(varchar(3), NR.MXPriority) + ', ' + NR.RecordData + WHEN NR.RecordType = 'SRV' THEN CONVERT(varchar(3), NR.SrvPort) + ', ' + NR.RecordData ELSE NR.RecordData END AS FullRecordData, NR.MXPriority, + NR.SrvPriority, + NR.SrvWeight, + NR.SrvPort, NR.IPAddressID, dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) AS IPAddress, IP.ExternalIP, @@ -35941,6 +36362,7 @@ RETURN + GO @@ -35998,10 +36420,14 @@ SELECT NR.RecordName, NR.RecordData, NR.MXPriority, + NR.SrvPriority, + NR.SrvWeight, + NR.SrvPort, NR.IPAddressID, CASE WHEN NR.RecordType = 'A' AND NR.RecordData = '' THEN dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) WHEN NR.RecordType = 'MX' THEN CONVERT(varchar(3), NR.MXPriority) + ', ' + NR.RecordData + WHEN NR.RecordType = 'SRV' THEN CONVERT(varchar(3), NR.SrvPort) + ', ' + NR.RecordData ELSE NR.RecordData END AS FullRecordData, dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) AS IPAddress, @@ -40186,7 +40612,7 @@ GO -CREATE PROCEDURE GetRawServicesByServerID +CREATE PROCEDURE [dbo].[GetRawServicesByServerID] ( @ActorID int, @ServerID int @@ -40202,7 +40628,7 @@ SELECT GroupID, GroupName FROM ResourceGroups -WHERE @IsAdmin = 1 +WHERE @IsAdmin = 1 AND (ShowGroup = 1) ORDER BY GroupOrder -- services @@ -40221,7 +40647,7 @@ WHERE AND @IsAdmin = 1 ORDER BY RG.GroupOrder -RETURN +RETURN @@ -43689,7 +44115,7 @@ GO -CREATE PROCEDURE GetVirtualServices +CREATE PROCEDURE [dbo].[GetVirtualServices] ( @ActorID int, @ServerID int @@ -43710,7 +44136,7 @@ SELECT FROM ResourceGroups AS RG LEFT OUTER JOIN VirtualGroups AS VRG ON RG.GroupID = VRG.GroupID AND VRG.ServerID = @ServerID WHERE - @IsAdmin = 1 + @IsAdmin = 1 AND (ShowGroup = 1) ORDER BY RG.GroupOrder -- services @@ -43729,7 +44155,7 @@ WHERE VS.ServerID = @ServerID AND @IsAdmin = 1 -RETURN +RETURN @@ -44029,8 +44455,8 @@ EXEC sp_xml_preparedocument @idoc OUTPUT, @xml -- Execute a SELECT statement that uses the OPENXML rowset provider. DELETE FROM ServiceProperties -WHERE ServiceID = @ServiceID -AND PropertyName IN +WHERE ServiceID = @ServiceID +AND PropertyName COLLATE Latin1_General_CI_AS IN ( SELECT PropertyName FROM OPENXML(@idoc, '/properties/property', 1) @@ -44358,6 +44784,7 @@ EXEC sp_xml_removedocument @idoc COMMIT TRAN RETURN +GO @@ -44380,33 +44807,813 @@ RETURN +CREATE PROCEDURE [dbo].[AddExchangeMailboxPlan] +( + @MailboxPlanId int OUTPUT, + @ItemID int, + @MailboxPlan nvarchar(300), + @EnableActiveSync bit, + @EnableIMAP bit, + @EnableMAPI bit, + @EnableOWA bit, + @EnablePOP bit, + @IsDefault bit, + @IssueWarningPct int, + @KeepDeletedItemsDays int, + @MailboxSizeMB int, + @MaxReceiveMessageSizeKB int, + @MaxRecipients int, + @MaxSendMessageSizeKB int, + @ProhibitSendPct int, + @ProhibitSendReceivePct int , + @HideFromAddressBook bit +) +AS + +IF ((SELECT Count(*) FROM ExchangeMailboxPlans WHERE ItemId = @ItemID) = 0) +BEGIN + SET @IsDefault = 1 +END +ELSE +BEGIN + IF @IsDefault = 1 + BEGIN + UPDATE ExchangeMailboxPlans SET IsDefault = 0 WHERE ItemID = @ItemID + END +END +INSERT INTO ExchangeMailboxPlans +( + ItemID, + MailboxPlan, + EnableActiveSync, + EnableIMAP, + EnableMAPI, + EnableOWA, + EnablePOP, + IsDefault, + IssueWarningPct, + KeepDeletedItemsDays, + MailboxSizeMB, + MaxReceiveMessageSizeKB, + MaxRecipients, + MaxSendMessageSizeKB, + ProhibitSendPct, + ProhibitSendReceivePct, + HideFromAddressBook +) +VALUES +( + @ItemID, + @MailboxPlan, + @EnableActiveSync, + @EnableIMAP, + @EnableMAPI, + @EnableOWA, + @EnablePOP, + @IsDefault, + @IssueWarningPct, + @KeepDeletedItemsDays, + @MailboxSizeMB, + @MaxReceiveMessageSizeKB, + @MaxRecipients, + @MaxSendMessageSizeKB, + @ProhibitSendPct, + @ProhibitSendReceivePct, + @HideFromAddressBook +) +SET @MailboxPlanId = SCOPE_IDENTITY() - - - - - - - - +RETURN GO + + + + + + + + + + + + + + +CREATE PROCEDURE [dbo].[SetExchangeAccountMailboxplan] +( + @AccountID int, + @MailboxPlanId int +) +AS + +UPDATE ExchangeAccounts SET + MailboxPlanId = @MailboxPlanId +WHERE + AccountID = @AccountID + +RETURN +GO + + + + + + + + + + + +CREATE PROCEDURE [dbo].[SetOrganizationDefaultExchangeMailboxPlan] +( + @ItemId int, + @MailboxPlanId int +) +AS + +UPDATE ExchangeMailboxPlans SET IsDefault=0 WHERE ItemId=@ItemId +UPDATE ExchangeMailboxPlans SET IsDefault=1 WHERE MailboxPlanId=@MailboxPlanId + +RETURN +GO + + + + + + + + + + + + + + + +CREATE PROCEDURE [dbo].[GetExchangeMailboxPlan] +( + @MailboxPlanId int +) +AS +SELECT + MailboxPlanId, + ItemID, + MailboxPlan, + EnableActiveSync, + EnableIMAP, + EnableMAPI, + EnableOWA, + EnablePOP, + IsDefault, + IssueWarningPct, + KeepDeletedItemsDays, + MailboxSizeMB, + MaxReceiveMessageSizeKB, + MaxRecipients, + MaxSendMessageSizeKB, + ProhibitSendPct, + ProhibitSendReceivePct, + HideFromAddressBook +FROM + ExchangeMailboxPlans +WHERE + MailboxPlanId = @MailboxPlanId +RETURN +GO + + + + + + + + + + + +CREATE PROCEDURE [dbo].[GetExchangeMailboxPlans] +( + @ItemID int +) +AS +SELECT + MailboxPlanId, + ItemID, + MailboxPlan, + EnableActiveSync, + EnableIMAP, + EnableMAPI, + EnableOWA, + EnablePOP, + IsDefault, + IssueWarningPct, + KeepDeletedItemsDays, + MailboxSizeMB, + MaxReceiveMessageSizeKB, + MaxRecipients, + MaxSendMessageSizeKB, + ProhibitSendPct, + ProhibitSendReceivePct, + HideFromAddressBook +FROM + ExchangeMailboxPlans +WHERE + ItemID = @ItemID +ORDER BY MailboxPlan +RETURN +GO + + + + + + + + + + + + + +CREATE PROCEDURE [dbo].[DeleteExchangeMailboxPlan] +( + @MailboxPlanId int +) +AS + +-- delete mailboxplan +DELETE FROM ExchangeMailboxPlans +WHERE MailboxPlanId = @MailboxPlanId + +RETURN +GO + + + + + + + + + + + +CREATE PROCEDURE [dbo].[AddLyncUser] + @AccountID int, + @LyncUserPlanID int +AS +BEGIN + SET NOCOUNT ON; + +INSERT INTO + dbo.LyncUsers + ( + + AccountID, + LyncUserPlanID, + CreatedDate, + ModifiedDate) +VALUES +( + @AccountID, + @LyncUserPlanID, + getdate(), + getdate() +) +END +GO + + + + + + + + +CREATE PROCEDURE [dbo].[AddLyncUserPlan] +( + @LyncUserPlanId int OUTPUT, + @ItemID int, + @LyncUserPlanName nvarchar(300), + @IM bit, + @Mobility bit, + @MobilityEnableOutsideVoice bit, + @Federation bit, + @Conferencing bit, + @EnterpriseVoice bit, + @VoicePolicy int, + @IsDefault bit +) +AS + +IF ((SELECT Count(*) FROM LyncUserPlans WHERE ItemId = @ItemID) = 0) +BEGIN + SET @IsDefault = 1 +END +ELSE +BEGIN + IF @IsDefault = 1 + BEGIN + UPDATE LyncUserPlans SET IsDefault = 0 WHERE ItemID = @ItemID + END +END + + + +INSERT INTO LyncUserPlans +( + ItemID, + LyncUserPlanName, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault +) +VALUES +( + @ItemID, + @LyncUserPlanName, + @IM, + @Mobility, + @MobilityEnableOutsideVoice, + @Federation, + @Conferencing, + @EnterpriseVoice, + @VoicePolicy, + @IsDefault +) + +SET @LyncUserPlanId = SCOPE_IDENTITY() + +RETURN +GO + + + + + + + + + +CREATE PROCEDURE [dbo].[GetLyncUsersByPlanId] +( + @ItemID int, + @PlanId int +) +AS + + SELECT + ea.AccountID, + ea.ItemID, + ea.AccountName, + ea.DisplayName, + ea.PrimaryEmailAddress, + ea.SamAccountName, + ou.LyncUserPlanId, + lp.LyncUserPlanName + FROM + ExchangeAccounts ea + INNER JOIN + LyncUsers ou + INNER JOIN + LyncUserPlans lp + ON + ou.LyncUserPlanId = lp.LyncUserPlanId + ON + ea.AccountID = ou.AccountID + WHERE + ea.ItemID = @ItemID AND + ou.LyncUserPlanId = @PlanId +GO + + + + + + + + +CREATE PROCEDURE [dbo].[CheckLyncUserExists] + @AccountID int +AS +BEGIN + SELECT + COUNT(AccountID) + FROM + dbo.LyncUsers + WHERE AccountID = @AccountID +END +GO + + + + + + + + + + +CREATE PROCEDURE [dbo].[DeleteLyncUser] +( + @AccountId int +) +AS + +DELETE FROM + LyncUsers +WHERE + AccountId = @AccountId + +RETURN +GO + + + + + + + + + + +CREATE PROCEDURE [dbo].[DeleteLyncUserPlan] +( + @LyncUserPlanId int +) +AS + +-- delete lyncuserplan +DELETE FROM LyncUserPlans +WHERE LyncUserPlanId = @LyncUserPlanId + +RETURN +GO + + + + + + + + + + + + + + + + + + + +CREATE PROCEDURE [dbo].[GetLyncUserPlan] +( + @LyncUserPlanId int +) +AS +SELECT + LyncUserPlanId, + ItemID, + LyncUserPlanName, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault +FROM + LyncUserPlans +WHERE + LyncUserPlanId = @LyncUserPlanId +RETURN +GO + + + + + + + + + + + + +CREATE PROCEDURE [dbo].[GetLyncUserPlanByAccountId] +( + @AccountID int +) +AS +SELECT + LyncUserPlanId, + ItemID, + LyncUserPlanName, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault +FROM + LyncUserPlans +WHERE + LyncUserPlanId IN (SELECT LyncUserPlanId FROM LyncUsers WHERE AccountID = @AccountID) +RETURN +GO + + + + + + + + + + + +CREATE PROCEDURE [dbo].[GetLyncUserPlans] +( + @ItemID int +) +AS +SELECT + LyncUserPlanId, + ItemID, + LyncUserPlanName, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault +FROM + LyncUserPlans +WHERE + ItemID = @ItemID +ORDER BY LyncUserPlanName +RETURN +GO + + + + + + + + + + + +CREATE PROCEDURE [dbo].[GetLyncUsers] +( + @ItemID int, + @SortColumn nvarchar(40), + @SortDirection nvarchar(20), + @StartRow int, + @Count int +) +AS + +CREATE TABLE #TempLyncUsers +( + [ID] [int] IDENTITY(1,1) NOT NULL, + [AccountID] [int], + [ItemID] [int] NOT NULL, + [AccountName] [nvarchar](300) NOT NULL, + [DisplayName] [nvarchar](300) NOT NULL, + [PrimaryEmailAddress] [nvarchar](300) NULL, + [SamAccountName] [nvarchar](100) NULL, + [LyncUserPlanId] [int] NOT NULL, + [LyncUserPlanName] [nvarchar] (300) NOT NULL, +) + + +DECLARE @condition nvarchar(700) +SET @condition = '' + +IF (@SortColumn = 'DisplayName') +BEGIN + SET @condition = 'ORDER BY ea.DisplayName' +END + +IF (@SortColumn = 'PrimaryEmailAddress') +BEGIN + SET @condition = 'ORDER BY ea.PrimaryEmailAddress' +END + +IF (@SortColumn = 'LyncUserPlanName') +BEGIN + SET @condition = 'ORDER BY lp.LyncUserPlanName' +END + +DECLARE @sql nvarchar(3500) + +set @sql = ' + INSERT INTO + #TempLyncUsers + SELECT + ea.AccountID, + ea.ItemID, + ea.AccountName, + ea.DisplayName, + ea.PrimaryEmailAddress, + ea.SamAccountName, + ou.LyncUserPlanId, + lp.LyncUserPlanName + FROM + ExchangeAccounts ea + INNER JOIN + LyncUsers ou + INNER JOIN + LyncUserPlans lp + ON + ou.LyncUserPlanId = lp.LyncUserPlanId + ON + ea.AccountID = ou.AccountID + WHERE + ea.ItemID = @ItemID ' + @condition + +exec sp_executesql @sql, N'@ItemID int',@ItemID + +DECLARE @RetCount int +SELECT @RetCount = COUNT(ID) FROM #TempLyncUsers + +IF (@SortDirection = 'ASC') +BEGIN + SELECT * FROM #TempLyncUsers + WHERE ID > @StartRow AND ID <= (@StartRow + @Count) +END +ELSE +BEGIN + IF @SortColumn <> '' AND @SortColumn IS NOT NULL + BEGIN + IF (@SortColumn = 'DisplayName') + BEGIN + SELECT * FROM #TempLyncUsers + WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY DisplayName DESC + END + IF (@SortColumn = 'PrimaryEmailAddress') + BEGIN + SELECT * FROM #TempLyncUsers + WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY PrimaryEmailAddress DESC + END + IF (@SortColumn = 'LyncUserPlanName') + BEGIN + SELECT * FROM #TempLyncUsers + WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY LyncUserPlanName DESC + END + END + ELSE + BEGIN + SELECT * FROM #TempLyncUsers + WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY PrimaryEmailAddress DESC + END + + +END + + +DROP TABLE #TempLyncUsers +GO + + + + + + + + + + +CREATE PROCEDURE [dbo].[GetLyncUsersCount] +( + @ItemID int +) +AS + +SELECT + COUNT(ea.AccountID) +FROM + ExchangeAccounts ea +INNER JOIN + LyncUsers ou +ON + ea.AccountID = ou.AccountID +WHERE + ea.ItemID = @ItemID +GO + + + + + + + + + +CREATE PROCEDURE [dbo].[SetLyncUserLyncUserPlan] +( + @AccountID int, + @LyncUserPlanId int +) +AS + +UPDATE LyncUsers SET + LyncUserPlanId = @LyncUserPlanId +WHERE + AccountID = @AccountID + +RETURN +GO + + + + + + + + + + + +CREATE PROCEDURE [dbo].[SetOrganizationDefaultLyncUserPlan] +( + @ItemId int, + @LyncUserPlanId int +) +AS + +UPDATE LyncUserPlans SET IsDefault=0 WHERE ItemId=@ItemId +UPDATE LyncUserPlans SET IsDefault=1 WHERE LyncUserPlanId=@LyncUserPlanId + +RETURN +GO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ALTER TABLE [dbo].[ScheduleParameters] WITH CHECK ADD CONSTRAINT [FK_ScheduleParameters_Schedule] FOREIGN KEY([ScheduleID]) REFERENCES [dbo].[Schedule] ([ScheduleID]) ON DELETE CASCADE GO ALTER TABLE [dbo].[ScheduleParameters] CHECK CONSTRAINT [FK_ScheduleParameters_Schedule] GO -ALTER TABLE [dbo].[ExchangeAccounts] WITH CHECK ADD CONSTRAINT [FK_ExchangeAccounts_ServiceItems] FOREIGN KEY([ItemID]) -REFERENCES [dbo].[ServiceItems] ([ItemID]) -ON DELETE CASCADE -GO -ALTER TABLE [dbo].[ExchangeAccounts] CHECK CONSTRAINT [FK_ExchangeAccounts_ServiceItems] -GO + ALTER TABLE [dbo].[ExchangeAccounts] ADD CONSTRAINT [DF__ExchangeA__Creat__59B045BD] DEFAULT (getdate()) FOR [CreatedDate] GO ALTER TABLE [dbo].[HostingPlans] WITH CHECK ADD CONSTRAINT [FK_HostingPlans_Packages] FOREIGN KEY([PackageID]) @@ -44614,12 +45821,21 @@ ALTER TABLE [dbo].[BlackBerryUsers] CHECK CONSTRAINT [FK_BlackBerryUsers_Exchang GO ALTER TABLE [dbo].[BlackBerryUsers] ADD CONSTRAINT [DF_BlackBerryUsers_CreatedDate] DEFAULT (getdate()) FOR [CreatedDate] GO + +ALTER TABLE [dbo].[ExchangeAccounts] WITH CHECK ADD CONSTRAINT [FK_ExchangeAccounts_ServiceItems] FOREIGN KEY([ItemID]) +REFERENCES [dbo].[ServiceItems] ([ItemID]) +ON DELETE CASCADE +GO +ALTER TABLE [dbo].[ExchangeAccounts] CHECK CONSTRAINT [FK_ExchangeAccounts_ServiceItems] +GO + ALTER TABLE [dbo].[ExchangeOrganizations] WITH CHECK ADD CONSTRAINT [FK_ExchangeOrganizations_ServiceItems] FOREIGN KEY([ItemID]) REFERENCES [dbo].[ServiceItems] ([ItemID]) ON DELETE CASCADE GO ALTER TABLE [dbo].[ExchangeOrganizations] CHECK CONSTRAINT [FK_ExchangeOrganizations_ServiceItems] GO + ALTER TABLE [dbo].[ExchangeOrganizationDomains] WITH CHECK ADD CONSTRAINT [FK_ExchangeOrganizationDomains_ServiceItems] FOREIGN KEY([ItemID]) REFERENCES [dbo].[ServiceItems] ([ItemID]) ON DELETE CASCADE @@ -44815,12 +46031,14 @@ ALTER TABLE [dbo].[Servers] ADD CONSTRAINT [DF_Servers_VirtualServer] DEFAULT GO ALTER TABLE [dbo].[Servers] ADD CONSTRAINT [DF_Servers_ADEnabled] DEFAULT ((0)) FOR [ADEnabled] GO + ALTER TABLE [dbo].[ResourceGroupDnsRecords] WITH CHECK ADD CONSTRAINT [FK_ResourceGroupDnsRecords_ResourceGroups] FOREIGN KEY([GroupID]) REFERENCES [dbo].[ResourceGroups] ([GroupID]) ON DELETE CASCADE GO ALTER TABLE [dbo].[ResourceGroupDnsRecords] CHECK CONSTRAINT [FK_ResourceGroupDnsRecords_ResourceGroups] GO + ALTER TABLE [dbo].[ResourceGroupDnsRecords] ADD CONSTRAINT [DF_ResourceGroupDnsRecords_RecordOrder] DEFAULT ((1)) FOR [RecordOrder] GO ALTER TABLE [dbo].[ecProduct] WITH CHECK ADD CONSTRAINT [FK_ecProduct_ecProductType] FOREIGN KEY([TypeID]) @@ -45024,4 +46242,53 @@ ON DELETE CASCADE GO ALTER TABLE [dbo].[ServiceProperties] CHECK CONSTRAINT [FK_ServiceProperties_Services] GO - \ No newline at end of file + +ALTER TABLE dbo.ExchangeMailboxPlans ADD CONSTRAINT + IX_ExchangeMailboxPlans UNIQUE NONCLUSTERED + ( + MailboxPlanId + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +GO + +ALTER TABLE [dbo].[ExchangeAccounts] WITH CHECK ADD CONSTRAINT [FK_ExchangeAccounts_ExchangeMailboxPlans] FOREIGN KEY([MailboxPlanId]) +REFERENCES [dbo].[ExchangeMailboxPlans] ([MailboxPlanId]) +GO +ALTER TABLE [dbo].[ExchangeAccounts] CHECK CONSTRAINT [FK_ExchangeAccounts_ExchangeMailboxPlans] +GO + +ALTER TABLE [dbo].[ExchangeMailboxPlans] WITH CHECK ADD CONSTRAINT [FK_ExchangeMailboxPlans_ExchangeOrganizations] FOREIGN KEY([ItemID]) +REFERENCES [dbo].[ExchangeOrganizations] ([ItemID]) +ON DELETE CASCADE +GO + +ALTER TABLE [dbo].[LyncUsers] ADD CONSTRAINT [DF_LyncUsers_CreatedDate] DEFAULT (getdate()) FOR [CreatedDate] +GO + +ALTER TABLE [dbo].[LyncUsers] ADD CONSTRAINT [DF_LyncUsers_ChangedDate] DEFAULT (getdate()) FOR [ModifiedDate] +GO + +ALTER TABLE [dbo].[LyncUsers] WITH CHECK ADD CONSTRAINT [FK_LyncUsers_LyncUserPlans] FOREIGN KEY([LyncUserPlanId]) +REFERENCES [dbo].[LyncUserPlans] ([LyncUserPlanId]) +GO + +ALTER TABLE [dbo].[LyncUsers] CHECK CONSTRAINT [FK_LyncUsers_LyncUserPlans] +GO + +ALTER TABLE dbo.LyncUserPlans ADD CONSTRAINT + IX_LyncUserPlans UNIQUE NONCLUSTERED + ( + LyncUserPlanId + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +GO +ALTER TABLE dbo.LyncUserPlans ADD CONSTRAINT + FK_LyncUserPlans_ExchangeOrganizations FOREIGN KEY + ( + ItemID + ) REFERENCES dbo.ExchangeOrganizations + ( + ItemID + ) ON UPDATE NO ACTION + ON DELETE CASCADE + diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index a949fd61..aeb27458 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -11,3 +11,4720 @@ BEGIN INSERT [dbo].[Versions] ([DatabaseVersion], [BuildDate]) VALUES (@build_version, @build_date) END GO + + +IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE ([UserID] = 1) AND ([SettingsName] = 'WebPolicy') AND ([PropertyName] = 'EnableParkingPageTokens')) +BEGIN + INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'WebPolicy', N'EnableParkingPageTokens', N'False') +END + +IF NOT EXISTS (SELECT * FROM [dbo].[ResourceGroups] WHERE [GroupName] = 'MsSQL2012') +BEGIN + INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (23, N'MsSQL2012', 10, N'WebsitePanel.EnterpriseServer.DatabaseServerController') +END +GO + +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 1 WHERE [GroupName] = N'OS' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 2 WHERE [GroupName] = N'Web' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 3 WHERE [GroupName] = N'FTP' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 4 WHERE [GroupName] = N'Mail' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 5 WHERE [GroupName] = N'Exchange' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 6 WHERE [GroupName] = N'Hosted Organizations' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 7 WHERE [GroupName] = N'MsSQL2000' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 8 WHERE [GroupName] = N'MsSQL2005' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 9 WHERE [GroupName] = N'MsSQL2008' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 10 WHERE [GroupName] = N'MsSQL2012' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 11 WHERE [GroupName] = N'MySQL4' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 12 WHERE [GroupName] = N'MySQL5' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 13 WHERE [GroupName] = N'SharePoint' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 14 WHERE [GroupName] = N'Hosted SharePoint' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 15 WHERE [GroupName] = N'Hosted CRM' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 16 WHERE [GroupName] = N'DNS' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 17 WHERE [GroupName] = N'Statistics' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 18 WHERE [GroupName] = N'VPS' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 19 WHERE [GroupName] = N'VPSForPC' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 20 WHERE [GroupName] = N'BlackBerry' +GO +UPDATE [dbo].[ResourceGroups] SET [GroupOrder] = 21 WHERE [GroupName] = N'OCS' +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[ResourceGroups] WHERE [GroupName] = 'Lync') +BEGIN +INSERT [dbo].[ResourceGroups] ([GroupID], [GroupName], [GroupOrder], [GroupController]) VALUES (41, N'Lync',22, NULL) +END +GO + + + +IF NOT EXISTS (SELECT * FROM [dbo].[ServiceItemTypes] WHERE [DisplayName] = 'MsSQL2012Database') +BEGIN + INSERT [dbo].[ServiceItemTypes] ([ItemTypeID], [GroupID], [DisplayName], [TypeName], [TypeOrder], [CalculateDiskspace], [CalculateBandwidth], [Suspendable], [Disposable], [Searchable], [Importable], [Backupable]) VALUES (37, 23, N'MsSQL2012Database', N'WebsitePanel.Providers.Database.SqlDatabase, WebsitePanel.Providers.Base', 1, 1, 0, 0, 1, 1, 1, 1) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[ServiceItemTypes] WHERE [DisplayName] = 'MsSQL2012User') +BEGIN + INSERT [dbo].[ServiceItemTypes] ([ItemTypeID], [GroupID], [DisplayName], [TypeName], [TypeOrder], [CalculateDiskspace], [CalculateBandwidth], [Suspendable], [Disposable], [Searchable], [Importable], [Backupable]) VALUES (38, 23, N'MsSQL2012User', N'WebsitePanel.Providers.Database.SqlUser, WebsitePanel.Providers.Base', 1, 0, 0, 0, 1, 1, 1, 1) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Microsoft SQL Server 2012') +BEGIN + -- provider + INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (209, 23, N'MsSQL', N'Microsoft SQL Server 2012', N'WebsitePanel.Providers.Database.MsSqlServer2012, WebsitePanel.Providers.Database.SqlServer', N'MSSQL', NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'MsSQL2012.Databases') +BEGIN + INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (218, 23, 1, N'MsSQL2012.Databases', N'Databases', 2, 0, 37) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'MsSQL2012.Users') +BEGIN + INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (219, 23, 2, N'MsSQL2012.Users', N'Users', 2, 0, 38) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'MsSQL2012.MaxDatabaseSize') +BEGIN + INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (221, 23, 3, N'MsSQL2012.MaxDatabaseSize', N'Max Database Size', 3, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'MsSQL2012.Backup') +BEGIN + INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (222, 23, 5, N'MsSQL2012.Backup', N'Database Backups', 1, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'MsSQL2012.Restore') +BEGIN + INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (223, 23, 6, N'MsSQL2012.Restore', N'Database Restores', 1, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'MsSQL2012.Truncate') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (224, 23, 7, N'MsSQL2012.Truncate', N'Database Truncate', 1, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'MsSQL2012.MaxLogSize') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (225, 23, 4, N'MsSQL2012.MaxLogSize', N'Max Log Size', 3, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSharePoint.UseSharedSSL') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (400, 20, 3, N'HostedSharePoint.UseSharedSSL', N'Use shared SSL Root', 1, 0, NULL) +END +GO + + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2007.KeepDeletedItemsDays') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (364, 12, 19, N'Exchange2007.KeepDeletedItemsDays', N'Keep Deleted Items (days)', 3, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2007.MaxRecipients') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (365, 12, 20, N'Exchange2007.MaxRecipients', N'Maximum Recipients', 3, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2007.MaxSendMessageSizeKB') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (366, 12, 21, N'Exchange2007.MaxSendMessageSizeKB', N'Maximum Send Message Size (Kb)', 3, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2007.MaxReceiveMessageSizeKB') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (367, 12, 22, N'Exchange2007.MaxReceiveMessageSizeKB', N'Maximum Receive Message Size (Kb)', 3, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2007.IsConsumer') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (368, 12, 1, N'Exchange2007.IsConsumer',N'Is Consumer Organization', 1, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Exchange2007.EnablePlansEditing') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (369, 12, 23,N'Exchange2007.EnablePlansEditing',N'Enable Plans Editing',1, 0 , NULL) +END +GO + + + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.Users') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (370, 41, 1, N'Lync.Users', N'Users',2 ,0 , NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.Federation') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (371, 41, 2, N'Lync.Federation' , N'Allow Federation', 1, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.Conferencing') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (372, 41, 3, N'Lync.Conferencing', N'Allow Conferencing', 1, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.MaxParticipants') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (373, 41, 4, N'Lync.MaxParticipants', N'Maximum Conference Particiapants', 3, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.AllowVideo') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (374, 41, 5, N'Lync.AllowVideo', N'Allow Video in Conference', 1, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.EnterpriseVoice') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (375, 41, 6, N'Lync.EnterpriseVoice', N'Allow EnterpriseVoice', 1, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.EVUsers') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (376, 41, 7, N'Lync.EVUsers', N'Number of Enterprise Voice Users', 2, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.EVNational') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (377, 41, 8, N'Lync.EVNational', N'Allow National Calls', 1, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.EVMobile') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (378, 41, 9, N'Lync.EVMobile', N'Allow Mobile Calls', 1, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.EVInternational') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (379, 41, 10, N'Lync.EVInternational', N'Allow International Calls', 1, 0, NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSharePoint.UseSharedSSL') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (400, 20, 3, N'HostedSharePoint.UseSharedSSL', N'Use shared SSL Root', 1, 0, NULL) +END +GO + + + +IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'Lync.EnablePlansEditing') +BEGIN +INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID]) VALUES (380, 41, 11, N'Lync.EnablePlansEditing', N'Enable Plans Editing', 1, 0, NULL) +END +GO + + + +IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Hosted Microsoft Exchange Server 2010 SP2') +BEGIN +INSERT [dbo].[Providers] ([ProviderId], [GroupId], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES(90, 12, N'Exchange2010SP2', N'Hosted Microsoft Exchange Server 2010 SP2', N'WebsitePanel.Providers.HostedSolution.Exchange2010SP2, WebsitePanel.Providers.HostedSolution', N'Exchange', 1) +END +GO + + +IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Microsoft Lync Server 2010 Multitenant Hosting Pack') +BEGIN +INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (250, 41, N'Lync2010', N'Microsoft Lync Server 2010 Multitenant Hosting Pack', 'WebsitePanel.Providers.HostedSolution.Lync2010, WebsitePanel.Providers.HostedSolution', 'Lync', 1) +END +GO + + + + +DELETE FROM [dbo].[HostingPlanQuotas] WHERE [QuotaID] IN (SELECT [QuotaID] FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.POP3Enabled') +DELETE FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.POP3Enabled' +DELETE FROM [dbo].[HostingPlanQuotas] WHERE [QuotaID] IN (SELECT [QuotaID] FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.IMAPEnabled') +DELETE FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.IMAPEnabled' +DELETE FROM [dbo].[HostingPlanQuotas] WHERE [QuotaID] IN (SELECT [QuotaID] FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.OWAEnabled') +DELETE FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.OWAEnabled' +DELETE FROM [dbo].[HostingPlanQuotas] WHERE [QuotaID] IN (SELECT [QuotaID] FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.MAPIEnabled') +DELETE FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.MAPIEnabled' +DELETE FROM [dbo].[HostingPlanQuotas] WHERE [QuotaID] IN (SELECT [QuotaID] FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.ActiveSyncEnabled') +DELETE FROM [dbo].[Quotas] WHERE [QuotaName] = N'Exchange2007.ActiveSyncEnabled' + + +UPDATE [dbo].[ScheduleTaskParameters] SET DefaultValue = N'MsSQL2000=SQL Server 2000;MsSQL2005=SQL Server 2005;MsSQL2008=SQL Server 2008;MsSQL2012=SQL Server 2012;MySQL4=MySQL 4.0;MySQL5=MySQL 5.0' WHERE [ParameterID] = N'DATABASE_GROUP' +GO + +UPDATE [dbo].[UserSettings] SET [PropertyValue] = N' + + Hosting Space Summary Information + + + +
    + + + +
    + Hosting Space Information +
    + + +

    +Hello #user.FirstName#, +

    + +

    +"#space.Package.PackageName#" hosting space has been created under your user account +and below is the summary information for its resources. +

    +
    + + + + + +

    Control Panel URL

    + + + + + + + + + + + + + + + +
    Control Panel URLUsernamePassword
    http://panel.HostingCompany.com#user.Username##user.Password#
    +
    + + +

    Hosting Space Overview

    + +

    + General hosting space limits: +

    + + + + + + + + + + + + + + + + + +
    Disk Space, MB:
    Bandwidth, MB/Month:
    Maximum Number of Domains:
    Maximum Number of Sub-Domains:
    + + + +

    Web

    + +

    + Limits +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Maximum Number of Web Sites:
    Web Application Gallery:
    Classic ASP:
    ASP.NET 1.1:
    ASP.NET 2.0:
    ASP.NET 4.0:
    PHP 4:
    PHP 5:
    Perl:
    CGI-BIN:
    + + + +

    Name Servers

    +

    + In order to point your domain to the web site in this hosting space you should use the following Name Servers: +

    + + + + + + +
    #NameServer#
    +

    + You should change the name servers in domain registrar (Register.com, GoDaddy.com, etc.) control panel. + Please, study domain registrar''s user manual for directions how to change name servers or contact your domain + registrar directly by e-mail or phone. +

    +

    + Please note, the changes in domain registrar database do not reflect immediately and sometimes it requires from + 12 to 48 hours till the end of DNS propagation. +

    + + +

    Web Sites

    +

    + The following web sites have been created under hosting space: +

    + + + + + + +
    http://#WebSite.Name#
    +

    + * Please note, your web sites may not be accessible from 12 to 48 hours after you''ve changed name servers for their respective domains. +

    + + + +

    Temporary URL

    +

    + You can access your web sites right now using their respective temporary URLs (instant aliases). + Temporary URL is a sub-domain of the form http://yourdomain.com.providerdomain.com where "yourdomain.com" is your + domain and "providerdomain.com" is the domain of your hosting provider. +

    +

    + You can use the following Temporary URL for all your web sites: +

    + + + + +
    + http://YourDomain.com.#InstantAlias# +
    +
    + + +

    Files Location

    +

    + Sometimes it is required to know the physical location of the hosting space folder (absolute path). + Hosting space folder is the folder where all hosting space files such as web sites content, web logs, data files, etc. are located. +

    +

    + The root of your hosting space on our HDD is here: +

    + + + + +
    + #PackageRootFolder# +
    +

    + By default the root folder of any web site within your hosting space is built as following (you can change it anytime from the control panel): +

    + + + + +
    + #PackageRootFolder#\YourDomain.com\wwwroot +
    +
    + + + + +

    FTP

    + + +

    Limits

    + + + + + +
    Maximum Number of FTP Accounts:
    + + + +

    FTP Server

    +

    +Your hosting space allows working with your files by FTP. +You can use the following FTP server to access your space files remotely: +

    + + + + +
    ftp://#FtpIP#
    +

    + Also, you can use the following domain names to access your FTP server: +

    + + + + +
    ftp://ftp.YourDomain.com
    + +

    + During DNS propagation period (when domain name servers have been changed), similar to web sites, FTP server can be access with Temporary URL too: +

    + + + + +
    ftp://ftp.YourDomain.com.#InstantAlias#
    +
    + +

    FTP Accounts

    +

    + The following FTP accounts have been created under your hosting space and can be used to access FTP server: +

    + + + + + + + + + + + + + + + + + + + + + +
    UsernamePasswordFolder
    #FtpAcocunt.Name# + #FtpAcocunt.Password# + #FtpAcocunt.Folder#
    +
    + + + + +

    Mail

    + + +

    Limits

    + + + + + + + + + + + + + + + + + +
    Maximum Number of Mail Accounts:
    Maximum Number of Mail Forwardings:
    Maximum Number of Mail Groups (Aliases):
    Maximum Number of Mailing Lists:
    + + +

    SMTP/POP3 Server

    +

    +Below is the IP address of your POP3/SMTP/IMAP server. You can always access your mailbox(es) +using this IP address instead of actual POP3/SMTP/IMAP servers name: +

    + + + + +
    + #MailRecords[0].ExternalIP# +
    + +

    + Also, you can use the following domain names to access SMTP/POP3 server from your favourite e-mail client software: +

    + + + + +
    mail.YourDomain.com
    + + +

    + During DNS propagation period (when domain name servers have been changed), similar to web sites, SMTP/POP3 server can be access with temporary domain too: +

    + + + + +
    mail.YourDomain.com.#InstantAlias#
    +
    + + +

    Mail Accounts

    +

    + The following mail accounts have been created under your hosting space: +

    + + + + + + + + + + + + + + + + + + + + + +
    E-mailUsername (for POP3/SMTP/IMAP/WebMail)Password
    #MailAccount.Name##MailAccount.Name# + #MailAccount.Password# +
    +
    + + +

    Databases

    + +

    + You can create databases and database users on "Space Home -> Databases" screen in the control panel. +

    + + + + +

    SQL Server 2000

    + + + + + + + + + + +
    Maximum Number of Databases:
    Maximum Number of Users:
    + +

    + In order to connect to SQL Server 2000 from Management Studio, Enterprise Manager, Query Analyzer + or other client software you can use the following SQL Server address: +

    + + + + +
    #MsSQL2000Address#
    + +
    + + + + +

    SQL Server 2005

    + + + + + + + + + + +
    Maximum Number of Databases:
    Maximum Number of Users:
    + +

    + In order to connect to SQL Server 2005 from Management Studio, Enterprise Manager, Query Analyzer + or other client software you can use the following SQL Server address: +

    + + + + +
    #MsSQL2005Address#
    + +
    + + + + +

    SQL Server 2008

    + + + + + + + + + + +
    Maximum Number of Databases:
    Maximum Number of Users:
    + +

    + In order to connect to SQL Server 2008 from Management Studio, Enterprise Manager, Query Analyzer + or other client software you can use the following SQL Server address: +

    + + + + +
    #MsSQL2008Address#
    + +
    + + + + +

    SQL Server 2012

    + + + + + + + + + + +
    Maximum Number of Databases:
    Maximum Number of Users:
    + +

    + In order to connect to SQL Server 2012 from Management Studio, Enterprise Manager, Query Analyzer + or other client software you can use the following SQL Server address: +

    + + + + +
    #MsSQL2012Address#
    + +
    + + + +

    MySQL 4.x

    + + + + + + + + + + +
    Maximum Number of Databases:
    Maximum Number of Users:
    + +

    + In order to connect to MySQL 4.x server you can use the following address: +

    + + + + +
    #MySQL4Address#
    +
    + + + + +

    MySQL 5.x

    + + + + + + + + + + +
    Maximum Number of Databases:
    Maximum Number of Users:
    + +

    + In order to connect to MySQL 5.x server you can use the following address: +

    + + + + +
    #MySQL5Address#
    +
    + + + +

    Microsoft Access

    +

    + Microsoft Access database are automatically allowed in any hosting plan. You can create/upload any number of Access + database from File Manager in control panel. +

    + + + + +

    Web Statistics

    + + + + + + +
    Maximum Number of Statistics Sites:
    + +

    + You can view advanced statistics from your domain using URL of the following form: +

    + + + + +
    http://stats.YourDomain.com
    + +

    + During DNS propagation period (when domain name servers have been changed), you can access web site statistics with Temporary URL: +

    + + + + +
    http://stats.YourDomain.com.#InstantAlias#
    +
    +
    + + +

    +If you have any questions regarding your hosting account, feel free to contact our support department at any time. +

    + +

    +Best regards,
    +ACME Hosting Inc.
    +Web Site: www.AcmeHosting.com
    +E-Mail: support@AcmeHosting.com +

    +
    + + + +

    + You may also use SQL Server address above in your application connection strings, for example: +

    + + + + + + + + + +
    Classic ASP (ADO Library)Provider=SQLOLEDB;Data source=#server#;Initial catalog=databaseName;User Id=userName;Password=password;
    ASP.NET (ADO.NET Library)Server=#server#;Database=databaseName;Uid=userName;Password=password;
    +
    + + + + #space.Quotas[quota].QuotaAllocatedValue#Unlimited + + 0 + + + + + + EnabledDisabled + + Disabled + + + +
    + +' WHERE [PropertyName] = N'HtmlBody' +GO + + + +IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'Microsoft SQL Server 2012') +BEGIN + INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (209, 23, N'MsSQL', N'Microsoft SQL Server 2012', N'WebsitePanel.Providers.Database.MsSqlServer2012, WebsitePanel.Providers.Database.SqlServer', N'MSSQL', NULL) +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[ServiceDefaultProperties] WHERE [ProviderID] = 12 AND [PropertyName] = 'LogsFolder') +BEGIN + INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (12, N'LogsFolder', N'%PROGRAMFILES%\Gene6 FTP Server\Log') +END +GO +UPDATE [dbo].[Providers] SET [EditorControl] = N'hMailServer5' WHERE [ProviderID] = 63 +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[ServiceDefaultProperties] WHERE [ProviderID] = 63 AND [PropertyName] = N'AdminUsername') +BEGIN + INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (63, N'AdminUsername', N'Administrator') +END +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[ServiceDefaultProperties] WHERE [ProviderID] = 63 AND [PropertyName] = N'AdminPassword') +BEGIN + INSERT [dbo].[ServiceDefaultProperties] ([ProviderID], [PropertyName], [PropertyValue]) VALUES (63, N'AdminPassword', N'') +END +GO + + +IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='Users' AND COLS.name='LoginStatusId') +BEGIN +ALTER TABLE [dbo].[Users] ADD + [LoginStatusId] [int] NULL, + [FailedLogins] [int] NULL +END +GO + + +IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='GlobalDnsRecords' AND COLS.name='SrvPriority') +BEGIN +ALTER TABLE [dbo].[GlobalDnsRecords] ADD + [SrvPriority] [int] NULL, + [SrvWeight] [int] NULL, + [SrvPort] [int] NULL +END +GO + +IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='ResourceGroups' AND COLS.name='ShowGroup') +BEGIN +ALTER TABLE [dbo].[ResourceGroups] ADD [ShowGroup] [bit] NULL +END +GO + +UPDATE [dbo].[ResourceGroups] SET ShowGroup=1 +GO + + +ALTER VIEW [dbo].[UsersDetailed] +AS +SELECT U.UserID, U.RoleID, U.StatusID, U.LoginStatusId, U.FailedLogins, U.OwnerID, U.Created, U.Changed, U.IsDemo, U.Comments, U.IsPeer, U.Username, U.FirstName, U.LastName, U.Email, + U.CompanyName, U.FirstName + ' ' + U.LastName AS FullName, UP.Username AS OwnerUsername, UP.FirstName AS OwnerFirstName, + UP.LastName AS OwnerLastName, UP.RoleID AS OwnerRoleID, UP.FirstName + ' ' + UP.LastName AS OwnerFullName, UP.Email AS OwnerEmail, UP.RoleID AS Expr1, + (SELECT COUNT(PackageID) AS Expr1 + FROM dbo.Packages AS P + WHERE (UserID = U.UserID)) AS PackagesNumber, U.EcommerceEnabled +FROM dbo.Users AS U LEFT OUTER JOIN + dbo.Users AS UP ON U.OwnerID = UP.UserID +GO + + +ALTER PROCEDURE [dbo].[AddDnsRecord] +( + @ActorID int, + @ServiceID int, + @ServerID int, + @PackageID int, + @RecordType nvarchar(10), + @RecordName nvarchar(50), + @RecordData nvarchar(500), + @MXPriority int, + @SrvPriority int, + @SrvWeight int, + @SrvPort int, + @IPAddressID int +) +AS + +IF (@ServiceID > 0 OR @ServerID > 0) AND dbo.CheckIsUserAdmin(@ActorID) = 0 +RAISERROR('You should have administrator role to perform such operation', 16, 1) + +IF (@PackageID > 0) AND dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +IF @ServiceID = 0 SET @ServiceID = NULL +IF @ServerID = 0 SET @ServerID = NULL +IF @PackageID = 0 SET @PackageID = NULL +IF @IPAddressID = 0 SET @IPAddressID = NULL + +IF EXISTS +( + SELECT RecordID FROM GlobalDnsRecords WHERE + ServiceID = @ServiceID AND ServerID = @ServerID AND PackageID = @PackageID + AND RecordName = @RecordName AND RecordType = @RecordType +) + + UPDATE GlobalDnsRecords + SET + RecordData = RecordData, + MXPriority = MXPriority, + SrvPriority = SrvPriority, + SrvWeight = SrvWeight, + SrvPort = SrvPort, + + IPAddressID = @IPAddressID + WHERE + ServiceID = @ServiceID AND ServerID = @ServerID AND PackageID = @PackageID +ELSE + INSERT INTO GlobalDnsRecords + ( + ServiceID, + ServerID, + PackageID, + RecordType, + RecordName, + RecordData, + MXPriority, + SrvPriority, + SrvWeight, + SrvPort, + IPAddressID + ) + VALUES + ( + @ServiceID, + @ServerID, + @PackageID, + @RecordType, + @RecordName, + @RecordData, + @MXPriority, + @SrvPriority, + @SrvWeight, + @SrvPort, + @IPAddressID + ) + +RETURN + +GO + + + + + + + + +ALTER PROCEDURE [dbo].[CheckDomain] +( + @PackageID int, + @DomainName nvarchar(100), + @IsDomainPointer bit, + @Result int OUTPUT +) +AS + +/* +@Result values: + 0 - OK + -1 - already exists + -2 - sub-domain of prohibited domain +*/ + +SET @Result = 0 -- OK + +-- check if the domain already exists +IF EXISTS( +SELECT DomainID FROM Domains +WHERE DomainName = @DomainName AND IsDomainPointer = @IsDomainPointer +) +BEGIN + SET @Result = -1 + RETURN +END + +-- check if this is a sub-domain of other domain +-- that is not allowed for 3rd level hosting + +DECLARE @UserID int +SELECT @UserID = UserID FROM Packages +WHERE PackageID = @PackageID + +-- find sub-domains +DECLARE @DomainUserID int, @HostingAllowed bit +SELECT + @DomainUserID = P.UserID, + @HostingAllowed = D.HostingAllowed +FROM Domains AS D +INNER JOIN Packages AS P ON D.PackageID = P.PackageID +WHERE CHARINDEX('.' + DomainName, @DomainName) > 0 +AND (CHARINDEX('.' + DomainName, @DomainName) + LEN('.' + DomainName)) = LEN(@DomainName) + 1 + +-- this is a domain of other user +IF @UserID <> @DomainUserID AND @HostingAllowed = 0 +BEGIN + SET @Result = -2 + RETURN +END + +RETURN + +GO + + + + + + + + +ALTER PROCEDURE [dbo].[GetDnsRecord] +( + @ActorID int, + @RecordID int +) +AS + +-- check rights +DECLARE @ServiceID int, @ServerID int, @PackageID int +SELECT + @ServiceID = ServiceID, + @ServerID = ServerID, + @PackageID = PackageID +FROM GlobalDnsRecords +WHERE + RecordID = @RecordID + +IF (@ServiceID > 0 OR @ServerID > 0) AND dbo.CheckIsUserAdmin(@ActorID) = 0 +RAISERROR('You are not allowed to perform this operation', 16, 1) + +IF (@PackageID > 0) AND dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +SELECT + NR.RecordID, + NR.ServiceID, + NR.ServerID, + NR.PackageID, + NR.RecordType, + NR.RecordName, + NR.RecordData, + NR.MXPriority, + NR.SrvPriority, + NR.SrvWeight, + NR.SrvPort, + NR.IPAddressID +FROM + GlobalDnsRecords AS NR +WHERE NR.RecordID = @RecordID +RETURN + +GO + + + + + + + + +ALTER PROCEDURE [dbo].[GetDnsRecordsByPackage] +( + @ActorID int, + @PackageID int +) +AS + +-- check rights +IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +SELECT + NR.RecordID, + NR.ServiceID, + NR.ServerID, + NR.PackageID, + NR.RecordType, + NR.RecordName, + NR.RecordData, + NR.MXPriority, + NR.SrvPriority, + NR.SrvWeight, + NR.SrvPort, + NR.IPAddressID, + CASE + WHEN NR.RecordType = 'A' AND NR.RecordData = '' THEN dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) + WHEN NR.RecordType = 'MX' THEN CONVERT(varchar(3), NR.MXPriority) + ', ' + NR.RecordData + WHEN NR.RecordType = 'SRV' THEN CONVERT(varchar(3), NR.SrvPort) + ', ' + NR.RecordData + ELSE NR.RecordData + END AS FullRecordData, + dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) AS IPAddress, + IP.ExternalIP, + IP.InternalIP +FROM + GlobalDnsRecords AS NR +LEFT OUTER JOIN IPAddresses AS IP ON NR.IPAddressID = IP.AddressID +WHERE NR.PackageID = @PackageID +RETURN + +GO + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetDnsRecordsByServer] +( + @ActorID int, + @ServerID int +) +AS + +SELECT + NR.RecordID, + NR.ServiceID, + NR.ServerID, + NR.PackageID, + NR.RecordType, + NR.RecordName, + NR.RecordData, + CASE + WHEN NR.RecordType = 'A' AND NR.RecordData = '' THEN dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) + WHEN NR.RecordType = 'MX' THEN CONVERT(varchar(3), NR.MXPriority) + ', ' + NR.RecordData + WHEN NR.RecordType = 'SRV' THEN CONVERT(varchar(3), NR.SrvPort) + ', ' + NR.RecordData + ELSE NR.RecordData + END AS FullRecordData, + NR.MXPriority, + NR.SrvPriority, + NR.SrvWeight, + NR.SrvPort, + NR.IPAddressID, + dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) AS IPAddress, + IP.ExternalIP, + IP.InternalIP +FROM + GlobalDnsRecords AS NR +LEFT OUTER JOIN IPAddresses AS IP ON NR.IPAddressID = IP.AddressID +WHERE + NR.ServerID = @ServerID +RETURN + +GO + + + + + + + + + +ALTER PROCEDURE [dbo].[GetDnsRecordsByService] +( + @ActorID int, + @ServiceID int +) +AS + +SELECT + NR.RecordID, + NR.ServiceID, + NR.ServerID, + NR.PackageID, + NR.RecordType, + NR.RecordName, + CASE + WHEN NR.RecordType = 'A' AND NR.RecordData = '' THEN dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) + WHEN NR.RecordType = 'MX' THEN CONVERT(varchar(3), NR.MXPriority) + ', ' + NR.RecordData + WHEN NR.RecordType = 'SRV' THEN CONVERT(varchar(3), NR.SrvPort) + ', ' + NR.RecordData + ELSE NR.RecordData + END AS FullRecordData, + NR.RecordData, + NR.MXPriority, + NR.SrvPriority, + NR.SrvWeight, + NR.SrvPort, + NR.IPAddressID, + dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) AS IPAddress, + IP.ExternalIP, + IP.InternalIP +FROM + GlobalDnsRecords AS NR +LEFT OUTER JOIN IPAddresses AS IP ON NR.IPAddressID = IP.AddressID +WHERE + NR.ServiceID = @ServiceID +RETURN + +GO + + + + + + + + + +ALTER PROCEDURE [dbo].[GetDnsRecordsTotal] +( + @ActorID int, + @PackageID int +) +AS + +-- check rights +IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +-- create temp table for DNS records +DECLARE @Records TABLE +( + RecordID int, + RecordType nvarchar(10) COLLATE Latin1_General_CI_AS, + RecordName nvarchar(50) COLLATE Latin1_General_CI_AS +) + +-- select PACKAGES DNS records +DECLARE @ParentPackageID int, @TmpPackageID int +SET @TmpPackageID = @PackageID + +WHILE 10 = 10 +BEGIN + + -- get DNS records for the current package + INSERT INTO @Records (RecordID, RecordType, RecordName) + SELECT + GR.RecordID, + GR.RecordType, + GR.RecordName + FROM GlobalDNSRecords AS GR + WHERE GR.PackageID = @TmpPackageID + AND GR.RecordType + GR.RecordName NOT IN (SELECT RecordType + RecordName FROM @Records) + + SET @ParentPackageID = NULL + + -- get parent package + SELECT + @ParentPackageID = ParentPackageID + FROM Packages + WHERE PackageID = @TmpPackageID + + IF @ParentPackageID IS NULL -- the last parent + BREAK + + SET @TmpPackageID = @ParentPackageID +END + +-- select SERVER DNS records +DECLARE @ServerID int +SELECT @ServerID = ServerID FROM Packages +WHERE PackageID = @PackageID + +INSERT INTO @Records (RecordID, RecordType, RecordName) +SELECT + GR.RecordID, + GR.RecordType, + GR.RecordName +FROM GlobalDNSRecords AS GR +WHERE GR.ServerID = @ServerID +AND GR.RecordType + GR.RecordName NOT IN (SELECT RecordType + RecordName FROM @Records) + + +-- select SERVICES DNS records +-- re-distribute package services +EXEC DistributePackageServices @ActorID, @PackageID + +INSERT INTO @Records (RecordID, RecordType, RecordName) +SELECT + GR.RecordID, + GR.RecordType, + GR.RecordName +FROM GlobalDNSRecords AS GR +WHERE GR.ServiceID IN (SELECT ServiceID FROM PackageServices WHERE PackageID = @PackageID) +AND GR.RecordType + GR.RecordName NOT IN (SELECT RecordType + RecordName FROM @Records) + + +SELECT + NR.RecordID, + NR.ServiceID, + NR.ServerID, + NR.PackageID, + NR.RecordType, + NR.RecordName, + NR.RecordData, + NR.MXPriority, + NR.SrvPriority, + NR.SrvWeight, + NR.SrvPort, + NR.IPAddressID, + ISNULL(IP.ExternalIP, '') AS ExternalIP, + ISNULL(IP.InternalIP, '') AS InternalIP, + CASE + WHEN NR.RecordType = 'A' AND NR.RecordData = '' THEN dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) + WHEN NR.RecordType = 'MX' THEN CONVERT(varchar(3), NR.MXPriority) + ', ' + NR.RecordData + WHEN NR.RecordType = 'SRV' THEN CONVERT(varchar(3), NR.SrvPort) + ', ' + NR.RecordData + ELSE NR.RecordData + END AS FullRecordData, + dbo.GetFullIPAddress(IP.ExternalIP, IP.InternalIP) AS IPAddress +FROM @Records AS TR +INNER JOIN GlobalDnsRecords AS NR ON TR.RecordID = NR.RecordID +LEFT OUTER JOIN IPAddresses AS IP ON NR.IPAddressID = IP.AddressID + +RETURN + +GO + + + + + + + + + +ALTER PROCEDURE [dbo].[GetDomainsPaged] +( + @ActorID int, + @PackageID int, + @ServerID int, + @Recursive bit, + @FilterColumn nvarchar(50) = '', + @FilterValue nvarchar(50) = '', + @SortColumn nvarchar(50), + @StartRow int, + @MaximumRows int +) +AS +SET NOCOUNT ON + +-- check rights +IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +-- build query and run it to the temporary table +DECLARE @sql nvarchar(2000) + +IF @SortColumn = '' OR @SortColumn IS NULL +SET @SortColumn = 'DomainName' + +SET @sql = ' +DECLARE @Domains TABLE +( + ItemPosition int IDENTITY(1,1), + DomainID int +) +INSERT INTO @Domains (DomainID) +SELECT + D.DomainID +FROM Domains AS D +INNER JOIN Packages AS P ON D.PackageID = P.PackageID +INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID +LEFT OUTER JOIN ServiceItems AS Z ON D.ZoneItemID = Z.ItemID +LEFT OUTER JOIN Services AS S ON Z.ServiceID = S.ServiceID +LEFT OUTER JOIN Servers AS SRV ON S.ServerID = SRV.ServerID +WHERE (D.IsInstantAlias = 0 AND D.IsDomainPointer = 0) AND + ((@Recursive = 0 AND D.PackageID = @PackageID) + OR (@Recursive = 1 AND dbo.CheckPackageParent(@PackageID, D.PackageID) = 1)) +AND (@ServerID = 0 OR (@ServerID > 0 AND S.ServerID = @ServerID)) +' + +IF @FilterColumn <> '' AND @FilterValue <> '' +SET @sql = @sql + ' AND ' + @FilterColumn + ' LIKE @FilterValue ' + +IF @SortColumn <> '' AND @SortColumn IS NOT NULL +SET @sql = @sql + ' ORDER BY ' + @SortColumn + ' ' + +SET @sql = @sql + ' SELECT COUNT(DomainID) FROM @Domains;SELECT + D.DomainID, + D.PackageID, + D.ZoneItemID, + D.DomainName, + D.HostingAllowed, + ISNULL(WS.ItemID, 0) AS WebSiteID, + WS.ItemName AS WebSiteName, + ISNULL(MD.ItemID, 0) AS MailDomainID, + MD.ItemName AS MailDomainName, + D.IsSubDomain, + D.IsInstantAlias, + D.IsDomainPointer, + + -- packages + P.PackageName, + + -- server + ISNULL(SRV.ServerID, 0) AS ServerID, + ISNULL(SRV.ServerName, '''') AS ServerName, + ISNULL(SRV.Comments, '''') AS ServerComments, + ISNULL(SRV.VirtualServer, 0) AS VirtualServer, + + -- user + P.UserID, + U.Username, + U.FirstName, + U.LastName, + U.FullName, + U.RoleID, + U.Email +FROM @Domains AS SD +INNER JOIN Domains AS D ON SD.DomainID = D.DomainID +INNER JOIN Packages AS P ON D.PackageID = P.PackageID +INNER JOIN UsersDetailed AS U ON P.UserID = U.UserID +LEFT OUTER JOIN ServiceItems AS WS ON D.WebSiteID = WS.ItemID +LEFT OUTER JOIN ServiceItems AS MD ON D.MailDomainID = MD.ItemID +LEFT OUTER JOIN ServiceItems AS Z ON D.ZoneItemID = Z.ItemID +LEFT OUTER JOIN Services AS S ON Z.ServiceID = S.ServiceID +LEFT OUTER JOIN Servers AS SRV ON S.ServerID = SRV.ServerID +WHERE SD.ItemPosition BETWEEN @StartRow + 1 AND @StartRow + @MaximumRows' + +exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @PackageID int, @FilterValue nvarchar(50), @ServerID int, @Recursive bit', +@StartRow, @MaximumRows, @PackageID, @FilterValue, @ServerID, @Recursive + + +RETURN + +GO + + + + + + + + + + +ALTER PROCEDURE [dbo].[UpdateDnsRecord] +( + @ActorID int, + @RecordID int, + @RecordType nvarchar(10), + @RecordName nvarchar(50), + @RecordData nvarchar(500), + @MXPriority int, + @SrvPriority int, + @SrvWeight int, + @SrvPort int, + @IPAddressID int +) +AS + +IF @IPAddressID = 0 SET @IPAddressID = NULL + +-- check rights +DECLARE @ServiceID int, @ServerID int, @PackageID int +SELECT + @ServiceID = ServiceID, + @ServerID = ServerID, + @PackageID = PackageID +FROM GlobalDnsRecords +WHERE + RecordID = @RecordID + +IF (@ServiceID > 0 OR @ServerID > 0) AND dbo.CheckIsUserAdmin(@ActorID) = 0 +RAISERROR('You are not allowed to perform this operation', 16, 1) + +IF (@PackageID > 0) AND dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + + +-- update record +UPDATE GlobalDnsRecords +SET + RecordType = @RecordType, + RecordName = @RecordName, + RecordData = @RecordData, + MXPriority = @MXPriority, + SrvPriority = @SrvPriority, + SrvWeight = @SrvWeight, + SrvPort = @SrvPort, + IPAddressID = @IPAddressID +WHERE + RecordID = @RecordID +RETURN + +GO + + + + +UPDATE dbo.Quotas SET QuotaTypeID = 2 WHERE QuotaName = 'HostedSharePoint.Sites' +GO +UPDATE dbo.Quotas SET QuotaTypeID = 2 WHERE QuotaName = 'HostedSolution.Users' +GO +UPDATE dbo.Quotas SET QuotaTypeID = 2 WHERE QuotaName = 'Exchange2007.Mailboxes' +GO +UPDATE dbo.Quotas SET QuotaTypeID = 2 WHERE QuotaName = 'Exchange2007.DiskSpace' +GO + + + + + + +-- Remove ExchangeHostedEdition Quotas +DELETE FROM Quotas WHERE QuotaID = 340 +GO +DELETE FROM Quotas WHERE QuotaID = 341 +GO +DELETE FROM Quotas WHERE QuotaID = 342 +GO +DELETE FROM Quotas WHERE QuotaID = 343 +GO + + +-- Remove ExchangeHostedEdition ServiceItemType +DELETE FROM ServiceItemTypes WHERE ItemTypeID = 40 +GO + + +-- Remove ExchangeHostedEdition ServiceDefaultProperties +DELETE FROM ServiceDefaultProperties WHERE ProviderID = 207 +GO + + + +-- Remove ExchangeHostedEdition Provider +DELETE FROM Providers WHERE ProviderID = 207 +GO + + + +-- Remove ExchangeHostedEdition VirtualGroups +DELETE FROM VirtualGroups WHERE GroupID = 33 +GO + + + +-- Remove ExchangeHostedEdition ResourceGroups +DELETE FROM ResourceGroups WHERE GRoupID = 33 +GO + + +-- Create Exchange Mailbox Plans +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ExchangeMailboxPlans]') AND type in (N'U')) +BEGIN +CREATE TABLE [dbo].[ExchangeMailboxPlans]( + [MailboxPlanId] [int] IDENTITY(1,1) NOT NULL, + [ItemID] [int] NOT NULL, + [MailboxPlan] [nvarchar](300) COLLATE Latin1_General_CI_AS NOT NULL, + [EnableActiveSync] [bit] NOT NULL, + [EnableIMAP] [bit] NOT NULL, + [EnableMAPI] [bit] NOT NULL, + [EnableOWA] [bit] NOT NULL, + [EnablePOP] [bit] NOT NULL, + [IsDefault] [bit] NOT NULL, + [IssueWarningPct] [int] NOT NULL, + [KeepDeletedItemsDays] [int] NOT NULL, + [MailboxSizeMB] [int] NOT NULL, + [MaxReceiveMessageSizeKB] [int] NOT NULL, + [MaxRecipients] [int] NOT NULL, + [MaxSendMessageSizeKB] [int] NOT NULL, + [ProhibitSendPct] [int] NOT NULL, + [ProhibitSendReceivePct] [int] NOT NULL, + [HideFromAddressBook] [bit] NOT NULL, + CONSTRAINT [PK_ExchangeMailboxPlans] PRIMARY KEY CLUSTERED +( + [MailboxPlanId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +/****** Object: Table [dbo].[ExchangeAccounts] ******/ +ALTER TABLE [dbo].[ExchangeAccounts] ALTER COLUMN [AccountName] [nvarchar](300) COLLATE Latin1_General_CI_AS NOT NULL + +/****** Object: Table [dbo].[ExchangeAccounts] ******/ +ALTER TABLE [dbo].[ExchangeAccounts] ADD [MailboxPlanId] int NULL + +/****** Object: Table [dbo].[ExchangeAccounts] ******/ +ALTER TABLE [dbo].[ExchangeAccounts] WITH CHECK ADD CONSTRAINT [FK_ExchangeAccounts_ExchangeMailboxPlans] FOREIGN KEY([MailboxPlanId]) +REFERENCES [dbo].[ExchangeMailboxPlans] ([MailboxPlanId]) + +ALTER TABLE [dbo].[ExchangeAccounts] CHECK CONSTRAINT [FK_ExchangeAccounts_ExchangeMailboxPlans] + +/****** Object: Table [dbo].[ExchangeAccounts] ******/ +ALTER TABLE [dbo].[ExchangeMailboxPlans] WITH CHECK ADD CONSTRAINT [FK_ExchangeMailboxPlans_ExchangeOrganizations] FOREIGN KEY([ItemID]) +REFERENCES [dbo].[ExchangeOrganizations] ([ItemID]) +ON DELETE CASCADE + +/****** Object: Table [dbo].[ExchangeAccounts] ******/ +ALTER TABLE dbo.ExchangeMailboxPlans ADD CONSTRAINT + IX_ExchangeMailboxPlans UNIQUE NONCLUSTERED + ( + MailboxPlanId + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +END +GO + +/****** Object: Table [dbo].[ExchangeAccounts] Extend Exchange Accounts with MailboxplanID ******/ +IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='ExchangeAccounts' AND COLS.name='MailboxPlanId') +BEGIN +ALTER TABLE [dbo].[ExchangeAccounts] ADD [MailboxPlanId] [int] NULL +END +GO + +/****** Object: Table [dbo].[ExchangeAccounts] Extend Exchange Accounts with SubscriberNumber ******/ +IF NOT EXISTS(select 1 from sys.columns COLS INNER JOIN sys.objects OBJS ON OBJS.object_id=COLS.object_id and OBJS.type='U' AND OBJS.name='ExchangeAccounts' AND COLS.name='SubscriberNumber') +BEGIN +ALTER TABLE [dbo].[ExchangeAccounts] ADD [SubscriberNumber] [nvarchar] (32) COLLATE Latin1_General_CI_AS NULL +END +GO + +/****** Object: Table [dbo].[ExchangeOrganizations] ******/ +ALTER TABLE [dbo].[ExchangeOrganizations] ALTER COLUMN [OrganizationID] [nvarchar](128) COLLATE Latin1_General_CI_AS NOT NULL +GO + + + +-- LyncUsers +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[LyncUsers]') AND type in (N'U')) +BEGIN +CREATE TABLE [dbo].[LyncUsers]( + [LyncUserID] [int] IDENTITY(1,1) NOT NULL, + [AccountID] [int] NOT NULL, + [LyncUserPlanID] [int] NOT NULL, + [CreatedDate] [datetime] NOT NULL, + [ModifiedDate] [datetime] NOT NULL, + CONSTRAINT [PK_LyncUsers] PRIMARY KEY CLUSTERED +( + [LyncUserID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + + +ALTER TABLE [dbo].[LyncUsers] ADD CONSTRAINT [DF_LyncUsers_CreatedDate] DEFAULT (getdate()) FOR [CreatedDate] + +ALTER TABLE [dbo].[LyncUsers] ADD CONSTRAINT [DF_LyncUsers_ChangedDate] DEFAULT (getdate()) FOR [ModifiedDate] + +END +GO + + + + + +-- LyncUserPlans +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[LyncUserPlans]') AND type in (N'U')) +BEGIN +CREATE TABLE [dbo].[LyncUserPlans]( + [LyncUserPlanId] [int] IDENTITY(1,1) NOT NULL, + [ItemID] [int] NOT NULL, + [LyncUserPlanName] [nvarchar](300) NOT NULL, + [IM] [bit] NOT NULL, + [Mobility] [bit] NOT NULL, + [MobilityEnableOutsideVoice] [bit] NOT NULL, + [Federation] [bit] NOT NULL, + [Conferencing] [bit] NOT NULL, + [EnterpriseVoice] [bit] NOT NULL, + [VoicePolicy] [int] NOT NULL, + [IsDefault] [bit] NOT NULL, + CONSTRAINT [PK_LyncUserPlans] PRIMARY KEY CLUSTERED +( + [LyncUserPlanId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +ALTER TABLE dbo.LyncUserPlans ADD CONSTRAINT + IX_LyncUserPlans UNIQUE NONCLUSTERED + ( + LyncUserPlanId + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +ALTER TABLE dbo.LyncUserPlans ADD CONSTRAINT + FK_LyncUserPlans_ExchangeOrganizations FOREIGN KEY + ( + ItemID + ) REFERENCES dbo.ExchangeOrganizations + ( + ItemID + ) ON UPDATE NO ACTION + ON DELETE CASCADE + +ALTER TABLE [dbo].[LyncUsers] WITH CHECK ADD CONSTRAINT [FK_LyncUsers_LyncUserPlans] FOREIGN KEY([LyncUserPlanId]) +REFERENCES [dbo].[LyncUserPlans] ([LyncUserPlanId]) + +ALTER TABLE [dbo].[LyncUsers] CHECK CONSTRAINT [FK_LyncUsers_LyncUserPlans] + +END +GO + + + + +/****** Object: Table [dbo].[AddExchangeAccount] ******/ +ALTER PROCEDURE [dbo].[AddExchangeAccount] +( + @AccountID int OUTPUT, + @ItemID int, + @AccountType int, + @AccountName nvarchar(300), + @DisplayName nvarchar(300), + @PrimaryEmailAddress nvarchar(300), + @MailEnabledPublicFolder bit, + @MailboxManagerActions varchar(200), + @SamAccountName nvarchar(100), + @AccountPassword nvarchar(200), + @MailboxPlanId int, + @SubscriberNumber nvarchar(32) +) +AS + +INSERT INTO ExchangeAccounts +( + ItemID, + AccountType, + AccountName, + DisplayName, + PrimaryEmailAddress, + MailEnabledPublicFolder, + MailboxManagerActions, + SamAccountName, + AccountPassword, + MailboxPlanId, + SubscriberNumber +) +VALUES +( + @ItemID, + @AccountType, + @AccountName, + @DisplayName, + @PrimaryEmailAddress, + @MailEnabledPublicFolder, + @MailboxManagerActions, + @SamAccountName, + @AccountPassword, + @MailboxPlanId, + @SubscriberNumber +) + +SET @AccountID = SCOPE_IDENTITY() + +RETURN +GO + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'AddExchangeMailboxPlan') +BEGIN +EXEC sp_executesql N' +CREATE PROCEDURE [dbo].[AddExchangeMailboxPlan] +( + @MailboxPlanId int OUTPUT, + @ItemID int, + @MailboxPlan nvarchar(300), + @EnableActiveSync bit, + @EnableIMAP bit, + @EnableMAPI bit, + @EnableOWA bit, + @EnablePOP bit, + @IsDefault bit, + @IssueWarningPct int, + @KeepDeletedItemsDays int, + @MailboxSizeMB int, + @MaxReceiveMessageSizeKB int, + @MaxRecipients int, + @MaxSendMessageSizeKB int, + @ProhibitSendPct int, + @ProhibitSendReceivePct int , + @HideFromAddressBook bit +) +AS + +IF ((SELECT Count(*) FROM ExchangeMailboxPlans WHERE ItemId = @ItemID) = 0) +BEGIN + SET @IsDefault = 1 +END +ELSE +BEGIN + IF @IsDefault = 1 + BEGIN + UPDATE ExchangeMailboxPlans SET IsDefault = 0 WHERE ItemID = @ItemID + END +END + + +INSERT INTO ExchangeMailboxPlans +( + ItemID, + MailboxPlan, + EnableActiveSync, + EnableIMAP, + EnableMAPI, + EnableOWA, + EnablePOP, + IsDefault, + IssueWarningPct, + KeepDeletedItemsDays, + MailboxSizeMB, + MaxReceiveMessageSizeKB, + MaxRecipients, + MaxSendMessageSizeKB, + ProhibitSendPct, + ProhibitSendReceivePct, + HideFromAddressBook +) +VALUES +( + @ItemID, + @MailboxPlan, + @EnableActiveSync, + @EnableIMAP, + @EnableMAPI, + @EnableOWA, + @EnablePOP, + @IsDefault, + @IssueWarningPct, + @KeepDeletedItemsDays, + @MailboxSizeMB, + @MaxReceiveMessageSizeKB, + @MaxRecipients, + @MaxSendMessageSizeKB, + @ProhibitSendPct, + @ProhibitSendReceivePct, + @HideFromAddressBook +) + +SET @MailboxPlanId = SCOPE_IDENTITY() + +RETURN' +END +GO + + + + + + +ALTER PROCEDURE [dbo].[AddExchangeMailboxPlan] +( + @MailboxPlanId int OUTPUT, + @ItemID int, + @MailboxPlan nvarchar(300), + @EnableActiveSync bit, + @EnableIMAP bit, + @EnableMAPI bit, + @EnableOWA bit, + @EnablePOP bit, + @IsDefault bit, + @IssueWarningPct int, + @KeepDeletedItemsDays int, + @MailboxSizeMB int, + @MaxReceiveMessageSizeKB int, + @MaxRecipients int, + @MaxSendMessageSizeKB int, + @ProhibitSendPct int, + @ProhibitSendReceivePct int , + @HideFromAddressBook bit +) +AS + +IF ((SELECT Count(*) FROM ExchangeMailboxPlans WHERE ItemId = @ItemID) = 0) +BEGIN + SET @IsDefault = 1 +END +ELSE +BEGIN + IF @IsDefault = 1 + BEGIN + UPDATE ExchangeMailboxPlans SET IsDefault = 0 WHERE ItemID = @ItemID + END +END + +INSERT INTO ExchangeMailboxPlans +( + ItemID, + MailboxPlan, + EnableActiveSync, + EnableIMAP, + EnableMAPI, + EnableOWA, + EnablePOP, + IsDefault, + IssueWarningPct, + KeepDeletedItemsDays, + MailboxSizeMB, + MaxReceiveMessageSizeKB, + MaxRecipients, + MaxSendMessageSizeKB, + ProhibitSendPct, + ProhibitSendReceivePct, + HideFromAddressBook +) +VALUES +( + @ItemID, + @MailboxPlan, + @EnableActiveSync, + @EnableIMAP, + @EnableMAPI, + @EnableOWA, + @EnablePOP, + @IsDefault, + @IssueWarningPct, + @KeepDeletedItemsDays, + @MailboxSizeMB, + @MaxReceiveMessageSizeKB, + @MaxRecipients, + @MaxSendMessageSizeKB, + @ProhibitSendPct, + @ProhibitSendReceivePct, + @HideFromAddressBook +) + +SET @MailboxPlanId = SCOPE_IDENTITY() + +RETURN + +GO + + + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[AddExchangeOrganization] +( + @ItemID int, + @OrganizationID nvarchar(128) +) +AS + +IF NOT EXISTS(SELECT * FROM ExchangeOrganizations WHERE OrganizationID = @OrganizationID) +BEGIN + INSERT INTO ExchangeOrganizations + (ItemID, OrganizationID) + VALUES + (@ItemID, @OrganizationID) +END + +RETURN +GO + + + + + + + + + + + + +ALTER FUNCTION [dbo].[CalculateQuotaUsage] +( + @PackageID int, + @QuotaID int +) +RETURNS int +AS + BEGIN + + DECLARE @QuotaTypeID int + SELECT @QuotaTypeID = QuotaTypeID FROM Quotas + WHERE QuotaID = @QuotaID + + IF @QuotaTypeID <> 2 + RETURN 0 + + DECLARE @Result int + + IF @QuotaID = 52 -- diskspace + SET @Result = dbo.CalculatePackageDiskspace(@PackageID) + ELSE IF @QuotaID = 51 -- bandwidth + SET @Result = dbo.CalculatePackageBandwidth(@PackageID) + ELSE IF @QuotaID = 53 -- domains + SET @Result = (SELECT COUNT(D.DomainID) FROM PackagesTreeCache AS PT + INNER JOIN Domains AS D ON D.PackageID = PT.PackageID + WHERE IsSubDomain = 0 AND IsInstantAlias = 0 AND IsDomainPointer = 0 AND PT.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 54 -- sub-domains + SET @Result = (SELECT COUNT(D.DomainID) FROM PackagesTreeCache AS PT + INNER JOIN Domains AS D ON D.PackageID = PT.PackageID + WHERE IsSubDomain = 1 AND IsInstantAlias = 0 AND PT.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 220 -- domain pointers + SET @Result = (SELECT COUNT(D.DomainID) FROM PackagesTreeCache AS PT + INNER JOIN Domains AS D ON D.PackageID = PT.PackageID + WHERE IsDomainPointer = 1 AND PT.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 71 -- scheduled tasks + SET @Result = (SELECT COUNT(S.ScheduleID) FROM PackagesTreeCache AS PT + INNER JOIN Schedule AS S ON S.PackageID = PT.PackageID + WHERE PT.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 305 -- RAM of VPS + SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP + INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID + INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID + WHERE SIP.PropertyName = 'RamSize' AND PT.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 306 -- HDD of VPS + SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP + INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID + INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID + WHERE SIP.PropertyName = 'HddSize' AND PT.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 309 -- External IP addresses of VPS + SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP + INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID + INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID + WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 3) + ELSE IF @QuotaID = 100 -- Dedicated Web IP addresses + SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP + INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID + INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID + WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 2) + ELSE IF @QuotaID = 350 -- RAM of VPSforPc + SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP + INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID + INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID + WHERE SIP.PropertyName = 'Memory' AND PT.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 351 -- HDD of VPSforPc + SET @Result = (SELECT SUM(CAST(SIP.PropertyValue AS int)) FROM ServiceItemProperties AS SIP + INNER JOIN ServiceItems AS SI ON SIP.ItemID = SI.ItemID + INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID + WHERE SIP.PropertyName = 'HddSize' AND PT.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 354 -- External IP addresses of VPSforPc + SET @Result = (SELECT COUNT(PIP.PackageAddressID) FROM PackageIPAddresses AS PIP + INNER JOIN IPAddresses AS IP ON PIP.AddressID = IP.AddressID + INNER JOIN PackagesTreeCache AS PT ON PIP.PackageID = PT.PackageID + WHERE PT.ParentPackageID = @PackageID AND IP.PoolID = 3) + ELSE IF @QuotaID = 319 -- BB Users + SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts ea + INNER JOIN BlackBerryUsers bu ON ea.AccountID = bu.AccountID + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE pt.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 206 -- HostedSolution.Users + SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE pt.ParentPackageID = @PackageID AND ea.AccountType IN (1,5,6,7)) + ELSE IF @QuotaID = 78 -- Exchange2007.Mailboxes + SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE pt.ParentPackageID = @PackageID AND ea.MailboxPlanId IS NOT NULL) + ELSE IF @QuotaID = 77 -- Exchange2007.DiskSpace + SET @Result = (SELECT SUM(B.MailboxSizeMB) FROM ExchangeAccounts AS ea + INNER JOIN ExchangeMailboxPlans AS B ON ea.MailboxPlanId = B.MailboxPlanId + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE pt.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 370 -- Lync.Users + SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea + INNER JOIN LyncUsers lu ON ea.AccountID = lu.AccountID + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE pt.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 376 -- Lync.EVUsers + SET @Result = (SELECT COUNT(ea.AccountID) FROM ExchangeAccounts AS ea + INNER JOIN LyncUsers lu ON ea.AccountID = lu.AccountID + INNER JOIN LyncUserPlans lp ON lu.LyncUserPlanId = lp.LyncUserPlanId + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE pt.ParentPackageID = @PackageID AND lp.EnterpriseVoice = 1) + ELSE + SET @Result = (SELECT COUNT(SI.ItemID) FROM Quotas AS Q + INNER JOIN ServiceItems AS SI ON SI.ItemTypeID = Q.ItemTypeID + INNER JOIN PackagesTreeCache AS PT ON SI.PackageID = PT.PackageID AND PT.ParentPackageID = @PackageID + WHERE Q.QuotaID = @QuotaID) + + RETURN @Result + END + +GO + + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'DeleteExchangeMailboxPlan') +BEGIN +EXEC sp_executesql N' +CREATE PROCEDURE [dbo].[DeleteExchangeMailboxPlan] +( + @MailboxPlanId int +) +AS + +-- delete mailboxplan +DELETE FROM ExchangeMailboxPlans +WHERE MailboxPlanId = @MailboxPlanId + +RETURN' +END +GO + + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[DeleteExchangeOrganization] +( + @ItemID int +) +AS +BEGIN TRAN + DELETE FROM ExchangeMailboxPlans WHERE ItemID = @ItemID + DELETE FROM ExchangeOrganizations WHERE ItemID = @ItemID +COMMIT TRAN +RETURN +GO + + + + + + + + + + + +ALTER PROCEDURE [dbo].[ExchangeAccountExists] +( + @AccountName nvarchar(20), + @Exists bit OUTPUT +) +AS +SET @Exists = 0 +IF EXISTS(SELECT * FROM ExchangeAccounts WHERE sAMAccountName LIKE '%\'+@AccountName) +BEGIN + SET @Exists = 1 +END + +RETURN + +GO + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetExchangeAccounts] +( + @ItemID int, + @AccountType int +) +AS +SELECT + E.AccountID, + E.ItemID, + E.AccountType, + E.AccountName, + E.DisplayName, + E.PrimaryEmailAddress, + E.MailEnabledPublicFolder, + E.MailboxPlanId, + P.MailboxPlan, + E.SubscriberNumber +FROM + ExchangeAccounts AS E +LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId +WHERE + E.ItemID = @ItemID AND + (E.AccountType = @AccountType OR @AccountType IS NULL) +ORDER BY DisplayName +RETURN + +GO + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetExchangeAccountsPaged] +( + @ActorID int, + @ItemID int, + @AccountTypes nvarchar(30), + @FilterColumn nvarchar(50) = '', + @FilterValue nvarchar(50) = '', + @SortColumn nvarchar(50), + @StartRow int, + @MaximumRows int +) +AS + +DECLARE @PackageID int +SELECT @PackageID = PackageID FROM ServiceItems +WHERE ItemID = @ItemID + +-- check rights +IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +-- start +DECLARE @condition nvarchar(700) +SET @condition = ' +EA.AccountType IN (' + @AccountTypes + ') +AND EA.ItemID = @ItemID +' + +IF @FilterColumn <> '' AND @FilterColumn IS NOT NULL +AND @FilterValue <> '' AND @FilterValue IS NOT NULL +BEGIN + IF @FilterColumn = 'PrimaryEmailAddress' AND @AccountTypes <> '2' + BEGIN + SET @condition = @condition + ' AND EA.AccountID IN (SELECT EAEA.AccountID FROM ExchangeAccountEmailAddresses EAEA WHERE EAEA.EmailAddress LIKE ''' + @FilterValue + ''')' + END + ELSE + BEGIN + SET @condition = @condition + ' AND ' + @FilterColumn + ' LIKE ''' + @FilterValue + '''' + END +END + +IF @SortColumn IS NULL OR @SortColumn = '' +SET @SortColumn = 'EA.DisplayName ASC' + +DECLARE @joincondition nvarchar(700) + SET @joincondition = ',P.MailboxPlan FROM ExchangeAccounts AS EA + LEFT OUTER JOIN ExchangeMailboxPlans AS P ON EA.MailboxPlanId = P.MailboxPlanId' + +DECLARE @sql nvarchar(3500) + +set @sql = ' +SELECT COUNT(EA.AccountID) FROM ExchangeAccounts AS EA +WHERE ' + @condition + '; + +WITH Accounts AS ( + SELECT ROW_NUMBER() OVER (ORDER BY ' + @SortColumn + ') as Row, + EA.AccountID, + EA.ItemID, + EA.AccountType, + EA.AccountName, + EA.DisplayName, + EA.PrimaryEmailAddress, + EA.MailEnabledPublicFolder, + EA.MailboxPlanId, + EA.SubscriberNumber ' + @joincondition + + ' WHERE ' + @condition + ' +) + +SELECT * FROM Accounts +WHERE Row BETWEEN @StartRow + 1 and @StartRow + @MaximumRows +' + +print @sql + +exec sp_executesql @sql, N'@ItemID int, @StartRow int, @MaximumRows int', +@ItemID, @StartRow, @MaximumRows + +RETURN + + + + +GO + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetExchangeAccountByAccountName') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetExchangeAccountByAccountName] +( + @ItemID int, + @AccountName nvarchar(300) +) +AS +SELECT + E.AccountID, + E.ItemID, + E.AccountType, + E.AccountName, + E.DisplayName, + E.PrimaryEmailAddress, + E.MailEnabledPublicFolder, + E.MailboxManagerActions, + E.SamAccountName, + E.AccountPassword, + E.MailboxPlanId, + P.MailboxPlan, + E.SubscriberNumber +FROM + ExchangeAccounts AS E +LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId +WHERE + E.ItemID = @ItemID AND + E.AccountName = @AccountName +RETURN' +END +GO + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetExchangeAccountByMailboxPlanId') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetExchangeAccountByMailboxPlanId] +( + @ItemID int, + @MailboxPlanId int +) +AS + +IF (@MailboxPlanId < 0) +BEGIN +SELECT + E.AccountID, + E.ItemID, + E.AccountType, + E.AccountName, + E.DisplayName, + E.PrimaryEmailAddress, + E.MailEnabledPublicFolder, + E.MailboxManagerActions, + E.SamAccountName, + E.AccountPassword, + E.MailboxPlanId, + P.MailboxPlan, + E.SubscriberNumber +FROM + ExchangeAccounts AS E +LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId +WHERE + E.ItemID = @ItemID AND + E.MailboxPlanId IS NULL AND + E.AccountType IN (1,5) +RETURN + +END +ELSE +BEGIN +SELECT + E.AccountID, + E.ItemID, + E.AccountType, + E.AccountName, + E.DisplayName, + E.PrimaryEmailAddress, + E.MailEnabledPublicFolder, + E.MailboxManagerActions, + E.SamAccountName, + E.AccountPassword, + E.MailboxPlanId, + P.MailboxPlan, + E.SubscriberNumber +FROM + ExchangeAccounts AS E +LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId +WHERE + E.ItemID = @ItemID AND + E.MailboxPlanId = @MailboxPlanId AND + E.AccountType IN (1,5) +RETURN +END' +END +GO + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetExchangeMailboxPlan') +BEGIN +EXEC sp_executesql N' CREATE PROCEDURE [dbo].[GetExchangeMailboxPlan] +( + @MailboxPlanId int +) +AS +SELECT + MailboxPlanId, + ItemID, + MailboxPlan, + EnableActiveSync, + EnableIMAP, + EnableMAPI, + EnableOWA, + EnablePOP, + IsDefault, + IssueWarningPct, + KeepDeletedItemsDays, + MailboxSizeMB, + MaxReceiveMessageSizeKB, + MaxRecipients, + MaxSendMessageSizeKB, + ProhibitSendPct, + ProhibitSendReceivePct, + HideFromAddressBook +FROM + ExchangeMailboxPlans +WHERE + MailboxPlanId = @MailboxPlanId +RETURN' +END +GO + + + + + + + + + + + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetExchangeMailboxPlans') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetExchangeMailboxPlans] +( + @ItemID int +) +AS +SELECT + MailboxPlanId, + ItemID, + MailboxPlan, + EnableActiveSync, + EnableIMAP, + EnableMAPI, + EnableOWA, + EnablePOP, + IsDefault, + IssueWarningPct, + KeepDeletedItemsDays, + MailboxSizeMB, + MaxReceiveMessageSizeKB, + MaxRecipients, + MaxSendMessageSizeKB, + ProhibitSendPct, + ProhibitSendReceivePct, + HideFromAddressBook +FROM + ExchangeMailboxPlans +WHERE + ItemID = @ItemID +ORDER BY MailboxPlan +RETURN' +END +GO + + + + + + + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetExchangeOrganizationStatistics] +( + @ItemID int +) +AS +SELECT + (SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1 OR AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedMailboxes, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists, + (SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders, + (SELECT COUNT(*) FROM ExchangeOrganizationDomains WHERE ItemID = @ItemID) AS CreatedDomains, + (SELECT SUM(B.MailboxSizeMB) FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID) AS UsedDiskSpace + +RETURN +GO + + + + + + + + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetPackages] +( + @ActorID int, + @UserID int +) +AS + +IF dbo.CheckActorUserRights(@ActorID, @UserID) = 0 +RAISERROR('You are not allowed to access this account', 16, 1) + +SELECT + P.PackageID, + P.ParentPackageID, + P.PackageName, + P.StatusID, + P.PurchaseDate, + + -- server + ISNULL(P.ServerID, 0) AS ServerID, + ISNULL(S.ServerName, 'None') AS ServerName, + ISNULL(S.Comments, '') AS ServerComments, + ISNULL(S.VirtualServer, 1) AS VirtualServer, + + -- hosting plan + P.PlanID, + HP.PlanName, + + -- user + P.UserID, + U.Username, + U.FirstName, + U.LastName, + U.RoleID, + U.Email +FROM Packages AS P +INNER JOIN Users AS U ON P.UserID = U.UserID +INNER JOIN Servers AS S ON P.ServerID = S.ServerID +INNER JOIN HostingPlans AS HP ON P.PlanID = HP.PlanID +WHERE + P.UserID = @UserID +RETURN + +GO + + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'SetExchangeAccountMailboxplan') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[SetExchangeAccountMailboxplan] +( + @AccountID int, + @MailboxPlanId int +) +AS + +UPDATE ExchangeAccounts SET + MailboxPlanId = @MailboxPlanId +WHERE + AccountID = @AccountID + +RETURN' +END +GO + + + + + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'SetOrganizationDefaultExchangeMailboxPlan') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[SetOrganizationDefaultExchangeMailboxPlan] +( + @ItemId int, + @MailboxPlanId int +) +AS + +UPDATE ExchangeMailboxPlans SET IsDefault=0 WHERE ItemId=@ItemId +UPDATE ExchangeMailboxPlans SET IsDefault=1 WHERE MailboxPlanId=@MailboxPlanId + +RETURN' +END +GO + + + + + + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[UpdateExchangeAccount] +( + @AccountID int, + @AccountName nvarchar(300), + @DisplayName nvarchar(300), + @PrimaryEmailAddress nvarchar(300), + @AccountType int, + @SamAccountName nvarchar(100), + @MailEnabledPublicFolder bit, + @MailboxManagerActions varchar(200), + @Password varchar(200), + @MailboxPlanId int, + @SubscriberNumber varchar(32) +) +AS + +BEGIN TRAN + +IF (@MailboxPlanId = -1) +BEGIN + SET @MailboxPlanId = NULL +END + +UPDATE ExchangeAccounts SET + AccountName = @AccountName, + DisplayName = @DisplayName, + PrimaryEmailAddress = @PrimaryEmailAddress, + MailEnabledPublicFolder = @MailEnabledPublicFolder, + MailboxManagerActions = @MailboxManagerActions, + AccountType =@AccountType, + SamAccountName = @SamAccountName, + MailboxPlanId = @MailboxPlanId, + SubscriberNumber = @SubscriberNumber + +WHERE + AccountID = @AccountID + +IF (@@ERROR <> 0 ) + BEGIN + ROLLBACK TRANSACTION + RETURN -1 + END + +UPDATE ExchangeAccounts SET + AccountPassword = @Password WHERE AccountID = @AccountID AND @Password IS NOT NULL + +IF (@@ERROR <> 0 ) + BEGIN + ROLLBACK TRANSACTION + RETURN -1 + END +COMMIT TRAN +RETURN +GO + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetExchangeAccount] +( + @ItemID int, + @AccountID int +) +AS +SELECT + E.AccountID, + E.ItemID, + E.AccountType, + E.AccountName, + E.DisplayName, + E.PrimaryEmailAddress, + E.MailEnabledPublicFolder, + E.MailboxManagerActions, + E.SamAccountName, + E.AccountPassword, + E.MailboxPlanId, + P.MailboxPlan, + E.SubscriberNumber +FROM + ExchangeAccounts AS E +LEFT OUTER JOIN ExchangeMailboxPlans AS P ON E.MailboxPlanId = P.MailboxPlanId +WHERE + E.ItemID = @ItemID AND + E.AccountID = @AccountID +RETURN +GO + + + + + + + + + +ALTER PROCEDURE [dbo].[GetExchangeMailboxes] + @ItemID int +AS +BEGIN +SELECT + AccountID, + ItemID, + AccountType, + AccountName, + DisplayName, + PrimaryEmailAddress, + MailEnabledPublicFolder, + SubscriberNumber +FROM + ExchangeAccounts +WHERE + ItemID = @ItemID AND + (AccountType =1 OR AccountType=5 OR AccountType=6) +ORDER BY 1 + +END + +GO + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[SearchExchangeAccount] +( + @ActorID int, + @AccountType int, + @PrimaryEmailAddress nvarchar(300) +) +AS + +DECLARE @PackageID int +DECLARE @ItemID int +DECLARE @AccountID int + +SELECT + @AccountID = AccountID, + @ItemID = ItemID +FROM ExchangeAccounts +WHERE PrimaryEmailAddress = @PrimaryEmailAddress +AND AccountType = @AccountType + + +-- check space rights +SELECT @PackageID = PackageID FROM ServiceItems +WHERE ItemID = @ItemID + +IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +SELECT + AccountID, + ItemID, + @PackageID AS PackageID, + AccountType, + AccountName, + DisplayName, + PrimaryEmailAddress, + MailEnabledPublicFolder, + MailboxManagerActions, + SamAccountName, + AccountPassword, + SubscriberNumber +FROM ExchangeAccounts +WHERE AccountID = @AccountID + +RETURN + +GO + + + + + + + + + + + +ALTER PROCEDURE [dbo].[SearchExchangeAccounts] +( + @ActorID int, + @ItemID int, + @IncludeMailboxes bit, + @IncludeContacts bit, + @IncludeDistributionLists bit, + @IncludeRooms bit, + @IncludeEquipment bit, + @FilterColumn nvarchar(50) = '', + @FilterValue nvarchar(50) = '', + @SortColumn nvarchar(50) +) +AS +DECLARE @PackageID int +SELECT @PackageID = PackageID FROM ServiceItems +WHERE ItemID = @ItemID + +-- check rights +IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +-- start +DECLARE @condition nvarchar(700) +SET @condition = ' +((@IncludeMailboxes = 1 AND EA.AccountType = 1) +OR (@IncludeContacts = 1 AND EA.AccountType = 2) +OR (@IncludeDistributionLists = 1 AND EA.AccountType = 3) +OR (@IncludeRooms = 1 AND EA.AccountType = 5) +OR (@IncludeEquipment = 1 AND EA.AccountType = 6)) +AND EA.ItemID = @ItemID +' + +IF @FilterColumn <> '' AND @FilterColumn IS NOT NULL +AND @FilterValue <> '' AND @FilterValue IS NOT NULL +SET @condition = @condition + ' AND ' + @FilterColumn + ' LIKE ''' + @FilterValue + '''' + +IF @SortColumn IS NULL OR @SortColumn = '' +SET @SortColumn = 'EA.DisplayName ASC' + +DECLARE @sql nvarchar(3500) + +set @sql = ' +SELECT + EA.AccountID, + EA.ItemID, + EA.AccountType, + EA.AccountName, + EA.DisplayName, + EA.PrimaryEmailAddress, + EA.MailEnabledPublicFolder, + EA.SubscriberNumber +FROM ExchangeAccounts AS EA +WHERE ' + @condition + +print @sql + +exec sp_executesql @sql, N'@ItemID int, @IncludeMailboxes int, @IncludeContacts int, + @IncludeDistributionLists int, @IncludeRooms bit, @IncludeEquipment bit', +@ItemID, @IncludeMailboxes, @IncludeContacts, @IncludeDistributionLists, @IncludeRooms, @IncludeEquipment + +RETURN + +GO + + + + + + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[SearchOrganizationAccounts] +( + @ActorID int, + @ItemID int, + @FilterColumn nvarchar(50) = '', + @FilterValue nvarchar(50) = '', + @SortColumn nvarchar(50), + @IncludeMailboxes bit +) +AS +DECLARE @PackageID int +SELECT @PackageID = PackageID FROM ServiceItems +WHERE ItemID = @ItemID + +-- check rights +IF dbo.CheckActorPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +-- start +DECLARE @condition nvarchar(700) +SET @condition = ' +(EA.AccountType = 7 OR (EA.AccountType = 1 AND @IncludeMailboxes = 1) ) +AND EA.ItemID = @ItemID +' + +IF @FilterColumn <> '' AND @FilterColumn IS NOT NULL +AND @FilterValue <> '' AND @FilterValue IS NOT NULL +SET @condition = @condition + ' AND ' + @FilterColumn + ' LIKE ''' + @FilterValue + '''' + +IF @SortColumn IS NULL OR @SortColumn = '' +SET @SortColumn = 'EA.DisplayName ASC' + +DECLARE @sql nvarchar(3500) + +set @sql = ' +SELECT + EA.AccountID, + EA.ItemID, + EA.AccountType, + EA.AccountName, + EA.DisplayName, + EA.PrimaryEmailAddress, + EA.SubscriberNumber +FROM ExchangeAccounts AS EA +WHERE ' + @condition + +print @sql + +exec sp_executesql @sql, N'@ItemID int, @IncludeMailboxes bit', +@ItemID, @IncludeMailboxes + +RETURN + +GO + + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'AddLyncUser') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[AddLyncUser] + @AccountID int, + @LyncUserPlanID int +AS +INSERT INTO + dbo.LyncUsers + (AccountID, + LyncUserPlanID, + CreatedDate, + ModifiedDate) +VALUES +( + @AccountID, + @LyncUserPlanID, + getdate(), + getdate() +)' +END +GO + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUsersByPlanId') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetLyncUsersByPlanId] +( + @ItemID int, + @PlanId int +) +AS + + SELECT + ea.AccountID, + ea.ItemID, + ea.AccountName, + ea.DisplayName, + ea.PrimaryEmailAddress, + ea.SamAccountName, + ou.LyncUserPlanId, + lp.LyncUserPlanName + FROM + ExchangeAccounts ea + INNER JOIN + LyncUsers ou + INNER JOIN + LyncUserPlans lp + ON + ou.LyncUserPlanId = lp.LyncUserPlanId + ON + ea.AccountID = ou.AccountID + WHERE + ea.ItemID = @ItemID AND + ou.LyncUserPlanId = @PlanId' +END +GO + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'AddLyncUserPlan') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[AddLyncUserPlan] +( + @LyncUserPlanId int OUTPUT, + @ItemID int, + @LyncUserPlanName nvarchar(300), + @IM bit, + @Mobility bit, + @MobilityEnableOutsideVoice bit, + @Federation bit, + @Conferencing bit, + @EnterpriseVoice bit, + @VoicePolicy int, + @IsDefault bit +) +AS + +IF ((SELECT Count(*) FROM LyncUserPlans WHERE ItemId = @ItemID) = 0) +BEGIN + SET @IsDefault = 1 +END +ELSE +BEGIN + IF @IsDefault = 1 + BEGIN + UPDATE LyncUserPlans SET IsDefault = 0 WHERE ItemID = @ItemID + END +END + + +INSERT INTO LyncUserPlans +( + ItemID, + LyncUserPlanName, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault +) +VALUES +( + @ItemID, + @LyncUserPlanName, + @IM, + @Mobility, + @MobilityEnableOutsideVoice, + @Federation, + @Conferencing, + @EnterpriseVoice, + @VoicePolicy, + @IsDefault +) + +SET @LyncUserPlanId = SCOPE_IDENTITY() + +RETURN' +END +GO + + + +ALTER PROCEDURE [dbo].[AddLyncUserPlan] +( + @LyncUserPlanId int OUTPUT, + @ItemID int, + @LyncUserPlanName nvarchar(300), + @IM bit, + @Mobility bit, + @MobilityEnableOutsideVoice bit, + @Federation bit, + @Conferencing bit, + @EnterpriseVoice bit, + @VoicePolicy int, + @IsDefault bit +) +AS + +IF ((SELECT Count(*) FROM LyncUserPlans WHERE ItemId = @ItemID) = 0) +BEGIN + SET @IsDefault = 1 +END +ELSE +BEGIN + IF @IsDefault = 1 + BEGIN + UPDATE LyncUserPlans SET IsDefault = 0 WHERE ItemID = @ItemID + END +END + + + +INSERT INTO LyncUserPlans +( + ItemID, + LyncUserPlanName, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault +) +VALUES +( + @ItemID, + @LyncUserPlanName, + @IM, + @Mobility, + @MobilityEnableOutsideVoice, + @Federation, + @Conferencing, + @EnterpriseVoice, + @VoicePolicy, + @IsDefault +) + +SET @LyncUserPlanId = SCOPE_IDENTITY() + +RETURN +GO + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'CheckLyncUserExists') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[CheckLyncUserExists] + @AccountID int +AS + SELECT + COUNT(AccountID) + FROM + dbo.LyncUsers + WHERE AccountID = @AccountID' +END +GO + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'CheckLyncUserExists') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[CheckLyncUserExists] + @AccountID int +AS +BEGIN + SELECT + COUNT(AccountID) + FROM + dbo.LyncUsers + WHERE AccountID = @AccountID' +END +GO + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'DeleteLyncUser') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[DeleteLyncUser] +( + @AccountId int +) +AS + +DELETE FROM + LyncUsers +WHERE + AccountId = @AccountId + +RETURN' +END +GO + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'DeleteLyncUserPlan') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[DeleteLyncUserPlan] +( + @LyncUserPlanId int +) +AS + +-- delete lyncuserplan +DELETE FROM LyncUserPlans +WHERE LyncUserPlanId = @LyncUserPlanId + +RETURN' +END +GO + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUserPlan') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetLyncUserPlan] +( + @LyncUserPlanId int +) +AS +SELECT + LyncUserPlanId, + ItemID, + LyncUserPlanName, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault +FROM + LyncUserPlans +WHERE + LyncUserPlanId = @LyncUserPlanId +RETURN' +END +GO + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUserPlanByAccountId') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetLyncUserPlanByAccountId] +( + @AccountID int +) +AS +SELECT + LyncUserPlanId, + ItemID, + LyncUserPlanName, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault +FROM + LyncUserPlans +WHERE + LyncUserPlanId IN (SELECT LyncUserPlanId FROM LyncUsers WHERE AccountID = @AccountID) +RETURN' +END +GO + + + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUserPlans') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetLyncUserPlans] +( + @ItemID int +) +AS +SELECT + LyncUserPlanId, + ItemID, + LyncUserPlanName, + IM, + Mobility, + MobilityEnableOutsideVoice, + Federation, + Conferencing, + EnterpriseVoice, + VoicePolicy, + IsDefault +FROM + LyncUserPlans +WHERE + ItemID = @ItemID +ORDER BY LyncUserPlanName +RETURN' +END +GO + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUsers') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetLyncUsers] +( + @ItemID int, + @SortColumn nvarchar(40), + @SortDirection nvarchar(20), + @StartRow int, + @Count int +) +AS + +CREATE TABLE #TempLyncUsers +( + [ID] [int] IDENTITY(1,1) NOT NULL, + [AccountID] [int], + [ItemID] [int] NOT NULL, + [AccountName] [nvarchar](300) NOT NULL, + [DisplayName] [nvarchar](300) NOT NULL, + [PrimaryEmailAddress] [nvarchar](300) NULL, + [SamAccountName] [nvarchar](100) NULL, + [LyncUserPlanId] [int] NOT NULL, + [LyncUserPlanName] [nvarchar] (300) NOT NULL, +) + + +DECLARE @condition nvarchar(700) +SET @condition = '''' + +IF (@SortColumn = ''DisplayName'') +BEGIN + SET @condition = ''ORDER BY ea.DisplayName'' +END + +IF (@SortColumn = ''PrimaryEmailAddress'') +BEGIN + SET @condition = ''ORDER BY ea.PrimaryEmailAddress'' +END + +IF (@SortColumn = ''LyncUserPlanName'') +BEGIN + SET @condition = ''ORDER BY lp.LyncUserPlanName'' +END + +DECLARE @sql nvarchar(3500) + +set @sql = '' + INSERT INTO + #TempLyncUsers + SELECT + ea.AccountID, + ea.ItemID, + ea.AccountName, + ea.DisplayName, + ea.PrimaryEmailAddress, + ea.SamAccountName, + ou.LyncUserPlanId, + lp.LyncUserPlanName + FROM + ExchangeAccounts ea + INNER JOIN + LyncUsers ou + INNER JOIN + LyncUserPlans lp + ON + ou.LyncUserPlanId = lp.LyncUserPlanId + ON + ea.AccountID = ou.AccountID + WHERE + ea.ItemID = @ItemID '' + @condition + +exec sp_executesql @sql, N''@ItemID int'',@ItemID + +DECLARE @RetCount int +SELECT @RetCount = COUNT(ID) FROM #TempLyncUsers + +IF (@SortDirection = ''ASC'') +BEGIN + SELECT * FROM #TempLyncUsers + WHERE ID > @StartRow AND ID <= (@StartRow + @Count) +END +ELSE +BEGIN + IF @SortColumn <> '''' AND @SortColumn IS NOT NULL + BEGIN + IF (@SortColumn = ''DisplayName'') + BEGIN + SELECT * FROM #TempLyncUsers + WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY DisplayName DESC + END + IF (@SortColumn = ''PrimaryEmailAddress'') + BEGIN + SELECT * FROM #TempLyncUsers + WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY PrimaryEmailAddress DESC + END + IF (@SortColumn = ''LyncUserPlanName'') + BEGIN + SELECT * FROM #TempLyncUsers + WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY LyncUserPlanName DESC + END + END + ELSE + BEGIN + SELECT * FROM #TempLyncUsers + WHERE ID >@RetCount - @Count - @StartRow AND ID <= @RetCount- @StartRow ORDER BY PrimaryEmailAddress DESC + END + + +END + +DROP TABLE #TempLyncUsers' +END +GO + + + + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetLyncUsersCount') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetLyncUsersCount] +( + @ItemID int +) +AS + +SELECT + COUNT(ea.AccountID) +FROM + ExchangeAccounts ea +INNER JOIN + LyncUsers ou +ON + ea.AccountID = ou.AccountID +WHERE + ea.ItemID = @ItemID' +END +GO + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'SetLyncUserLyncUserPlan') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[SetLyncUserLyncUserPlan] +( + @AccountID int, + @LyncUserPlanId int +) +AS + +UPDATE LyncUsers SET + LyncUserPlanId = @LyncUserPlanId +WHERE + AccountID = @AccountID + +RETURN' +END +GO + + + + + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'SetOrganizationDefaultLyncUserPlan') +BEGIN +EXEC sp_executesql N'CREATE PROCEDURE [dbo].[SetOrganizationDefaultLyncUserPlan] +( + @ItemId int, + @LyncUserPlanId int +) +AS + +UPDATE LyncUserPlans SET IsDefault=0 WHERE ItemId=@ItemId +UPDATE LyncUserPlans SET IsDefault=1 WHERE LyncUserPlanId=@LyncUserPlanId + +RETURN' +END +GO + + + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetHostingPlanQuotas] +( + @ActorID int, + @PlanID int, + @PackageID int, + @ServerID int +) +AS + +-- check rights +IF dbo.CheckActorParentPackageRights(@ActorID, @PackageID) = 0 +RAISERROR('You are not allowed to access this package', 16, 1) + +DECLARE @IsAddon bit + +IF @ServerID = 0 +SELECT @ServerID = ServerID FROM Packages +WHERE PackageID = @PackageID + +-- get resource groups +SELECT + RG.GroupID, + RG.GroupName, + CASE + WHEN HPR.CalculateDiskSpace IS NULL THEN CAST(0 as bit) + ELSE CAST(1 as bit) + END AS Enabled, + dbo.GetPackageAllocatedResource(@PackageID, RG.GroupID, @ServerID) AS ParentEnabled, + ISNULL(HPR.CalculateDiskSpace, 1) AS CalculateDiskSpace, + ISNULL(HPR.CalculateBandwidth, 1) AS CalculateBandwidth +FROM ResourceGroups AS RG +LEFT OUTER JOIN HostingPlanResources AS HPR ON RG.GroupID = HPR.GroupID AND HPR.PlanID = @PlanID +WHERE (RG.ShowGroup = 1) +ORDER BY RG.GroupOrder + +-- get quotas by groups +SELECT + Q.QuotaID, + Q.GroupID, + Q.QuotaName, + Q.QuotaDescription, + Q.QuotaTypeID, + ISNULL(HPQ.QuotaValue, 0) AS QuotaValue, + dbo.GetPackageAllocatedQuota(@PackageID, Q.QuotaID) AS ParentQuotaValue +FROM Quotas AS Q +LEFT OUTER JOIN HostingPlanQuotas AS HPQ ON Q.QuotaID = HPQ.QuotaID AND HPQ.PlanID = @PlanID +ORDER BY Q.QuotaOrder +RETURN +GO + + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetRawServicesByServerID] +( + @ActorID int, + @ServerID int +) +AS + +-- check rights +DECLARE @IsAdmin bit +SET @IsAdmin = dbo.CheckIsUserAdmin(@ActorID) + +-- resource groups +SELECT + GroupID, + GroupName +FROM ResourceGroups +WHERE @IsAdmin = 1 AND (ShowGroup = 1) +ORDER BY GroupOrder + +-- services +SELECT + S.ServiceID, + S.ServerID, + S.ServiceName, + S.Comments, + RG.GroupID, + PROV.DisplayName AS ProviderName +FROM Services AS S +INNER JOIN Providers AS PROV ON S.ProviderID = PROV.ProviderID +INNER JOIN ResourceGroups AS RG ON PROV.GroupID = RG.GroupID +WHERE + S.ServerID = @ServerID + AND @IsAdmin = 1 +ORDER BY RG.GroupOrder + +RETURN +GO + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetVirtualServices] +( + @ActorID int, + @ServerID int +) +AS + +-- check rights +DECLARE @IsAdmin bit +SET @IsAdmin = dbo.CheckIsUserAdmin(@ActorID) + +-- virtual groups +SELECT + VRG.VirtualGroupID, + RG.GroupID, + RG.GroupName, + ISNULL(VRG.DistributionType, 1) AS DistributionType, + ISNULL(VRG.BindDistributionToPrimary, 1) AS BindDistributionToPrimary +FROM ResourceGroups AS RG +LEFT OUTER JOIN VirtualGroups AS VRG ON RG.GroupID = VRG.GroupID AND VRG.ServerID = @ServerID +WHERE + @IsAdmin = 1 AND (ShowGroup = 1) +ORDER BY RG.GroupOrder + +-- services +SELECT + VS.ServiceID, + S.ServiceName, + S.Comments, + P.GroupID, + P.DisplayName, + SRV.ServerName +FROM VirtualServices AS VS +INNER JOIN Services AS S ON VS.ServiceID = S.ServiceID +INNER JOIN Servers AS SRV ON S.ServerID = SRV.ServerID +INNER JOIN Providers AS P ON S.ProviderID = P.ProviderID +WHERE + VS.ServerID = @ServerID + AND @IsAdmin = 1 + +RETURN +GO + + + + + + + + +ALTER PROCEDURE [dbo].[AddUser] +( + @ActorID int, + @UserID int OUTPUT, + @OwnerID int, + @RoleID int, + @StatusID int, + @LoginStatusID int, + @IsDemo bit, + @IsPeer bit, + @Comments ntext, + @Username nvarchar(50), + @Password nvarchar(200), + @FirstName nvarchar(50), + @LastName nvarchar(50), + @Email nvarchar(255), + @SecondaryEmail nvarchar(255), + @Address nvarchar(200), + @City nvarchar(50), + @State nvarchar(50), + @Country nvarchar(50), + @Zip varchar(20), + @PrimaryPhone varchar(30), + @SecondaryPhone varchar(30), + @Fax varchar(30), + @InstantMessenger nvarchar(200), + @HtmlMail bit, + @CompanyName nvarchar(100), + @EcommerceEnabled bit +) +AS + +-- check if the user already exists +IF EXISTS(SELECT UserID FROM Users WHERE Username = @Username) +BEGIN + SET @UserID = -1 + RETURN +END + +-- check actor rights +IF dbo.CanCreateUser(@ActorID, @OwnerID) = 0 +BEGIN + SET @UserID = -2 + RETURN +END + +INSERT INTO Users +( + OwnerID, + RoleID, + StatusID, + LoginStatusID, + Created, + Changed, + IsDemo, + IsPeer, + Comments, + Username, + Password, + FirstName, + LastName, + Email, + SecondaryEmail, + Address, + City, + State, + Country, + Zip, + PrimaryPhone, + SecondaryPhone, + Fax, + InstantMessenger, + HtmlMail, + CompanyName, + EcommerceEnabled +) +VALUES +( + @OwnerID, + @RoleID, + @StatusID, + @LoginStatusID, + GetDate(), + GetDate(), + @IsDemo, + @IsPeer, + @Comments, + @Username, + @Password, + @FirstName, + @LastName, + @Email, + @SecondaryEmail, + @Address, + @City, + @State, + @Country, + @Zip, + @PrimaryPhone, + @SecondaryPhone, + @Fax, + @InstantMessenger, + @HtmlMail, + @CompanyName, + @EcommerceEnabled +) + +SET @UserID = SCOPE_IDENTITY() + +RETURN +GO + + + + + + +ALTER PROCEDURE [dbo].[GetUserById] +( + @ActorID int, + @UserID int +) +AS + -- user can retrieve his own account, his users accounts + -- and his reseller account (without pasword) + SELECT + U.UserID, + U.RoleID, + U.StatusID, + U.LoginStatusId, + U.FailedLogins, + U.OwnerID, + U.Created, + U.Changed, + U.IsDemo, + U.Comments, + U.IsPeer, + U.Username, + CASE WHEN dbo.CanGetUserPassword(@ActorID, @UserID) = 1 THEN U.Password + ELSE '' END AS Password, + U.FirstName, + U.LastName, + U.Email, + U.SecondaryEmail, + U.Address, + U.City, + U.State, + U.Country, + U.Zip, + U.PrimaryPhone, + U.SecondaryPhone, + U.Fax, + U.InstantMessenger, + U.HtmlMail, + U.CompanyName, + U.EcommerceEnabled, + U.[AdditionalParams] + FROM Users AS U + WHERE U.UserID = @UserID + AND dbo.CanGetUserDetails(@ActorID, @UserID) = 1 -- actor user rights + + RETURN +GO + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetUserByIdInternally] +( + @UserID int +) +AS + SELECT + U.UserID, + U.RoleID, + U.StatusID, + U.LoginStatusId, + U.FailedLogins, + U.OwnerID, + U.Created, + U.Changed, + U.IsDemo, + U.Comments, + U.IsPeer, + U.Username, + U.Password, + U.FirstName, + U.LastName, + U.Email, + U.SecondaryEmail, + U.Address, + U.City, + U.State, + U.Country, + U.Zip, + U.PrimaryPhone, + U.SecondaryPhone, + U.Fax, + U.InstantMessenger, + U.HtmlMail, + U.CompanyName, + U.EcommerceEnabled, + U.[AdditionalParams] + FROM Users AS U + WHERE U.UserID = @UserID + + RETURN + +GO + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetUserByUsername] +( + @ActorID int, + @Username nvarchar(50) +) +AS + + SELECT + U.UserID, + U.RoleID, + U.StatusID, + U.LoginStatusId, + U.FailedLogins, + U.OwnerID, + U.Created, + U.Changed, + U.IsDemo, + U.Comments, + U.IsPeer, + U.Username, + CASE WHEN dbo.CanGetUserPassword(@ActorID, UserID) = 1 THEN U.Password + ELSE '' END AS Password, + U.FirstName, + U.LastName, + U.Email, + U.SecondaryEmail, + U.Address, + U.City, + U.State, + U.Country, + U.Zip, + U.PrimaryPhone, + U.SecondaryPhone, + U.Fax, + U.InstantMessenger, + U.HtmlMail, + U.CompanyName, + U.EcommerceEnabled, + U.[AdditionalParams] + FROM Users AS U + WHERE U.Username = @Username + AND dbo.CanGetUserDetails(@ActorID, UserID) = 1 -- actor user rights + + RETURN +GO + + + + + + + + +ALTER PROCEDURE [dbo].[GetUserByUsernameInternally] +( + @Username nvarchar(50) +) +AS + SELECT + U.UserID, + U.RoleID, + U.StatusID, + U.LoginStatusId, + U.FailedLogins, + U.OwnerID, + U.Created, + U.Changed, + U.IsDemo, + U.Comments, + U.IsPeer, + U.Username, + U.Password, + U.FirstName, + U.LastName, + U.Email, + U.SecondaryEmail, + U.Address, + U.City, + U.State, + U.Country, + U.Zip, + U.PrimaryPhone, + U.SecondaryPhone, + U.Fax, + U.InstantMessenger, + U.HtmlMail, + U.CompanyName, + U.EcommerceEnabled, + U.[AdditionalParams] + FROM Users AS U + WHERE U.Username = @Username + + RETURN + +GO + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetUserDomainsPaged] +( + @ActorID int, + @UserID int, + @FilterColumn nvarchar(50) = '', + @FilterValue nvarchar(50) = '', + @SortColumn nvarchar(50), + @StartRow int, + @MaximumRows int +) +AS +-- build query and run it to the temporary table +DECLARE @sql nvarchar(2000) + +SET @sql = ' +DECLARE @HasUserRights bit +SET @HasUserRights = dbo.CheckActorUserRights(@ActorID, @UserID) + +DECLARE @EndRow int +SET @EndRow = @StartRow + @MaximumRows +DECLARE @Users TABLE +( + ItemPosition int IDENTITY(1,1), + UserID int, + DomainID int +) +INSERT INTO @Users (UserID, DomainID) +SELECT + U.UserID, + D.DomainID +FROM Users AS U +INNER JOIN UsersTree(@UserID, 1) AS UT ON U.UserID = UT.UserID +LEFT OUTER JOIN Packages AS P ON U.UserID = P.UserID +LEFT OUTER JOIN Domains AS D ON P.PackageID = D.PackageID +WHERE + U.UserID <> @UserID AND U.IsPeer = 0 + AND @HasUserRights = 1 ' + +IF @FilterColumn <> '' AND @FilterValue <> '' +SET @sql = @sql + ' AND ' + @FilterColumn + ' LIKE @FilterValue ' + +IF @SortColumn <> '' AND @SortColumn IS NOT NULL +SET @sql = @sql + ' ORDER BY ' + @SortColumn + ' ' + +SET @sql = @sql + ' SELECT COUNT(UserID) FROM @Users; +SELECT + U.UserID, + U.RoleID, + U.StatusID, + U.LoginStatusId, + U.FailedLogins, + U.OwnerID, + U.Created, + U.Changed, + U.IsDemo, + U.Comments, + U.IsPeer, + U.Username, + U.FirstName, + U.LastName, + U.Email, + D.DomainName +FROM @Users AS TU +INNER JOIN Users AS U ON TU.UserID = U.UserID +LEFT OUTER JOIN Domains AS D ON TU.DomainID = D.DomainID +WHERE TU.ItemPosition BETWEEN @StartRow AND @EndRow' + +exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @UserID int, @FilterValue nvarchar(50), @ActorID int', +@StartRow, @MaximumRows, @UserID, @FilterValue, @ActorID + + +RETURN +GO + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetUserParents] +( + @ActorID int, + @UserID int +) +AS + +-- check rights +IF dbo.CheckActorUserRights(@ActorID, @UserID) = 0 +RAISERROR('You are not allowed to access this account', 16, 1) + +SELECT + U.UserID, + U.RoleID, + U.StatusID, + U.LoginStatusId, + U.FailedLogins, + U.OwnerID, + U.Created, + U.Changed, + U.IsDemo, + U.Comments, + U.IsPeer, + U.Username, + U.FirstName, + U.LastName, + U.Email, + U.CompanyName, + U.EcommerceEnabled +FROM UserParents(@ActorID, @UserID) AS UP +INNER JOIN Users AS U ON UP.UserID = U.UserID +ORDER BY UP.UserOrder DESC +RETURN +GO + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetUserPeers] +( + @ActorID int, + @UserID int +) +AS + +DECLARE @CanGetDetails bit +SET @CanGetDetails = dbo.CanGetUserDetails(@ActorID, @UserID) + +SELECT + U.UserID, + U.RoleID, + U.StatusID, + U.LoginStatusId, + U.FailedLogins, + U.OwnerID, + U.Created, + U.Changed, + U.IsDemo, + U.Comments, + U.IsPeer, + U.Username, + U.FirstName, + U.LastName, + U.Email, + U.FullName, + (U.FirstName + ' ' + U.LastName) AS FullName, + U.CompanyName, + U.EcommerceEnabled +FROM UsersDetailed AS U +WHERE U.OwnerID = @UserID AND IsPeer = 1 +AND @CanGetDetails = 1 -- actor rights + +RETURN +GO + + + + + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetUsers] +( + @ActorID int, + @OwnerID int, + @Recursive bit = 0 +) +AS + +DECLARE @CanGetDetails bit +SET @CanGetDetails = dbo.CanGetUserDetails(@ActorID, @OwnerID) + +SELECT + U.UserID, + U.RoleID, + U.StatusID, + U.LoginStatusId, + U.FailedLogins, + U.OwnerID, + U.Created, + U.Changed, + U.IsDemo, + U.Comments, + U.IsPeer, + U.Username, + U.FirstName, + U.LastName, + U.Email, + U.FullName, + U.OwnerUsername, + U.OwnerFirstName, + U.OwnerLastName, + U.OwnerRoleID, + U.OwnerFullName, + U.PackagesNumber, + U.CompanyName, + U.EcommerceEnabled +FROM UsersDetailed AS U +WHERE U.UserID <> @OwnerID AND +((@Recursive = 1 AND dbo.CheckUserParent(@OwnerID, U.UserID) = 1) OR +(@Recursive = 0 AND U.OwnerID = @OwnerID)) +AND U.IsPeer = 0 +AND @CanGetDetails = 1 -- actor user rights + +RETURN +GO + + + + + + + + + + +ALTER PROCEDURE [dbo].[GetUsersPaged] +( + @ActorID int, + @UserID int, + @FilterColumn nvarchar(50) = '', + @FilterValue nvarchar(50) = '', + @StatusID int, + @RoleID int, + @SortColumn nvarchar(50), + @StartRow int, + @MaximumRows int, + @Recursive bit +) +AS +-- build query and run it to the temporary table +DECLARE @sql nvarchar(2000) + +SET @sql = ' + +DECLARE @HasUserRights bit +SET @HasUserRights = dbo.CheckActorUserRights(@ActorID, @UserID) + +DECLARE @EndRow int +SET @EndRow = @StartRow + @MaximumRows +DECLARE @Users TABLE +( + ItemPosition int IDENTITY(0,1), + UserID int +) +INSERT INTO @Users (UserID) +SELECT + U.UserID +FROM UsersDetailed AS U +WHERE + U.UserID <> @UserID AND U.IsPeer = 0 AND + ( + (@Recursive = 0 AND OwnerID = @UserID) OR + (@Recursive = 1 AND dbo.CheckUserParent(@UserID, U.UserID) = 1) + ) + AND ((@StatusID = 0) OR (@StatusID > 0 AND U.StatusID = @StatusID)) + AND ((@RoleID = 0) OR (@RoleID > 0 AND U.RoleID = @RoleID)) + AND @HasUserRights = 1 ' + +IF @FilterColumn <> '' AND @FilterValue <> '' +SET @sql = @sql + ' AND ' + @FilterColumn + ' LIKE @FilterValue ' + +IF @SortColumn <> '' AND @SortColumn IS NOT NULL +SET @sql = @sql + ' ORDER BY ' + @SortColumn + ' ' + +SET @sql = @sql + ' SELECT COUNT(UserID) FROM @Users; +SELECT + U.UserID, + U.RoleID, + U.StatusID, + U.LoginStatusId, + U.FailedLogins, + U.OwnerID, + U.Created, + U.Changed, + U.IsDemo, + dbo.GetItemComments(U.UserID, ''USER'', @ActorID) AS Comments, + U.IsPeer, + U.Username, + U.FirstName, + U.LastName, + U.Email, + U.FullName, + U.OwnerUsername, + U.OwnerFirstName, + U.OwnerLastName, + U.OwnerRoleID, + U.OwnerFullName, + U.OwnerEmail, + U.PackagesNumber, + U.CompanyName, + U.EcommerceEnabled +FROM @Users AS TU +INNER JOIN UsersDetailed AS U ON TU.UserID = U.UserID +WHERE TU.ItemPosition BETWEEN @StartRow AND @EndRow' + +exec sp_executesql @sql, N'@StartRow int, @MaximumRows int, @UserID int, @FilterValue nvarchar(50), @ActorID int, @Recursive bit, @StatusID int, @RoleID int', +@StartRow, @MaximumRows, @UserID, @FilterValue, @ActorID, @Recursive, @StatusID, @RoleID + + +RETURN +GO + + + + + + + + +ALTER PROCEDURE [dbo].[UpdateUser] +( + @ActorID int, + @UserID int, + @RoleID int, + @StatusID int, + @LoginStatusId int, + @IsDemo bit, + @IsPeer bit, + @Comments ntext, + @FirstName nvarchar(50), + @LastName nvarchar(50), + @Email nvarchar(255), + @SecondaryEmail nvarchar(255), + @Address nvarchar(200), + @City nvarchar(50), + @State nvarchar(50), + @Country nvarchar(50), + @Zip varchar(20), + @PrimaryPhone varchar(30), + @SecondaryPhone varchar(30), + @Fax varchar(30), + @InstantMessenger nvarchar(200), + @HtmlMail bit, + @CompanyName nvarchar(100), + @EcommerceEnabled BIT, + @AdditionalParams NVARCHAR(max) +) +AS + + -- check actor rights + IF dbo.CanUpdateUserDetails(@ActorID, @UserID) = 0 + BEGIN + RETURN + END + + IF @LoginStatusId = 0 + BEGIN + UPDATE Users SET + FailedLogins = 0 + WHERE UserID = @UserID + END + + UPDATE Users SET + RoleID = @RoleID, + StatusID = @StatusID, + LoginStatusId = @LoginStatusId, + Changed = GetDate(), + IsDemo = @IsDemo, + IsPeer = @IsPeer, + Comments = @Comments, + FirstName = @FirstName, + LastName = @LastName, + Email = @Email, + SecondaryEmail = @SecondaryEmail, + Address = @Address, + City = @City, + State = @State, + Country = @Country, + Zip = @Zip, + PrimaryPhone = @PrimaryPhone, + SecondaryPhone = @SecondaryPhone, + Fax = @Fax, + InstantMessenger = @InstantMessenger, + HtmlMail = @HtmlMail, + CompanyName = @CompanyName, + EcommerceEnabled = @EcommerceEnabled, + [AdditionalParams] = @AdditionalParams + WHERE UserID = @UserID + + RETURN +GO + + + + + + + + +IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'UpdateUserFailedLoginAttempt') +BEGIN +EXEC sp_executesql N' CREATE PROCEDURE [dbo].[UpdateUserFailedLoginAttempt] +( + @UserID int, + @LockOut int, + @Reset int +) +AS + +IF (@Reset = 1) +BEGIN + UPDATE Users SET FailedLogins = 0 WHERE UserID = @UserID +END +ELSE +BEGIN + IF (@LockOut <= (SELECT FailedLogins FROM USERS WHERE UserID = @UserID)) + BEGIN + UPDATE Users SET LoginStatusId = 2 WHERE UserID = @UserID + END + ELSE + BEGIN + IF ((SELECT FailedLogins FROM Users WHERE UserID = @UserID) IS NULL) + BEGIN + UPDATE Users SET FailedLogins = 1 WHERE UserID = @UserID + END + ELSE + UPDATE Users SET FailedLogins = FailedLogins + 1 WHERE UserID = @UserID + END +END' +END +GO diff --git a/WebsitePanel/Lib/Microsoft.Web.PlatformInstaller.dll b/WebsitePanel/Lib/Microsoft.Web.PlatformInstaller.dll new file mode 100644 index 00000000..a94eef6f Binary files /dev/null and b/WebsitePanel/Lib/Microsoft.Web.PlatformInstaller.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Common.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Common.dll index f57cfe43..a3d1e823 100644 Binary files a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Common.dll and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Common.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Common.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Common.dll new file mode 100644 index 00000000..6357f145 Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Common.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Directory.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Directory.dll index bd191b1b..b91ec87a 100644 Binary files a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Directory.dll and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Directory.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Storage.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Storage.dll index b61a808e..8b32a497 100644 Binary files a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Storage.dll and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Storage.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Transport.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Transport.dll new file mode 100644 index 00000000..971c863e Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.Transport.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.dll index 7e84ef85..044fcdf3 100644 Binary files a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.dll and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Data.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Diagnostics.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Diagnostics.dll index 51f49b87..87f926b5 100644 Binary files a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Diagnostics.dll and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Diagnostics.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Extensibility.Internal.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Extensibility.Internal.dll index c1f52fa2..5f094714 100644 Binary files a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Extensibility.Internal.dll and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Extensibility.Internal.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Net.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Net.dll index db920bf9..30d3819e 100644 Binary files a/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Net.dll and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Exchange.Net.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Rtc.Management.Core.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Rtc.Management.Core.dll new file mode 100644 index 00000000..beb6e4ab Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Rtc.Management.Core.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Rtc.Management.Hosted.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Rtc.Management.Hosted.dll new file mode 100644 index 00000000..fb643522 Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Rtc.Management.Hosted.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Rtc.Management.WritableConfig.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Rtc.Management.WritableConfig.dll new file mode 100644 index 00000000..aec9421d Binary files /dev/null and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Rtc.Management.WritableConfig.dll differ diff --git a/WebsitePanel/Lib/References/Microsoft/Microsoft.Web.Deployment.dll b/WebsitePanel/Lib/References/Microsoft/Microsoft.Web.Deployment.dll index 8b4b2ff3..5a16662c 100644 Binary files a/WebsitePanel/Lib/References/Microsoft/Microsoft.Web.Deployment.dll and b/WebsitePanel/Lib/References/Microsoft/Microsoft.Web.Deployment.dll differ diff --git a/WebsitePanel/Resources/build-serveradmin-settings.xml b/WebsitePanel/Resources/build-serveradmin-settings.xml index 0a0b96ef..e6c2859d 100644 --- a/WebsitePanel/Resources/build-serveradmin-settings.xml +++ b/WebsitePanel/Resources/build-serveradmin-settings.xml @@ -228,6 +228,7 @@ and below is the summary information for its resources. <ad:if test="#space.Groups.ContainsKey("MsSQL2000")#"><li><a href="##mssql2000">SQL Server 2000</a></li></ad:if> <ad:if test="#space.Groups.ContainsKey("MsSQL2005")#"><li><a href="##mssql2005">SQL Server 2005</a></li></ad:if> <ad:if test="#space.Groups.ContainsKey("MsSQL2008")#"><li><a href="##mssql2008">SQL Server 2008</a></li></ad:if> + <ad:if test="#space.Groups.ContainsKey("MsSQL2012")#"><li><a href="##mssql2012">SQL Server 2012</a></li></ad:if> <ad:if test="#space.Groups.ContainsKey("MySQL4")#"><li><a href="##mysql4">My SQL 4.x</a></li></ad:if> <ad:if test="#space.Groups.ContainsKey("MySQL5")#"><li><a href="##mysql5">My SQL 5.x</a></li></ad:if> <li><a href="##msaccess">Microsoft Access</a></li> @@ -675,6 +676,34 @@ using this IP address instead of actual POP3/SMTP/IMAP servers name: <ad:MsSqlConnectionStrings server="#MsSQL2008Address#" /> </ad:if> +<ad:if test="#space.Groups.ContainsKey("MsSQL2012")#"> +<a name="mssql2012"></a> + +<h2>SQL Server 2012</h2> + +<table> + <tr> + <td class="Label">Maximum Number of Databases:</td> + <td><ad:NumericQuota quota="MsSQL2012.Databases" /></td> + </tr> + <tr> + <td class="Label">Maximum Number of Users:</td> + <td><ad:NumericQuota quota="MsSQL2012.Users" /></td> + </tr> +</table> + +<p> + In order to connect to SQL Server 2012 from Management Studio, Enterprise Manager, Query Analyzer + or other client software you can use the following SQL Server address: +</p> +<table> + <tr> + <td>#MsSQL2012Address#</td> + </tr> +</table> +<ad:MsSqlConnectionStrings server="#MsSQL2012Address#" /> +</ad:if> + <ad:if test="#space.Groups.ContainsKey("MySQL4")#"> <a name="mysql4"></a> <h2>MySQL 4.x</h2> @@ -1009,6 +1038,18 @@ In order to connect to SQL Server 2008 from Management Studio, Enterprise Manage <ad:MsSqlConnectionStrings server="#MsSQL2008Address#" /> </ad:if> +<ad:if test="#space.Groups.ContainsKey("MsSQL2012")#">SQL Server 2012 +--------------- +Maximum Number of Databases: <ad:NumericQuota quota="MsSQL2012.Databases" /> +Maximum Number of Users: <ad:NumericQuota quota="MsSQL2012.Users" /> + +In order to connect to SQL Server 2012 from Management Studio, Enterprise Manager, Query Analyzer or other client software you can use the following SQL Server address: + + #MsSQL2012Address#</td> + +<ad:MsSqlConnectionStrings server="#MsSQL2012Address#" /> +</ad:if> + <ad:if test="#space.Groups.ContainsKey("MySQL4")#">MySQL 4.x --------- diff --git a/WebsitePanel/Sources/Tools/WSPTransportAgent.sln b/WebsitePanel/Sources/Tools/WSPTransportAgent.sln new file mode 100644 index 00000000..ef592cfc --- /dev/null +++ b/WebsitePanel/Sources/Tools/WSPTransportAgent.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WSPTransportAgent", "WSPTransportAgent\WSPTransportAgent.csproj", "{D959F137-A56F-4F4E-BA80-599FBE3700E3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D959F137-A56F-4F4E-BA80-599FBE3700E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D959F137-A56F-4F4E-BA80-599FBE3700E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D959F137-A56F-4F4E-BA80-599FBE3700E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D959F137-A56F-4F4E-BA80-599FBE3700E3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/WebsitePanel/Sources/Tools/WSPTransportAgent/App.config b/WebsitePanel/Sources/Tools/WSPTransportAgent/App.config new file mode 100644 index 00000000..f3d7ccd1 --- /dev/null +++ b/WebsitePanel/Sources/Tools/WSPTransportAgent/App.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/WebsitePanel/Sources/Tools/WSPTransportAgent/Properties/AssemblyInfo.cs b/WebsitePanel/Sources/Tools/WSPTransportAgent/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..3be99d2c --- /dev/null +++ b/WebsitePanel/Sources/Tools/WSPTransportAgent/Properties/AssemblyInfo.cs @@ -0,0 +1,65 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WSPTransportAgent")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WSPTransportAgent")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e28cac4e-9660-4174-8010-c6a00c81bf57")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/WebsitePanel/Sources/Tools/WSPTransportAgent/WSPRoutingAgent.cs b/WebsitePanel/Sources/Tools/WSPTransportAgent/WSPRoutingAgent.cs new file mode 100644 index 00000000..16656900 --- /dev/null +++ b/WebsitePanel/Sources/Tools/WSPTransportAgent/WSPRoutingAgent.cs @@ -0,0 +1,289 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System; +using System.Collections.Generic; +using System.Text; +using System.Diagnostics; +using System.IO; +using System.Configuration; +using System.Collections.ObjectModel; +using System.Collections; +using System.Collections.Specialized; +using System.Xml; +using Microsoft.Exchange.Data.Transport; +using Microsoft.Exchange.Data.Transport.Routing; +using Microsoft.Exchange.Data.Mime; +using System.DirectoryServices; + + +namespace WSPTransportAgent +{ + public class WSPRoutingAgentFactory : RoutingAgentFactory + { + public override RoutingAgent CreateAgent(SmtpServer server) + { + return new WSPRoutingAgent(server); + } + } + + public class WSPRoutingAgent : RoutingAgent + { + private string routingDomain; + private bool enableVerboseLogging; + private string logFile; + private Hashtable htAcceptedDomains; + private bool blockInternalInterTenantOOF; + + public WSPRoutingAgent(SmtpServer server) + { + //subscribe to different events + loadConfiguration(); + + WriteLine("WSPRoutingAgent Registration started"); + loadAcceptedDomains(server); + //GetAcceptedDomains(); + WriteLine("\trouting Domain: " + routingDomain); + + base.OnResolvedMessage += new ResolvedMessageEventHandler(WSPRoutingAgent_OnResolvedMessage); + + WriteLine("WSPRoutingAgent Registration completed"); + } + + private void loadConfiguration() + { + this.routingDomain = ".tmpdefault"; + this.enableVerboseLogging = true; + this.logFile = "C:\\WSP.LOG"; + + try + { + ExeConfigurationFileMap map = new ExeConfigurationFileMap(); + map.ExeConfigFilename = System.Reflection.Assembly.GetExecutingAssembly().Location + ".config"; + Configuration libConfig = ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None); + AppSettingsSection section = (libConfig.GetSection("appSettings") as AppSettingsSection); + + this.routingDomain = section.Settings["routingDomain"].Value; + this.enableVerboseLogging = (section.Settings["enableVerboseLogging"].Value == "true"); + this.blockInternalInterTenantOOF = (section.Settings["blockInternalInterTenantOOF"].Value == "true"); + this.logFile = section.Settings["logFile"].Value; + } + catch (Exception ex) + { + WriteLine("\t[Error] " + ex.Message); + LogErrorToEventLog("[Error] [loadConfiguration] Error :" + ex.Message); + } + + + } + + + private void loadAcceptedDomains(SmtpServer server) + { + try + { + if (htAcceptedDomains == null) + this.htAcceptedDomains = new Hashtable(); + else + this.htAcceptedDomains.Clear(); + + foreach (AcceptedDomain domain in server.AcceptedDomains) + { + htAcceptedDomains.Add(domain.ToString(), "1"); + WriteLine("\tAccepted Domain: " + domain.ToString()); + } + } + catch (Exception ex) + { + WriteLine("\t[Error] " + ex.Message); + LogErrorToEventLog("[Error] [loadAcceptedDomains] Error :" + ex.Message); + } + } + + + void WSPRoutingAgent_OnResolvedMessage(ResolvedMessageEventSource source, QueuedMessageEventArgs e) + { + try + { + + WriteLine("Start WSPRoutingAgent_OnResolvedMessage"); + + WriteLine("\tFromAddress: " + e.MailItem.FromAddress.ToString()); + WriteLine("\tSubject: " + e.MailItem.Message.Subject.ToString()); + WriteLine("\tMapiMessageClass: " + e.MailItem.Message.MapiMessageClass.ToString()); + + MimeDocument mdMimeDoc = e.MailItem.Message.MimeDocument; + HeaderList hlHeaderlist = mdMimeDoc.RootPart.Headers; + Header mhProcHeader = hlHeaderlist.FindFirst("X-WSP"); + + if (mhProcHeader == null) + { + WriteLine("\tTouched: " + "No"); + + if (!e.MailItem.Message.IsSystemMessage) + { + bool touched = false; + + if (e.MailItem.FromAddress.DomainPart != null) + { + foreach (EnvelopeRecipient recp in e.MailItem.Recipients) + { + WriteLine("\t\tTo: " + recp.Address.ToString().ToLower()); + if (IsMessageBetweenTenants(e.MailItem.FromAddress.DomainPart.ToLower(), recp.Address.DomainPart.ToLower())) + { + WriteLine("\t\tMessage routed to domain: " + recp.Address.DomainPart.ToLower() + routingDomain); + RoutingDomain myRoutingDomain = new RoutingDomain(recp.Address.DomainPart.ToLower() + routingDomain); + RoutingOverride myRoutingOverride = new RoutingOverride(myRoutingDomain, DeliveryQueueDomain.UseOverrideDomain); + source.SetRoutingOverride(recp, myRoutingOverride); + touched = true; + } + } + } + else + { + if ((e.MailItem.Message.MapiMessageClass.ToString() == "IPM.Note.Rules.OofTemplate.Microsoft") & + blockInternalInterTenantOOF) + { + WriteLine("\t\tOOF From: " + e.MailItem.Message.From.SmtpAddress); + if (e.MailItem.Message.From.SmtpAddress.Contains("@")) + { + string[] tmp = e.MailItem.Message.From.SmtpAddress.Split('@'); + foreach (EnvelopeRecipient recp in e.MailItem.Recipients) + { + WriteLine("\t\tTo: " + recp.Address.ToString().ToLower()); + if (IsMessageBetweenTenants(tmp[1].ToLower(), recp.Address.DomainPart.ToLower())) + { + WriteLine("\t\tRemove: " + recp.Address.DomainPart.ToLower()); + e.MailItem.Recipients.Remove(recp); + } + } + } + } + } + + if (touched) + { + MimeNode lhLasterHeader = hlHeaderlist.LastChild; + TextHeader nhNewHeader = new TextHeader("X-WSP", "Logged00"); + hlHeaderlist.InsertBefore(nhNewHeader, lhLasterHeader); + } + } + else + WriteLine("\tSystem Message"); + } + else + WriteLine("\tTouched: " + "Yes"); + + } + + catch (Exception ex) + { + WriteLine("\t[Error] Error :" + ex.Message); + LogErrorToEventLog("[Error] [OnResolvedMessage] Error :" + ex.Message); + } + + WriteLine("End WSPRoutingAgent_OnResolvedMessage"); + } + + private bool IsMessageBetweenTenants(string senderDomain, string recipientDomain) + { + if (senderDomain == recipientDomain) return false; + + if ((htAcceptedDomains[senderDomain] != null) && + (htAcceptedDomains[recipientDomain] != null)) + return true; + + return false; + } + + /* + private void GetAcceptedDomains() + { + try + { + htAcceptedDomains.Clear(); + DirectoryEntry rdRootDSE = new DirectoryEntry("LDAP://RootDSE"); + DirectoryEntry cfConfigPartition = new DirectoryEntry("LDAP://" + rdRootDSE.Properties["configurationnamingcontext"].Value); + DirectorySearcher cfConfigPartitionSearch = new DirectorySearcher(cfConfigPartition); + cfConfigPartitionSearch.Filter = "(objectClass=msExchAcceptedDomain)"; + cfConfigPartitionSearch.SearchScope = SearchScope.Subtree; + SearchResultCollection srSearchResults = cfConfigPartitionSearch.FindAll(); + + foreach (SearchResult srSearchResult in srSearchResults) + { + DirectoryEntry acDomain = srSearchResult.GetDirectoryEntry(); + htAcceptedDomains.Add(acDomain.Properties["msexchaccepteddomainname"].Value.ToString().ToLower(), "1"); + WriteLine("\tAccepted Domain :" + acDomain.Properties["msexchaccepteddomainname"].Value.ToString().ToLower()); + } + } + catch (Exception ex) + { + WriteLine("\tError :" + ex.Message); + EventLog.WriteEntry("WSP Transport Agent", ex.Message, EventLogEntryType.Error); + } + } + */ + + + private void WriteLine(string Line) + { + if (!enableVerboseLogging) return; + + try + { + StreamWriter writer = new StreamWriter(logFile, true, System.Text.Encoding.ASCII); + writer.WriteLine("[" + DateTime.Now.ToString() + "]" + Line); + writer.Close(); + } + catch (Exception e) + { + + } + } + + + private void LogErrorToEventLog(string Line) + { + try + { + if (EventLog.SourceExists("WSPTransportAgent")) + { + EventLog.WriteEntry("WSPTransportAgent", Line, EventLogEntryType.Error); + } + } + catch (Exception ex) + { + WriteLine("[Error] WritingEventLog :" + ex.Message); + } + } + + + } + +} diff --git a/WebsitePanel/Sources/Tools/WSPTransportAgent/WSPTransportAgent.csproj b/WebsitePanel/Sources/Tools/WSPTransportAgent/WSPTransportAgent.csproj new file mode 100644 index 00000000..20efc18d --- /dev/null +++ b/WebsitePanel/Sources/Tools/WSPTransportAgent/WSPTransportAgent.csproj @@ -0,0 +1,62 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {D959F137-A56F-4F4E-BA80-599FBE3700E3} + Library + Properties + WSPTransportAgent + WSPTransportAgent + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\Lib\References\Microsoft\Microsoft.Exchange.Data.Common.dll + + + ..\..\..\Lib\References\Microsoft\Microsoft.Exchange.Data.Transport.dll + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebsitePanel/Sources/Tools/WSPTransportAgent/WSPTransportAgent.reg b/WebsitePanel/Sources/Tools/WSPTransportAgent/WSPTransportAgent.reg new file mode 100644 index 00000000..755c888a --- /dev/null +++ b/WebsitePanel/Sources/Tools/WSPTransportAgent/WSPTransportAgent.reg @@ -0,0 +1,15 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\MEACPTransportAgent] +"MaxSize"=dword:00080000 +"AutoBackupLogFiles"=dword:00000000 +"Retention"=dword:00000000 + +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\MEACPTransportAgent\MEACPTransportAgent] +"EventMessageFile"=hex(2):43,00,3a,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,\ + 00,73,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,2e,00,\ + 4e,00,45,00,54,00,5c,00,46,00,72,00,61,00,6d,00,65,00,77,00,6f,00,72,00,6b,\ + 00,36,00,34,00,5c,00,76,00,34,00,2e,00,30,00,2e,00,33,00,30,00,33,00,31,00,\ + 39,00,5c,00,45,00,76,00,65,00,6e,00,74,00,4c,00,6f,00,67,00,4d,00,65,00,73,\ + 00,73,00,61,00,67,00,65,00,73,00,2e,00,64,00,6c,00,6c,00,00,00 + diff --git a/WebsitePanel/Sources/Tools/WebsitePanel.Import.CsvBulk/ExchangeImport.cs b/WebsitePanel/Sources/Tools/WebsitePanel.Import.CsvBulk/ExchangeImport.cs index 315c378e..ac586b4b 100644 --- a/WebsitePanel/Sources/Tools/WebsitePanel.Import.CsvBulk/ExchangeImport.cs +++ b/WebsitePanel/Sources/Tools/WebsitePanel.Import.CsvBulk/ExchangeImport.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -26,6 +26,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + using System; using System.IO; using System.Data; @@ -527,7 +528,7 @@ namespace WebsitePanel.Import.CsvBulk //create mailbox //ES.Services.ExchangeServer. string accountName = string.Empty; - int accountId = ES.Services.ExchangeServer.CreateMailbox(orgId, 0, ExchangeAccountType.Mailbox, accountName, displayName, name, domain, password, false, string.Empty); + int accountId = ES.Services.ExchangeServer.CreateMailbox(orgId, 0, ExchangeAccountType.Mailbox, accountName, displayName, name, domain, password, false, string.Empty, 0, string.Empty); if (accountId < 0) { string errorMessage = GetErrorMessage(accountId); @@ -558,12 +559,13 @@ namespace WebsitePanel.Import.CsvBulk //update mailbox + /* ES.Services.ExchangeServer.SetMailboxGeneralSettings(orgId, accountId, mailbox.DisplayName, null, mailbox.HideFromAddressBook, mailbox.Disabled, mailbox.FirstName, mailbox.Initials, mailbox.LastName, mailbox.Address, mailbox.City, mailbox.State, mailbox.Zip, mailbox.Country, mailbox.JobTitle, mailbox.Company, mailbox.Department, mailbox.Office, null, mailbox.BusinessPhone, mailbox.Fax, mailbox.HomePhone, mailbox.MobilePhone, mailbox.Pager, mailbox.WebPage, mailbox.Notes); - + */ ret = true; } catch (Exception ex) @@ -672,7 +674,7 @@ namespace WebsitePanel.Import.CsvBulk string name = emailAddress.Substring(0, emailAddress.IndexOf("@")); string domain = emailAddress.Substring(emailAddress.IndexOf("@") + 1); string accountName = string.Empty; - int accountId = ES.Services.Organizations.CreateUser(orgId, displayName, name, domain, password, false, string.Empty); + int accountId = ES.Services.Organizations.CreateUser(orgId, displayName, name, domain, password, string.Empty,false, string.Empty); if (accountId < 0) { @@ -703,12 +705,13 @@ namespace WebsitePanel.Import.CsvBulk user.Notes = notes; //update + /* ES.Services.Organizations.SetUserGeneralSettings(orgId, accountId, user.DisplayName, null, false, user.Disabled, user.Locked, user.FirstName, user.Initials, user.LastName, user.Address, user.City, user.State, user.Zip, user.Country, user.JobTitle, user.Company, user.Department, user.Office, null, user.BusinessPhone, user.Fax, user.HomePhone, user.MobilePhone, user.Pager, user.WebPage, user.Notes, user.ExternalEmail); - + */ ret = true; } catch (Exception ex) diff --git a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/OrganizationImporter.cs b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/OrganizationImporter.cs index eda285be..7b3ff1bb 100644 --- a/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/OrganizationImporter.cs +++ b/WebsitePanel/Sources/Tools/WebsitePanel.Import.Enterprise/OrganizationImporter.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -439,12 +439,14 @@ namespace WebsitePanel.Import.Enterprise PackageContext cntx = PackageController.GetPackageContext(packageId); // organization limits + /* org.IssueWarningKB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; if (org.IssueWarningKB > 0) org.IssueWarningKB *= 1024; org.ProhibitSendKB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; if (org.ProhibitSendKB > 0) org.ProhibitSendKB *= 1024; org.ProhibitSendReceiveKB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; if (org.ProhibitSendReceiveKB > 0) org.ProhibitSendReceiveKB *= 1024; + */ PackageSettings settings = PackageController.GetPackageSettings(packageId, PackageSettings.EXCHANGE_SERVER); org.KeepDeletedItemsDays = Utils.ParseInt(settings["KeepDeletedItemsDays"], 14); @@ -933,13 +935,13 @@ namespace WebsitePanel.Import.Enterprise { return DataProvider.AddExchangeAccount(itemId, (int)accountType, accountName, displayName, primaryEmailAddress, mailEnabledPublicFolder, - mailboxManagerActions.ToString(), samAccountName, CryptoUtils.Encrypt(accountPassword)); + mailboxManagerActions.ToString(), samAccountName, CryptoUtils.Encrypt(accountPassword),0, string.Empty); } private static int AddOrganizationUser(int itemId, string accountName, string displayName, string email, string accountPassword) { return DataProvider.AddExchangeAccount(itemId, (int)ExchangeAccountType.User, accountName, displayName, email, false, string.Empty, - string.Empty, CryptoUtils.Encrypt(accountPassword)); + string.Empty, CryptoUtils.Encrypt(accountPassword),0 , string.Empty); } @@ -960,7 +962,7 @@ namespace WebsitePanel.Import.Enterprise mailEnabledPublicFolder, mailboxManagerActions, samAccountName, - CryptoUtils.Encrypt(accountPassword)); + CryptoUtils.Encrypt(accountPassword), 0, string.Empty); } } } diff --git a/WebsitePanel/Sources/Tools/WebsitePanel.LocalizationToolkit.Setup/Resources.xml b/WebsitePanel/Sources/Tools/WebsitePanel.LocalizationToolkit.Setup/Resources.xml index 49586147..973cbf22 100644 --- a/WebsitePanel/Sources/Tools/WebsitePanel.LocalizationToolkit.Setup/Resources.xml +++ b/WebsitePanel/Sources/Tools/WebsitePanel.LocalizationToolkit.Setup/Resources.xml @@ -1,4 +1,4 @@ - + App_GlobalResources\Ecommerce_Modules.ascx.resx @@ -3334,6 +3334,16 @@ ModuleTitle.Sql2008Users SQL Server 2008 Logins + + App_GlobalResources\WebsitePanel_Modules.ascx.resx + ModuleTitle.Sql2012Databases + SQL Server 2012 Databases + + + App_GlobalResources\WebsitePanel_Modules.ascx.resx + ModuleTitle.Sql2012Users + SQL Server 2012 Logins + App_GlobalResources\WebsitePanel_Modules.ascx.resx ModuleTitle.SQLDatabaseProperties @@ -3994,6 +4004,16 @@ PageTitle.SpaceMsSql2008 {user} - {space} - SQL Server 2008 + + App_GlobalResources\WebsitePanel_Pages.ascx.resx + PageName.SpaceMsSql2012 + SQL Server 2012 + + + App_GlobalResources\WebsitePanel_Pages.ascx.resx + PageTitle.SpaceMsSql2012 + {user} - {space} - SQL Server 2012 + App_GlobalResources\WebsitePanel_Pages.ascx.resx PageTitle.SpaceMsSql2005 @@ -7094,6 +7114,36 @@ Quota.MsSQL2008.Users Users + + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx + Quota.MsSQL2012.Backup + Database Backups + + + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx + Quota.MsSQL2012.Databases + Databases + + + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx + Quota.MsSQL2012.MaxDatabaseSize + Max Database Size, MB + + + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx + Quota.MsSQL2012.Restore + Database Restores + + + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx + Quota.MsSQL2012.Truncate + Database Truncate + + + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx + Quota.MsSQL2012.Users + Users + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx Quota.MySQL5.Backup @@ -7129,6 +7179,11 @@ ResourceGroup.MsSQL2008 SQL Server 2008 + + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx + ResourceGroup.MsSQL2012 + SQL Server 2012 + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx ResourceGroup.MySQL5 @@ -7449,6 +7504,16 @@ ServiceItemType.MsSQL2008User MS SQL 2008 User + + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx + ServiceItemType.MsSQL2012Database + MS SQL 2012 Database + + + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx + ServiceItemType.MsSQL2012User + MS SQL 2012 User + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx ServiceItemType.MySQL4Database @@ -9300,6 +9365,11 @@ Quota.MsSQL2008.MaxLogSize Max Log Size, MB + + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx + Quota.MsSQL2012.MaxLogSize + Max Log Size, MB + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx Error.EXCHANGE_UPDATE_MAILBOX_PERMISSIONS @@ -11875,6 +11945,11 @@ ReportResourceGroup.MsSQL2008 SQL Server 2008 + + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx + ReportResourceGroup.MsSQL2012 + SQL Server 2012 + App_GlobalResources\WebsitePanel_SharedResources.ascx.resx WebAppGallery.ApplicationInstallationError @@ -15762,6 +15837,11 @@ for your installation of ResellerClub .NET API Kit.</div> lclMSSQL2008Resources.Text Microsoft SQL 2008 Quotas + + DesktopModules\Ecommerce\UserControls\App_LocalResources\HostingPlanQuotas.ascx.resx + lclMSSQL2012Resources.Text + Microsoft SQL 2012 Quotas + DesktopModules\Ecommerce\UserControls\App_LocalResources\LoginUserAccount.ascx.resx lclPassword.Text diff --git a/WebsitePanel/Sources/VersionInfo.cs b/WebsitePanel/Sources/VersionInfo.cs index 76d765dc..692b7f6f 100644 --- a/WebsitePanel/Sources/VersionInfo.cs +++ b/WebsitePanel/Sources/VersionInfo.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.261 +// Runtime Version:4.0.30319.269 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -15,8 +15,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Outercurve Foundation")] [assembly: AssemblyCopyright("Copyright © 2012 Outercurve Foundation.")] -[assembly: AssemblyVersion("1.2.1.0")] -[assembly: AssemblyFileVersion("1.2.1.6")] -[assembly: AssemblyInformationalVersion("1.2.1")] +[assembly: AssemblyVersion("1.2.2.0")] +[assembly: AssemblyFileVersion("1.2.2.0")] +[assembly: AssemblyInformationalVersion("1.2.2")] diff --git a/WebsitePanel/Sources/VersionInfo.vb b/WebsitePanel/Sources/VersionInfo.vb index 5ca71dce..356d6c92 100644 --- a/WebsitePanel/Sources/VersionInfo.vb +++ b/WebsitePanel/Sources/VersionInfo.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.261 +' Runtime Version:4.0.30319.269 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -17,7 +17,7 @@ Imports System.Runtime.CompilerServices Imports System.Runtime.InteropServices + Assembly: AssemblyVersion("1.2.2.0"), _ + Assembly: AssemblyFileVersion("1.2.2.0"), _ + Assembly: AssemblyInformationalVersion("1.2.2")> diff --git a/WebsitePanel/Sources/WebsitePanel.Common.Utils/ProxyConfigurator.cs b/WebsitePanel/Sources/WebsitePanel.Common.Utils/ProxyConfigurator.cs index 5cc85309..5280f8bd 100644 --- a/WebsitePanel/Sources/WebsitePanel.Common.Utils/ProxyConfigurator.cs +++ b/WebsitePanel/Sources/WebsitePanel.Common.Utils/ProxyConfigurator.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Common.Utils/Utils.cs b/WebsitePanel/Sources/WebsitePanel.Common.Utils/Utils.cs index 077c6823..40f578c3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Common.Utils/Utils.cs +++ b/WebsitePanel/Sources/WebsitePanel.Common.Utils/Utils.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/BusinessErrorCodes.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/BusinessErrorCodes.cs index f1984ebe..0b32925f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/BusinessErrorCodes.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/BusinessErrorCodes.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -62,6 +62,11 @@ namespace WebsitePanel.EnterpriseServer public const int ERROR_USER_WRONG_USERNAME = -109; public const int ERROR_USER_WRONG_PASSWORD = -110; public const int ERROR_INVALID_USER_NAME = -111; + public const int ERROR_USER_ACCOUNT_NOT_ENOUGH_PERMISSIONS = -112; + public const int ERROR_USER_ACCOUNT_ROLE_NOT_ALLOWED = -113; + + public const int ERROR_USER_ACCOUNT_DISABLED = -114; + public const int ERROR_USER_ACCOUNT_LOCKEDOUT = -115; #endregion #region Packages @@ -336,6 +341,10 @@ namespace WebsitePanel.EnterpriseServer public const int ERROR_FILE_MOVE_PATH_ALREADY_EXISTS = -3004; #endregion + #region Lync Server + public const int ERROR_LYNC_DELETE_SOME_PROBLEMS = -2806; + #endregion + public static string ToText(int code) { switch (code) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/GenericStringResult.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/GenericStringResult.cs index 714a41fa..3eed3879 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/GenericStringResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/GenericStringResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/DatabaseServers/DatabaseBrowserConfiguration.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/DatabaseServers/DatabaseBrowserConfiguration.cs index a1cc8773..b667fb5d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/DatabaseServers/DatabaseBrowserConfiguration.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/DatabaseServers/DatabaseBrowserConfiguration.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/BillingCycle.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/BillingCycle.cs index b549cbe4..bde08224 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/BillingCycle.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/BillingCycle.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Category.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Category.cs index 2def2e57..45adac5d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Category.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Category.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckDomainResult.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckDomainResult.cs index c6551ec2..7a10a929 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckDomainResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckDomainResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutDetails.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutDetails.cs index a7231930..cf569a09 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutDetails.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutDetails.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutFormParams.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutFormParams.cs index 0205c728..c28a49bf 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutFormParams.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutFormParams.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutKeys.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutKeys.cs index f0a75679..559767d3 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutKeys.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutKeys.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutResult.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutResult.cs index 05946c53..fbc44fee 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/CheckoutResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Common/GenericResult.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Common/GenericResult.cs index 596604f9..a61a1c4a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Common/GenericResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Common/GenericResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ContractSystem/Contract.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ContractSystem/Contract.cs index 21b38e70..e14d2136 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ContractSystem/Contract.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ContractSystem/Contract.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/DomainNameCycle.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/DomainNameCycle.cs index 630d29aa..8de85022 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/DomainNameCycle.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/DomainNameCycle.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/FormParameters.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/FormParameters.cs index 1dd00ad4..44651c24 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/FormParameters.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/FormParameters.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/GenericSvcResult.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/GenericSvcResult.cs index 32363759..3aa82a55 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/GenericSvcResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/GenericSvcResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/HostingAddon.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/HostingAddon.cs index 822a6bc4..cb2b9287 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/HostingAddon.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/HostingAddon.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/HostingPlan.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/HostingPlan.cs index d1172bb1..c52e7b2c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/HostingPlan.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/HostingPlan.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/HostingPlanCycle.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/HostingPlanCycle.cs index 8c65bf05..09e0c553 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/HostingPlanCycle.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/HostingPlanCycle.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/IDomainRegistrar.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/IDomainRegistrar.cs index 0d54efd0..2257958a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/IDomainRegistrar.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/IDomainRegistrar.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/IInteractivePaymentGatewayProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/IInteractivePaymentGatewayProvider.cs index c868b0bf..daec7335 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/IInteractivePaymentGatewayProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/IInteractivePaymentGatewayProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/IPaymentGatewayProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/IPaymentGatewayProvider.cs index 3546345a..5a7c207b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/IPaymentGatewayProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/IPaymentGatewayProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Invoice.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Invoice.cs index 0c8f8965..d7165821 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Invoice.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Invoice.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/InvoiceItem.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/InvoiceItem.cs index fdee5560..beab6460 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/InvoiceItem.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/InvoiceItem.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/KeyValueBunch.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/KeyValueBunch.cs index ac4a8fe3..4f7ecd41 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/KeyValueBunch.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/KeyValueBunch.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/OrderResult.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/OrderResult.cs index e3ae7b66..3e147126 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/OrderResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/OrderResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Payment.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Payment.cs index c77e40f2..e344d719 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Payment.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Payment.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/PaymentMethod.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/PaymentMethod.cs index adf911cc..ac858ef6 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/PaymentMethod.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/PaymentMethod.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Product.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Product.cs index dbc158a7..eee2d827 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Product.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Product.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ProductType.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ProductType.cs index 693c6a45..1d88c3bc 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ProductType.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ProductType.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ResultCodes.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ResultCodes.cs index 97185431..da4a47bb 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ResultCodes.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ResultCodes.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Service.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Service.cs index 845895b2..35fdc83a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Service.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Service.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ServiceHandlers/HandlerResponse.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ServiceHandlers/HandlerResponse.cs index f48ee426..e8a63f51 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ServiceHandlers/HandlerResponse.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/ServiceHandlers/HandlerResponse.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/StoreSettings.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/StoreSettings.cs index c0c0f36c..ebbafda4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/StoreSettings.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/StoreSettings.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/SupportedPlugin.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/SupportedPlugin.cs index f4b31780..19e06fae 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/SupportedPlugin.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/SupportedPlugin.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/SystemPlugins/ISystemPlugin.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/SystemPlugins/ISystemPlugin.cs index e979b9f5..e3b903d3 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/SystemPlugins/ISystemPlugin.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/SystemPlugins/ISystemPlugin.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/SystemPlugins/SystemPluginBase.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/SystemPlugins/SystemPluginBase.cs index 605ef64a..dda95fb0 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/SystemPlugins/SystemPluginBase.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/SystemPlugins/SystemPluginBase.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TLDExtension.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TLDExtension.cs index 75dc93ab..7b6589fb 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TLDExtension.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TLDExtension.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TaxZone.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TaxZone.cs index 50b10417..a8371461 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TaxZone.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TaxZone.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Taxation.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Taxation.cs index 50430af0..f9e258d4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Taxation.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/Taxation.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TopLevelDomain.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TopLevelDomain.cs index 647e6e13..3ca07f41 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TopLevelDomain.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TopLevelDomain.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TransactionResult.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TransactionResult.cs index 1d41ab08..7999a97b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TransactionResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TransactionResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TriggerSystem/ITriggerHandler.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TriggerSystem/ITriggerHandler.cs index c3841004..003239d2 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TriggerSystem/ITriggerHandler.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Ecommerce/TriggerSystem/ITriggerHandler.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/ExchangeServer/ExchangeEmailAddress.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/ExchangeServer/ExchangeEmailAddress.cs index ee9d4bf3..0eccbbc1 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/ExchangeServer/ExchangeEmailAddress.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/ExchangeServer/ExchangeEmailAddress.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Log/LogRecord.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Log/LogRecord.cs index 8cc41028..207d3603 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Log/LogRecord.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Log/LogRecord.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanContext.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanContext.cs index 5ecf777c..dd0d1c67 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanContext.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanContext.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanGroupInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanGroupInfo.cs index c3842468..76270097 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanGroupInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanGroupInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanInfo.cs index 072f5c76..86bba986 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanQuotaInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanQuotaInfo.cs index 8b18a9c6..64db3ee8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanQuotaInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/HostingPlanQuotaInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageAddonInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageAddonInfo.cs index 5f3ed466..fd87dd84 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageAddonInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageAddonInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -43,6 +43,8 @@ namespace WebsitePanel.EnterpriseServer int statusId; DateTime purchaseDate; string comments; + string planName; + string planDescription; public PackageAddonInfo() @@ -90,5 +92,18 @@ namespace WebsitePanel.EnterpriseServer get { return this.statusId; } set { this.statusId = value; } } + + public string PlanName + { + get { return planName; } + set { planName = value; } + } + + public string PlanDescription + { + get { return planDescription; } + set { planDescription = value; } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageContext.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageContext.cs index 31b053bf..e36edb0e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageContext.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageContext.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageInfo.cs index 18c1b8f0..8f6644af 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageResult.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageResult.cs index 57f7a3d8..601ac4b8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageSettings.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageSettings.cs index 4ea94b6d..6d2ba63c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageSettings.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageSettings.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -42,7 +42,6 @@ namespace WebsitePanel.EnterpriseServer public const string NAME_SERVERS = "NameServers"; public const string SHARED_SSL_SITES = "SharedSslSites"; public const string EXCHANGE_SERVER = "ExchangeServer"; - public const string EXCHANGE_HOSTED_EDITION = "ExchangeHostedEdition"; public const string HOSTED_SOLLUTION = "HostedSollution"; public const string VIRTUAL_PRIVATE_SERVERS = "VirtualPrivateServers"; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageStatus.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageStatus.cs index 529e9fd7..c67b36ed 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageStatus.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/PackageStatus.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/QuotaInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/QuotaInfo.cs index e83f6b82..a227a89d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/QuotaInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/QuotaInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/QuotaValueInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/QuotaValueInfo.cs index 2af8ca69..b6d645a4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/QuotaValueInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/QuotaValueInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs index 9284699d..2922d7c7 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Packages/Quotas.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -105,10 +105,12 @@ order by rg.groupOrder public const string EXCHANGE2007_OWAENABLED = "Exchange2007.OWAEnabled"; // OWA Enabled by default public const string EXCHANGE2007_MAPIENABLED = "Exchange2007.MAPIEnabled"; // MAPI Enabled by default public const string EXCHANGE2007_ACTIVESYNCENABLED = "Exchange2007.ActiveSyncEnabled"; // ActiveSync Enabled by default - public const string EXCHANGEHOSTEDEDITION_DOMAINS = "ExchangeHostedEdition.Domains"; - public const string EXCHANGEHOSTEDEDITION_MAILBOXES = "ExchangeHostedEdition.Mailboxes"; - public const string EXCHANGEHOSTEDEDITION_CONTACTS = "ExchangeHostedEdition.Contacts"; - public const string EXCHANGEHOSTEDEDITION_DISTRIBUTIONLISTS = "ExchangeHostedEdition.DistributionLists"; + public const string EXCHANGE2007_KEEPDELETEDITEMSDAYS = "Exchange2007.KeepDeletedItemsDays"; // Keep deleted items + public const string EXCHANGE2007_MAXRECIPIENTS = "Exchange2007.MaxRecipients"; // Max Recipients + public const string EXCHANGE2007_MAXSENDMESSAGESIZEKB = "Exchange2007.MaxSendMessageSizeKB"; // Max Send Message Size + public const string EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB = "Exchange2007.MaxReceiveMessageSizeKB"; // Max Receive Message Size + public const string EXCHANGE2007_ISCONSUMER = "Exchange2007.IsConsumer"; // Is Consumer Organization + public const string EXCHANGE2007_ENABLEDPLANSEDITING = "Exchange2007.EnablePlansEditing"; // Enabled plans editing public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size @@ -136,7 +138,8 @@ order by rg.groupOrder public const string SHAREPOINT_SITES = "SharePoint.Sites"; // SharePoint Sites public const string HOSTED_SHAREPOINT_SITES = "HostedSharePoint.Sites"; // Hosted SharePoint Sites public const string HOSTED_SHAREPOINT_STORAGE_SIZE = "HostedSharePoint.MaxStorage"; // Hosted SharePoint storage size; - public const string DNS_EDITOR = "DNS.Editor"; // DNS Editor + public const string HOSTED_SHAREPOINT_USESHAREDSSL = "HostedSharePoint.UseSharedSSL"; // Hosted SharePoint Use Shared SSL Root + public const string DNS_EDITOR = "DNS.Editor"; // DNS Editor public const string DNS_ZONES = "DNS.Zones"; // DNS Editor public const string DNS_PRIMARY_ZONES = "DNS.PrimaryZones"; // DNS Editor public const string DNS_SECONDARY_ZONES = "DNS.SecondaryZones"; // DNS Editor @@ -205,7 +208,19 @@ order by rg.groupOrder public const string OCS_PresenceAllowed = "OCS.PresenceAllowed"; public const string OCS_PresenceAllowedByDefault = "OCS.PresenceAllowedByDefault"; - + + public const string LYNC_USERS = "Lync.Users"; + public const string LYNC_FEDERATION = "Lync.Federation"; + public const string LYNC_CONFERENCING = "Lync.Conferencing"; + public const string LYNC_MAXPARTICIPANTS = "Lync.MaxParticipants"; + public const string LYNC_ALLOWVIDEO = "Lync.AllowVideo"; + public const string LYNC_ENTERPRISEVOICE = "Lync.EnterpriseVoice"; + public const string LYNC_EVUSERS = "Lync.EVUsers"; + public const string LYNC_EVNATIONAL = "Lync.EVNational"; + public const string LYNC_EVMOBILE = "Lync.EVMobile"; + public const string LYNC_EVINTERNATIONAL = "Lync.EVInternational"; + public const string LYNC_ENABLEDPLANSEDITING = "Lync.EnablePlansEditing"; + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Reports/OverusageReport.custom.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Reports/OverusageReport.custom.cs index 32a164f4..7cee5a38 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Reports/OverusageReport.custom.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Reports/OverusageReport.custom.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Reports/OverusageReportUtils.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Reports/OverusageReportUtils.cs index afd8282a..41dd74d2 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Reports/OverusageReportUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Reports/OverusageReportUtils.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleInfo.cs index 91249fbc..4a8d0a54 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/SchedulePriority.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/SchedulePriority.cs index 18888a04..9b904cd4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/SchedulePriority.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/SchedulePriority.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleStatus.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleStatus.cs index e99304c4..ef9e5be4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleStatus.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleStatus.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleTaskInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleTaskInfo.cs index d573d8d1..04045c28 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleTaskInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleTaskInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleTaskParameterInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleTaskParameterInfo.cs index 222078a0..688f2959 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleTaskParameterInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleTaskParameterInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleTaskParameterType.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleTaskParameterType.cs index 959a4b3b..d57f2fcf 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleTaskParameterType.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleTaskParameterType.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleType.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleType.cs index 405eb47f..0aa5a078 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleType.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleType.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleViewConfiguration.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleViewConfiguration.cs index fe209088..42ec6c00 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleViewConfiguration.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ScheduleViewConfiguration.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/SchedulerException.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/SchedulerException.cs index 75470d69..6d487a88 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/SchedulerException.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/SchedulerException.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/SchedulerTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/SchedulerTask.cs index b4706313..d654021e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/SchedulerTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/SchedulerTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ThreadStartParameters.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ThreadStartParameters.cs index b786d53a..39a2c953 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ThreadStartParameters.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Scheduling/ThreadStartParameters.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Security/DemandAccount.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Security/DemandAccount.cs index b6a6fc27..720f6bd4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Security/DemandAccount.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Security/DemandAccount.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -38,6 +38,10 @@ namespace WebsitePanel.EnterpriseServer NotDemo = 0x1, IsActive = 0x2, IsAdmin = 0x4, - IsReseller = 0x8 + IsReseller = 0x8, + IsPlatformCSR = 0x10, + IsPlatformHelpdesk = 0x20, + IsResellerCSR = 0x40, + IsResellerHelpdesk = 0x80, } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Security/DemandPackage.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Security/DemandPackage.cs index 80d4fb7b..2b032f37 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Security/DemandPackage.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Security/DemandPackage.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ClusterInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ClusterInfo.cs index 3714a9c1..d7bb6504 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ClusterInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ClusterInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/DomainInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/DomainInfo.cs index cb891ae9..cd716b2c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/DomainInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/DomainInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/DomainType.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/DomainType.cs index a6b4554b..43406f1a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/DomainType.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/DomainType.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/GlobalDnsRecord.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/GlobalDnsRecord.cs index c4b4ba51..773026b4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/GlobalDnsRecord.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/GlobalDnsRecord.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -36,6 +36,22 @@ namespace WebsitePanel.EnterpriseServer public class GlobalDnsRecord { private int recordId; + private string internalIP; + private string externalIP; + private int recordOrder; + private int groupId; + private int serviceId; + private int serverId; + private int packageId; + private string recordType; + private string recordName; + private string recordData; + private int mxPriority; + private int ipAddressId; + private int srvPriority; + private int srvWeight; + private int srvPort; + public int RecordId { @@ -43,63 +59,54 @@ namespace WebsitePanel.EnterpriseServer set { recordId = value; } } - private int recordOrder; public int RecordOrder { get { return recordOrder; } set { recordOrder = value; } } - private int groupId; public int GroupId { get { return groupId; } set { groupId = value; } } - private int serviceId; public int ServiceId { get { return serviceId; } set { serviceId = value; } } - private int serverId; public int ServerId { get { return serverId; } set { serverId = value; } } - private int packageId; public int PackageId { get { return packageId; } set { packageId = value; } } - private string recordType; public string RecordType { get { return recordType; } set { recordType = value; } } - private string recordName; public string RecordName { get { return recordName; } set { recordName = value; } } - private string recordData; public string RecordData { get { return recordData; } set { recordData = value; } } - private int mxPriority; public int MxPriority { @@ -107,7 +114,6 @@ namespace WebsitePanel.EnterpriseServer set { mxPriority = value; } } - private int ipAddressId; public int IpAddressId { @@ -115,9 +121,6 @@ namespace WebsitePanel.EnterpriseServer set { ipAddressId = value; } } - private string internalIP; - private string externalIP; - public GlobalDnsRecord() { } @@ -133,5 +136,24 @@ namespace WebsitePanel.EnterpriseServer get { return this.externalIP; } set { this.externalIP = value; } } + + + public int SrvPriority + { + get { return srvPriority; } + set { srvPriority = value; } + } + + public int SrvWeight + { + get { return srvWeight; } + set { srvWeight = value; } + } + + public int SrvPort + { + get { return srvPort; } + set { srvPort = value; } + } } -} +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressInfo.cs index 81e88e79..b16f48d8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressPool.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressPool.cs index 7d442d7f..d2a3656a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressPool.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressPool.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressesPaged.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressesPaged.cs index b85ec9a3..862e15b7 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressesPaged.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/IPAddressesPaged.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ProviderInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ProviderInfo.cs index c31628f0..c21eec09 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ProviderInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ProviderInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ResourceGroupInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ResourceGroupInfo.cs index 86a73e1c..abec2ff0 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ResourceGroupInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ResourceGroupInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ResourceGroups.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ResourceGroups.cs index d7ae1e70..e1a569e1 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ResourceGroups.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ResourceGroups.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -38,18 +38,19 @@ namespace WebsitePanel.EnterpriseServer public const string MySql4 = "MySQL4"; public const string MsSql2005 = "MsSQL2005"; public const string MsSql2008 = "MsSQL2008"; + public const string MsSql2012 = "MsSQL2012"; public const string MySql5 = "MySQL5"; public const string Dns = "DNS"; public const string Statistics = "Statistics"; public const string SharePoint = "SharePoint"; public const string HostedSharePoint = "Hosted SharePoint"; public const string Exchange = "Exchange"; - public const string ExchangeHostedEdition = "ExchangeHostedEdition"; public const string HostedOrganizations = "Hosted Organizations"; public const string HostedCRM = "Hosted CRM"; public const string VPS = "VPS"; public const string BlackBerry = "BlackBerry"; public const string OCS = "OCS"; public const string VPSForPC = "VPSForPC"; + public const string Lync = "Lync"; } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ServerInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ServerInfo.cs index f95c922d..5560a08e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ServerInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ServerInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ServiceInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ServiceInfo.cs index ef248abc..9a704b12 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ServiceInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/ServiceInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/VirtualGroupInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/VirtualGroupInfo.cs index f8e04eca..03359b56 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/VirtualGroupInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Servers/VirtualGroupInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/System/SystemSettings.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/System/SystemSettings.cs index 04ed5497..904dec23 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/System/SystemSettings.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/System/SystemSettings.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -41,6 +41,7 @@ namespace WebsitePanel.EnterpriseServer public const string SMTP_SETTINGS = "SmtpSettings"; public const string BACKUP_SETTINGS = "BackupSettings"; public const string SETUP_SETTINGS = "SetupSettings"; + public const string WPI_SETTINGS = "WpiSettings"; public static readonly SystemSettings Empty = new SystemSettings { SettingsArray = new string[][] {} }; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTask.cs index 91eb97ad..8ea92110 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTaskLogRecord.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTaskLogRecord.cs index c3801386..d6ef3ab4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTaskLogRecord.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Tasks/BackgroundTaskLogRecord.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserInfo.cs index 6ca5d87b..a960ad5c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -33,225 +33,249 @@ using System.Xml.Linq; namespace WebsitePanel.EnterpriseServer { - /// - /// User account. - /// - [Serializable] - public class UserInfo - { - private int userId; - private int ownerId; - private int roleId; - private int statusId; - private DateTime created; - private DateTime changed; - private bool isPeer; - private bool isDemo; - private string comments; - private string username; - private string password; - private string firstName; - private string lastName; - private string email; - private string secondaryEmail; - private string address; - private string city; - private string country; - private string state; - private string zip; - private string primaryPhone; - private string secondaryPhone; - private string fax; - private string instantMessenger; + /// + /// User account. + /// + [Serializable] + public class UserInfo + { + private int userId; + private int ownerId; + private int roleId; + private int statusId; + private int loginStatusId; + private int failedLogins; + private DateTime created; + private DateTime changed; + private bool isPeer; + private bool isDemo; + private string comments; + private string username; + private string password; + private string firstName; + private string lastName; + private string email; + private string secondaryEmail; + private string address; + private string city; + private string country; + private string state; + private string zip; + private string primaryPhone; + private string secondaryPhone; + private string fax; + private string instantMessenger; private bool htmlMail; - private string companyName; - private bool ecommerceEnabled; + private string companyName; + private bool ecommerceEnabled; - /// - /// Creates a new instance of UserInfo class. - /// - public UserInfo() - { - } + /// + /// Creates a new instance of UserInfo class. + /// + public UserInfo() + { + } - /// - /// User role ID: - /// Administrator = 1, - /// Reseller = 2, - /// User = 3 - /// - public int RoleId - { - get { return roleId; } - set { roleId = value; } - } + /// + /// User role ID: + /// Administrator = 1, + /// Reseller = 2, + /// User = 3 + /// + public int RoleId + { + get { return roleId; } + set { roleId = value; } + } - /// - /// User role. - /// - public UserRole Role - { - get { return (UserRole)roleId; } - set { roleId = (int)value; } - } - /// - /// User account status: - /// Active = 1, - /// Suspended = 2, - /// Cancelled = 3, - /// Pending = 4 - /// - public int StatusId - { - get { return statusId; } - set { statusId = value; } - } + /// + /// User role. + /// + public UserRole Role + { + get { return (UserRole)roleId; } + set { roleId = (int)value; } + } - /// - /// User account status. - /// - public UserStatus Status - { - get { return (UserStatus)statusId; } - set { statusId = (int)value; } - } + /// + /// User account status: + /// Active = 1, + /// Suspended = 2, + /// Cancelled = 3, + /// Pending = 4 + /// + public int StatusId + { + get { return statusId; } + set { statusId = value; } + } - /// - /// User account unique identifier. - /// - public int UserId - { - get { return userId; } - set { userId = value; } - } + /// + /// User account status. + /// + public UserStatus Status + { + get { return (UserStatus)statusId; } + set { statusId = (int)value; } + } - public int OwnerId - { - get { return ownerId; } - set { ownerId = value; } - } - public bool IsPeer - { - get { return isPeer; } - set { isPeer = value; } - } + public int LoginStatusId + { + get { return loginStatusId; } + set { loginStatusId = value; } + } - public DateTime Created - { - get { return created; } - set { created = value; } - } + public UserLoginStatus LoginStatus + { + get { return (UserLoginStatus)loginStatusId; } + set { loginStatusId = (int)value; } + } - public DateTime Changed - { - get { return changed; } - set { changed = value; } - } + public int FailedLogins + { + get { return failedLogins; } + set { failedLogins = value; } + } - public bool IsDemo - { - get { return isDemo; } - set { isDemo = value; } - } - public string Comments - { - get { return comments; } - set { comments = value; } - } - public string LastName - { - get { return this.lastName; } - set { this.lastName = value; } - } + /// + /// User account unique identifier. + /// + public int UserId + { + get { return userId; } + set { userId = value; } + } - public string Username - { - get { return this.username; } - set { this.username = value; } - } + public int OwnerId + { + get { return ownerId; } + set { ownerId = value; } + } - public string Password - { - get { return this.password; } - set { this.password = value; } - } + public bool IsPeer + { + get { return isPeer; } + set { isPeer = value; } + } - public string FirstName - { - get { return this.firstName; } - set { this.firstName = value; } - } + public DateTime Created + { + get { return created; } + set { created = value; } + } - public string Email - { - get { return this.email; } - set { this.email = value; } - } + public DateTime Changed + { + get { return changed; } + set { changed = value; } + } - public string PrimaryPhone - { - get { return this.primaryPhone; } - set { this.primaryPhone = value; } - } + public bool IsDemo + { + get { return isDemo; } + set { isDemo = value; } + } - public string Zip - { - get { return this.zip; } - set { this.zip = value; } - } + public string Comments + { + get { return comments; } + set { comments = value; } + } - public string InstantMessenger - { - get { return this.instantMessenger; } - set { this.instantMessenger = value; } - } + public string LastName + { + get { return this.lastName; } + set { this.lastName = value; } + } - public string Fax - { - get { return this.fax; } - set { this.fax = value; } - } + public string Username + { + get { return this.username; } + set { this.username = value; } + } - public string SecondaryPhone - { - get { return this.secondaryPhone; } - set { this.secondaryPhone = value; } - } + public string Password + { + get { return this.password; } + set { this.password = value; } + } - public string SecondaryEmail - { - get { return this.secondaryEmail; } - set { this.secondaryEmail = value; } - } + public string FirstName + { + get { return this.firstName; } + set { this.firstName = value; } + } - public string Country - { - get { return this.country; } - set { this.country = value; } - } + public string Email + { + get { return this.email; } + set { this.email = value; } + } - public string Address - { - get { return this.address; } - set { this.address = value; } - } + public string PrimaryPhone + { + get { return this.primaryPhone; } + set { this.primaryPhone = value; } + } - public string City - { - get { return this.city; } - set { this.city = value; } - } + public string Zip + { + get { return this.zip; } + set { this.zip = value; } + } - public string State - { - get { return this.state; } - set { this.state = value; } - } + public string InstantMessenger + { + get { return this.instantMessenger; } + set { this.instantMessenger = value; } + } + + public string Fax + { + get { return this.fax; } + set { this.fax = value; } + } + + public string SecondaryPhone + { + get { return this.secondaryPhone; } + set { this.secondaryPhone = value; } + } + + public string SecondaryEmail + { + get { return this.secondaryEmail; } + set { this.secondaryEmail = value; } + } + + public string Country + { + get { return this.country; } + set { this.country = value; } + } + + public string Address + { + get { return this.address; } + set { this.address = value; } + } + + public string City + { + get { return this.city; } + set { this.city = value; } + } + + public string State + { + get { return this.state; } + set { this.state = value; } + } public bool HtmlMail { @@ -259,17 +283,17 @@ namespace WebsitePanel.EnterpriseServer set { this.htmlMail = value; } } - public string CompanyName - { - get { return this.companyName; } - set { this.companyName = value; } - } + public string CompanyName + { + get { return this.companyName; } + set { this.companyName = value; } + } - public bool EcommerceEnabled - { - get { return this.ecommerceEnabled; } - set { this.ecommerceEnabled = value; } - } + public bool EcommerceEnabled + { + get { return this.ecommerceEnabled; } + set { this.ecommerceEnabled = value; } + } public string AdditionalParams { get; set; } @@ -289,10 +313,10 @@ namespace WebsitePanel.EnterpriseServer XElement vLansElement = doc.Root.Element("VLans"); if (vLansElement != null) { - foreach(var item in vLansElement.Elements("VLan")) + foreach (var item in vLansElement.Elements("VLan")) result.Add(new UserVlan { - VLanID = item.Attribute("VLanID") != null ? ushort.Parse(item.Attribute("VLanID").Value) : (ushort) 0, + VLanID = item.Attribute("VLanID") != null ? ushort.Parse(item.Attribute("VLanID").Value) : (ushort)0, Comment = item.Attribute("Comment") != null ? item.Attribute("Comment").Value : null }); } @@ -304,7 +328,7 @@ namespace WebsitePanel.EnterpriseServer return result; } } - } + } /// /// User's VLans diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserLoginStatus.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserLoginStatus.cs new file mode 100644 index 00000000..ee564350 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserLoginStatus.cs @@ -0,0 +1,42 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; + +namespace WebsitePanel.EnterpriseServer +{ + /// + /// Summary description for AccountLoginStatus. + /// + public enum UserLoginStatus + { + Enabled = 0, + Disabled = 1, + LockedOut = 2 + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserRole.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserRole.cs index 9aa8bc4e..c83a3abb 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserRole.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserRole.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -37,6 +37,10 @@ namespace WebsitePanel.EnterpriseServer { Administrator = 1, Reseller = 2, - User = 3 + User = 3, + ResellerCSR = 4, + PlatformCSR = 5, + ResellerHelpdesk = 6, + PlatformHelpdesk = 7 } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs index 8fb6e56b..b69dfc04 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -52,13 +52,16 @@ namespace WebsitePanel.EnterpriseServer public const string MYSQL_POLICY = "MySqlPolicy"; public const string SHAREPOINT_POLICY = "SharePointPolicy"; public const string OS_POLICY = "OsPolicy"; - public const string EXCHANGE_POLICY = "ExchangePolicy"; + public const string EXCHANGE_POLICY = "ExchangePolicy"; public const string EXCHANGE_HOSTED_EDITION_POLICY = "ExchangeHostedEditionPolicy"; public const string WEBSITEPANEL_POLICY = "WebsitePanelPolicy"; public const string VPS_POLICY = "VpsPolicy"; public const string DISPLAY_PREFS = "DisplayPreferences"; public const string GRID_ITEMS = "GridItems"; + public const string DEFAULT_MAILBOXPLANS = "DefaultMailboxPlans"; + public const string DEFAULT_LYNCUSERPLANS = "DefaultLyncUserPlans"; + public int UserId; public string SettingsName; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserStatus.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserStatus.cs index 8c769793..d7a2fda4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserStatus.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserStatus.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -30,14 +30,14 @@ using System; namespace WebsitePanel.EnterpriseServer { - /// - /// Summary description for AccountStatus. - /// - public enum UserStatus - { - Active = 1, - Suspended = 2, - Cancelled = 3, - Pending = 4 - } + /// + /// Summary description for AccountStatus. + /// + public enum UserStatus + { + Active = 1, + Suspended = 2, + Cancelled = 3, + Pending = 4 + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UsernamePolicy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UsernamePolicy.cs index 14fcd3a1..9487df2a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UsernamePolicy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UsernamePolicy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/NetworkAdapterDetails.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/NetworkAdapterDetails.cs index 4e71c72b..ce0e201b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/NetworkAdapterDetails.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/NetworkAdapterDetails.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/NetworkAdapterIPAddress.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/NetworkAdapterIPAddress.cs index 72c7a64f..8147ad89 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/NetworkAdapterIPAddress.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/NetworkAdapterIPAddress.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PackageIPAddress.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PackageIPAddress.cs index 7da284e9..88e0e1f4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PackageIPAddress.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PackageIPAddress.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PackageIPAddressesPaged.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PackageIPAddressesPaged.cs index dda3babe..ab66da8e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PackageIPAddressesPaged.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PackageIPAddressesPaged.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PrivateIPAddress.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PrivateIPAddress.cs index e01dab29..66b84828 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PrivateIPAddress.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PrivateIPAddress.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PrivateIPAddressesPaged.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PrivateIPAddressesPaged.cs index 6a139068..3dc76776 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PrivateIPAddressesPaged.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/PrivateIPAddressesPaged.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualMachineMetaItem.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualMachineMetaItem.cs index 9982f58e..7f2c2b8c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualMachineMetaItem.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualMachineMetaItem.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualMachineMetaItemsPaged.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualMachineMetaItemsPaged.cs index c171f746..d8957cdf 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualMachineMetaItemsPaged.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualMachineMetaItemsPaged.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualMachinePermission.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualMachinePermission.cs index affeca0e..67fd1505 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualMachinePermission.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualMachinePermission.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualizationErrorCodes.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualizationErrorCodes.cs index 4a4c2546..beeeb237 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualizationErrorCodes.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualizationErrorCodes.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj index 8c1018da..9350215a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj @@ -156,6 +156,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Wizards/ApplicationInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Wizards/ApplicationInfo.cs index 411c29ef..95b9369c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Wizards/ApplicationInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Wizards/ApplicationInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Wizards/InstallationInfo.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Wizards/InstallationInfo.cs index 70731f70..0aba9bab 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Wizards/InstallationInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Wizards/InstallationInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ApplicationsInstallerProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ApplicationsInstallerProxy.cs index 794a5673..15662f96 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ApplicationsInstallerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ApplicationsInstallerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/AuditLogProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/AuditLogProxy.cs index b2052185..c9a7e050 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/AuditLogProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/AuditLogProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/AuthenticationProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/AuthenticationProxy.cs index 8293ec91..628cb2c7 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/AuthenticationProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/AuthenticationProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/BackupProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/BackupProxy.cs index 708832bf..f08daee2 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/BackupProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/BackupProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/BlackBerryProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/BlackBerryProxy.cs index 08b619db..27197897 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/BlackBerryProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/BlackBerryProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/CRMProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/CRMProxy.cs index a1497c69..bdd6379e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/CRMProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/CRMProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/CommentsProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/CommentsProxy.cs index 08a06820..e355e6db 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/CommentsProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/CommentsProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/Common/EnterpriseServerProxyConfigurator.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/Common/EnterpriseServerProxyConfigurator.cs index 0cda7de8..0658013c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/Common/EnterpriseServerProxyConfigurator.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/Common/EnterpriseServerProxyConfigurator.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/Common/UsernameAssertion.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/Common/UsernameAssertion.cs index 08632054..ab5098ae 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/Common/UsernameAssertion.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/Common/UsernameAssertion.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/DatabaseServersProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/DatabaseServersProxy.cs index 787e8e8f..a04feca5 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/DatabaseServersProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/DatabaseServersProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeHostedEditionProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeHostedEditionProxy.cs deleted file mode 100644 index e8b723c4..00000000 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeHostedEditionProxy.cs +++ /dev/null @@ -1,950 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4952 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// -// This source code was auto-generated by wsdl, Version=2.0.50727.42. -// -namespace WebsitePanel.EnterpriseServer { - using System.Xml.Serialization; - using System.Web.Services; - using System.ComponentModel; - using System.Web.Services.Protocols; - using System; - using System.Diagnostics; - - using WebsitePanel.Providers; - using WebsitePanel.Providers.Common; - using WebsitePanel.Providers.ExchangeHostedEdition; - using WebsitePanel.Providers.ResultObjects; - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name="esExchangeHostedEditionSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] - public partial class esExchangeHostedEdition : Microsoft.Web.Services3.WebServicesClientProtocol { - - private System.Threading.SendOrPostCallback GetOrganizationsOperationCompleted; - - private System.Threading.SendOrPostCallback CreateExchangeOrganizationOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeOrganizationDetailsOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeOrganizationDomainsOperationCompleted; - - private System.Threading.SendOrPostCallback GetExchangeOrganizationSummaryOperationCompleted; - - private System.Threading.SendOrPostCallback SendExchangeOrganizationSummaryOperationCompleted; - - private System.Threading.SendOrPostCallback AddExchangeOrganizationDomainOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteExchangeOrganizationDomainOperationCompleted; - - private System.Threading.SendOrPostCallback UpdateExchangeOrganizationQuotasOperationCompleted; - - private System.Threading.SendOrPostCallback UpdateExchangeOrganizationCatchAllAddressOperationCompleted; - - private System.Threading.SendOrPostCallback UpdateExchangeOrganizationServicePlanOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteExchangeOrganizationOperationCompleted; - - /// - public esExchangeHostedEdition() { - this.Url = "http://localhost:9002/esExchangeHostedEdition.asmx"; - } - - /// - public event GetOrganizationsCompletedEventHandler GetOrganizationsCompleted; - - /// - public event CreateExchangeOrganizationCompletedEventHandler CreateExchangeOrganizationCompleted; - - /// - public event GetExchangeOrganizationDetailsCompletedEventHandler GetExchangeOrganizationDetailsCompleted; - - /// - public event GetExchangeOrganizationDomainsCompletedEventHandler GetExchangeOrganizationDomainsCompleted; - - /// - public event GetExchangeOrganizationSummaryCompletedEventHandler GetExchangeOrganizationSummaryCompleted; - - /// - public event SendExchangeOrganizationSummaryCompletedEventHandler SendExchangeOrganizationSummaryCompleted; - - /// - public event AddExchangeOrganizationDomainCompletedEventHandler AddExchangeOrganizationDomainCompleted; - - /// - public event DeleteExchangeOrganizationDomainCompletedEventHandler DeleteExchangeOrganizationDomainCompleted; - - /// - public event UpdateExchangeOrganizationQuotasCompletedEventHandler UpdateExchangeOrganizationQuotasCompleted; - - /// - public event UpdateExchangeOrganizationCatchAllAddressCompletedEventHandler UpdateExchangeOrganizationCatchAllAddressCompleted; - - /// - public event UpdateExchangeOrganizationServicePlanCompletedEventHandler UpdateExchangeOrganizationServicePlanCompleted; - - /// - public event DeleteExchangeOrganizationCompletedEventHandler DeleteExchangeOrganizationCompleted; - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetOrganizations", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeOrganization[] GetOrganizations(int packageId) { - object[] results = this.Invoke("GetOrganizations", new object[] { - packageId}); - return ((ExchangeOrganization[])(results[0])); - } - - /// - public System.IAsyncResult BeginGetOrganizations(int packageId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetOrganizations", new object[] { - packageId}, callback, asyncState); - } - - /// - public ExchangeOrganization[] EndGetOrganizations(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeOrganization[])(results[0])); - } - - /// - public void GetOrganizationsAsync(int packageId) { - this.GetOrganizationsAsync(packageId, null); - } - - /// - public void GetOrganizationsAsync(int packageId, object userState) { - if ((this.GetOrganizationsOperationCompleted == null)) { - this.GetOrganizationsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationsOperationCompleted); - } - this.InvokeAsync("GetOrganizations", new object[] { - packageId}, this.GetOrganizationsOperationCompleted, userState); - } - - private void OnGetOrganizationsOperationCompleted(object arg) { - if ((this.GetOrganizationsCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetOrganizationsCompleted(this, new GetOrganizationsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateExchangeOrganization", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public IntResult CreateExchangeOrganization(int packageId, string organizationId, string domain, string adminName, string adminEmail, string adminPassword) { - object[] results = this.Invoke("CreateExchangeOrganization", new object[] { - packageId, - organizationId, - domain, - adminName, - adminEmail, - adminPassword}); - return ((IntResult)(results[0])); - } - - /// - public System.IAsyncResult BeginCreateExchangeOrganization(int packageId, string organizationId, string domain, string adminName, string adminEmail, string adminPassword, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("CreateExchangeOrganization", new object[] { - packageId, - organizationId, - domain, - adminName, - adminEmail, - adminPassword}, callback, asyncState); - } - - /// - public IntResult EndCreateExchangeOrganization(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((IntResult)(results[0])); - } - - /// - public void CreateExchangeOrganizationAsync(int packageId, string organizationId, string domain, string adminName, string adminEmail, string adminPassword) { - this.CreateExchangeOrganizationAsync(packageId, organizationId, domain, adminName, adminEmail, adminPassword, null); - } - - /// - public void CreateExchangeOrganizationAsync(int packageId, string organizationId, string domain, string adminName, string adminEmail, string adminPassword, object userState) { - if ((this.CreateExchangeOrganizationOperationCompleted == null)) { - this.CreateExchangeOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateExchangeOrganizationOperationCompleted); - } - this.InvokeAsync("CreateExchangeOrganization", new object[] { - packageId, - organizationId, - domain, - adminName, - adminEmail, - adminPassword}, this.CreateExchangeOrganizationOperationCompleted, userState); - } - - private void OnCreateExchangeOrganizationOperationCompleted(object arg) { - if ((this.CreateExchangeOrganizationCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.CreateExchangeOrganizationCompleted(this, new CreateExchangeOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeOrganizationDetails", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeOrganization GetExchangeOrganizationDetails(int itemId) { - object[] results = this.Invoke("GetExchangeOrganizationDetails", new object[] { - itemId}); - return ((ExchangeOrganization)(results[0])); - } - - /// - public System.IAsyncResult BeginGetExchangeOrganizationDetails(int itemId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetExchangeOrganizationDetails", new object[] { - itemId}, callback, asyncState); - } - - /// - public ExchangeOrganization EndGetExchangeOrganizationDetails(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeOrganization)(results[0])); - } - - /// - public void GetExchangeOrganizationDetailsAsync(int itemId) { - this.GetExchangeOrganizationDetailsAsync(itemId, null); - } - - /// - public void GetExchangeOrganizationDetailsAsync(int itemId, object userState) { - if ((this.GetExchangeOrganizationDetailsOperationCompleted == null)) { - this.GetExchangeOrganizationDetailsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeOrganizationDetailsOperationCompleted); - } - this.InvokeAsync("GetExchangeOrganizationDetails", new object[] { - itemId}, this.GetExchangeOrganizationDetailsOperationCompleted, userState); - } - - private void OnGetExchangeOrganizationDetailsOperationCompleted(object arg) { - if ((this.GetExchangeOrganizationDetailsCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetExchangeOrganizationDetailsCompleted(this, new GetExchangeOrganizationDetailsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeOrganizationDomains", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeOrganizationDomain[] GetExchangeOrganizationDomains(int itemId) { - object[] results = this.Invoke("GetExchangeOrganizationDomains", new object[] { - itemId}); - return ((ExchangeOrganizationDomain[])(results[0])); - } - - /// - public System.IAsyncResult BeginGetExchangeOrganizationDomains(int itemId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetExchangeOrganizationDomains", new object[] { - itemId}, callback, asyncState); - } - - /// - public ExchangeOrganizationDomain[] EndGetExchangeOrganizationDomains(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeOrganizationDomain[])(results[0])); - } - - /// - public void GetExchangeOrganizationDomainsAsync(int itemId) { - this.GetExchangeOrganizationDomainsAsync(itemId, null); - } - - /// - public void GetExchangeOrganizationDomainsAsync(int itemId, object userState) { - if ((this.GetExchangeOrganizationDomainsOperationCompleted == null)) { - this.GetExchangeOrganizationDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeOrganizationDomainsOperationCompleted); - } - this.InvokeAsync("GetExchangeOrganizationDomains", new object[] { - itemId}, this.GetExchangeOrganizationDomainsOperationCompleted, userState); - } - - private void OnGetExchangeOrganizationDomainsOperationCompleted(object arg) { - if ((this.GetExchangeOrganizationDomainsCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetExchangeOrganizationDomainsCompleted(this, new GetExchangeOrganizationDomainsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeOrganizationSummary", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string GetExchangeOrganizationSummary(int itemId) { - object[] results = this.Invoke("GetExchangeOrganizationSummary", new object[] { - itemId}); - return ((string)(results[0])); - } - - /// - public System.IAsyncResult BeginGetExchangeOrganizationSummary(int itemId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetExchangeOrganizationSummary", new object[] { - itemId}, callback, asyncState); - } - - /// - public string EndGetExchangeOrganizationSummary(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((string)(results[0])); - } - - /// - public void GetExchangeOrganizationSummaryAsync(int itemId) { - this.GetExchangeOrganizationSummaryAsync(itemId, null); - } - - /// - public void GetExchangeOrganizationSummaryAsync(int itemId, object userState) { - if ((this.GetExchangeOrganizationSummaryOperationCompleted == null)) { - this.GetExchangeOrganizationSummaryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeOrganizationSummaryOperationCompleted); - } - this.InvokeAsync("GetExchangeOrganizationSummary", new object[] { - itemId}, this.GetExchangeOrganizationSummaryOperationCompleted, userState); - } - - private void OnGetExchangeOrganizationSummaryOperationCompleted(object arg) { - if ((this.GetExchangeOrganizationSummaryCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetExchangeOrganizationSummaryCompleted(this, new GetExchangeOrganizationSummaryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SendExchangeOrganizationSummary", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject SendExchangeOrganizationSummary(int itemId, string toEmail) { - object[] results = this.Invoke("SendExchangeOrganizationSummary", new object[] { - itemId, - toEmail}); - return ((ResultObject)(results[0])); - } - - /// - public System.IAsyncResult BeginSendExchangeOrganizationSummary(int itemId, string toEmail, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("SendExchangeOrganizationSummary", new object[] { - itemId, - toEmail}, callback, asyncState); - } - - /// - public ResultObject EndSendExchangeOrganizationSummary(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ResultObject)(results[0])); - } - - /// - public void SendExchangeOrganizationSummaryAsync(int itemId, string toEmail) { - this.SendExchangeOrganizationSummaryAsync(itemId, toEmail, null); - } - - /// - public void SendExchangeOrganizationSummaryAsync(int itemId, string toEmail, object userState) { - if ((this.SendExchangeOrganizationSummaryOperationCompleted == null)) { - this.SendExchangeOrganizationSummaryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendExchangeOrganizationSummaryOperationCompleted); - } - this.InvokeAsync("SendExchangeOrganizationSummary", new object[] { - itemId, - toEmail}, this.SendExchangeOrganizationSummaryOperationCompleted, userState); - } - - private void OnSendExchangeOrganizationSummaryOperationCompleted(object arg) { - if ((this.SendExchangeOrganizationSummaryCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.SendExchangeOrganizationSummaryCompleted(this, new SendExchangeOrganizationSummaryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddExchangeOrganizationDomain", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject AddExchangeOrganizationDomain(int itemId, string domain) { - object[] results = this.Invoke("AddExchangeOrganizationDomain", new object[] { - itemId, - domain}); - return ((ResultObject)(results[0])); - } - - /// - public System.IAsyncResult BeginAddExchangeOrganizationDomain(int itemId, string domain, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("AddExchangeOrganizationDomain", new object[] { - itemId, - domain}, callback, asyncState); - } - - /// - public ResultObject EndAddExchangeOrganizationDomain(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ResultObject)(results[0])); - } - - /// - public void AddExchangeOrganizationDomainAsync(int itemId, string domain) { - this.AddExchangeOrganizationDomainAsync(itemId, domain, null); - } - - /// - public void AddExchangeOrganizationDomainAsync(int itemId, string domain, object userState) { - if ((this.AddExchangeOrganizationDomainOperationCompleted == null)) { - this.AddExchangeOrganizationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddExchangeOrganizationDomainOperationCompleted); - } - this.InvokeAsync("AddExchangeOrganizationDomain", new object[] { - itemId, - domain}, this.AddExchangeOrganizationDomainOperationCompleted, userState); - } - - private void OnAddExchangeOrganizationDomainOperationCompleted(object arg) { - if ((this.AddExchangeOrganizationDomainCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.AddExchangeOrganizationDomainCompleted(this, new AddExchangeOrganizationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExchangeOrganizationDomain", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject DeleteExchangeOrganizationDomain(int itemId, string domain) { - object[] results = this.Invoke("DeleteExchangeOrganizationDomain", new object[] { - itemId, - domain}); - return ((ResultObject)(results[0])); - } - - /// - public System.IAsyncResult BeginDeleteExchangeOrganizationDomain(int itemId, string domain, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("DeleteExchangeOrganizationDomain", new object[] { - itemId, - domain}, callback, asyncState); - } - - /// - public ResultObject EndDeleteExchangeOrganizationDomain(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ResultObject)(results[0])); - } - - /// - public void DeleteExchangeOrganizationDomainAsync(int itemId, string domain) { - this.DeleteExchangeOrganizationDomainAsync(itemId, domain, null); - } - - /// - public void DeleteExchangeOrganizationDomainAsync(int itemId, string domain, object userState) { - if ((this.DeleteExchangeOrganizationDomainOperationCompleted == null)) { - this.DeleteExchangeOrganizationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteExchangeOrganizationDomainOperationCompleted); - } - this.InvokeAsync("DeleteExchangeOrganizationDomain", new object[] { - itemId, - domain}, this.DeleteExchangeOrganizationDomainOperationCompleted, userState); - } - - private void OnDeleteExchangeOrganizationDomainOperationCompleted(object arg) { - if ((this.DeleteExchangeOrganizationDomainCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.DeleteExchangeOrganizationDomainCompleted(this, new DeleteExchangeOrganizationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateExchangeOrganizationQuotas", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject UpdateExchangeOrganizationQuotas(int itemId, int mailboxesNumber, int contactsNumber, int distributionListsNumber) { - object[] results = this.Invoke("UpdateExchangeOrganizationQuotas", new object[] { - itemId, - mailboxesNumber, - contactsNumber, - distributionListsNumber}); - return ((ResultObject)(results[0])); - } - - /// - public System.IAsyncResult BeginUpdateExchangeOrganizationQuotas(int itemId, int mailboxesNumber, int contactsNumber, int distributionListsNumber, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("UpdateExchangeOrganizationQuotas", new object[] { - itemId, - mailboxesNumber, - contactsNumber, - distributionListsNumber}, callback, asyncState); - } - - /// - public ResultObject EndUpdateExchangeOrganizationQuotas(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ResultObject)(results[0])); - } - - /// - public void UpdateExchangeOrganizationQuotasAsync(int itemId, int mailboxesNumber, int contactsNumber, int distributionListsNumber) { - this.UpdateExchangeOrganizationQuotasAsync(itemId, mailboxesNumber, contactsNumber, distributionListsNumber, null); - } - - /// - public void UpdateExchangeOrganizationQuotasAsync(int itemId, int mailboxesNumber, int contactsNumber, int distributionListsNumber, object userState) { - if ((this.UpdateExchangeOrganizationQuotasOperationCompleted == null)) { - this.UpdateExchangeOrganizationQuotasOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateExchangeOrganizationQuotasOperationCompleted); - } - this.InvokeAsync("UpdateExchangeOrganizationQuotas", new object[] { - itemId, - mailboxesNumber, - contactsNumber, - distributionListsNumber}, this.UpdateExchangeOrganizationQuotasOperationCompleted, userState); - } - - private void OnUpdateExchangeOrganizationQuotasOperationCompleted(object arg) { - if ((this.UpdateExchangeOrganizationQuotasCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.UpdateExchangeOrganizationQuotasCompleted(this, new UpdateExchangeOrganizationQuotasCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateExchangeOrganizationCatchAllAd" + - "dress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject UpdateExchangeOrganizationCatchAllAddress(int itemId, string catchAllEmail) { - object[] results = this.Invoke("UpdateExchangeOrganizationCatchAllAddress", new object[] { - itemId, - catchAllEmail}); - return ((ResultObject)(results[0])); - } - - /// - public System.IAsyncResult BeginUpdateExchangeOrganizationCatchAllAddress(int itemId, string catchAllEmail, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("UpdateExchangeOrganizationCatchAllAddress", new object[] { - itemId, - catchAllEmail}, callback, asyncState); - } - - /// - public ResultObject EndUpdateExchangeOrganizationCatchAllAddress(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ResultObject)(results[0])); - } - - /// - public void UpdateExchangeOrganizationCatchAllAddressAsync(int itemId, string catchAllEmail) { - this.UpdateExchangeOrganizationCatchAllAddressAsync(itemId, catchAllEmail, null); - } - - /// - public void UpdateExchangeOrganizationCatchAllAddressAsync(int itemId, string catchAllEmail, object userState) { - if ((this.UpdateExchangeOrganizationCatchAllAddressOperationCompleted == null)) { - this.UpdateExchangeOrganizationCatchAllAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateExchangeOrganizationCatchAllAddressOperationCompleted); - } - this.InvokeAsync("UpdateExchangeOrganizationCatchAllAddress", new object[] { - itemId, - catchAllEmail}, this.UpdateExchangeOrganizationCatchAllAddressOperationCompleted, userState); - } - - private void OnUpdateExchangeOrganizationCatchAllAddressOperationCompleted(object arg) { - if ((this.UpdateExchangeOrganizationCatchAllAddressCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.UpdateExchangeOrganizationCatchAllAddressCompleted(this, new UpdateExchangeOrganizationCatchAllAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateExchangeOrganizationServicePla" + - "n", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject UpdateExchangeOrganizationServicePlan(int itemId, int newServiceId) { - object[] results = this.Invoke("UpdateExchangeOrganizationServicePlan", new object[] { - itemId, - newServiceId}); - return ((ResultObject)(results[0])); - } - - /// - public System.IAsyncResult BeginUpdateExchangeOrganizationServicePlan(int itemId, int newServiceId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("UpdateExchangeOrganizationServicePlan", new object[] { - itemId, - newServiceId}, callback, asyncState); - } - - /// - public ResultObject EndUpdateExchangeOrganizationServicePlan(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ResultObject)(results[0])); - } - - /// - public void UpdateExchangeOrganizationServicePlanAsync(int itemId, int newServiceId) { - this.UpdateExchangeOrganizationServicePlanAsync(itemId, newServiceId, null); - } - - /// - public void UpdateExchangeOrganizationServicePlanAsync(int itemId, int newServiceId, object userState) { - if ((this.UpdateExchangeOrganizationServicePlanOperationCompleted == null)) { - this.UpdateExchangeOrganizationServicePlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateExchangeOrganizationServicePlanOperationCompleted); - } - this.InvokeAsync("UpdateExchangeOrganizationServicePlan", new object[] { - itemId, - newServiceId}, this.UpdateExchangeOrganizationServicePlanOperationCompleted, userState); - } - - private void OnUpdateExchangeOrganizationServicePlanOperationCompleted(object arg) { - if ((this.UpdateExchangeOrganizationServicePlanCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.UpdateExchangeOrganizationServicePlanCompleted(this, new UpdateExchangeOrganizationServicePlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExchangeOrganization", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject DeleteExchangeOrganization(int itemId) { - object[] results = this.Invoke("DeleteExchangeOrganization", new object[] { - itemId}); - return ((ResultObject)(results[0])); - } - - /// - public System.IAsyncResult BeginDeleteExchangeOrganization(int itemId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("DeleteExchangeOrganization", new object[] { - itemId}, callback, asyncState); - } - - /// - public ResultObject EndDeleteExchangeOrganization(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ResultObject)(results[0])); - } - - /// - public void DeleteExchangeOrganizationAsync(int itemId) { - this.DeleteExchangeOrganizationAsync(itemId, null); - } - - /// - public void DeleteExchangeOrganizationAsync(int itemId, object userState) { - if ((this.DeleteExchangeOrganizationOperationCompleted == null)) { - this.DeleteExchangeOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteExchangeOrganizationOperationCompleted); - } - this.InvokeAsync("DeleteExchangeOrganization", new object[] { - itemId}, this.DeleteExchangeOrganizationOperationCompleted, userState); - } - - private void OnDeleteExchangeOrganizationOperationCompleted(object arg) { - if ((this.DeleteExchangeOrganizationCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.DeleteExchangeOrganizationCompleted(this, new DeleteExchangeOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - public new void CancelAsync(object userState) { - base.CancelAsync(userState); - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetOrganizationsCompletedEventHandler(object sender, GetOrganizationsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetOrganizationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeOrganization[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeOrganization[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void CreateExchangeOrganizationCompletedEventHandler(object sender, CreateExchangeOrganizationCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateExchangeOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CreateExchangeOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public IntResult Result { - get { - this.RaiseExceptionIfNecessary(); - return ((IntResult)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetExchangeOrganizationDetailsCompletedEventHandler(object sender, GetExchangeOrganizationDetailsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeOrganizationDetailsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetExchangeOrganizationDetailsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeOrganization Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeOrganization)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetExchangeOrganizationDomainsCompletedEventHandler(object sender, GetExchangeOrganizationDomainsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeOrganizationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetExchangeOrganizationDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeOrganizationDomain[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeOrganizationDomain[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetExchangeOrganizationSummaryCompletedEventHandler(object sender, GetExchangeOrganizationSummaryCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetExchangeOrganizationSummaryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetExchangeOrganizationSummaryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public string Result { - get { - this.RaiseExceptionIfNecessary(); - return ((string)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void SendExchangeOrganizationSummaryCompletedEventHandler(object sender, SendExchangeOrganizationSummaryCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SendExchangeOrganizationSummaryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SendExchangeOrganizationSummaryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void AddExchangeOrganizationDomainCompletedEventHandler(object sender, AddExchangeOrganizationDomainCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddExchangeOrganizationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AddExchangeOrganizationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DeleteExchangeOrganizationDomainCompletedEventHandler(object sender, DeleteExchangeOrganizationDomainCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteExchangeOrganizationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteExchangeOrganizationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void UpdateExchangeOrganizationQuotasCompletedEventHandler(object sender, UpdateExchangeOrganizationQuotasCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateExchangeOrganizationQuotasCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal UpdateExchangeOrganizationQuotasCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void UpdateExchangeOrganizationCatchAllAddressCompletedEventHandler(object sender, UpdateExchangeOrganizationCatchAllAddressCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateExchangeOrganizationCatchAllAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal UpdateExchangeOrganizationCatchAllAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void UpdateExchangeOrganizationServicePlanCompletedEventHandler(object sender, UpdateExchangeOrganizationServicePlanCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateExchangeOrganizationServicePlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal UpdateExchangeOrganizationServicePlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DeleteExchangeOrganizationCompletedEventHandler(object sender, DeleteExchangeOrganizationCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteExchangeOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteExchangeOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } -} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs index d3c251b1..341ae893 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ExchangeServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -26,10 +26,11 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// Runtime Version:2.0.50727.5456 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -37,7 +38,7 @@ //------------------------------------------------------------------------------ // -// This source code was auto-generated by wsdl, Version=2.0.50727.3038. +// This source code was auto-generated by wsdl, Version=2.0.50727.42. // namespace WebsitePanel.EnterpriseServer { using System.Xml.Serialization; @@ -52,12 +53,14 @@ namespace WebsitePanel.EnterpriseServer { using WebsitePanel.Providers.Common; using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.ResultObjects; - + + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="esExchangeServerSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(BaseStatistics))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] public partial class esExchangeServer : Microsoft.Web.Services3.WebServicesClientProtocol { @@ -79,7 +82,7 @@ namespace WebsitePanel.EnterpriseServer { private System.Threading.SendOrPostCallback GetMailboxesStatisticsOperationCompleted; - private System.Threading.SendOrPostCallback GetPublicFoldersStatisticsOperationCompleted; + private System.Threading.SendOrPostCallback GetMailboxStatisticsOperationCompleted; private System.Threading.SendOrPostCallback CalculateOrganizationDiskspaceOperationCompleted; @@ -95,6 +98,8 @@ namespace WebsitePanel.EnterpriseServer { private System.Threading.SendOrPostCallback GetAccountsOperationCompleted; + private System.Threading.SendOrPostCallback GetExchangeAccountByMailboxPlanIdOperationCompleted; + private System.Threading.SendOrPostCallback SearchAccountsOperationCompleted; private System.Threading.SendOrPostCallback GetAccountOperationCompleted; @@ -125,9 +130,7 @@ namespace WebsitePanel.EnterpriseServer { private System.Threading.SendOrPostCallback SetMailboxMailFlowSettingsOperationCompleted; - private System.Threading.SendOrPostCallback GetMailboxAdvancedSettingsOperationCompleted; - - private System.Threading.SendOrPostCallback SetMailboxAdvancedSettingsOperationCompleted; + private System.Threading.SendOrPostCallback SetExchangeMailboxPlanOperationCompleted; private System.Threading.SendOrPostCallback GetMailboxSetupInstructionsOperationCompleted; @@ -175,6 +178,26 @@ namespace WebsitePanel.EnterpriseServer { private System.Threading.SendOrPostCallback GetDistributionListPermissionsOperationCompleted; + private System.Threading.SendOrPostCallback GetMobileDevicesOperationCompleted; + + private System.Threading.SendOrPostCallback GetMobileDeviceOperationCompleted; + + private System.Threading.SendOrPostCallback WipeDataFromDeviceOperationCompleted; + + private System.Threading.SendOrPostCallback CancelRemoteWipeRequestOperationCompleted; + + private System.Threading.SendOrPostCallback RemoveDeviceOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeMailboxPlansOperationCompleted; + + private System.Threading.SendOrPostCallback GetExchangeMailboxPlanOperationCompleted; + + private System.Threading.SendOrPostCallback AddExchangeMailboxPlanOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteExchangeMailboxPlanOperationCompleted; + + private System.Threading.SendOrPostCallback SetOrganizationDefaultExchangeMailboxPlanOperationCompleted; + private System.Threading.SendOrPostCallback CreatePublicFolderOperationCompleted; private System.Threading.SendOrPostCallback DeletePublicFoldersOperationCompleted; @@ -201,19 +224,9 @@ namespace WebsitePanel.EnterpriseServer { private System.Threading.SendOrPostCallback DeletePublicFolderEmailAddressesOperationCompleted; - private System.Threading.SendOrPostCallback GetMobileDevicesOperationCompleted; - - private System.Threading.SendOrPostCallback GetMobileDeviceOperationCompleted; - - private System.Threading.SendOrPostCallback WipeDataFromDeviceOperationCompleted; - - private System.Threading.SendOrPostCallback CancelRemoteWipeRequestOperationCompleted; - - private System.Threading.SendOrPostCallback RemoveDeviceOperationCompleted; - /// public esExchangeServer() { - this.Url = "http://localhost/WebsitePanelEnterpriseServer/esExchangeServer.asmx"; + this.Url = "http://localhost:9005/esExchangeServer.asmx"; } /// @@ -244,7 +257,7 @@ namespace WebsitePanel.EnterpriseServer { public event GetMailboxesStatisticsCompletedEventHandler GetMailboxesStatisticsCompleted; /// - public event GetPublicFoldersStatisticsCompletedEventHandler GetPublicFoldersStatisticsCompleted; + public event GetMailboxStatisticsCompletedEventHandler GetMailboxStatisticsCompleted; /// public event CalculateOrganizationDiskspaceCompletedEventHandler CalculateOrganizationDiskspaceCompleted; @@ -267,6 +280,9 @@ namespace WebsitePanel.EnterpriseServer { /// public event GetAccountsCompletedEventHandler GetAccountsCompleted; + /// + public event GetExchangeAccountByMailboxPlanIdCompletedEventHandler GetExchangeAccountByMailboxPlanIdCompleted; + /// public event SearchAccountsCompletedEventHandler SearchAccountsCompleted; @@ -313,10 +329,7 @@ namespace WebsitePanel.EnterpriseServer { public event SetMailboxMailFlowSettingsCompletedEventHandler SetMailboxMailFlowSettingsCompleted; /// - public event GetMailboxAdvancedSettingsCompletedEventHandler GetMailboxAdvancedSettingsCompleted; - - /// - public event SetMailboxAdvancedSettingsCompletedEventHandler SetMailboxAdvancedSettingsCompleted; + public event SetExchangeMailboxPlanCompletedEventHandler SetExchangeMailboxPlanCompleted; /// public event GetMailboxSetupInstructionsCompletedEventHandler GetMailboxSetupInstructionsCompleted; @@ -387,6 +400,36 @@ namespace WebsitePanel.EnterpriseServer { /// public event GetDistributionListPermissionsCompletedEventHandler GetDistributionListPermissionsCompleted; + /// + public event GetMobileDevicesCompletedEventHandler GetMobileDevicesCompleted; + + /// + public event GetMobileDeviceCompletedEventHandler GetMobileDeviceCompleted; + + /// + public event WipeDataFromDeviceCompletedEventHandler WipeDataFromDeviceCompleted; + + /// + public event CancelRemoteWipeRequestCompletedEventHandler CancelRemoteWipeRequestCompleted; + + /// + public event RemoveDeviceCompletedEventHandler RemoveDeviceCompleted; + + /// + public event GetExchangeMailboxPlansCompletedEventHandler GetExchangeMailboxPlansCompleted; + + /// + public event GetExchangeMailboxPlanCompletedEventHandler GetExchangeMailboxPlanCompleted; + + /// + public event AddExchangeMailboxPlanCompletedEventHandler AddExchangeMailboxPlanCompleted; + + /// + public event DeleteExchangeMailboxPlanCompletedEventHandler DeleteExchangeMailboxPlanCompleted; + + /// + public event SetOrganizationDefaultExchangeMailboxPlanCompletedEventHandler SetOrganizationDefaultExchangeMailboxPlanCompleted; + /// public event CreatePublicFolderCompletedEventHandler CreatePublicFolderCompleted; @@ -426,21 +469,6 @@ namespace WebsitePanel.EnterpriseServer { /// public event DeletePublicFolderEmailAddressesCompletedEventHandler DeletePublicFolderEmailAddressesCompleted; - /// - public event GetMobileDevicesCompletedEventHandler GetMobileDevicesCompleted; - - /// - public event GetMobileDeviceCompletedEventHandler GetMobileDeviceCompleted; - - /// - public event WipeDataFromDeviceCompletedEventHandler WipeDataFromDeviceCompleted; - - /// - public event CancelRemoteWipeRequestCompletedEventHandler CancelRemoteWipeRequestCompleted; - - /// - public event RemoveDeviceCompletedEventHandler RemoveDeviceCompleted; - /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawExchangeOrganizationsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public System.Data.DataSet GetRawExchangeOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { @@ -865,43 +893,46 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPublicFoldersStatistics", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeItemStatistics[] GetPublicFoldersStatistics(int itemId) { - object[] results = this.Invoke("GetPublicFoldersStatistics", new object[] { - itemId}); - return ((ExchangeItemStatistics[])(results[0])); + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxStatistics", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailboxStatistics GetMailboxStatistics(int itemId, int accountId) { + object[] results = this.Invoke("GetMailboxStatistics", new object[] { + itemId, + accountId}); + return ((ExchangeMailboxStatistics)(results[0])); } /// - public System.IAsyncResult BeginGetPublicFoldersStatistics(int itemId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetPublicFoldersStatistics", new object[] { - itemId}, callback, asyncState); + public System.IAsyncResult BeginGetMailboxStatistics(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetMailboxStatistics", new object[] { + itemId, + accountId}, callback, asyncState); } /// - public ExchangeItemStatistics[] EndGetPublicFoldersStatistics(System.IAsyncResult asyncResult) { + public ExchangeMailboxStatistics EndGetMailboxStatistics(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); - return ((ExchangeItemStatistics[])(results[0])); + return ((ExchangeMailboxStatistics)(results[0])); } /// - public void GetPublicFoldersStatisticsAsync(int itemId) { - this.GetPublicFoldersStatisticsAsync(itemId, null); + public void GetMailboxStatisticsAsync(int itemId, int accountId) { + this.GetMailboxStatisticsAsync(itemId, accountId, null); } /// - public void GetPublicFoldersStatisticsAsync(int itemId, object userState) { - if ((this.GetPublicFoldersStatisticsOperationCompleted == null)) { - this.GetPublicFoldersStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPublicFoldersStatisticsOperationCompleted); + public void GetMailboxStatisticsAsync(int itemId, int accountId, object userState) { + if ((this.GetMailboxStatisticsOperationCompleted == null)) { + this.GetMailboxStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxStatisticsOperationCompleted); } - this.InvokeAsync("GetPublicFoldersStatistics", new object[] { - itemId}, this.GetPublicFoldersStatisticsOperationCompleted, userState); + this.InvokeAsync("GetMailboxStatistics", new object[] { + itemId, + accountId}, this.GetMailboxStatisticsOperationCompleted, userState); } - private void OnGetPublicFoldersStatisticsOperationCompleted(object arg) { - if ((this.GetPublicFoldersStatisticsCompleted != null)) { + private void OnGetMailboxStatisticsOperationCompleted(object arg) { + if ((this.GetMailboxStatisticsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetPublicFoldersStatisticsCompleted(this, new GetPublicFoldersStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + this.GetMailboxStatisticsCompleted(this, new GetMailboxStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } @@ -1338,6 +1369,50 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeAccountByMailboxPlanId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeAccount[] GetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId) { + object[] results = this.Invoke("GetExchangeAccountByMailboxPlanId", new object[] { + itemId, + mailboxPlanId}); + return ((ExchangeAccount[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetExchangeAccountByMailboxPlanId", new object[] { + itemId, + mailboxPlanId}, callback, asyncState); + } + + /// + public ExchangeAccount[] EndGetExchangeAccountByMailboxPlanId(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeAccount[])(results[0])); + } + + /// + public void GetExchangeAccountByMailboxPlanIdAsync(int itemId, int mailboxPlanId) { + this.GetExchangeAccountByMailboxPlanIdAsync(itemId, mailboxPlanId, null); + } + + /// + public void GetExchangeAccountByMailboxPlanIdAsync(int itemId, int mailboxPlanId, object userState) { + if ((this.GetExchangeAccountByMailboxPlanIdOperationCompleted == null)) { + this.GetExchangeAccountByMailboxPlanIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeAccountByMailboxPlanIdOperationCompleted); + } + this.InvokeAsync("GetExchangeAccountByMailboxPlanId", new object[] { + itemId, + mailboxPlanId}, this.GetExchangeAccountByMailboxPlanIdOperationCompleted, userState); + } + + private void OnGetExchangeAccountByMailboxPlanIdOperationCompleted(object arg) { + if ((this.GetExchangeAccountByMailboxPlanIdCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetExchangeAccountByMailboxPlanIdCompleted(this, new GetExchangeAccountByMailboxPlanIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchAccounts", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public ExchangeAccount[] SearchAccounts(int itemId, bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, string filterColumn, string filterValue, string sortColumn) { @@ -1540,7 +1615,7 @@ namespace WebsitePanel.EnterpriseServer { /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateMailbox", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress) { + public int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) { object[] results = this.Invoke("CreateMailbox", new object[] { itemId, accountId, @@ -1551,12 +1626,14 @@ namespace WebsitePanel.EnterpriseServer { domain, password, sendSetupInstructions, - setupInstructionMailAddress}); + setupInstructionMailAddress, + mailboxPlanId, + subscriberNumber}); return ((int)(results[0])); } /// - public System.IAsyncResult BeginCreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateMailbox", new object[] { itemId, accountId, @@ -1567,7 +1644,9 @@ namespace WebsitePanel.EnterpriseServer { domain, password, sendSetupInstructions, - setupInstructionMailAddress}, callback, asyncState); + setupInstructionMailAddress, + mailboxPlanId, + subscriberNumber}, callback, asyncState); } /// @@ -1577,12 +1656,12 @@ namespace WebsitePanel.EnterpriseServer { } /// - public void CreateMailboxAsync(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress) { - this.CreateMailboxAsync(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress, null); + public void CreateMailboxAsync(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) { + this.CreateMailboxAsync(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, subscriberNumber, null); } /// - public void CreateMailboxAsync(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, object userState) { + public void CreateMailboxAsync(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber, object userState) { if ((this.CreateMailboxOperationCompleted == null)) { this.CreateMailboxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateMailboxOperationCompleted); } @@ -1596,7 +1675,9 @@ namespace WebsitePanel.EnterpriseServer { domain, password, sendSetupInstructions, - setupInstructionMailAddress}, this.CreateMailboxOperationCompleted, userState); + setupInstructionMailAddress, + mailboxPlanId, + subscriberNumber}, this.CreateMailboxOperationCompleted, userState); } private void OnCreateMailboxOperationCompleted(object arg) { @@ -1740,120 +1821,22 @@ namespace WebsitePanel.EnterpriseServer { /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxGeneralSettings( - int itemId, - int accountId, - string displayName, - string password, - bool hideAddressBook, - bool disabled, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes) { + public int SetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled) { object[] results = this.Invoke("SetMailboxGeneralSettings", new object[] { itemId, accountId, - displayName, - password, hideAddressBook, - disabled, - firstName, - initials, - lastName, - address, - city, - state, - zip, - country, - jobTitle, - company, - department, - office, - managerAccountName, - businessPhone, - fax, - homePhone, - mobilePhone, - pager, - webPage, - notes}); + disabled}); return ((int)(results[0])); } /// - public System.IAsyncResult BeginSetMailboxGeneralSettings( - int itemId, - int accountId, - string displayName, - string password, - bool hideAddressBook, - bool disabled, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - System.AsyncCallback callback, - object asyncState) { + public System.IAsyncResult BeginSetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetMailboxGeneralSettings", new object[] { itemId, accountId, - displayName, - password, hideAddressBook, - disabled, - firstName, - initials, - lastName, - address, - city, - state, - zip, - country, - jobTitle, - company, - department, - office, - managerAccountName, - businessPhone, - fax, - homePhone, - mobilePhone, - pager, - webPage, - notes}, callback, asyncState); + disabled}, callback, asyncState); } /// @@ -1863,95 +1846,20 @@ namespace WebsitePanel.EnterpriseServer { } /// - public void SetMailboxGeneralSettingsAsync( - int itemId, - int accountId, - string displayName, - string password, - bool hideAddressBook, - bool disabled, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes) { - this.SetMailboxGeneralSettingsAsync(itemId, accountId, displayName, password, hideAddressBook, disabled, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, null); + public void SetMailboxGeneralSettingsAsync(int itemId, int accountId, bool hideAddressBook, bool disabled) { + this.SetMailboxGeneralSettingsAsync(itemId, accountId, hideAddressBook, disabled, null); } /// - public void SetMailboxGeneralSettingsAsync( - int itemId, - int accountId, - string displayName, - string password, - bool hideAddressBook, - bool disabled, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - object userState) { + public void SetMailboxGeneralSettingsAsync(int itemId, int accountId, bool hideAddressBook, bool disabled, object userState) { if ((this.SetMailboxGeneralSettingsOperationCompleted == null)) { this.SetMailboxGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxGeneralSettingsOperationCompleted); } this.InvokeAsync("SetMailboxGeneralSettings", new object[] { itemId, accountId, - displayName, - password, hideAddressBook, - disabled, - firstName, - initials, - lastName, - address, - city, - state, - zip, - country, - jobTitle, - company, - department, - office, - managerAccountName, - businessPhone, - fax, - homePhone, - mobilePhone, - pager, - webPage, - notes}, this.SetMailboxGeneralSettingsOperationCompleted, userState); + disabled}, this.SetMailboxGeneralSettingsOperationCompleted, userState); } private void OnSetMailboxGeneralSettingsOperationCompleted(object arg) { @@ -2192,7 +2100,7 @@ namespace WebsitePanel.EnterpriseServer { /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxMailFlowSettings(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool requireSenderAuthentication) { + public int SetMailboxMailFlowSettings(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { object[] results = this.Invoke("SetMailboxMailFlowSettings", new object[] { itemId, accountId, @@ -2202,15 +2110,12 @@ namespace WebsitePanel.EnterpriseServer { sendOnBehalfAccounts, acceptAccounts, rejectAccounts, - maxRecipients, - maxSendMessageSizeKB, - maxReceiveMessageSizeKB, requireSenderAuthentication}); return ((int)(results[0])); } /// - public System.IAsyncResult BeginSetMailboxMailFlowSettings(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxMailFlowSettings(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetMailboxMailFlowSettings", new object[] { itemId, accountId, @@ -2220,9 +2125,6 @@ namespace WebsitePanel.EnterpriseServer { sendOnBehalfAccounts, acceptAccounts, rejectAccounts, - maxRecipients, - maxSendMessageSizeKB, - maxReceiveMessageSizeKB, requireSenderAuthentication}, callback, asyncState); } @@ -2233,12 +2135,12 @@ namespace WebsitePanel.EnterpriseServer { } /// - public void SetMailboxMailFlowSettingsAsync(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool requireSenderAuthentication) { - this.SetMailboxMailFlowSettingsAsync(itemId, accountId, enableForwarding, forwardingAccountName, forwardToBoth, sendOnBehalfAccounts, acceptAccounts, rejectAccounts, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, requireSenderAuthentication, null); + public void SetMailboxMailFlowSettingsAsync(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + this.SetMailboxMailFlowSettingsAsync(itemId, accountId, enableForwarding, forwardingAccountName, forwardToBoth, sendOnBehalfAccounts, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); } /// - public void SetMailboxMailFlowSettingsAsync(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool requireSenderAuthentication, object userState) { + public void SetMailboxMailFlowSettingsAsync(int itemId, int accountId, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { if ((this.SetMailboxMailFlowSettingsOperationCompleted == null)) { this.SetMailboxMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxMailFlowSettingsOperationCompleted); } @@ -2251,9 +2153,6 @@ namespace WebsitePanel.EnterpriseServer { sendOnBehalfAccounts, acceptAccounts, rejectAccounts, - maxRecipients, - maxSendMessageSizeKB, - maxReceiveMessageSizeKB, requireSenderAuthentication}, this.SetMailboxMailFlowSettingsOperationCompleted, userState); } @@ -2265,117 +2164,49 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMailboxAdvancedSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMailbox GetMailboxAdvancedSettings(int itemId, int accountId) { - object[] results = this.Invoke("GetMailboxAdvancedSettings", new object[] { - itemId, - accountId}); - return ((ExchangeMailbox)(results[0])); - } - - /// - public System.IAsyncResult BeginGetMailboxAdvancedSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetMailboxAdvancedSettings", new object[] { - itemId, - accountId}, callback, asyncState); - } - - /// - public ExchangeMailbox EndGetMailboxAdvancedSettings(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeMailbox)(results[0])); - } - - /// - public void GetMailboxAdvancedSettingsAsync(int itemId, int accountId) { - this.GetMailboxAdvancedSettingsAsync(itemId, accountId, null); - } - - /// - public void GetMailboxAdvancedSettingsAsync(int itemId, int accountId, object userState) { - if ((this.GetMailboxAdvancedSettingsOperationCompleted == null)) { - this.GetMailboxAdvancedSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMailboxAdvancedSettingsOperationCompleted); - } - this.InvokeAsync("GetMailboxAdvancedSettings", new object[] { - itemId, - accountId}, this.GetMailboxAdvancedSettingsOperationCompleted, userState); - } - - private void OnGetMailboxAdvancedSettingsOperationCompleted(object arg) { - if ((this.GetMailboxAdvancedSettingsCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetMailboxAdvancedSettingsCompleted(this, new GetMailboxAdvancedSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetMailboxAdvancedSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetMailboxAdvancedSettings(int itemId, int accountId, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) { - object[] results = this.Invoke("SetMailboxAdvancedSettings", new object[] { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId) { + object[] results = this.Invoke("SetExchangeMailboxPlan", new object[] { itemId, accountId, - enablePOP, - enableIMAP, - enableOWA, - enableMAPI, - enableActiveSync, - issueWarningKB, - prohibitSendKB, - prohibitSendReceiveKB, - keepDeletedItemsDays}); + mailboxPlanId}); return ((int)(results[0])); } /// - public System.IAsyncResult BeginSetMailboxAdvancedSettings(int itemId, int accountId, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("SetMailboxAdvancedSettings", new object[] { + public System.IAsyncResult BeginSetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetExchangeMailboxPlan", new object[] { itemId, accountId, - enablePOP, - enableIMAP, - enableOWA, - enableMAPI, - enableActiveSync, - issueWarningKB, - prohibitSendKB, - prohibitSendReceiveKB, - keepDeletedItemsDays}, callback, asyncState); + mailboxPlanId}, callback, asyncState); } /// - public int EndSetMailboxAdvancedSettings(System.IAsyncResult asyncResult) { + public int EndSetExchangeMailboxPlan(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } /// - public void SetMailboxAdvancedSettingsAsync(int itemId, int accountId, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) { - this.SetMailboxAdvancedSettingsAsync(itemId, accountId, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, null); + public void SetExchangeMailboxPlanAsync(int itemId, int accountId, int mailboxPlanId) { + this.SetExchangeMailboxPlanAsync(itemId, accountId, mailboxPlanId, null); } /// - public void SetMailboxAdvancedSettingsAsync(int itemId, int accountId, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, object userState) { - if ((this.SetMailboxAdvancedSettingsOperationCompleted == null)) { - this.SetMailboxAdvancedSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxAdvancedSettingsOperationCompleted); + public void SetExchangeMailboxPlanAsync(int itemId, int accountId, int mailboxPlanId, object userState) { + if ((this.SetExchangeMailboxPlanOperationCompleted == null)) { + this.SetExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetExchangeMailboxPlanOperationCompleted); } - this.InvokeAsync("SetMailboxAdvancedSettings", new object[] { + this.InvokeAsync("SetExchangeMailboxPlan", new object[] { itemId, accountId, - enablePOP, - enableIMAP, - enableOWA, - enableMAPI, - enableActiveSync, - issueWarningKB, - prohibitSendKB, - prohibitSendReceiveKB, - keepDeletedItemsDays}, this.SetMailboxAdvancedSettingsOperationCompleted, userState); + mailboxPlanId}, this.SetExchangeMailboxPlanOperationCompleted, userState); } - private void OnSetMailboxAdvancedSettingsOperationCompleted(object arg) { - if ((this.SetMailboxAdvancedSettingsCompleted != null)) { + private void OnSetExchangeMailboxPlanOperationCompleted(object arg) { + if ((this.SetExchangeMailboxPlanCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.SetMailboxAdvancedSettingsCompleted(this, new SetMailboxAdvancedSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + this.SetExchangeMailboxPlanCompleted(this, new SetExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } @@ -3182,8 +3013,7 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListGeneralSettings" + - "", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public ExchangeDistributionList GetDistributionListGeneralSettings(int itemId, int accountId) { object[] results = this.Invoke("GetDistributionListGeneralSettings", new object[] { itemId, @@ -3227,8 +3057,7 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListGeneralSettings" + - "", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int SetDistributionListGeneralSettings(int itemId, int accountId, string displayName, bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes) { object[] results = this.Invoke("SetDistributionListGeneralSettings", new object[] { itemId, @@ -3287,8 +3116,7 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListMailFlowSetting" + - "s", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDistributionListMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public ExchangeDistributionList GetDistributionListMailFlowSettings(int itemId, int accountId) { object[] results = this.Invoke("GetDistributionListMailFlowSettings", new object[] { itemId, @@ -3332,8 +3160,7 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListMailFlowSetting" + - "s", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int SetDistributionListMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { object[] results = this.Invoke("SetDistributionListMailFlowSettings", new object[] { itemId, @@ -3477,8 +3304,8 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListPrimaryEmailAdd" + - "ress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetDistributionListPrimaryEmailAddre" + + "ss", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int SetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress) { object[] results = this.Invoke("SetDistributionListPrimaryEmailAddress", new object[] { itemId, @@ -3525,8 +3352,8 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionListEmailAddress" + - "es", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDistributionListEmailAddresses" + + "", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int DeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses) { object[] results = this.Invoke("DeleteDistributionListEmailAddresses", new object[] { itemId, @@ -3666,6 +3493,436 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevices", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) { + object[] results = this.Invoke("GetMobileDevices", new object[] { + itemId, + accountId}); + return ((ExchangeMobileDevice[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetMobileDevices(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetMobileDevices", new object[] { + itemId, + accountId}, callback, asyncState); + } + + /// + public ExchangeMobileDevice[] EndGetMobileDevices(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeMobileDevice[])(results[0])); + } + + /// + public void GetMobileDevicesAsync(int itemId, int accountId) { + this.GetMobileDevicesAsync(itemId, accountId, null); + } + + /// + public void GetMobileDevicesAsync(int itemId, int accountId, object userState) { + if ((this.GetMobileDevicesOperationCompleted == null)) { + this.GetMobileDevicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDevicesOperationCompleted); + } + this.InvokeAsync("GetMobileDevices", new object[] { + itemId, + accountId}, this.GetMobileDevicesOperationCompleted, userState); + } + + private void OnGetMobileDevicesOperationCompleted(object arg) { + if ((this.GetMobileDevicesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetMobileDevicesCompleted(this, new GetMobileDevicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMobileDevice GetMobileDevice(int itemId, string deviceId) { + object[] results = this.Invoke("GetMobileDevice", new object[] { + itemId, + deviceId}); + return ((ExchangeMobileDevice)(results[0])); + } + + /// + public System.IAsyncResult BeginGetMobileDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetMobileDevice", new object[] { + itemId, + deviceId}, callback, asyncState); + } + + /// + public ExchangeMobileDevice EndGetMobileDevice(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeMobileDevice)(results[0])); + } + + /// + public void GetMobileDeviceAsync(int itemId, string deviceId) { + this.GetMobileDeviceAsync(itemId, deviceId, null); + } + + /// + public void GetMobileDeviceAsync(int itemId, string deviceId, object userState) { + if ((this.GetMobileDeviceOperationCompleted == null)) { + this.GetMobileDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDeviceOperationCompleted); + } + this.InvokeAsync("GetMobileDevice", new object[] { + itemId, + deviceId}, this.GetMobileDeviceOperationCompleted, userState); + } + + private void OnGetMobileDeviceOperationCompleted(object arg) { + if ((this.GetMobileDeviceCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetMobileDeviceCompleted(this, new GetMobileDeviceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/WipeDataFromDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void WipeDataFromDevice(int itemId, string deviceId) { + this.Invoke("WipeDataFromDevice", new object[] { + itemId, + deviceId}); + } + + /// + public System.IAsyncResult BeginWipeDataFromDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("WipeDataFromDevice", new object[] { + itemId, + deviceId}, callback, asyncState); + } + + /// + public void EndWipeDataFromDevice(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void WipeDataFromDeviceAsync(int itemId, string deviceId) { + this.WipeDataFromDeviceAsync(itemId, deviceId, null); + } + + /// + public void WipeDataFromDeviceAsync(int itemId, string deviceId, object userState) { + if ((this.WipeDataFromDeviceOperationCompleted == null)) { + this.WipeDataFromDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWipeDataFromDeviceOperationCompleted); + } + this.InvokeAsync("WipeDataFromDevice", new object[] { + itemId, + deviceId}, this.WipeDataFromDeviceOperationCompleted, userState); + } + + private void OnWipeDataFromDeviceOperationCompleted(object arg) { + if ((this.WipeDataFromDeviceCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.WipeDataFromDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CancelRemoteWipeRequest", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void CancelRemoteWipeRequest(int itemId, string deviceId) { + this.Invoke("CancelRemoteWipeRequest", new object[] { + itemId, + deviceId}); + } + + /// + public System.IAsyncResult BeginCancelRemoteWipeRequest(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("CancelRemoteWipeRequest", new object[] { + itemId, + deviceId}, callback, asyncState); + } + + /// + public void EndCancelRemoteWipeRequest(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void CancelRemoteWipeRequestAsync(int itemId, string deviceId) { + this.CancelRemoteWipeRequestAsync(itemId, deviceId, null); + } + + /// + public void CancelRemoteWipeRequestAsync(int itemId, string deviceId, object userState) { + if ((this.CancelRemoteWipeRequestOperationCompleted == null)) { + this.CancelRemoteWipeRequestOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCancelRemoteWipeRequestOperationCompleted); + } + this.InvokeAsync("CancelRemoteWipeRequest", new object[] { + itemId, + deviceId}, this.CancelRemoteWipeRequestOperationCompleted, userState); + } + + private void OnCancelRemoteWipeRequestOperationCompleted(object arg) { + if ((this.CancelRemoteWipeRequestCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CancelRemoteWipeRequestCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RemoveDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void RemoveDevice(int itemId, string deviceId) { + this.Invoke("RemoveDevice", new object[] { + itemId, + deviceId}); + } + + /// + public System.IAsyncResult BeginRemoveDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("RemoveDevice", new object[] { + itemId, + deviceId}, callback, asyncState); + } + + /// + public void EndRemoveDevice(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void RemoveDeviceAsync(int itemId, string deviceId) { + this.RemoveDeviceAsync(itemId, deviceId, null); + } + + /// + public void RemoveDeviceAsync(int itemId, string deviceId, object userState) { + if ((this.RemoveDeviceOperationCompleted == null)) { + this.RemoveDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveDeviceOperationCompleted); + } + this.InvokeAsync("RemoveDevice", new object[] { + itemId, + deviceId}, this.RemoveDeviceOperationCompleted, userState); + } + + private void OnRemoveDeviceOperationCompleted(object arg) { + if ((this.RemoveDeviceCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RemoveDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeMailboxPlans", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailboxPlan[] GetExchangeMailboxPlans(int itemId) { + object[] results = this.Invoke("GetExchangeMailboxPlans", new object[] { + itemId}); + return ((ExchangeMailboxPlan[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetExchangeMailboxPlans(int itemId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetExchangeMailboxPlans", new object[] { + itemId}, callback, asyncState); + } + + /// + public ExchangeMailboxPlan[] EndGetExchangeMailboxPlans(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeMailboxPlan[])(results[0])); + } + + /// + public void GetExchangeMailboxPlansAsync(int itemId) { + this.GetExchangeMailboxPlansAsync(itemId, null); + } + + /// + public void GetExchangeMailboxPlansAsync(int itemId, object userState) { + if ((this.GetExchangeMailboxPlansOperationCompleted == null)) { + this.GetExchangeMailboxPlansOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeMailboxPlansOperationCompleted); + } + this.InvokeAsync("GetExchangeMailboxPlans", new object[] { + itemId}, this.GetExchangeMailboxPlansOperationCompleted, userState); + } + + private void OnGetExchangeMailboxPlansOperationCompleted(object arg) { + if ((this.GetExchangeMailboxPlansCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetExchangeMailboxPlansCompleted(this, new GetExchangeMailboxPlansCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ExchangeMailboxPlan GetExchangeMailboxPlan(int itemId, int mailboxPlanId) { + object[] results = this.Invoke("GetExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}); + return ((ExchangeMailboxPlan)(results[0])); + } + + /// + public System.IAsyncResult BeginGetExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}, callback, asyncState); + } + + /// + public ExchangeMailboxPlan EndGetExchangeMailboxPlan(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ExchangeMailboxPlan)(results[0])); + } + + /// + public void GetExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) { + this.GetExchangeMailboxPlanAsync(itemId, mailboxPlanId, null); + } + + /// + public void GetExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) { + if ((this.GetExchangeMailboxPlanOperationCompleted == null)) { + this.GetExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetExchangeMailboxPlanOperationCompleted); + } + this.InvokeAsync("GetExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}, this.GetExchangeMailboxPlanOperationCompleted, userState); + } + + private void OnGetExchangeMailboxPlanOperationCompleted(object arg) { + if ((this.GetExchangeMailboxPlanCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetExchangeMailboxPlanCompleted(this, new GetExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan) { + object[] results = this.Invoke("AddExchangeMailboxPlan", new object[] { + itemId, + mailboxPlan}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginAddExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("AddExchangeMailboxPlan", new object[] { + itemId, + mailboxPlan}, callback, asyncState); + } + + /// + public int EndAddExchangeMailboxPlan(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void AddExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan) { + this.AddExchangeMailboxPlanAsync(itemId, mailboxPlan, null); + } + + /// + public void AddExchangeMailboxPlanAsync(int itemId, ExchangeMailboxPlan mailboxPlan, object userState) { + if ((this.AddExchangeMailboxPlanOperationCompleted == null)) { + this.AddExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddExchangeMailboxPlanOperationCompleted); + } + this.InvokeAsync("AddExchangeMailboxPlan", new object[] { + itemId, + mailboxPlan}, this.AddExchangeMailboxPlanOperationCompleted, userState); + } + + private void OnAddExchangeMailboxPlanOperationCompleted(object arg) { + if ((this.AddExchangeMailboxPlanCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.AddExchangeMailboxPlanCompleted(this, new AddExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteExchangeMailboxPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteExchangeMailboxPlan(int itemId, int mailboxPlanId) { + object[] results = this.Invoke("DeleteExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginDeleteExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("DeleteExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}, callback, asyncState); + } + + /// + public int EndDeleteExchangeMailboxPlan(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void DeleteExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) { + this.DeleteExchangeMailboxPlanAsync(itemId, mailboxPlanId, null); + } + + /// + public void DeleteExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) { + if ((this.DeleteExchangeMailboxPlanOperationCompleted == null)) { + this.DeleteExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteExchangeMailboxPlanOperationCompleted); + } + this.InvokeAsync("DeleteExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}, this.DeleteExchangeMailboxPlanOperationCompleted, userState); + } + + private void OnDeleteExchangeMailboxPlanOperationCompleted(object arg) { + if ((this.DeleteExchangeMailboxPlanCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteExchangeMailboxPlanCompleted(this, new DeleteExchangeMailboxPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetOrganizationDefaultExchangeMailbo" + + "xPlan", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId) { + this.Invoke("SetOrganizationDefaultExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}); + } + + /// + public System.IAsyncResult BeginSetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetOrganizationDefaultExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}, callback, asyncState); + } + + /// + public void EndSetOrganizationDefaultExchangeMailboxPlan(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void SetOrganizationDefaultExchangeMailboxPlanAsync(int itemId, int mailboxPlanId) { + this.SetOrganizationDefaultExchangeMailboxPlanAsync(itemId, mailboxPlanId, null); + } + + /// + public void SetOrganizationDefaultExchangeMailboxPlanAsync(int itemId, int mailboxPlanId, object userState) { + if ((this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted == null)) { + this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetOrganizationDefaultExchangeMailboxPlanOperationCompleted); + } + this.InvokeAsync("SetOrganizationDefaultExchangeMailboxPlan", new object[] { + itemId, + mailboxPlanId}, this.SetOrganizationDefaultExchangeMailboxPlanOperationCompleted, userState); + } + + private void OnSetOrganizationDefaultExchangeMailboxPlanOperationCompleted(object arg) { + if ((this.SetOrganizationDefaultExchangeMailboxPlanCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetOrganizationDefaultExchangeMailboxPlanCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreatePublicFolder", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int CreatePublicFolder(int itemId, string parentFolder, string folderName, bool mailEnabled, string accountName, string domain) { @@ -3950,24 +4207,24 @@ namespace WebsitePanel.EnterpriseServer { /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetPublicFolderGeneralSettings(int itemId, int accountId, string newName, bool hideAddressBook, string[] authorAccounts) { + public int SetPublicFolderGeneralSettings(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts) { object[] results = this.Invoke("SetPublicFolderGeneralSettings", new object[] { itemId, accountId, newName, hideAddressBook, - authorAccounts}); + accounts}); return ((int)(results[0])); } /// - public System.IAsyncResult BeginSetPublicFolderGeneralSettings(int itemId, int accountId, string newName, bool hideAddressBook, string[] authorAccounts, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetPublicFolderGeneralSettings(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetPublicFolderGeneralSettings", new object[] { itemId, accountId, newName, hideAddressBook, - authorAccounts}, callback, asyncState); + accounts}, callback, asyncState); } /// @@ -3977,12 +4234,12 @@ namespace WebsitePanel.EnterpriseServer { } /// - public void SetPublicFolderGeneralSettingsAsync(int itemId, int accountId, string newName, bool hideAddressBook, string[] authorAccounts) { - this.SetPublicFolderGeneralSettingsAsync(itemId, accountId, newName, hideAddressBook, authorAccounts, null); + public void SetPublicFolderGeneralSettingsAsync(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts) { + this.SetPublicFolderGeneralSettingsAsync(itemId, accountId, newName, hideAddressBook, accounts, null); } /// - public void SetPublicFolderGeneralSettingsAsync(int itemId, int accountId, string newName, bool hideAddressBook, string[] authorAccounts, object userState) { + public void SetPublicFolderGeneralSettingsAsync(int itemId, int accountId, string newName, bool hideAddressBook, ExchangeAccount[] accounts, object userState) { if ((this.SetPublicFolderGeneralSettingsOperationCompleted == null)) { this.SetPublicFolderGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderGeneralSettingsOperationCompleted); } @@ -3991,7 +4248,7 @@ namespace WebsitePanel.EnterpriseServer { accountId, newName, hideAddressBook, - authorAccounts}, this.SetPublicFolderGeneralSettingsOperationCompleted, userState); + accounts}, this.SetPublicFolderGeneralSettingsOperationCompleted, userState); } private void OnSetPublicFolderGeneralSettingsOperationCompleted(object arg) { @@ -4190,8 +4447,7 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderPrimaryEmailAddress" + - "", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SetPublicFolderPrimaryEmailAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int SetPublicFolderPrimaryEmailAddress(int itemId, int accountId, string emailAddress) { object[] results = this.Invoke("SetPublicFolderPrimaryEmailAddress", new object[] { itemId, @@ -4284,252 +4540,18 @@ namespace WebsitePanel.EnterpriseServer { } } - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevices", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) { - object[] results = this.Invoke("GetMobileDevices", new object[] { - itemId, - accountId}); - return ((ExchangeMobileDevice[])(results[0])); - } - - /// - public System.IAsyncResult BeginGetMobileDevices(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetMobileDevices", new object[] { - itemId, - accountId}, callback, asyncState); - } - - /// - public ExchangeMobileDevice[] EndGetMobileDevices(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeMobileDevice[])(results[0])); - } - - /// - public void GetMobileDevicesAsync(int itemId, int accountId) { - this.GetMobileDevicesAsync(itemId, accountId, null); - } - - /// - public void GetMobileDevicesAsync(int itemId, int accountId, object userState) { - if ((this.GetMobileDevicesOperationCompleted == null)) { - this.GetMobileDevicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDevicesOperationCompleted); - } - this.InvokeAsync("GetMobileDevices", new object[] { - itemId, - accountId}, this.GetMobileDevicesOperationCompleted, userState); - } - - private void OnGetMobileDevicesOperationCompleted(object arg) { - if ((this.GetMobileDevicesCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetMobileDevicesCompleted(this, new GetMobileDevicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMobileDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeMobileDevice GetMobileDevice(int itemId, string deviceId) { - object[] results = this.Invoke("GetMobileDevice", new object[] { - itemId, - deviceId}); - return ((ExchangeMobileDevice)(results[0])); - } - - /// - public System.IAsyncResult BeginGetMobileDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetMobileDevice", new object[] { - itemId, - deviceId}, callback, asyncState); - } - - /// - public ExchangeMobileDevice EndGetMobileDevice(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeMobileDevice)(results[0])); - } - - /// - public void GetMobileDeviceAsync(int itemId, string deviceId) { - this.GetMobileDeviceAsync(itemId, deviceId, null); - } - - /// - public void GetMobileDeviceAsync(int itemId, string deviceId, object userState) { - if ((this.GetMobileDeviceOperationCompleted == null)) { - this.GetMobileDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMobileDeviceOperationCompleted); - } - this.InvokeAsync("GetMobileDevice", new object[] { - itemId, - deviceId}, this.GetMobileDeviceOperationCompleted, userState); - } - - private void OnGetMobileDeviceOperationCompleted(object arg) { - if ((this.GetMobileDeviceCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetMobileDeviceCompleted(this, new GetMobileDeviceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/WipeDataFromDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void WipeDataFromDevice(int itemId, string deviceId) { - this.Invoke("WipeDataFromDevice", new object[] { - itemId, - deviceId}); - } - - /// - public System.IAsyncResult BeginWipeDataFromDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("WipeDataFromDevice", new object[] { - itemId, - deviceId}, callback, asyncState); - } - - /// - public void EndWipeDataFromDevice(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void WipeDataFromDeviceAsync(int itemId, string deviceId) { - this.WipeDataFromDeviceAsync(itemId, deviceId, null); - } - - /// - public void WipeDataFromDeviceAsync(int itemId, string deviceId, object userState) { - if ((this.WipeDataFromDeviceOperationCompleted == null)) { - this.WipeDataFromDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWipeDataFromDeviceOperationCompleted); - } - this.InvokeAsync("WipeDataFromDevice", new object[] { - itemId, - deviceId}, this.WipeDataFromDeviceOperationCompleted, userState); - } - - private void OnWipeDataFromDeviceOperationCompleted(object arg) { - if ((this.WipeDataFromDeviceCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.WipeDataFromDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CancelRemoteWipeRequest", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void CancelRemoteWipeRequest(int itemId, string deviceId) { - this.Invoke("CancelRemoteWipeRequest", new object[] { - itemId, - deviceId}); - } - - /// - public System.IAsyncResult BeginCancelRemoteWipeRequest(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("CancelRemoteWipeRequest", new object[] { - itemId, - deviceId}, callback, asyncState); - } - - /// - public void EndCancelRemoteWipeRequest(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void CancelRemoteWipeRequestAsync(int itemId, string deviceId) { - this.CancelRemoteWipeRequestAsync(itemId, deviceId, null); - } - - /// - public void CancelRemoteWipeRequestAsync(int itemId, string deviceId, object userState) { - if ((this.CancelRemoteWipeRequestOperationCompleted == null)) { - this.CancelRemoteWipeRequestOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCancelRemoteWipeRequestOperationCompleted); - } - this.InvokeAsync("CancelRemoteWipeRequest", new object[] { - itemId, - deviceId}, this.CancelRemoteWipeRequestOperationCompleted, userState); - } - - private void OnCancelRemoteWipeRequestOperationCompleted(object arg) { - if ((this.CancelRemoteWipeRequestCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.CancelRemoteWipeRequestCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RemoveDevice", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RemoveDevice(int itemId, string deviceId) { - this.Invoke("RemoveDevice", new object[] { - itemId, - deviceId}); - } - - /// - public System.IAsyncResult BeginRemoveDevice(int itemId, string deviceId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("RemoveDevice", new object[] { - itemId, - deviceId}, callback, asyncState); - } - - /// - public void EndRemoveDevice(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void RemoveDeviceAsync(int itemId, string deviceId) { - this.RemoveDeviceAsync(itemId, deviceId, null); - } - - /// - public void RemoveDeviceAsync(int itemId, string deviceId, object userState) { - if ((this.RemoveDeviceOperationCompleted == null)) { - this.RemoveDeviceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveDeviceOperationCompleted); - } - this.InvokeAsync("RemoveDevice", new object[] { - itemId, - deviceId}, this.RemoveDeviceOperationCompleted, userState); - } - - private void OnRemoveDeviceOperationCompleted(object arg) { - if ((this.RemoveDeviceCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.RemoveDeviceCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - /// public new void CancelAsync(object userState) { base.CancelAsync(userState); } } - - - - - - - - - - - - - - - - - - - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetRawExchangeOrganizationsPagedCompletedEventHandler(object sender, GetRawExchangeOrganizationsPagedCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetRawExchangeOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4551,11 +4573,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetExchangeOrganizationsPagedCompletedEventHandler(object sender, GetExchangeOrganizationsPagedCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetExchangeOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4577,11 +4599,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetExchangeOrganizationsCompletedEventHandler(object sender, GetExchangeOrganizationsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetExchangeOrganizationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4603,11 +4625,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetOrganizationCompletedEventHandler(object sender, GetOrganizationCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4629,11 +4651,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetOrganizationStatisticsCompletedEventHandler(object sender, GetOrganizationStatisticsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetOrganizationStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4655,11 +4677,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4681,11 +4703,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetOrganizationStorageLimitsCompletedEventHandler(object sender, GetOrganizationStorageLimitsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetOrganizationStorageLimitsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4707,11 +4729,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetOrganizationStorageLimitsCompletedEventHandler(object sender, SetOrganizationStorageLimitsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetOrganizationStorageLimitsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4733,11 +4755,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxesStatisticsCompletedEventHandler(object sender, GetMailboxesStatisticsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxesStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4759,37 +4781,37 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetPublicFoldersStatisticsCompletedEventHandler(object sender, GetPublicFoldersStatisticsCompletedEventArgs e); + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMailboxStatisticsCompletedEventHandler(object sender, GetMailboxStatisticsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFoldersStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + public partial class GetMailboxStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; - internal GetPublicFoldersStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + internal GetMailboxStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } /// - public ExchangeItemStatistics[] Result { + public ExchangeMailboxStatistics Result { get { this.RaiseExceptionIfNecessary(); - return ((ExchangeItemStatistics[])(this.results[0])); + return ((ExchangeMailboxStatistics)(this.results[0])); } } } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CalculateOrganizationDiskspaceCompletedEventHandler(object sender, CalculateOrganizationDiskspaceCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CalculateOrganizationDiskspaceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4811,11 +4833,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetActiveSyncPolicyCompletedEventHandler(object sender, GetActiveSyncPolicyCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4837,11 +4859,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetActiveSyncPolicyCompletedEventHandler(object sender, SetActiveSyncPolicyCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4863,11 +4885,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddAuthoritativeDomainCompletedEventHandler(object sender, AddAuthoritativeDomainCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class AddAuthoritativeDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4889,11 +4911,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteAuthoritativeDomainCompletedEventHandler(object sender, DeleteAuthoritativeDomainCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteAuthoritativeDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4915,11 +4937,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetAccountsPagedCompletedEventHandler(object sender, GetAccountsPagedCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetAccountsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4941,11 +4963,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetAccountsCompletedEventHandler(object sender, GetAccountsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4967,11 +4989,37 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetExchangeAccountByMailboxPlanIdCompletedEventHandler(object sender, GetExchangeAccountByMailboxPlanIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetExchangeAccountByMailboxPlanIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetExchangeAccountByMailboxPlanIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ExchangeAccount[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ExchangeAccount[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SearchAccountsCompletedEventHandler(object sender, SearchAccountsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SearchAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4993,11 +5041,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetAccountCompletedEventHandler(object sender, GetAccountCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5019,11 +5067,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SearchAccountCompletedEventHandler(object sender, SearchAccountCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SearchAccountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5045,11 +5093,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CheckAccountCredentialsCompletedEventHandler(object sender, CheckAccountCredentialsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CheckAccountCredentialsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5071,11 +5119,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateMailboxCompletedEventHandler(object sender, CreateMailboxCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CreateMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5097,11 +5145,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteMailboxCompletedEventHandler(object sender, DeleteMailboxCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5123,11 +5171,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DisableMailboxCompletedEventHandler(object sender, DisableMailboxCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DisableMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5149,11 +5197,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxGeneralSettingsCompletedEventHandler(object sender, GetMailboxGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5175,11 +5223,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxGeneralSettingsCompletedEventHandler(object sender, SetMailboxGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5201,11 +5249,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxEmailAddressesCompletedEventHandler(object sender, GetMailboxEmailAddressesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5227,11 +5275,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddMailboxEmailAddressCompletedEventHandler(object sender, AddMailboxEmailAddressCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class AddMailboxEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5253,11 +5301,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxPrimaryEmailAddressCompletedEventHandler(object sender, SetMailboxPrimaryEmailAddressCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetMailboxPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5279,11 +5327,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteMailboxEmailAddressesCompletedEventHandler(object sender, DeleteMailboxEmailAddressesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5305,11 +5353,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxMailFlowSettingsCompletedEventHandler(object sender, GetMailboxMailFlowSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5331,11 +5379,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxMailFlowSettingsCompletedEventHandler(object sender, SetMailboxMailFlowSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5357,44 +5405,18 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetMailboxAdvancedSettingsCompletedEventHandler(object sender, GetMailboxAdvancedSettingsCompletedEventArgs e); + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetExchangeMailboxPlanCompletedEventHandler(object sender, SetExchangeMailboxPlanCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMailboxAdvancedSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + public partial class SetExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; - internal GetMailboxAdvancedSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeMailbox Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeMailbox)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetMailboxAdvancedSettingsCompletedEventHandler(object sender, SetMailboxAdvancedSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetMailboxAdvancedSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetMailboxAdvancedSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + internal SetExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } @@ -5409,11 +5431,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxSetupInstructionsCompletedEventHandler(object sender, GetMailboxSetupInstructionsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxSetupInstructionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5435,11 +5457,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SendMailboxSetupInstructionsCompletedEventHandler(object sender, SendMailboxSetupInstructionsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SendMailboxSetupInstructionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5461,11 +5483,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxManagerSettingsCompletedEventHandler(object sender, SetMailboxManagerSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetMailboxManagerSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5487,11 +5509,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxPermissionsCompletedEventHandler(object sender, GetMailboxPermissionsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5513,11 +5535,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxPermissionsCompletedEventHandler(object sender, SetMailboxPermissionsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5539,11 +5561,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateContactCompletedEventHandler(object sender, CreateContactCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CreateContactCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5565,11 +5587,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteContactCompletedEventHandler(object sender, DeleteContactCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteContactCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5591,11 +5613,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetContactGeneralSettingsCompletedEventHandler(object sender, GetContactGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5617,11 +5639,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetContactGeneralSettingsCompletedEventHandler(object sender, SetContactGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5643,11 +5665,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetContactMailFlowSettingsCompletedEventHandler(object sender, GetContactMailFlowSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5669,11 +5691,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetContactMailFlowSettingsCompletedEventHandler(object sender, SetContactMailFlowSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5695,11 +5717,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateDistributionListCompletedEventHandler(object sender, CreateDistributionListCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CreateDistributionListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5721,11 +5743,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteDistributionListCompletedEventHandler(object sender, DeleteDistributionListCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteDistributionListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5747,11 +5769,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetDistributionListGeneralSettingsCompletedEventHandler(object sender, GetDistributionListGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5773,11 +5795,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetDistributionListGeneralSettingsCompletedEventHandler(object sender, SetDistributionListGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5799,11 +5821,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetDistributionListMailFlowSettingsCompletedEventHandler(object sender, GetDistributionListMailFlowSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5825,11 +5847,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetDistributionListMailFlowSettingsCompletedEventHandler(object sender, SetDistributionListMailFlowSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5851,11 +5873,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetDistributionListEmailAddressesCompletedEventHandler(object sender, GetDistributionListEmailAddressesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5877,11 +5899,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddDistributionListEmailAddressCompletedEventHandler(object sender, AddDistributionListEmailAddressCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class AddDistributionListEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5903,11 +5925,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetDistributionListPrimaryEmailAddressCompletedEventHandler(object sender, SetDistributionListPrimaryEmailAddressCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetDistributionListPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5929,11 +5951,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteDistributionListEmailAddressesCompletedEventHandler(object sender, DeleteDistributionListEmailAddressesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5955,11 +5977,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetDistributionListPermissionsCompletedEventHandler(object sender, SetDistributionListPermissionsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5981,11 +6003,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetDistributionListPermissionsCompletedEventHandler(object sender, GetDistributionListPermissionsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -6007,349 +6029,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CreatePublicFolderCompletedEventHandler(object sender, CreatePublicFolderCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreatePublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CreatePublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeletePublicFoldersCompletedEventHandler(object sender, DeletePublicFoldersCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeletePublicFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeletePublicFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeletePublicFolderCompletedEventHandler(object sender, DeletePublicFolderCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeletePublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeletePublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void EnableMailPublicFolderCompletedEventHandler(object sender, EnableMailPublicFolderCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class EnableMailPublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal EnableMailPublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DisableMailPublicFolderCompletedEventHandler(object sender, DisableMailPublicFolderCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DisableMailPublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DisableMailPublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetPublicFolderGeneralSettingsCompletedEventHandler(object sender, GetPublicFolderGeneralSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangePublicFolder Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangePublicFolder)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetPublicFolderGeneralSettingsCompletedEventHandler(object sender, SetPublicFolderGeneralSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, GetPublicFolderMailFlowSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangePublicFolder Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangePublicFolder)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, SetPublicFolderMailFlowSettingsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GetPublicFolderEmailAddressesCompletedEventHandler(object sender, GetPublicFolderEmailAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetPublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeEmailAddress[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeEmailAddress[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void AddPublicFolderEmailAddressCompletedEventHandler(object sender, AddPublicFolderEmailAddressCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddPublicFolderEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AddPublicFolderEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void SetPublicFolderPrimaryEmailAddressCompletedEventHandler(object sender, SetPublicFolderPrimaryEmailAddressCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetPublicFolderPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal SetPublicFolderPrimaryEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void DeletePublicFolderEmailAddressesCompletedEventHandler(object sender, DeletePublicFolderEmailAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeletePublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeletePublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMobileDevicesCompletedEventHandler(object sender, GetMobileDevicesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMobileDevicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -6371,11 +6055,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMobileDeviceCompletedEventHandler(object sender, GetMobileDeviceCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMobileDeviceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -6397,14 +6081,460 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void WipeDataFromDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CancelRemoteWipeRequestCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void RemoveDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetExchangeMailboxPlansCompletedEventHandler(object sender, GetExchangeMailboxPlansCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetExchangeMailboxPlansCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetExchangeMailboxPlansCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ExchangeMailboxPlan[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailboxPlan[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetExchangeMailboxPlanCompletedEventHandler(object sender, GetExchangeMailboxPlanCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ExchangeMailboxPlan Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ExchangeMailboxPlan)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddExchangeMailboxPlanCompletedEventHandler(object sender, AddExchangeMailboxPlanCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal AddExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteExchangeMailboxPlanCompletedEventHandler(object sender, DeleteExchangeMailboxPlanCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteExchangeMailboxPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal DeleteExchangeMailboxPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetOrganizationDefaultExchangeMailboxPlanCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreatePublicFolderCompletedEventHandler(object sender, CreatePublicFolderCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreatePublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal CreatePublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeletePublicFoldersCompletedEventHandler(object sender, DeletePublicFoldersCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeletePublicFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal DeletePublicFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeletePublicFolderCompletedEventHandler(object sender, DeletePublicFolderCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeletePublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal DeletePublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void EnableMailPublicFolderCompletedEventHandler(object sender, EnableMailPublicFolderCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class EnableMailPublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal EnableMailPublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DisableMailPublicFolderCompletedEventHandler(object sender, DisableMailPublicFolderCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DisableMailPublicFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal DisableMailPublicFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetPublicFolderGeneralSettingsCompletedEventHandler(object sender, GetPublicFolderGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ExchangePublicFolder Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ExchangePublicFolder)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetPublicFolderGeneralSettingsCompletedEventHandler(object sender, SetPublicFolderGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal SetPublicFolderGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, GetPublicFolderMailFlowSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ExchangePublicFolder Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ExchangePublicFolder)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, SetPublicFolderMailFlowSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal SetPublicFolderMailFlowSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetPublicFolderEmailAddressesCompletedEventHandler(object sender, GetPublicFolderEmailAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetPublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ExchangeEmailAddress[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ExchangeEmailAddress[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddPublicFolderEmailAddressCompletedEventHandler(object sender, AddPublicFolderEmailAddressCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddPublicFolderEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal AddPublicFolderEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetPublicFolderPrimaryEmailAddressCompletedEventHandler(object sender, SetPublicFolderPrimaryEmailAddressCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetPublicFolderPrimaryEmailAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal SetPublicFolderPrimaryEmailAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeletePublicFolderEmailAddressesCompletedEventHandler(object sender, DeletePublicFolderEmailAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeletePublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal DeletePublicFolderEmailAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/FilesProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/FilesProxy.cs index 882ccefd..9018d66a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/FilesProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/FilesProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/FtpServersProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/FtpServersProxy.cs index e4f2ade9..82ffc802 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/FtpServersProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/FtpServersProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/HostedSharePointServersProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/HostedSharePointServersProxy.cs index 5321f73f..e3e66389 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/HostedSharePointServersProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/HostedSharePointServersProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ImportProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ImportProxy.cs index 4a72c08d..889922e5 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ImportProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ImportProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/LyncProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/LyncProxy.cs new file mode 100644 index 00000000..f1c5f802 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/LyncProxy.cs @@ -0,0 +1,1206 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.5456 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by wsdl, Version=2.0.50727.42. +// +namespace WebsitePanel.EnterpriseServer { + using System.Xml.Serialization; + using System.Web.Services; + using System.ComponentModel; + using System.Web.Services.Protocols; + using System; + using System.Diagnostics; + + using WebsitePanel.Providers.Common; + using WebsitePanel.Providers.HostedSolution; + using WebsitePanel.Providers.ResultObjects; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Web.Services.WebServiceBindingAttribute(Name="esLyncSoap", Namespace="http://tempuri.org/")] + public partial class esLync : Microsoft.Web.Services3.WebServicesClientProtocol { + + private System.Threading.SendOrPostCallback CreateLyncUserOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteLyncUserOperationCompleted; + + private System.Threading.SendOrPostCallback GetLyncUsersPagedOperationCompleted; + + private System.Threading.SendOrPostCallback GetLyncUsersByPlanIdOperationCompleted; + + private System.Threading.SendOrPostCallback GetLyncUserCountOperationCompleted; + + private System.Threading.SendOrPostCallback GetLyncUserPlansOperationCompleted; + + private System.Threading.SendOrPostCallback GetLyncUserPlanOperationCompleted; + + private System.Threading.SendOrPostCallback AddLyncUserPlanOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteLyncUserPlanOperationCompleted; + + private System.Threading.SendOrPostCallback SetOrganizationDefaultLyncUserPlanOperationCompleted; + + private System.Threading.SendOrPostCallback GetLyncUserGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetUserLyncPlanOperationCompleted; + + private System.Threading.SendOrPostCallback GetFederationDomainsOperationCompleted; + + private System.Threading.SendOrPostCallback AddFederationDomainOperationCompleted; + + private System.Threading.SendOrPostCallback RemoveFederationDomainOperationCompleted; + + /// + public esLync() { + this.Url = "http://localhost:9005/esLync.asmx"; + } + + /// + public event CreateLyncUserCompletedEventHandler CreateLyncUserCompleted; + + /// + public event DeleteLyncUserCompletedEventHandler DeleteLyncUserCompleted; + + /// + public event GetLyncUsersPagedCompletedEventHandler GetLyncUsersPagedCompleted; + + /// + public event GetLyncUsersByPlanIdCompletedEventHandler GetLyncUsersByPlanIdCompleted; + + /// + public event GetLyncUserCountCompletedEventHandler GetLyncUserCountCompleted; + + /// + public event GetLyncUserPlansCompletedEventHandler GetLyncUserPlansCompleted; + + /// + public event GetLyncUserPlanCompletedEventHandler GetLyncUserPlanCompleted; + + /// + public event AddLyncUserPlanCompletedEventHandler AddLyncUserPlanCompleted; + + /// + public event DeleteLyncUserPlanCompletedEventHandler DeleteLyncUserPlanCompleted; + + /// + public event SetOrganizationDefaultLyncUserPlanCompletedEventHandler SetOrganizationDefaultLyncUserPlanCompleted; + + /// + public event GetLyncUserGeneralSettingsCompletedEventHandler GetLyncUserGeneralSettingsCompleted; + + /// + public event SetUserLyncPlanCompletedEventHandler SetUserLyncPlanCompleted; + + /// + public event GetFederationDomainsCompletedEventHandler GetFederationDomainsCompleted; + + /// + public event AddFederationDomainCompletedEventHandler AddFederationDomainCompleted; + + /// + public event RemoveFederationDomainCompletedEventHandler RemoveFederationDomainCompleted; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateLyncUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public LyncUserResult CreateLyncUser(int itemId, int accountId, int lyncUserPlanId) { + object[] results = this.Invoke("CreateLyncUser", new object[] { + itemId, + accountId, + lyncUserPlanId}); + return ((LyncUserResult)(results[0])); + } + + /// + public System.IAsyncResult BeginCreateLyncUser(int itemId, int accountId, int lyncUserPlanId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("CreateLyncUser", new object[] { + itemId, + accountId, + lyncUserPlanId}, callback, asyncState); + } + + /// + public LyncUserResult EndCreateLyncUser(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((LyncUserResult)(results[0])); + } + + /// + public void CreateLyncUserAsync(int itemId, int accountId, int lyncUserPlanId) { + this.CreateLyncUserAsync(itemId, accountId, lyncUserPlanId, null); + } + + /// + public void CreateLyncUserAsync(int itemId, int accountId, int lyncUserPlanId, object userState) { + if ((this.CreateLyncUserOperationCompleted == null)) { + this.CreateLyncUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateLyncUserOperationCompleted); + } + this.InvokeAsync("CreateLyncUser", new object[] { + itemId, + accountId, + lyncUserPlanId}, this.CreateLyncUserOperationCompleted, userState); + } + + private void OnCreateLyncUserOperationCompleted(object arg) { + if ((this.CreateLyncUserCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CreateLyncUserCompleted(this, new CreateLyncUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteLyncUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject DeleteLyncUser(int itemId, int accountId) { + object[] results = this.Invoke("DeleteLyncUser", new object[] { + itemId, + accountId}); + return ((ResultObject)(results[0])); + } + + /// + public System.IAsyncResult BeginDeleteLyncUser(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("DeleteLyncUser", new object[] { + itemId, + accountId}, callback, asyncState); + } + + /// + public ResultObject EndDeleteLyncUser(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ResultObject)(results[0])); + } + + /// + public void DeleteLyncUserAsync(int itemId, int accountId) { + this.DeleteLyncUserAsync(itemId, accountId, null); + } + + /// + public void DeleteLyncUserAsync(int itemId, int accountId, object userState) { + if ((this.DeleteLyncUserOperationCompleted == null)) { + this.DeleteLyncUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteLyncUserOperationCompleted); + } + this.InvokeAsync("DeleteLyncUser", new object[] { + itemId, + accountId}, this.DeleteLyncUserOperationCompleted, userState); + } + + private void OnDeleteLyncUserOperationCompleted(object arg) { + if ((this.DeleteLyncUserCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteLyncUserCompleted(this, new DeleteLyncUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetLyncUsersPaged", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public LyncUsersPagedResult GetLyncUsersPaged(int itemId, string sortColumn, string sortDirection, int startRow, int maximumRows) { + object[] results = this.Invoke("GetLyncUsersPaged", new object[] { + itemId, + sortColumn, + sortDirection, + startRow, + maximumRows}); + return ((LyncUsersPagedResult)(results[0])); + } + + /// + public System.IAsyncResult BeginGetLyncUsersPaged(int itemId, string sortColumn, string sortDirection, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetLyncUsersPaged", new object[] { + itemId, + sortColumn, + sortDirection, + startRow, + maximumRows}, callback, asyncState); + } + + /// + public LyncUsersPagedResult EndGetLyncUsersPaged(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((LyncUsersPagedResult)(results[0])); + } + + /// + public void GetLyncUsersPagedAsync(int itemId, string sortColumn, string sortDirection, int startRow, int maximumRows) { + this.GetLyncUsersPagedAsync(itemId, sortColumn, sortDirection, startRow, maximumRows, null); + } + + /// + public void GetLyncUsersPagedAsync(int itemId, string sortColumn, string sortDirection, int startRow, int maximumRows, object userState) { + if ((this.GetLyncUsersPagedOperationCompleted == null)) { + this.GetLyncUsersPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLyncUsersPagedOperationCompleted); + } + this.InvokeAsync("GetLyncUsersPaged", new object[] { + itemId, + sortColumn, + sortDirection, + startRow, + maximumRows}, this.GetLyncUsersPagedOperationCompleted, userState); + } + + private void OnGetLyncUsersPagedOperationCompleted(object arg) { + if ((this.GetLyncUsersPagedCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetLyncUsersPagedCompleted(this, new GetLyncUsersPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetLyncUsersByPlanId", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public LyncUser[] GetLyncUsersByPlanId(int itemId, int planId) { + object[] results = this.Invoke("GetLyncUsersByPlanId", new object[] { + itemId, + planId}); + return ((LyncUser[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetLyncUsersByPlanId(int itemId, int planId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetLyncUsersByPlanId", new object[] { + itemId, + planId}, callback, asyncState); + } + + /// + public LyncUser[] EndGetLyncUsersByPlanId(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((LyncUser[])(results[0])); + } + + /// + public void GetLyncUsersByPlanIdAsync(int itemId, int planId) { + this.GetLyncUsersByPlanIdAsync(itemId, planId, null); + } + + /// + public void GetLyncUsersByPlanIdAsync(int itemId, int planId, object userState) { + if ((this.GetLyncUsersByPlanIdOperationCompleted == null)) { + this.GetLyncUsersByPlanIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLyncUsersByPlanIdOperationCompleted); + } + this.InvokeAsync("GetLyncUsersByPlanId", new object[] { + itemId, + planId}, this.GetLyncUsersByPlanIdOperationCompleted, userState); + } + + private void OnGetLyncUsersByPlanIdOperationCompleted(object arg) { + if ((this.GetLyncUsersByPlanIdCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetLyncUsersByPlanIdCompleted(this, new GetLyncUsersByPlanIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetLyncUserCount", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public IntResult GetLyncUserCount(int itemId) { + object[] results = this.Invoke("GetLyncUserCount", new object[] { + itemId}); + return ((IntResult)(results[0])); + } + + /// + public System.IAsyncResult BeginGetLyncUserCount(int itemId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetLyncUserCount", new object[] { + itemId}, callback, asyncState); + } + + /// + public IntResult EndGetLyncUserCount(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((IntResult)(results[0])); + } + + /// + public void GetLyncUserCountAsync(int itemId) { + this.GetLyncUserCountAsync(itemId, null); + } + + /// + public void GetLyncUserCountAsync(int itemId, object userState) { + if ((this.GetLyncUserCountOperationCompleted == null)) { + this.GetLyncUserCountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLyncUserCountOperationCompleted); + } + this.InvokeAsync("GetLyncUserCount", new object[] { + itemId}, this.GetLyncUserCountOperationCompleted, userState); + } + + private void OnGetLyncUserCountOperationCompleted(object arg) { + if ((this.GetLyncUserCountCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetLyncUserCountCompleted(this, new GetLyncUserCountCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetLyncUserPlans", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public LyncUserPlan[] GetLyncUserPlans(int itemId) { + object[] results = this.Invoke("GetLyncUserPlans", new object[] { + itemId}); + return ((LyncUserPlan[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetLyncUserPlans(int itemId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetLyncUserPlans", new object[] { + itemId}, callback, asyncState); + } + + /// + public LyncUserPlan[] EndGetLyncUserPlans(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((LyncUserPlan[])(results[0])); + } + + /// + public void GetLyncUserPlansAsync(int itemId) { + this.GetLyncUserPlansAsync(itemId, null); + } + + /// + public void GetLyncUserPlansAsync(int itemId, object userState) { + if ((this.GetLyncUserPlansOperationCompleted == null)) { + this.GetLyncUserPlansOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLyncUserPlansOperationCompleted); + } + this.InvokeAsync("GetLyncUserPlans", new object[] { + itemId}, this.GetLyncUserPlansOperationCompleted, userState); + } + + private void OnGetLyncUserPlansOperationCompleted(object arg) { + if ((this.GetLyncUserPlansCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetLyncUserPlansCompleted(this, new GetLyncUserPlansCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetLyncUserPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public LyncUserPlan GetLyncUserPlan(int itemId, int lyncUserPlanId) { + object[] results = this.Invoke("GetLyncUserPlan", new object[] { + itemId, + lyncUserPlanId}); + return ((LyncUserPlan)(results[0])); + } + + /// + public System.IAsyncResult BeginGetLyncUserPlan(int itemId, int lyncUserPlanId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetLyncUserPlan", new object[] { + itemId, + lyncUserPlanId}, callback, asyncState); + } + + /// + public LyncUserPlan EndGetLyncUserPlan(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((LyncUserPlan)(results[0])); + } + + /// + public void GetLyncUserPlanAsync(int itemId, int lyncUserPlanId) { + this.GetLyncUserPlanAsync(itemId, lyncUserPlanId, null); + } + + /// + public void GetLyncUserPlanAsync(int itemId, int lyncUserPlanId, object userState) { + if ((this.GetLyncUserPlanOperationCompleted == null)) { + this.GetLyncUserPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLyncUserPlanOperationCompleted); + } + this.InvokeAsync("GetLyncUserPlan", new object[] { + itemId, + lyncUserPlanId}, this.GetLyncUserPlanOperationCompleted, userState); + } + + private void OnGetLyncUserPlanOperationCompleted(object arg) { + if ((this.GetLyncUserPlanCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetLyncUserPlanCompleted(this, new GetLyncUserPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddLyncUserPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddLyncUserPlan(int itemId, LyncUserPlan lyncUserPlan) { + object[] results = this.Invoke("AddLyncUserPlan", new object[] { + itemId, + lyncUserPlan}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginAddLyncUserPlan(int itemId, LyncUserPlan lyncUserPlan, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("AddLyncUserPlan", new object[] { + itemId, + lyncUserPlan}, callback, asyncState); + } + + /// + public int EndAddLyncUserPlan(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void AddLyncUserPlanAsync(int itemId, LyncUserPlan lyncUserPlan) { + this.AddLyncUserPlanAsync(itemId, lyncUserPlan, null); + } + + /// + public void AddLyncUserPlanAsync(int itemId, LyncUserPlan lyncUserPlan, object userState) { + if ((this.AddLyncUserPlanOperationCompleted == null)) { + this.AddLyncUserPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddLyncUserPlanOperationCompleted); + } + this.InvokeAsync("AddLyncUserPlan", new object[] { + itemId, + lyncUserPlan}, this.AddLyncUserPlanOperationCompleted, userState); + } + + private void OnAddLyncUserPlanOperationCompleted(object arg) { + if ((this.AddLyncUserPlanCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.AddLyncUserPlanCompleted(this, new AddLyncUserPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteLyncUserPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteLyncUserPlan(int itemId, int lyncUserPlanId) { + object[] results = this.Invoke("DeleteLyncUserPlan", new object[] { + itemId, + lyncUserPlanId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginDeleteLyncUserPlan(int itemId, int lyncUserPlanId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("DeleteLyncUserPlan", new object[] { + itemId, + lyncUserPlanId}, callback, asyncState); + } + + /// + public int EndDeleteLyncUserPlan(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void DeleteLyncUserPlanAsync(int itemId, int lyncUserPlanId) { + this.DeleteLyncUserPlanAsync(itemId, lyncUserPlanId, null); + } + + /// + public void DeleteLyncUserPlanAsync(int itemId, int lyncUserPlanId, object userState) { + if ((this.DeleteLyncUserPlanOperationCompleted == null)) { + this.DeleteLyncUserPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteLyncUserPlanOperationCompleted); + } + this.InvokeAsync("DeleteLyncUserPlan", new object[] { + itemId, + lyncUserPlanId}, this.DeleteLyncUserPlanOperationCompleted, userState); + } + + private void OnDeleteLyncUserPlanOperationCompleted(object arg) { + if ((this.DeleteLyncUserPlanCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteLyncUserPlanCompleted(this, new DeleteLyncUserPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetOrganizationDefaultLyncUserPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetOrganizationDefaultLyncUserPlan(int itemId, int lyncUserPlanId) { + object[] results = this.Invoke("SetOrganizationDefaultLyncUserPlan", new object[] { + itemId, + lyncUserPlanId}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginSetOrganizationDefaultLyncUserPlan(int itemId, int lyncUserPlanId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetOrganizationDefaultLyncUserPlan", new object[] { + itemId, + lyncUserPlanId}, callback, asyncState); + } + + /// + public int EndSetOrganizationDefaultLyncUserPlan(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void SetOrganizationDefaultLyncUserPlanAsync(int itemId, int lyncUserPlanId) { + this.SetOrganizationDefaultLyncUserPlanAsync(itemId, lyncUserPlanId, null); + } + + /// + public void SetOrganizationDefaultLyncUserPlanAsync(int itemId, int lyncUserPlanId, object userState) { + if ((this.SetOrganizationDefaultLyncUserPlanOperationCompleted == null)) { + this.SetOrganizationDefaultLyncUserPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetOrganizationDefaultLyncUserPlanOperationCompleted); + } + this.InvokeAsync("SetOrganizationDefaultLyncUserPlan", new object[] { + itemId, + lyncUserPlanId}, this.SetOrganizationDefaultLyncUserPlanOperationCompleted, userState); + } + + private void OnSetOrganizationDefaultLyncUserPlanOperationCompleted(object arg) { + if ((this.SetOrganizationDefaultLyncUserPlanCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetOrganizationDefaultLyncUserPlanCompleted(this, new SetOrganizationDefaultLyncUserPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetLyncUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public LyncUser GetLyncUserGeneralSettings(int itemId, int accountId) { + object[] results = this.Invoke("GetLyncUserGeneralSettings", new object[] { + itemId, + accountId}); + return ((LyncUser)(results[0])); + } + + /// + public System.IAsyncResult BeginGetLyncUserGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetLyncUserGeneralSettings", new object[] { + itemId, + accountId}, callback, asyncState); + } + + /// + public LyncUser EndGetLyncUserGeneralSettings(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((LyncUser)(results[0])); + } + + /// + public void GetLyncUserGeneralSettingsAsync(int itemId, int accountId) { + this.GetLyncUserGeneralSettingsAsync(itemId, accountId, null); + } + + /// + public void GetLyncUserGeneralSettingsAsync(int itemId, int accountId, object userState) { + if ((this.GetLyncUserGeneralSettingsOperationCompleted == null)) { + this.GetLyncUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLyncUserGeneralSettingsOperationCompleted); + } + this.InvokeAsync("GetLyncUserGeneralSettings", new object[] { + itemId, + accountId}, this.GetLyncUserGeneralSettingsOperationCompleted, userState); + } + + private void OnGetLyncUserGeneralSettingsOperationCompleted(object arg) { + if ((this.GetLyncUserGeneralSettingsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetLyncUserGeneralSettingsCompleted(this, new GetLyncUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserLyncPlan", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public LyncUserResult SetUserLyncPlan(int itemId, int accountId, int lyncUserPlanId) { + object[] results = this.Invoke("SetUserLyncPlan", new object[] { + itemId, + accountId, + lyncUserPlanId}); + return ((LyncUserResult)(results[0])); + } + + /// + public System.IAsyncResult BeginSetUserLyncPlan(int itemId, int accountId, int lyncUserPlanId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetUserLyncPlan", new object[] { + itemId, + accountId, + lyncUserPlanId}, callback, asyncState); + } + + /// + public LyncUserResult EndSetUserLyncPlan(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((LyncUserResult)(results[0])); + } + + /// + public void SetUserLyncPlanAsync(int itemId, int accountId, int lyncUserPlanId) { + this.SetUserLyncPlanAsync(itemId, accountId, lyncUserPlanId, null); + } + + /// + public void SetUserLyncPlanAsync(int itemId, int accountId, int lyncUserPlanId, object userState) { + if ((this.SetUserLyncPlanOperationCompleted == null)) { + this.SetUserLyncPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserLyncPlanOperationCompleted); + } + this.InvokeAsync("SetUserLyncPlan", new object[] { + itemId, + accountId, + lyncUserPlanId}, this.SetUserLyncPlanOperationCompleted, userState); + } + + private void OnSetUserLyncPlanOperationCompleted(object arg) { + if ((this.SetUserLyncPlanCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetUserLyncPlanCompleted(this, new SetUserLyncPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetFederationDomains", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public LyncFederationDomain[] GetFederationDomains(int itemId) { + object[] results = this.Invoke("GetFederationDomains", new object[] { + itemId}); + return ((LyncFederationDomain[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetFederationDomains(int itemId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetFederationDomains", new object[] { + itemId}, callback, asyncState); + } + + /// + public LyncFederationDomain[] EndGetFederationDomains(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((LyncFederationDomain[])(results[0])); + } + + /// + public void GetFederationDomainsAsync(int itemId) { + this.GetFederationDomainsAsync(itemId, null); + } + + /// + public void GetFederationDomainsAsync(int itemId, object userState) { + if ((this.GetFederationDomainsOperationCompleted == null)) { + this.GetFederationDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFederationDomainsOperationCompleted); + } + this.InvokeAsync("GetFederationDomains", new object[] { + itemId}, this.GetFederationDomainsOperationCompleted, userState); + } + + private void OnGetFederationDomainsOperationCompleted(object arg) { + if ((this.GetFederationDomainsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetFederationDomainsCompleted(this, new GetFederationDomainsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddFederationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public LyncUserResult AddFederationDomain(int itemId, string domainName, string proxyFqdn) { + object[] results = this.Invoke("AddFederationDomain", new object[] { + itemId, + domainName, + proxyFqdn}); + return ((LyncUserResult)(results[0])); + } + + /// + public System.IAsyncResult BeginAddFederationDomain(int itemId, string domainName, string proxyFqdn, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("AddFederationDomain", new object[] { + itemId, + domainName, + proxyFqdn}, callback, asyncState); + } + + /// + public LyncUserResult EndAddFederationDomain(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((LyncUserResult)(results[0])); + } + + /// + public void AddFederationDomainAsync(int itemId, string domainName, string proxyFqdn) { + this.AddFederationDomainAsync(itemId, domainName, proxyFqdn, null); + } + + /// + public void AddFederationDomainAsync(int itemId, string domainName, string proxyFqdn, object userState) { + if ((this.AddFederationDomainOperationCompleted == null)) { + this.AddFederationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddFederationDomainOperationCompleted); + } + this.InvokeAsync("AddFederationDomain", new object[] { + itemId, + domainName, + proxyFqdn}, this.AddFederationDomainOperationCompleted, userState); + } + + private void OnAddFederationDomainOperationCompleted(object arg) { + if ((this.AddFederationDomainCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.AddFederationDomainCompleted(this, new AddFederationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/RemoveFederationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public LyncUserResult RemoveFederationDomain(int itemId, string domainName) { + object[] results = this.Invoke("RemoveFederationDomain", new object[] { + itemId, + domainName}); + return ((LyncUserResult)(results[0])); + } + + /// + public System.IAsyncResult BeginRemoveFederationDomain(int itemId, string domainName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("RemoveFederationDomain", new object[] { + itemId, + domainName}, callback, asyncState); + } + + /// + public LyncUserResult EndRemoveFederationDomain(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((LyncUserResult)(results[0])); + } + + /// + public void RemoveFederationDomainAsync(int itemId, string domainName) { + this.RemoveFederationDomainAsync(itemId, domainName, null); + } + + /// + public void RemoveFederationDomainAsync(int itemId, string domainName, object userState) { + if ((this.RemoveFederationDomainOperationCompleted == null)) { + this.RemoveFederationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveFederationDomainOperationCompleted); + } + this.InvokeAsync("RemoveFederationDomain", new object[] { + itemId, + domainName}, this.RemoveFederationDomainOperationCompleted, userState); + } + + private void OnRemoveFederationDomainOperationCompleted(object arg) { + if ((this.RemoveFederationDomainCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RemoveFederationDomainCompleted(this, new RemoveFederationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) { + base.CancelAsync(userState); + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateLyncUserCompletedEventHandler(object sender, CreateLyncUserCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateLyncUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal CreateLyncUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public LyncUserResult Result { + get { + this.RaiseExceptionIfNecessary(); + return ((LyncUserResult)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteLyncUserCompletedEventHandler(object sender, DeleteLyncUserCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteLyncUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal DeleteLyncUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ResultObject Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetLyncUsersPagedCompletedEventHandler(object sender, GetLyncUsersPagedCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetLyncUsersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetLyncUsersPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public LyncUsersPagedResult Result { + get { + this.RaiseExceptionIfNecessary(); + return ((LyncUsersPagedResult)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetLyncUsersByPlanIdCompletedEventHandler(object sender, GetLyncUsersByPlanIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetLyncUsersByPlanIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetLyncUsersByPlanIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public LyncUser[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((LyncUser[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetLyncUserCountCompletedEventHandler(object sender, GetLyncUserCountCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetLyncUserCountCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetLyncUserCountCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public IntResult Result { + get { + this.RaiseExceptionIfNecessary(); + return ((IntResult)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetLyncUserPlansCompletedEventHandler(object sender, GetLyncUserPlansCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetLyncUserPlansCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetLyncUserPlansCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public LyncUserPlan[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((LyncUserPlan[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetLyncUserPlanCompletedEventHandler(object sender, GetLyncUserPlanCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetLyncUserPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public LyncUserPlan Result { + get { + this.RaiseExceptionIfNecessary(); + return ((LyncUserPlan)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddLyncUserPlanCompletedEventHandler(object sender, AddLyncUserPlanCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal AddLyncUserPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteLyncUserPlanCompletedEventHandler(object sender, DeleteLyncUserPlanCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal DeleteLyncUserPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetOrganizationDefaultLyncUserPlanCompletedEventHandler(object sender, SetOrganizationDefaultLyncUserPlanCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetOrganizationDefaultLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal SetOrganizationDefaultLyncUserPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetLyncUserGeneralSettingsCompletedEventHandler(object sender, GetLyncUserGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetLyncUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetLyncUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public LyncUser Result { + get { + this.RaiseExceptionIfNecessary(); + return ((LyncUser)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetUserLyncPlanCompletedEventHandler(object sender, SetUserLyncPlanCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetUserLyncPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal SetUserLyncPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public LyncUserResult Result { + get { + this.RaiseExceptionIfNecessary(); + return ((LyncUserResult)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetFederationDomainsCompletedEventHandler(object sender, GetFederationDomainsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetFederationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetFederationDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public LyncFederationDomain[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((LyncFederationDomain[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddFederationDomainCompletedEventHandler(object sender, AddFederationDomainCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal AddFederationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public LyncUserResult Result { + get { + this.RaiseExceptionIfNecessary(); + return ((LyncUserResult)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void RemoveFederationDomainCompletedEventHandler(object sender, RemoveFederationDomainCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class RemoveFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal RemoveFederationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public LyncUserResult Result { + get { + this.RaiseExceptionIfNecessary(); + return ((LyncUserResult)(this.results[0])); + } + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/MailServersProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/MailServersProxy.cs index b072e66a..e195ec8d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/MailServersProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/MailServersProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OCSProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OCSProxy.cs index a6a57601..6548acb9 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OCSProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OCSProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OperatingSystemsProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OperatingSystemsProxy.cs index 602a8eed..f64b1da1 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OperatingSystemsProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OperatingSystemsProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs index 73ed0e4d..f7164f03 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs @@ -1,35 +1,7 @@ -// Copyright (c) 2011, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3053 +// Runtime Version:2.0.50727.5456 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -39,162 +11,180 @@ // // This source code was auto-generated by wsdl, Version=2.0.50727.42. // -using WebsitePanel.Providers; -using WebsitePanel.Providers.Common; -using WebsitePanel.Providers.HostedSolution; -using WebsitePanel.Providers.ResultObjects; - -namespace WebsitePanel.EnterpriseServer.HostedSolution { - using System.Diagnostics; +namespace WebsitePanel.EnterpriseServer.HostedSolution +{ + using System.Xml.Serialization; using System.Web.Services; using System.ComponentModel; using System.Web.Services.Protocols; using System; - using System.Xml.Serialization; + using System.Diagnostics; using System.Data; - - + + using WebsitePanel.Providers; + using WebsitePanel.Providers.Common; + using WebsitePanel.Providers.HostedSolution; + using WebsitePanel.Providers.ResultObjects; + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name="esOrganizationsSoap", Namespace="http://tempuri.org/")] + [System.Web.Services.WebServiceBindingAttribute(Name = "esOrganizationsSoap", Namespace = "http://tempuri.org/")] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResultObject))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] - public partial class esOrganizations : Microsoft.Web.Services3.WebServicesClientProtocol { - + public partial class esOrganizations : Microsoft.Web.Services3.WebServicesClientProtocol + { + private System.Threading.SendOrPostCallback CreateOrganizationOperationCompleted; - + private System.Threading.SendOrPostCallback GetRawOrganizationsPagedOperationCompleted; - + private System.Threading.SendOrPostCallback GetOrganizationsOperationCompleted; - + private System.Threading.SendOrPostCallback GetOrganizationUserSummuryLetterOperationCompleted; - + private System.Threading.SendOrPostCallback SendOrganizationUserSummuryLetterOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; - + private System.Threading.SendOrPostCallback GetOrganizationStatisticsOperationCompleted; - + private System.Threading.SendOrPostCallback GetOrganizationOperationCompleted; - + + private System.Threading.SendOrPostCallback GetAccountIdByUserPrincipalNameOperationCompleted; + private System.Threading.SendOrPostCallback AddOrganizationDomainOperationCompleted; - + private System.Threading.SendOrPostCallback GetOrganizationDomainsOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteOrganizationDomainOperationCompleted; - + private System.Threading.SendOrPostCallback SetOrganizationDefaultDomainOperationCompleted; - + private System.Threading.SendOrPostCallback CreateUserOperationCompleted; - + + private System.Threading.SendOrPostCallback ImportUserOperationCompleted; + private System.Threading.SendOrPostCallback GetOrganizationUsersPagedOperationCompleted; - + private System.Threading.SendOrPostCallback GetUserGeneralSettingsOperationCompleted; - + private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted; - + private System.Threading.SendOrPostCallback SearchAccountsOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteUserOperationCompleted; - + private System.Threading.SendOrPostCallback GetPasswordPolicyOperationCompleted; - + /// - public esOrganizations() { - this.Url = "http://localhost/WebsitePanelEnterpriseServer/esOrganizations.asmx"; + public esOrganizations() + { + this.Url = "http://localhost:9002/esOrganizations.asmx"; } - + /// public event CreateOrganizationCompletedEventHandler CreateOrganizationCompleted; - + /// public event GetRawOrganizationsPagedCompletedEventHandler GetRawOrganizationsPagedCompleted; - + /// public event GetOrganizationsCompletedEventHandler GetOrganizationsCompleted; - + /// public event GetOrganizationUserSummuryLetterCompletedEventHandler GetOrganizationUserSummuryLetterCompleted; - + /// public event SendOrganizationUserSummuryLetterCompletedEventHandler SendOrganizationUserSummuryLetterCompleted; - + /// public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; - + /// public event GetOrganizationStatisticsCompletedEventHandler GetOrganizationStatisticsCompleted; - + /// public event GetOrganizationCompletedEventHandler GetOrganizationCompleted; - + + /// + public event GetAccountIdByUserPrincipalNameCompletedEventHandler GetAccountIdByUserPrincipalNameCompleted; + /// public event AddOrganizationDomainCompletedEventHandler AddOrganizationDomainCompleted; - + /// public event GetOrganizationDomainsCompletedEventHandler GetOrganizationDomainsCompleted; - + /// public event DeleteOrganizationDomainCompletedEventHandler DeleteOrganizationDomainCompleted; - + /// public event SetOrganizationDefaultDomainCompletedEventHandler SetOrganizationDefaultDomainCompleted; - + /// public event CreateUserCompletedEventHandler CreateUserCompleted; - + + /// + public event ImportUserCompletedEventHandler ImportUserCompleted; + /// public event GetOrganizationUsersPagedCompletedEventHandler GetOrganizationUsersPagedCompleted; - + /// public event GetUserGeneralSettingsCompletedEventHandler GetUserGeneralSettingsCompleted; - + /// public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted; - + /// public event SearchAccountsCompletedEventHandler SearchAccountsCompleted; - + /// public event DeleteUserCompletedEventHandler DeleteUserCompleted; - + /// public event GetPasswordPolicyCompletedEventHandler GetPasswordPolicyCompleted; - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateOrganization", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateOrganization(int packageId, string organizationID, string organizationName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateOrganization", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateOrganization(int packageId, string organizationID, string organizationName) + { object[] results = this.Invoke("CreateOrganization", new object[] { packageId, organizationID, organizationName}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCreateOrganization(int packageId, string organizationID, string organizationName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateOrganization(int packageId, string organizationID, string organizationName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateOrganization", new object[] { packageId, organizationID, organizationName}, callback, asyncState); } - + /// - public int EndCreateOrganization(System.IAsyncResult asyncResult) { + public int EndCreateOrganization(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CreateOrganizationAsync(int packageId, string organizationID, string organizationName) { + public void CreateOrganizationAsync(int packageId, string organizationID, string organizationName) + { this.CreateOrganizationAsync(packageId, organizationID, organizationName, null); } - + /// - public void CreateOrganizationAsync(int packageId, string organizationID, string organizationName, object userState) { - if ((this.CreateOrganizationOperationCompleted == null)) { + public void CreateOrganizationAsync(int packageId, string organizationID, string organizationName, object userState) + { + if ((this.CreateOrganizationOperationCompleted == null)) + { this.CreateOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationOperationCompleted); } this.InvokeAsync("CreateOrganization", new object[] { @@ -202,17 +192,20 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { organizationID, organizationName}, this.CreateOrganizationOperationCompleted, userState); } - - private void OnCreateOrganizationOperationCompleted(object arg) { - if ((this.CreateOrganizationCompleted != null)) { + + private void OnCreateOrganizationOperationCompleted(object arg) + { + if ((this.CreateOrganizationCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateOrganizationCompleted(this, new CreateOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetRawOrganizationsPaged", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetRawOrganizationsPaged", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { object[] results = this.Invoke("GetRawOrganizationsPaged", new object[] { packageId, recursive, @@ -223,9 +216,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { maximumRows}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawOrganizationsPaged(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawOrganizationsPaged", new object[] { packageId, recursive, @@ -235,21 +229,25 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { startRow, maximumRows}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawOrganizationsPaged(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawOrganizationsPaged(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + public void GetRawOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { this.GetRawOrganizationsPagedAsync(packageId, recursive, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetRawOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { - if ((this.GetRawOrganizationsPagedOperationCompleted == null)) { + public void GetRawOrganizationsPagedAsync(int packageId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) + { + if ((this.GetRawOrganizationsPagedOperationCompleted == null)) + { this.GetRawOrganizationsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawOrganizationsPagedOperationCompleted); } this.InvokeAsync("GetRawOrganizationsPaged", new object[] { @@ -261,61 +259,72 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { startRow, maximumRows}, this.GetRawOrganizationsPagedOperationCompleted, userState); } - - private void OnGetRawOrganizationsPagedOperationCompleted(object arg) { - if ((this.GetRawOrganizationsPagedCompleted != null)) { + + private void OnGetRawOrganizationsPagedOperationCompleted(object arg) + { + if ((this.GetRawOrganizationsPagedCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawOrganizationsPagedCompleted(this, new GetRawOrganizationsPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizations", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public Organization[] GetOrganizations(int packageId, bool recursive) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizations", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public Organization[] GetOrganizations(int packageId, bool recursive) + { object[] results = this.Invoke("GetOrganizations", new object[] { packageId, recursive}); return ((Organization[])(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizations(int packageId, bool recursive, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizations(int packageId, bool recursive, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizations", new object[] { packageId, recursive}, callback, asyncState); } - + /// - public Organization[] EndGetOrganizations(System.IAsyncResult asyncResult) { + public Organization[] EndGetOrganizations(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((Organization[])(results[0])); } - + /// - public void GetOrganizationsAsync(int packageId, bool recursive) { + public void GetOrganizationsAsync(int packageId, bool recursive) + { this.GetOrganizationsAsync(packageId, recursive, null); } - + /// - public void GetOrganizationsAsync(int packageId, bool recursive, object userState) { - if ((this.GetOrganizationsOperationCompleted == null)) { + public void GetOrganizationsAsync(int packageId, bool recursive, object userState) + { + if ((this.GetOrganizationsOperationCompleted == null)) + { this.GetOrganizationsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationsOperationCompleted); } this.InvokeAsync("GetOrganizations", new object[] { packageId, recursive}, this.GetOrganizationsOperationCompleted, userState); } - - private void OnGetOrganizationsOperationCompleted(object arg) { - if ((this.GetOrganizationsCompleted != null)) { + + private void OnGetOrganizationsOperationCompleted(object arg) + { + if ((this.GetOrganizationsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationsCompleted(this, new GetOrganizationsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationUserSummuryLetter", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string GetOrganizationUserSummuryLetter(int itemId, int accountId, bool pmm, bool emailMode, bool signup) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationUserSummuryLetter", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string GetOrganizationUserSummuryLetter(int itemId, int accountId, bool pmm, bool emailMode, bool signup) + { object[] results = this.Invoke("GetOrganizationUserSummuryLetter", new object[] { itemId, accountId, @@ -324,9 +333,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { signup}); return ((string)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationUserSummuryLetter(int itemId, int accountId, bool pmm, bool emailMode, bool signup, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizationUserSummuryLetter(int itemId, int accountId, bool pmm, bool emailMode, bool signup, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizationUserSummuryLetter", new object[] { itemId, accountId, @@ -334,21 +344,25 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { emailMode, signup}, callback, asyncState); } - + /// - public string EndGetOrganizationUserSummuryLetter(System.IAsyncResult asyncResult) { + public string EndGetOrganizationUserSummuryLetter(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string)(results[0])); } - + /// - public void GetOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup) { + public void GetOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup) + { this.GetOrganizationUserSummuryLetterAsync(itemId, accountId, pmm, emailMode, signup, null); } - + /// - public void GetOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup, object userState) { - if ((this.GetOrganizationUserSummuryLetterOperationCompleted == null)) { + public void GetOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool pmm, bool emailMode, bool signup, object userState) + { + if ((this.GetOrganizationUserSummuryLetterOperationCompleted == null)) + { this.GetOrganizationUserSummuryLetterOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationUserSummuryLetterOperationCompleted); } this.InvokeAsync("GetOrganizationUserSummuryLetter", new object[] { @@ -358,17 +372,20 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { emailMode, signup}, this.GetOrganizationUserSummuryLetterOperationCompleted, userState); } - - private void OnGetOrganizationUserSummuryLetterOperationCompleted(object arg) { - if ((this.GetOrganizationUserSummuryLetterCompleted != null)) { + + private void OnGetOrganizationUserSummuryLetterOperationCompleted(object arg) + { + if ((this.GetOrganizationUserSummuryLetterCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationUserSummuryLetterCompleted(this, new GetOrganizationUserSummuryLetterCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendOrganizationUserSummuryLetter", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SendOrganizationUserSummuryLetter(int itemId, int accountId, bool signup, string to, string cc) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendOrganizationUserSummuryLetter", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SendOrganizationUserSummuryLetter(int itemId, int accountId, bool signup, string to, string cc) + { object[] results = this.Invoke("SendOrganizationUserSummuryLetter", new object[] { itemId, accountId, @@ -377,9 +394,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { cc}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSendOrganizationUserSummuryLetter(int itemId, int accountId, bool signup, string to, string cc, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSendOrganizationUserSummuryLetter(int itemId, int accountId, bool signup, string to, string cc, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SendOrganizationUserSummuryLetter", new object[] { itemId, accountId, @@ -387,21 +405,25 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { to, cc}, callback, asyncState); } - + /// - public int EndSendOrganizationUserSummuryLetter(System.IAsyncResult asyncResult) { + public int EndSendOrganizationUserSummuryLetter(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SendOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool signup, string to, string cc) { + public void SendOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool signup, string to, string cc) + { this.SendOrganizationUserSummuryLetterAsync(itemId, accountId, signup, to, cc, null); } - + /// - public void SendOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool signup, string to, string cc, object userState) { - if ((this.SendOrganizationUserSummuryLetterOperationCompleted == null)) { + public void SendOrganizationUserSummuryLetterAsync(int itemId, int accountId, bool signup, string to, string cc, object userState) + { + if ((this.SendOrganizationUserSummuryLetterOperationCompleted == null)) + { this.SendOrganizationUserSummuryLetterOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendOrganizationUserSummuryLetterOperationCompleted); } this.InvokeAsync("SendOrganizationUserSummuryLetter", new object[] { @@ -411,350 +433,468 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { to, cc}, this.SendOrganizationUserSummuryLetterOperationCompleted, userState); } - - private void OnSendOrganizationUserSummuryLetterOperationCompleted(object arg) { - if ((this.SendOrganizationUserSummuryLetterCompleted != null)) { + + private void OnSendOrganizationUserSummuryLetterOperationCompleted(object arg) + { + if ((this.SendOrganizationUserSummuryLetterCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SendOrganizationUserSummuryLetterCompleted(this, new SendOrganizationUserSummuryLetterCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganization", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteOrganization(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganization", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteOrganization(int itemId) + { object[] results = this.Invoke("DeleteOrganization", new object[] { itemId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteOrganization(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteOrganization(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteOrganization", new object[] { itemId}, callback, asyncState); } - + /// - public int EndDeleteOrganization(System.IAsyncResult asyncResult) { + public int EndDeleteOrganization(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteOrganizationAsync(int itemId) { + public void DeleteOrganizationAsync(int itemId) + { this.DeleteOrganizationAsync(itemId, null); } - + /// - public void DeleteOrganizationAsync(int itemId, object userState) { - if ((this.DeleteOrganizationOperationCompleted == null)) { + public void DeleteOrganizationAsync(int itemId, object userState) + { + if ((this.DeleteOrganizationOperationCompleted == null)) + { this.DeleteOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationOperationCompleted); } this.InvokeAsync("DeleteOrganization", new object[] { itemId}, this.DeleteOrganizationOperationCompleted, userState); } - - private void OnDeleteOrganizationOperationCompleted(object arg) { - if ((this.DeleteOrganizationCompleted != null)) { + + private void OnDeleteOrganizationOperationCompleted(object arg) + { + if ((this.DeleteOrganizationCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteOrganizationCompleted(this, new DeleteOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationStatistics", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationStatistics GetOrganizationStatistics(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationStatistics", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationStatistics GetOrganizationStatistics(int itemId) + { object[] results = this.Invoke("GetOrganizationStatistics", new object[] { itemId}); return ((OrganizationStatistics)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationStatistics(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizationStatistics(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizationStatistics", new object[] { itemId}, callback, asyncState); } - + /// - public OrganizationStatistics EndGetOrganizationStatistics(System.IAsyncResult asyncResult) { + public OrganizationStatistics EndGetOrganizationStatistics(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationStatistics)(results[0])); } - + /// - public void GetOrganizationStatisticsAsync(int itemId) { + public void GetOrganizationStatisticsAsync(int itemId) + { this.GetOrganizationStatisticsAsync(itemId, null); } - + /// - public void GetOrganizationStatisticsAsync(int itemId, object userState) { - if ((this.GetOrganizationStatisticsOperationCompleted == null)) { + public void GetOrganizationStatisticsAsync(int itemId, object userState) + { + if ((this.GetOrganizationStatisticsOperationCompleted == null)) + { this.GetOrganizationStatisticsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationStatisticsOperationCompleted); } this.InvokeAsync("GetOrganizationStatistics", new object[] { itemId}, this.GetOrganizationStatisticsOperationCompleted, userState); } - - private void OnGetOrganizationStatisticsOperationCompleted(object arg) { - if ((this.GetOrganizationStatisticsCompleted != null)) { + + private void OnGetOrganizationStatisticsOperationCompleted(object arg) + { + if ((this.GetOrganizationStatisticsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationStatisticsCompleted(this, new GetOrganizationStatisticsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganization", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public Organization GetOrganization(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganization", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public Organization GetOrganization(int itemId) + { object[] results = this.Invoke("GetOrganization", new object[] { itemId}); return ((Organization)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganization(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganization(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganization", new object[] { itemId}, callback, asyncState); } - + /// - public Organization EndGetOrganization(System.IAsyncResult asyncResult) { + public Organization EndGetOrganization(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((Organization)(results[0])); } - + /// - public void GetOrganizationAsync(int itemId) { + public void GetOrganizationAsync(int itemId) + { this.GetOrganizationAsync(itemId, null); } - + /// - public void GetOrganizationAsync(int itemId, object userState) { - if ((this.GetOrganizationOperationCompleted == null)) { + public void GetOrganizationAsync(int itemId, object userState) + { + if ((this.GetOrganizationOperationCompleted == null)) + { this.GetOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationOperationCompleted); } this.InvokeAsync("GetOrganization", new object[] { itemId}, this.GetOrganizationOperationCompleted, userState); } - - private void OnGetOrganizationOperationCompleted(object arg) { - if ((this.GetOrganizationCompleted != null)) { + + private void OnGetOrganizationOperationCompleted(object arg) + { + if ((this.GetOrganizationCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationCompleted(this, new GetOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddOrganizationDomain(int itemId, string domainName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetAccountIdByUserPrincipalName", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName) + { + object[] results = this.Invoke("GetAccountIdByUserPrincipalName", new object[] { + itemId, + userPrincipalName}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginGetAccountIdByUserPrincipalName(int itemId, string userPrincipalName, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetAccountIdByUserPrincipalName", new object[] { + itemId, + userPrincipalName}, callback, asyncState); + } + + /// + public int EndGetAccountIdByUserPrincipalName(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void GetAccountIdByUserPrincipalNameAsync(int itemId, string userPrincipalName) + { + this.GetAccountIdByUserPrincipalNameAsync(itemId, userPrincipalName, null); + } + + /// + public void GetAccountIdByUserPrincipalNameAsync(int itemId, string userPrincipalName, object userState) + { + if ((this.GetAccountIdByUserPrincipalNameOperationCompleted == null)) + { + this.GetAccountIdByUserPrincipalNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAccountIdByUserPrincipalNameOperationCompleted); + } + this.InvokeAsync("GetAccountIdByUserPrincipalName", new object[] { + itemId, + userPrincipalName}, this.GetAccountIdByUserPrincipalNameOperationCompleted, userState); + } + + private void OnGetAccountIdByUserPrincipalNameOperationCompleted(object arg) + { + if ((this.GetAccountIdByUserPrincipalNameCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetAccountIdByUserPrincipalNameCompleted(this, new GetAccountIdByUserPrincipalNameCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddOrganizationDomain", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddOrganizationDomain(int itemId, string domainName) + { object[] results = this.Invoke("AddOrganizationDomain", new object[] { itemId, domainName}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddOrganizationDomain(int itemId, string domainName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddOrganizationDomain(int itemId, string domainName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddOrganizationDomain", new object[] { itemId, domainName}, callback, asyncState); } - + /// - public int EndAddOrganizationDomain(System.IAsyncResult asyncResult) { + public int EndAddOrganizationDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddOrganizationDomainAsync(int itemId, string domainName) { + public void AddOrganizationDomainAsync(int itemId, string domainName) + { this.AddOrganizationDomainAsync(itemId, domainName, null); } - + /// - public void AddOrganizationDomainAsync(int itemId, string domainName, object userState) { - if ((this.AddOrganizationDomainOperationCompleted == null)) { + public void AddOrganizationDomainAsync(int itemId, string domainName, object userState) + { + if ((this.AddOrganizationDomainOperationCompleted == null)) + { this.AddOrganizationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddOrganizationDomainOperationCompleted); } this.InvokeAsync("AddOrganizationDomain", new object[] { itemId, domainName}, this.AddOrganizationDomainOperationCompleted, userState); } - - private void OnAddOrganizationDomainOperationCompleted(object arg) { - if ((this.AddOrganizationDomainCompleted != null)) { + + private void OnAddOrganizationDomainOperationCompleted(object arg) + { + if ((this.AddOrganizationDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddOrganizationDomainCompleted(this, new AddOrganizationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationDomains", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationDomainName[] GetOrganizationDomains(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationDomains", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationDomainName[] GetOrganizationDomains(int itemId) + { object[] results = this.Invoke("GetOrganizationDomains", new object[] { itemId}); return ((OrganizationDomainName[])(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationDomains(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizationDomains(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizationDomains", new object[] { itemId}, callback, asyncState); } - + /// - public OrganizationDomainName[] EndGetOrganizationDomains(System.IAsyncResult asyncResult) { + public OrganizationDomainName[] EndGetOrganizationDomains(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationDomainName[])(results[0])); } - + /// - public void GetOrganizationDomainsAsync(int itemId) { + public void GetOrganizationDomainsAsync(int itemId) + { this.GetOrganizationDomainsAsync(itemId, null); } - + /// - public void GetOrganizationDomainsAsync(int itemId, object userState) { - if ((this.GetOrganizationDomainsOperationCompleted == null)) { + public void GetOrganizationDomainsAsync(int itemId, object userState) + { + if ((this.GetOrganizationDomainsOperationCompleted == null)) + { this.GetOrganizationDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationDomainsOperationCompleted); } this.InvokeAsync("GetOrganizationDomains", new object[] { itemId}, this.GetOrganizationDomainsOperationCompleted, userState); } - - private void OnGetOrganizationDomainsOperationCompleted(object arg) { - if ((this.GetOrganizationDomainsCompleted != null)) { + + private void OnGetOrganizationDomainsOperationCompleted(object arg) + { + if ((this.GetOrganizationDomainsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationDomainsCompleted(this, new GetOrganizationDomainsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteOrganizationDomain(int itemId, int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganizationDomain", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteOrganizationDomain(int itemId, int domainId) + { object[] results = this.Invoke("DeleteOrganizationDomain", new object[] { itemId, domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteOrganizationDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteOrganizationDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteOrganizationDomain", new object[] { itemId, domainId}, callback, asyncState); } - + /// - public int EndDeleteOrganizationDomain(System.IAsyncResult asyncResult) { + public int EndDeleteOrganizationDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteOrganizationDomainAsync(int itemId, int domainId) { + public void DeleteOrganizationDomainAsync(int itemId, int domainId) + { this.DeleteOrganizationDomainAsync(itemId, domainId, null); } - + /// - public void DeleteOrganizationDomainAsync(int itemId, int domainId, object userState) { - if ((this.DeleteOrganizationDomainOperationCompleted == null)) { + public void DeleteOrganizationDomainAsync(int itemId, int domainId, object userState) + { + if ((this.DeleteOrganizationDomainOperationCompleted == null)) + { this.DeleteOrganizationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationDomainOperationCompleted); } this.InvokeAsync("DeleteOrganizationDomain", new object[] { itemId, domainId}, this.DeleteOrganizationDomainOperationCompleted, userState); } - - private void OnDeleteOrganizationDomainOperationCompleted(object arg) { - if ((this.DeleteOrganizationDomainCompleted != null)) { + + private void OnDeleteOrganizationDomainOperationCompleted(object arg) + { + if ((this.DeleteOrganizationDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteOrganizationDomainCompleted(this, new DeleteOrganizationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetOrganizationDefaultDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int SetOrganizationDefaultDomain(int itemId, int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetOrganizationDefaultDomain", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int SetOrganizationDefaultDomain(int itemId, int domainId) + { object[] results = this.Invoke("SetOrganizationDefaultDomain", new object[] { itemId, domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginSetOrganizationDefaultDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetOrganizationDefaultDomain(int itemId, int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SetOrganizationDefaultDomain", new object[] { itemId, domainId}, callback, asyncState); } - + /// - public int EndSetOrganizationDefaultDomain(System.IAsyncResult asyncResult) { + public int EndSetOrganizationDefaultDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void SetOrganizationDefaultDomainAsync(int itemId, int domainId) { + public void SetOrganizationDefaultDomainAsync(int itemId, int domainId) + { this.SetOrganizationDefaultDomainAsync(itemId, domainId, null); } - + /// - public void SetOrganizationDefaultDomainAsync(int itemId, int domainId, object userState) { - if ((this.SetOrganizationDefaultDomainOperationCompleted == null)) { + public void SetOrganizationDefaultDomainAsync(int itemId, int domainId, object userState) + { + if ((this.SetOrganizationDefaultDomainOperationCompleted == null)) + { this.SetOrganizationDefaultDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetOrganizationDefaultDomainOperationCompleted); } this.InvokeAsync("SetOrganizationDefaultDomain", new object[] { itemId, domainId}, this.SetOrganizationDefaultDomainOperationCompleted, userState); } - - private void OnSetOrganizationDefaultDomainOperationCompleted(object arg) { - if ((this.SetOrganizationDefaultDomainCompleted != null)) { + + private void OnSetOrganizationDefaultDomainOperationCompleted(object arg) + { + if ((this.SetOrganizationDefaultDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetOrganizationDefaultDomainCompleted(this, new SetOrganizationDefaultDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateUser(int itemId, string displayName, string name, string domain, string password, bool sendNotification, string to) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateUser", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateUser(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to) + { object[] results = this.Invoke("CreateUser", new object[] { itemId, displayName, name, domain, password, + subscriberNumber, sendNotification, to}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCreateUser(int itemId, string displayName, string name, string domain, string password, bool sendNotification, string to, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateUser(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateUser", new object[] { itemId, displayName, name, domain, password, + subscriberNumber, sendNotification, to}, callback, asyncState); } - + /// - public int EndCreateUser(System.IAsyncResult asyncResult) { + public int EndCreateUser(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CreateUserAsync(int itemId, string displayName, string name, string domain, string password, bool sendNotification, string to) { - this.CreateUserAsync(itemId, displayName, name, domain, password, sendNotification, to, null); + public void CreateUserAsync(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to) + { + this.CreateUserAsync(itemId, displayName, name, domain, password, subscriberNumber, sendNotification, to, null); } - + /// - public void CreateUserAsync(int itemId, string displayName, string name, string domain, string password, bool sendNotification, string to, object userState) { - if ((this.CreateUserOperationCompleted == null)) { + public void CreateUserAsync(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to, object userState) + { + if ((this.CreateUserOperationCompleted == null)) + { this.CreateUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateUserOperationCompleted); } this.InvokeAsync("CreateUser", new object[] { @@ -763,20 +903,88 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { name, domain, password, + subscriberNumber, sendNotification, to}, this.CreateUserOperationCompleted, userState); } - - private void OnCreateUserOperationCompleted(object arg) { - if ((this.CreateUserCompleted != null)) { + + private void OnCreateUserOperationCompleted(object arg) + { + if ((this.CreateUserCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateUserCompleted(this, new CreateUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationUsersPaged", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationUsersPaged GetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ImportUser", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int ImportUser(int itemId, string accountName, string displayName, string name, string domain, string password) + { + object[] results = this.Invoke("ImportUser", new object[] { + itemId, + accountName, + displayName, + name, + domain, + password}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginImportUser(int itemId, string accountName, string displayName, string name, string domain, string password, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("ImportUser", new object[] { + itemId, + accountName, + displayName, + name, + domain, + password}, callback, asyncState); + } + + /// + public int EndImportUser(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void ImportUserAsync(int itemId, string accountName, string displayName, string name, string domain, string password) + { + this.ImportUserAsync(itemId, accountName, displayName, name, domain, password, null); + } + + /// + public void ImportUserAsync(int itemId, string accountName, string displayName, string name, string domain, string password, object userState) + { + if ((this.ImportUserOperationCompleted == null)) + { + this.ImportUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnImportUserOperationCompleted); + } + this.InvokeAsync("ImportUser", new object[] { + itemId, + accountName, + displayName, + name, + domain, + password}, this.ImportUserOperationCompleted, userState); + } + + private void OnImportUserOperationCompleted(object arg) + { + if ((this.ImportUserCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.ImportUserCompleted(this, new ImportUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationUsersPaged", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationUsersPaged GetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { object[] results = this.Invoke("GetOrganizationUsersPaged", new object[] { itemId, filterColumn, @@ -786,9 +994,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { maximumRows}); return ((OrganizationUsersPaged)(results[0])); } - + /// - public System.IAsyncResult BeginGetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetOrganizationUsersPaged", new object[] { itemId, filterColumn, @@ -797,21 +1006,25 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { startRow, maximumRows}, callback, asyncState); } - + /// - public OrganizationUsersPaged EndGetOrganizationUsersPaged(System.IAsyncResult asyncResult) { + public OrganizationUsersPaged EndGetOrganizationUsersPaged(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationUsersPaged)(results[0])); } - + /// - public void GetOrganizationUsersPagedAsync(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + public void GetOrganizationUsersPagedAsync(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { this.GetOrganizationUsersPagedAsync(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetOrganizationUsersPagedAsync(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { - if ((this.GetOrganizationUsersPagedOperationCompleted == null)) { + public void GetOrganizationUsersPagedAsync(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) + { + if ((this.GetOrganizationUsersPagedOperationCompleted == null)) + { this.GetOrganizationUsersPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationUsersPagedOperationCompleted); } this.InvokeAsync("GetOrganizationUsersPaged", new object[] { @@ -822,89 +1035,101 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { startRow, maximumRows}, this.GetOrganizationUsersPagedOperationCompleted, userState); } - - private void OnGetOrganizationUsersPagedOperationCompleted(object arg) { - if ((this.GetOrganizationUsersPagedCompleted != null)) { + + private void OnGetOrganizationUsersPagedOperationCompleted(object arg) + { + if ((this.GetOrganizationUsersPagedCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetOrganizationUsersPagedCompleted(this, new GetOrganizationUsersPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationUser GetUserGeneralSettings(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetUserGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationUser GetUserGeneralSettings(int itemId, int accountId) + { object[] results = this.Invoke("GetUserGeneralSettings", new object[] { itemId, accountId}); return ((OrganizationUser)(results[0])); } - + /// - public System.IAsyncResult BeginGetUserGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetUserGeneralSettings(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetUserGeneralSettings", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public OrganizationUser EndGetUserGeneralSettings(System.IAsyncResult asyncResult) { + public OrganizationUser EndGetUserGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationUser)(results[0])); } - + /// - public void GetUserGeneralSettingsAsync(int itemId, int accountId) { + public void GetUserGeneralSettingsAsync(int itemId, int accountId) + { this.GetUserGeneralSettingsAsync(itemId, accountId, null); } - + /// - public void GetUserGeneralSettingsAsync(int itemId, int accountId, object userState) { - if ((this.GetUserGeneralSettingsOperationCompleted == null)) { + public void GetUserGeneralSettingsAsync(int itemId, int accountId, object userState) + { + if ((this.GetUserGeneralSettingsOperationCompleted == null)) + { this.GetUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetUserGeneralSettingsOperationCompleted); } this.InvokeAsync("GetUserGeneralSettings", new object[] { itemId, accountId}, this.GetUserGeneralSettingsOperationCompleted, userState); } - - private void OnGetUserGeneralSettingsOperationCompleted(object arg) { - if ((this.GetUserGeneralSettingsCompleted != null)) { + + private void OnGetUserGeneralSettingsOperationCompleted(object arg) + { + if ((this.GetUserGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetUserGeneralSettingsCompleted(this, new GetUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public int SetUserGeneralSettings( - int itemId, - int accountId, - string displayName, - string password, - bool hideAddressBook, - bool disabled, - bool locked, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - string externalEmail) { + int itemId, + int accountId, + string displayName, + string password, + bool hideAddressBook, + bool disabled, + bool locked, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + string externalEmail, + string subscriberNumber) + { object[] results = this.Invoke("SetUserGeneralSettings", new object[] { itemId, accountId, @@ -933,42 +1158,45 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { pager, webPage, notes, - externalEmail}); + externalEmail, + subscriberNumber}); return ((int)(results[0])); } - + /// public System.IAsyncResult BeginSetUserGeneralSettings( - int itemId, - int accountId, - string displayName, - string password, - bool hideAddressBook, - bool disabled, - bool locked, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - string externalEmail, - System.AsyncCallback callback, - object asyncState) { + int itemId, + int accountId, + string displayName, + string password, + bool hideAddressBook, + bool disabled, + bool locked, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + string externalEmail, + string subscriberNumber, + System.AsyncCallback callback, + object asyncState) + { return this.BeginInvoke("SetUserGeneralSettings", new object[] { itemId, accountId, @@ -997,80 +1225,87 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { pager, webPage, notes, - externalEmail}, callback, asyncState); + externalEmail, + subscriberNumber}, callback, asyncState); } - + /// - public int EndSetUserGeneralSettings(System.IAsyncResult asyncResult) { + public int EndSetUserGeneralSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// public void SetUserGeneralSettingsAsync( - int itemId, - int accountId, - string displayName, - string password, - bool hideAddressBook, - bool disabled, - bool locked, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - string externalEmail) { - this.SetUserGeneralSettingsAsync(itemId, accountId, displayName, password, hideAddressBook, disabled, locked, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, externalEmail, null); + int itemId, + int accountId, + string displayName, + string password, + bool hideAddressBook, + bool disabled, + bool locked, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + string externalEmail, + string subscriberNumber) + { + this.SetUserGeneralSettingsAsync(itemId, accountId, displayName, password, hideAddressBook, disabled, locked, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, externalEmail, subscriberNumber, null); } - + /// public void SetUserGeneralSettingsAsync( - int itemId, - int accountId, - string displayName, - string password, - bool hideAddressBook, - bool disabled, - bool locked, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - string externalEmail, - object userState) { - if ((this.SetUserGeneralSettingsOperationCompleted == null)) { + int itemId, + int accountId, + string displayName, + string password, + bool hideAddressBook, + bool disabled, + bool locked, + string firstName, + string initials, + string lastName, + string address, + string city, + string state, + string zip, + string country, + string jobTitle, + string company, + string department, + string office, + string managerAccountName, + string businessPhone, + string fax, + string homePhone, + string mobilePhone, + string pager, + string webPage, + string notes, + string externalEmail, + string subscriberNumber, + object userState) + { + if ((this.SetUserGeneralSettingsOperationCompleted == null)) + { this.SetUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserGeneralSettingsOperationCompleted); } this.InvokeAsync("SetUserGeneralSettings", new object[] { @@ -1101,19 +1336,23 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { pager, webPage, notes, - externalEmail}, this.SetUserGeneralSettingsOperationCompleted, userState); + externalEmail, + subscriberNumber}, this.SetUserGeneralSettingsOperationCompleted, userState); } - - private void OnSetUserGeneralSettingsOperationCompleted(object arg) { - if ((this.SetUserGeneralSettingsCompleted != null)) { + + private void OnSetUserGeneralSettingsOperationCompleted(object arg) + { + if ((this.SetUserGeneralSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetUserGeneralSettingsCompleted(this, new SetUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SearchAccounts", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationUser[] SearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SearchAccounts", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationUser[] SearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) + { object[] results = this.Invoke("SearchAccounts", new object[] { itemId, filterColumn, @@ -1122,9 +1361,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { includeMailboxes}); return ((OrganizationUser[])(results[0])); } - + /// - public System.IAsyncResult BeginSearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("SearchAccounts", new object[] { itemId, filterColumn, @@ -1132,21 +1372,25 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { sortColumn, includeMailboxes}, callback, asyncState); } - + /// - public OrganizationUser[] EndSearchAccounts(System.IAsyncResult asyncResult) { + public OrganizationUser[] EndSearchAccounts(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((OrganizationUser[])(results[0])); } - + /// - public void SearchAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) { + public void SearchAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) + { this.SearchAccountsAsync(itemId, filterColumn, filterValue, sortColumn, includeMailboxes, null); } - + /// - public void SearchAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes, object userState) { - if ((this.SearchAccountsOperationCompleted == null)) { + public void SearchAccountsAsync(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes, object userState) + { + if ((this.SearchAccountsOperationCompleted == null)) + { this.SearchAccountsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchAccountsOperationCompleted); } this.InvokeAsync("SearchAccounts", new object[] { @@ -1156,604 +1400,748 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution { sortColumn, includeMailboxes}, this.SearchAccountsOperationCompleted, userState); } - - private void OnSearchAccountsOperationCompleted(object arg) { - if ((this.SearchAccountsCompleted != null)) { + + private void OnSearchAccountsOperationCompleted(object arg) + { + if ((this.SearchAccountsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SearchAccountsCompleted(this, new SearchAccountsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteUser(int itemId, int accountId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUser", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteUser(int itemId, int accountId) + { object[] results = this.Invoke("DeleteUser", new object[] { itemId, accountId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteUser(int itemId, int accountId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteUser(int itemId, int accountId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteUser", new object[] { itemId, accountId}, callback, asyncState); } - + /// - public int EndDeleteUser(System.IAsyncResult asyncResult) { + public int EndDeleteUser(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteUserAsync(int itemId, int accountId) { + public void DeleteUserAsync(int itemId, int accountId) + { this.DeleteUserAsync(itemId, accountId, null); } - + /// - public void DeleteUserAsync(int itemId, int accountId, object userState) { - if ((this.DeleteUserOperationCompleted == null)) { + public void DeleteUserAsync(int itemId, int accountId, object userState) + { + if ((this.DeleteUserOperationCompleted == null)) + { this.DeleteUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteUserOperationCompleted); } this.InvokeAsync("DeleteUser", new object[] { itemId, accountId}, this.DeleteUserOperationCompleted, userState); } - - private void OnDeleteUserOperationCompleted(object arg) { - if ((this.DeleteUserCompleted != null)) { + + private void OnDeleteUserOperationCompleted(object arg) + { + if ((this.DeleteUserCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteUserCompleted(this, new DeleteUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetPasswordPolicy", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public PasswordPolicyResult GetPasswordPolicy(int itemId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetPasswordPolicy", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public PasswordPolicyResult GetPasswordPolicy(int itemId) + { object[] results = this.Invoke("GetPasswordPolicy", new object[] { itemId}); return ((PasswordPolicyResult)(results[0])); } - + /// - public System.IAsyncResult BeginGetPasswordPolicy(int itemId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetPasswordPolicy(int itemId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetPasswordPolicy", new object[] { itemId}, callback, asyncState); } - + /// - public PasswordPolicyResult EndGetPasswordPolicy(System.IAsyncResult asyncResult) { + public PasswordPolicyResult EndGetPasswordPolicy(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((PasswordPolicyResult)(results[0])); } - + /// - public void GetPasswordPolicyAsync(int itemId) { + public void GetPasswordPolicyAsync(int itemId) + { this.GetPasswordPolicyAsync(itemId, null); } - + /// - public void GetPasswordPolicyAsync(int itemId, object userState) { - if ((this.GetPasswordPolicyOperationCompleted == null)) { + public void GetPasswordPolicyAsync(int itemId, object userState) + { + if ((this.GetPasswordPolicyOperationCompleted == null)) + { this.GetPasswordPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPasswordPolicyOperationCompleted); } this.InvokeAsync("GetPasswordPolicy", new object[] { itemId}, this.GetPasswordPolicyOperationCompleted, userState); } - - private void OnGetPasswordPolicyOperationCompleted(object arg) { - if ((this.GetPasswordPolicyCompleted != null)) { + + private void OnGetPasswordPolicyOperationCompleted(object arg) + { + if ((this.GetPasswordPolicyCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPasswordPolicyCompleted(this, new GetPasswordPolicyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - public new void CancelAsync(object userState) { + public new void CancelAsync(object userState) + { base.CancelAsync(userState); } } - - - - - - - - - - - - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateOrganizationCompletedEventHandler(object sender, CreateOrganizationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class CreateOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal CreateOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal CreateOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetRawOrganizationsPagedCompletedEventHandler(object sender, GetRawOrganizationsPagedCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetRawOrganizationsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetRawOrganizationsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetRawOrganizationsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public System.Data.DataSet Result { - get { + public System.Data.DataSet Result + { + get + { this.RaiseExceptionIfNecessary(); return ((System.Data.DataSet)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetOrganizationsCompletedEventHandler(object sender, GetOrganizationsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetOrganizationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetOrganizationsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public Organization[] Result { - get { + public Organization[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((Organization[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetOrganizationUserSummuryLetterCompletedEventHandler(object sender, GetOrganizationUserSummuryLetterCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationUserSummuryLetterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetOrganizationUserSummuryLetterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationUserSummuryLetterCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetOrganizationUserSummuryLetterCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public string Result { - get { + public string Result + { + get + { this.RaiseExceptionIfNecessary(); return ((string)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SendOrganizationUserSummuryLetterCompletedEventHandler(object sender, SendOrganizationUserSummuryLetterCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SendOrganizationUserSummuryLetterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SendOrganizationUserSummuryLetterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SendOrganizationUserSummuryLetterCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SendOrganizationUserSummuryLetterCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeleteOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeleteOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetOrganizationStatisticsCompletedEventHandler(object sender, GetOrganizationStatisticsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetOrganizationStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetOrganizationStatisticsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public OrganizationStatistics Result { - get { + public OrganizationStatistics Result + { + get + { this.RaiseExceptionIfNecessary(); return ((OrganizationStatistics)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetOrganizationCompletedEventHandler(object sender, GetOrganizationCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public Organization Result { - get { + public Organization Result + { + get + { this.RaiseExceptionIfNecessary(); return ((Organization)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void AddOrganizationDomainCompletedEventHandler(object sender, AddOrganizationDomainCompletedEventArgs e); - + public delegate void GetAccountIdByUserPrincipalNameCompletedEventHandler(object sender, GetAccountIdByUserPrincipalNameCompletedEventArgs e); + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddOrganizationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetAccountIdByUserPrincipalNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal AddOrganizationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetAccountIdByUserPrincipalNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetOrganizationDomainsCompletedEventHandler(object sender, GetOrganizationDomainsCompletedEventArgs e); - + public delegate void AddOrganizationDomainCompletedEventHandler(object sender, AddOrganizationDomainCompletedEventArgs e); + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class AddOrganizationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal AddOrganizationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public OrganizationDomainName[] Result { - get { + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetOrganizationDomainsCompletedEventHandler(object sender, GetOrganizationDomainsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetOrganizationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetOrganizationDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public OrganizationDomainName[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((OrganizationDomainName[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteOrganizationDomainCompletedEventHandler(object sender, DeleteOrganizationDomainCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteOrganizationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeleteOrganizationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeleteOrganizationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeleteOrganizationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetOrganizationDefaultDomainCompletedEventHandler(object sender, SetOrganizationDefaultDomainCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetOrganizationDefaultDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SetOrganizationDefaultDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SetOrganizationDefaultDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SetOrganizationDefaultDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateUserCompletedEventHandler(object sender, CreateUserCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal CreateUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal CreateUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetOrganizationUsersPagedCompletedEventHandler(object sender, GetOrganizationUsersPagedCompletedEventArgs e); - + public delegate void ImportUserCompletedEventHandler(object sender, ImportUserCompletedEventArgs e); + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationUsersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class ImportUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetOrganizationUsersPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal ImportUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public OrganizationUsersPaged Result { - get { + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetOrganizationUsersPagedCompletedEventHandler(object sender, GetOrganizationUsersPagedCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetOrganizationUsersPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetOrganizationUsersPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public OrganizationUsersPaged Result + { + get + { this.RaiseExceptionIfNecessary(); return ((OrganizationUsersPaged)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetUserGeneralSettingsCompletedEventHandler(object sender, GetUserGeneralSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public OrganizationUser Result { - get { + public OrganizationUser Result + { + get + { this.RaiseExceptionIfNecessary(); return ((OrganizationUser)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetUserGeneralSettingsCompletedEventHandler(object sender, SetUserGeneralSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SetUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SetUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SearchAccountsCompletedEventHandler(object sender, SearchAccountsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SearchAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class SearchAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal SearchAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal SearchAccountsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public OrganizationUser[] Result { - get { + public OrganizationUser[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((OrganizationUser[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteUserCompletedEventHandler(object sender, DeleteUserCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeleteUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeleteUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeleteUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetPasswordPolicyCompletedEventHandler(object sender, GetPasswordPolicyCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPasswordPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetPasswordPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetPasswordPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetPasswordPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public PasswordPolicyResult Result { - get { + public PasswordPolicyResult Result + { + get + { this.RaiseExceptionIfNecessary(); return ((PasswordPolicyResult)(this.results[0])); } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/PackagesProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/PackagesProxy.cs index fbdc9623..3c204247 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/PackagesProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/PackagesProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/SchedulerProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/SchedulerProxy.cs index 0ff127be..c0c13ee8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/SchedulerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/SchedulerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ServersProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ServersProxy.cs index 6e1dcaa0..1b51bbe5 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ServersProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ServersProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -29,7 +29,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3074 +// Runtime Version:2.0.50727.5456 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -39,7 +39,8 @@ // // This source code was auto-generated by wsdl, Version=2.0.50727.42. // -namespace WebsitePanel.EnterpriseServer { +namespace WebsitePanel.EnterpriseServer +{ using System.Xml.Serialization; using System.Web.Services; using System.ComponentModel; @@ -47,2268 +48,2664 @@ namespace WebsitePanel.EnterpriseServer { using System; using System.Diagnostics; using System.Data; + using WebsitePanel.Providers; using WebsitePanel.Providers.Common; using WebsitePanel.Server; using WebsitePanel.Providers.DNS; - using WebsitePanel.Providers.ResultObjects; - + using WebsitePanel.Providers.ResultObjects; + + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name="esServersSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")] - public partial class esServers : Microsoft.Web.Services3.WebServicesClientProtocol { - + [System.Web.Services.WebServiceBindingAttribute(Name = "esServersSoap", Namespace = "http://smbsaas/websitepanel/enterpriseserver")] + public partial class esServers : Microsoft.Web.Services3.WebServicesClientProtocol + { + private System.Threading.SendOrPostCallback GetAllServersOperationCompleted; - + private System.Threading.SendOrPostCallback GetRawAllServersOperationCompleted; - + private System.Threading.SendOrPostCallback GetServersOperationCompleted; - + private System.Threading.SendOrPostCallback GetRawServersOperationCompleted; - + private System.Threading.SendOrPostCallback GetServerShortDetailsOperationCompleted; - + private System.Threading.SendOrPostCallback GetServerByIdOperationCompleted; - + private System.Threading.SendOrPostCallback GetServerByNameOperationCompleted; - + private System.Threading.SendOrPostCallback CheckServerAvailableOperationCompleted; - + private System.Threading.SendOrPostCallback AddServerOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateServerOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateServerConnectionPasswordOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateServerADPasswordOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteServerOperationCompleted; - + private System.Threading.SendOrPostCallback GetVirtualServersOperationCompleted; - + private System.Threading.SendOrPostCallback GetAvailableVirtualServicesOperationCompleted; - + private System.Threading.SendOrPostCallback GetVirtualServicesOperationCompleted; - + private System.Threading.SendOrPostCallback AddVirtualServicesOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteVirtualServicesOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateVirtualGroupsOperationCompleted; - + private System.Threading.SendOrPostCallback GetRawServicesByServerIdOperationCompleted; - + private System.Threading.SendOrPostCallback GetServicesByServerIdOperationCompleted; - + private System.Threading.SendOrPostCallback GetServicesByServerIdGroupNameOperationCompleted; - + private System.Threading.SendOrPostCallback GetRawServicesByGroupIdOperationCompleted; - + private System.Threading.SendOrPostCallback GetRawServicesByGroupNameOperationCompleted; - + private System.Threading.SendOrPostCallback GetServiceInfoOperationCompleted; - + private System.Threading.SendOrPostCallback AddServiceOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateServiceOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteServiceOperationCompleted; - + private System.Threading.SendOrPostCallback GetServiceSettingsOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateServiceSettingsOperationCompleted; - + private System.Threading.SendOrPostCallback InstallServiceOperationCompleted; - + private System.Threading.SendOrPostCallback GetProviderServiceQuotaOperationCompleted; - + private System.Threading.SendOrPostCallback GetInstalledProvidersOperationCompleted; - + private System.Threading.SendOrPostCallback GetResourceGroupsOperationCompleted; - + private System.Threading.SendOrPostCallback GetResourceGroupOperationCompleted; - + private System.Threading.SendOrPostCallback GetProviderOperationCompleted; - + private System.Threading.SendOrPostCallback GetProvidersOperationCompleted; - + private System.Threading.SendOrPostCallback GetProvidersByGroupIdOperationCompleted; - + private System.Threading.SendOrPostCallback GetPackageServiceProviderOperationCompleted; - + private System.Threading.SendOrPostCallback IsInstalledOperationCompleted; - + private System.Threading.SendOrPostCallback GetServerVersionOperationCompleted; - + private System.Threading.SendOrPostCallback GetIPAddressesOperationCompleted; - + private System.Threading.SendOrPostCallback GetIPAddressesPagedOperationCompleted; - + private System.Threading.SendOrPostCallback GetIPAddressOperationCompleted; - + private System.Threading.SendOrPostCallback AddIPAddressOperationCompleted; - + private System.Threading.SendOrPostCallback AddIPAddressesRangeOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateIPAddressOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateIPAddressesOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteIPAddressOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteIPAddressesOperationCompleted; - + private System.Threading.SendOrPostCallback GetUnallottedIPAddressesOperationCompleted; - + private System.Threading.SendOrPostCallback GetPackageIPAddressesOperationCompleted; - + private System.Threading.SendOrPostCallback GetPackageUnassignedIPAddressesOperationCompleted; - + private System.Threading.SendOrPostCallback AllocatePackageIPAddressesOperationCompleted; - + private System.Threading.SendOrPostCallback AllocateMaximumPackageIPAddressesOperationCompleted; - + private System.Threading.SendOrPostCallback DeallocatePackageIPAddressesOperationCompleted; - + private System.Threading.SendOrPostCallback GetClustersOperationCompleted; - + private System.Threading.SendOrPostCallback AddClusterOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteClusterOperationCompleted; - + private System.Threading.SendOrPostCallback GetRawDnsRecordsByServiceOperationCompleted; - + private System.Threading.SendOrPostCallback GetRawDnsRecordsByServerOperationCompleted; - + private System.Threading.SendOrPostCallback GetRawDnsRecordsByPackageOperationCompleted; - + private System.Threading.SendOrPostCallback GetRawDnsRecordsByGroupOperationCompleted; - + private System.Threading.SendOrPostCallback GetDnsRecordsByServiceOperationCompleted; - + private System.Threading.SendOrPostCallback GetDnsRecordsByServerOperationCompleted; - + private System.Threading.SendOrPostCallback GetDnsRecordsByPackageOperationCompleted; - + private System.Threading.SendOrPostCallback GetDnsRecordsByGroupOperationCompleted; - + private System.Threading.SendOrPostCallback GetDnsRecordOperationCompleted; - + private System.Threading.SendOrPostCallback AddDnsRecordOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateDnsRecordOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteDnsRecordOperationCompleted; - + private System.Threading.SendOrPostCallback GetDomainsOperationCompleted; - + private System.Threading.SendOrPostCallback GetMyDomainsOperationCompleted; - + private System.Threading.SendOrPostCallback GetResellerDomainsOperationCompleted; - + private System.Threading.SendOrPostCallback GetDomainsPagedOperationCompleted; - + private System.Threading.SendOrPostCallback GetDomainOperationCompleted; - + private System.Threading.SendOrPostCallback AddDomainOperationCompleted; - + private System.Threading.SendOrPostCallback AddDomainWithProvisioningOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateDomainOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteDomainOperationCompleted; - + private System.Threading.SendOrPostCallback DetachDomainOperationCompleted; - + private System.Threading.SendOrPostCallback EnableDomainDnsOperationCompleted; - + private System.Threading.SendOrPostCallback DisableDomainDnsOperationCompleted; - + private System.Threading.SendOrPostCallback CreateDomainInstantAliasOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteDomainInstantAliasOperationCompleted; - + private System.Threading.SendOrPostCallback GetDnsZoneRecordsOperationCompleted; - + private System.Threading.SendOrPostCallback GetRawDnsZoneRecordsOperationCompleted; - + private System.Threading.SendOrPostCallback AddDnsZoneRecordOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateDnsZoneRecordOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteDnsZoneRecordOperationCompleted; - + private System.Threading.SendOrPostCallback GetTerminalServicesSessionsOperationCompleted; - + private System.Threading.SendOrPostCallback CloseTerminalServicesSessionOperationCompleted; - + private System.Threading.SendOrPostCallback GetWindowsProcessesOperationCompleted; - + private System.Threading.SendOrPostCallback TerminateWindowsProcessOperationCompleted; + + private System.Threading.SendOrPostCallback InitWPIFeedsOperationCompleted; + + private System.Threading.SendOrPostCallback GetWPITabsOperationCompleted; + + private System.Threading.SendOrPostCallback GetWPIKeywordsOperationCompleted; + + private System.Threading.SendOrPostCallback GetWPIProductsOperationCompleted; + + private System.Threading.SendOrPostCallback GetWPIProductsFilteredOperationCompleted; + + private System.Threading.SendOrPostCallback GetWPIProductsWithDependenciesOperationCompleted; + + private System.Threading.SendOrPostCallback InstallWPIProductsOperationCompleted; + + private System.Threading.SendOrPostCallback CancelInstallWPIProductsOperationCompleted; + + private System.Threading.SendOrPostCallback GetWPIStatusOperationCompleted; + + private System.Threading.SendOrPostCallback WpiGetLogFileDirectoryOperationCompleted; + + private System.Threading.SendOrPostCallback WpiGetLogsInDirectoryOperationCompleted; private System.Threading.SendOrPostCallback GetWindowsServicesOperationCompleted; - + private System.Threading.SendOrPostCallback ChangeWindowsServiceStatusOperationCompleted; - + private System.Threading.SendOrPostCallback GetLogNamesOperationCompleted; - + private System.Threading.SendOrPostCallback GetLogEntriesOperationCompleted; - + private System.Threading.SendOrPostCallback GetLogEntriesPagedOperationCompleted; - + private System.Threading.SendOrPostCallback ClearLogOperationCompleted; - + private System.Threading.SendOrPostCallback RebootSystemOperationCompleted; - + /// - public esServers() { - this.Url = "http://127.0.0.1:9002/esServers.asmx"; + public esServers() + { + this.Url = "http://localhost:9002/esServers.asmx"; } - + /// public event GetAllServersCompletedEventHandler GetAllServersCompleted; - + /// public event GetRawAllServersCompletedEventHandler GetRawAllServersCompleted; - + /// public event GetServersCompletedEventHandler GetServersCompleted; - + /// public event GetRawServersCompletedEventHandler GetRawServersCompleted; - + /// public event GetServerShortDetailsCompletedEventHandler GetServerShortDetailsCompleted; - + /// public event GetServerByIdCompletedEventHandler GetServerByIdCompleted; - + /// public event GetServerByNameCompletedEventHandler GetServerByNameCompleted; - + /// public event CheckServerAvailableCompletedEventHandler CheckServerAvailableCompleted; - + /// public event AddServerCompletedEventHandler AddServerCompleted; - + /// public event UpdateServerCompletedEventHandler UpdateServerCompleted; - + /// public event UpdateServerConnectionPasswordCompletedEventHandler UpdateServerConnectionPasswordCompleted; - + /// public event UpdateServerADPasswordCompletedEventHandler UpdateServerADPasswordCompleted; - + /// public event DeleteServerCompletedEventHandler DeleteServerCompleted; - + /// public event GetVirtualServersCompletedEventHandler GetVirtualServersCompleted; - + /// public event GetAvailableVirtualServicesCompletedEventHandler GetAvailableVirtualServicesCompleted; - + /// public event GetVirtualServicesCompletedEventHandler GetVirtualServicesCompleted; - + /// public event AddVirtualServicesCompletedEventHandler AddVirtualServicesCompleted; - + /// public event DeleteVirtualServicesCompletedEventHandler DeleteVirtualServicesCompleted; - + /// public event UpdateVirtualGroupsCompletedEventHandler UpdateVirtualGroupsCompleted; - + /// public event GetRawServicesByServerIdCompletedEventHandler GetRawServicesByServerIdCompleted; - + /// public event GetServicesByServerIdCompletedEventHandler GetServicesByServerIdCompleted; - + /// public event GetServicesByServerIdGroupNameCompletedEventHandler GetServicesByServerIdGroupNameCompleted; - + /// public event GetRawServicesByGroupIdCompletedEventHandler GetRawServicesByGroupIdCompleted; - + /// public event GetRawServicesByGroupNameCompletedEventHandler GetRawServicesByGroupNameCompleted; - + /// public event GetServiceInfoCompletedEventHandler GetServiceInfoCompleted; - + /// public event AddServiceCompletedEventHandler AddServiceCompleted; - + /// public event UpdateServiceCompletedEventHandler UpdateServiceCompleted; - + /// public event DeleteServiceCompletedEventHandler DeleteServiceCompleted; - + /// public event GetServiceSettingsCompletedEventHandler GetServiceSettingsCompleted; - + /// public event UpdateServiceSettingsCompletedEventHandler UpdateServiceSettingsCompleted; - + /// public event InstallServiceCompletedEventHandler InstallServiceCompleted; - + /// public event GetProviderServiceQuotaCompletedEventHandler GetProviderServiceQuotaCompleted; - + /// public event GetInstalledProvidersCompletedEventHandler GetInstalledProvidersCompleted; - + /// public event GetResourceGroupsCompletedEventHandler GetResourceGroupsCompleted; - + /// public event GetResourceGroupCompletedEventHandler GetResourceGroupCompleted; - + /// public event GetProviderCompletedEventHandler GetProviderCompleted; - + /// public event GetProvidersCompletedEventHandler GetProvidersCompleted; - + /// public event GetProvidersByGroupIdCompletedEventHandler GetProvidersByGroupIdCompleted; - + /// public event GetPackageServiceProviderCompletedEventHandler GetPackageServiceProviderCompleted; - + /// public event IsInstalledCompletedEventHandler IsInstalledCompleted; - + /// public event GetServerVersionCompletedEventHandler GetServerVersionCompleted; - + /// public event GetIPAddressesCompletedEventHandler GetIPAddressesCompleted; - + /// public event GetIPAddressesPagedCompletedEventHandler GetIPAddressesPagedCompleted; - + /// public event GetIPAddressCompletedEventHandler GetIPAddressCompleted; - + /// public event AddIPAddressCompletedEventHandler AddIPAddressCompleted; - + /// public event AddIPAddressesRangeCompletedEventHandler AddIPAddressesRangeCompleted; - + /// public event UpdateIPAddressCompletedEventHandler UpdateIPAddressCompleted; - + /// public event UpdateIPAddressesCompletedEventHandler UpdateIPAddressesCompleted; - + /// public event DeleteIPAddressCompletedEventHandler DeleteIPAddressCompleted; - + /// public event DeleteIPAddressesCompletedEventHandler DeleteIPAddressesCompleted; - + /// public event GetUnallottedIPAddressesCompletedEventHandler GetUnallottedIPAddressesCompleted; - + /// public event GetPackageIPAddressesCompletedEventHandler GetPackageIPAddressesCompleted; - + /// public event GetPackageUnassignedIPAddressesCompletedEventHandler GetPackageUnassignedIPAddressesCompleted; - + /// public event AllocatePackageIPAddressesCompletedEventHandler AllocatePackageIPAddressesCompleted; - + /// public event AllocateMaximumPackageIPAddressesCompletedEventHandler AllocateMaximumPackageIPAddressesCompleted; - + /// public event DeallocatePackageIPAddressesCompletedEventHandler DeallocatePackageIPAddressesCompleted; - + /// public event GetClustersCompletedEventHandler GetClustersCompleted; - + /// public event AddClusterCompletedEventHandler AddClusterCompleted; - + /// public event DeleteClusterCompletedEventHandler DeleteClusterCompleted; - + /// public event GetRawDnsRecordsByServiceCompletedEventHandler GetRawDnsRecordsByServiceCompleted; - + /// public event GetRawDnsRecordsByServerCompletedEventHandler GetRawDnsRecordsByServerCompleted; - + /// public event GetRawDnsRecordsByPackageCompletedEventHandler GetRawDnsRecordsByPackageCompleted; - + /// public event GetRawDnsRecordsByGroupCompletedEventHandler GetRawDnsRecordsByGroupCompleted; - + /// public event GetDnsRecordsByServiceCompletedEventHandler GetDnsRecordsByServiceCompleted; - + /// public event GetDnsRecordsByServerCompletedEventHandler GetDnsRecordsByServerCompleted; - + /// public event GetDnsRecordsByPackageCompletedEventHandler GetDnsRecordsByPackageCompleted; - + /// public event GetDnsRecordsByGroupCompletedEventHandler GetDnsRecordsByGroupCompleted; - + /// public event GetDnsRecordCompletedEventHandler GetDnsRecordCompleted; - + /// public event AddDnsRecordCompletedEventHandler AddDnsRecordCompleted; - + /// public event UpdateDnsRecordCompletedEventHandler UpdateDnsRecordCompleted; - + /// public event DeleteDnsRecordCompletedEventHandler DeleteDnsRecordCompleted; - + /// public event GetDomainsCompletedEventHandler GetDomainsCompleted; - + /// public event GetMyDomainsCompletedEventHandler GetMyDomainsCompleted; - + /// public event GetResellerDomainsCompletedEventHandler GetResellerDomainsCompleted; - + /// public event GetDomainsPagedCompletedEventHandler GetDomainsPagedCompleted; - + /// public event GetDomainCompletedEventHandler GetDomainCompleted; - + /// public event AddDomainCompletedEventHandler AddDomainCompleted; - + /// public event AddDomainWithProvisioningCompletedEventHandler AddDomainWithProvisioningCompleted; - + /// public event UpdateDomainCompletedEventHandler UpdateDomainCompleted; - + /// public event DeleteDomainCompletedEventHandler DeleteDomainCompleted; - + /// public event DetachDomainCompletedEventHandler DetachDomainCompleted; - + /// public event EnableDomainDnsCompletedEventHandler EnableDomainDnsCompleted; - + /// public event DisableDomainDnsCompletedEventHandler DisableDomainDnsCompleted; - + /// public event CreateDomainInstantAliasCompletedEventHandler CreateDomainInstantAliasCompleted; - + /// public event DeleteDomainInstantAliasCompletedEventHandler DeleteDomainInstantAliasCompleted; - + /// public event GetDnsZoneRecordsCompletedEventHandler GetDnsZoneRecordsCompleted; - + /// public event GetRawDnsZoneRecordsCompletedEventHandler GetRawDnsZoneRecordsCompleted; - + /// public event AddDnsZoneRecordCompletedEventHandler AddDnsZoneRecordCompleted; - + /// public event UpdateDnsZoneRecordCompletedEventHandler UpdateDnsZoneRecordCompleted; - + /// public event DeleteDnsZoneRecordCompletedEventHandler DeleteDnsZoneRecordCompleted; - + /// public event GetTerminalServicesSessionsCompletedEventHandler GetTerminalServicesSessionsCompleted; - + /// public event CloseTerminalServicesSessionCompletedEventHandler CloseTerminalServicesSessionCompleted; - + /// public event GetWindowsProcessesCompletedEventHandler GetWindowsProcessesCompleted; - + /// public event TerminateWindowsProcessCompletedEventHandler TerminateWindowsProcessCompleted; + + /// + public event InitWPIFeedsCompletedEventHandler InitWPIFeedsCompleted; + + /// + public event GetWPITabsCompletedEventHandler GetWPITabsCompleted; + + /// + public event GetWPIKeywordsCompletedEventHandler GetWPIKeywordsCompleted; + + /// + public event GetWPIProductsCompletedEventHandler GetWPIProductsCompleted; + + /// + public event GetWPIProductsFilteredCompletedEventHandler GetWPIProductsFilteredCompleted; + + /// + public event GetWPIProductsWithDependenciesCompletedEventHandler GetWPIProductsWithDependenciesCompleted; + + /// + public event InstallWPIProductsCompletedEventHandler InstallWPIProductsCompleted; + + /// + public event CancelInstallWPIProductsCompletedEventHandler CancelInstallWPIProductsCompleted; + + /// + public event GetWPIStatusCompletedEventHandler GetWPIStatusCompleted; + + /// + public event WpiGetLogFileDirectoryCompletedEventHandler WpiGetLogFileDirectoryCompleted; + + /// + public event WpiGetLogsInDirectoryCompletedEventHandler WpiGetLogsInDirectoryCompleted; /// public event GetWindowsServicesCompletedEventHandler GetWindowsServicesCompleted; - + /// public event ChangeWindowsServiceStatusCompletedEventHandler ChangeWindowsServiceStatusCompleted; - + /// public event GetLogNamesCompletedEventHandler GetLogNamesCompleted; - + /// public event GetLogEntriesCompletedEventHandler GetLogEntriesCompleted; - + /// public event GetLogEntriesPagedCompletedEventHandler GetLogEntriesPagedCompleted; - + /// public event ClearLogCompletedEventHandler ClearLogCompleted; - + /// public event RebootSystemCompletedEventHandler RebootSystemCompleted; - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAllServers", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ServerInfo[] GetAllServers() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAllServers", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ServerInfo[] GetAllServers() + { object[] results = this.Invoke("GetAllServers", new object[0]); return ((ServerInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetAllServers(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetAllServers(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetAllServers", new object[0], callback, asyncState); } - + /// - public ServerInfo[] EndGetAllServers(System.IAsyncResult asyncResult) { + public ServerInfo[] EndGetAllServers(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ServerInfo[])(results[0])); } - + /// - public void GetAllServersAsync() { + public void GetAllServersAsync() + { this.GetAllServersAsync(null); } - + /// - public void GetAllServersAsync(object userState) { - if ((this.GetAllServersOperationCompleted == null)) { + public void GetAllServersAsync(object userState) + { + if ((this.GetAllServersOperationCompleted == null)) + { this.GetAllServersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAllServersOperationCompleted); } this.InvokeAsync("GetAllServers", new object[0], this.GetAllServersOperationCompleted, userState); } - - private void OnGetAllServersOperationCompleted(object arg) { - if ((this.GetAllServersCompleted != null)) { + + private void OnGetAllServersOperationCompleted(object arg) + { + if ((this.GetAllServersCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetAllServersCompleted(this, new GetAllServersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawAllServers", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawAllServers() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawAllServers", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawAllServers() + { object[] results = this.Invoke("GetRawAllServers", new object[0]); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawAllServers(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawAllServers(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawAllServers", new object[0], callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawAllServers(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawAllServers(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawAllServersAsync() { + public void GetRawAllServersAsync() + { this.GetRawAllServersAsync(null); } - + /// - public void GetRawAllServersAsync(object userState) { - if ((this.GetRawAllServersOperationCompleted == null)) { + public void GetRawAllServersAsync(object userState) + { + if ((this.GetRawAllServersOperationCompleted == null)) + { this.GetRawAllServersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawAllServersOperationCompleted); } this.InvokeAsync("GetRawAllServers", new object[0], this.GetRawAllServersOperationCompleted, userState); } - - private void OnGetRawAllServersOperationCompleted(object arg) { - if ((this.GetRawAllServersCompleted != null)) { + + private void OnGetRawAllServersOperationCompleted(object arg) + { + if ((this.GetRawAllServersCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawAllServersCompleted(this, new GetRawAllServersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServers", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ServerInfo[] GetServers() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServers", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ServerInfo[] GetServers() + { object[] results = this.Invoke("GetServers", new object[0]); return ((ServerInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetServers(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetServers(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetServers", new object[0], callback, asyncState); } - + /// - public ServerInfo[] EndGetServers(System.IAsyncResult asyncResult) { + public ServerInfo[] EndGetServers(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ServerInfo[])(results[0])); } - + /// - public void GetServersAsync() { + public void GetServersAsync() + { this.GetServersAsync(null); } - + /// - public void GetServersAsync(object userState) { - if ((this.GetServersOperationCompleted == null)) { + public void GetServersAsync(object userState) + { + if ((this.GetServersOperationCompleted == null)) + { this.GetServersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetServersOperationCompleted); } this.InvokeAsync("GetServers", new object[0], this.GetServersOperationCompleted, userState); } - - private void OnGetServersOperationCompleted(object arg) { - if ((this.GetServersCompleted != null)) { + + private void OnGetServersOperationCompleted(object arg) + { + if ((this.GetServersCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetServersCompleted(this, new GetServersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawServers", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawServers() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawServers", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawServers() + { object[] results = this.Invoke("GetRawServers", new object[0]); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawServers(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawServers(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawServers", new object[0], callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawServers(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawServers(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawServersAsync() { + public void GetRawServersAsync() + { this.GetRawServersAsync(null); } - + /// - public void GetRawServersAsync(object userState) { - if ((this.GetRawServersOperationCompleted == null)) { + public void GetRawServersAsync(object userState) + { + if ((this.GetRawServersOperationCompleted == null)) + { this.GetRawServersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawServersOperationCompleted); } this.InvokeAsync("GetRawServers", new object[0], this.GetRawServersOperationCompleted, userState); } - - private void OnGetRawServersOperationCompleted(object arg) { - if ((this.GetRawServersCompleted != null)) { + + private void OnGetRawServersOperationCompleted(object arg) + { + if ((this.GetRawServersCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawServersCompleted(this, new GetRawServersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServerShortDetails", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ServerInfo GetServerShortDetails(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServerShortDetails", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ServerInfo GetServerShortDetails(int serverId) + { object[] results = this.Invoke("GetServerShortDetails", new object[] { serverId}); return ((ServerInfo)(results[0])); } - + /// - public System.IAsyncResult BeginGetServerShortDetails(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetServerShortDetails(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetServerShortDetails", new object[] { serverId}, callback, asyncState); } - + /// - public ServerInfo EndGetServerShortDetails(System.IAsyncResult asyncResult) { + public ServerInfo EndGetServerShortDetails(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ServerInfo)(results[0])); } - + /// - public void GetServerShortDetailsAsync(int serverId) { + public void GetServerShortDetailsAsync(int serverId) + { this.GetServerShortDetailsAsync(serverId, null); } - + /// - public void GetServerShortDetailsAsync(int serverId, object userState) { - if ((this.GetServerShortDetailsOperationCompleted == null)) { + public void GetServerShortDetailsAsync(int serverId, object userState) + { + if ((this.GetServerShortDetailsOperationCompleted == null)) + { this.GetServerShortDetailsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetServerShortDetailsOperationCompleted); } this.InvokeAsync("GetServerShortDetails", new object[] { serverId}, this.GetServerShortDetailsOperationCompleted, userState); } - - private void OnGetServerShortDetailsOperationCompleted(object arg) { - if ((this.GetServerShortDetailsCompleted != null)) { + + private void OnGetServerShortDetailsOperationCompleted(object arg) + { + if ((this.GetServerShortDetailsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetServerShortDetailsCompleted(this, new GetServerShortDetailsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServerById", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ServerInfo GetServerById(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServerById", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ServerInfo GetServerById(int serverId) + { object[] results = this.Invoke("GetServerById", new object[] { serverId}); return ((ServerInfo)(results[0])); } - + /// - public System.IAsyncResult BeginGetServerById(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetServerById(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetServerById", new object[] { serverId}, callback, asyncState); } - + /// - public ServerInfo EndGetServerById(System.IAsyncResult asyncResult) { + public ServerInfo EndGetServerById(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ServerInfo)(results[0])); } - + /// - public void GetServerByIdAsync(int serverId) { + public void GetServerByIdAsync(int serverId) + { this.GetServerByIdAsync(serverId, null); } - + /// - public void GetServerByIdAsync(int serverId, object userState) { - if ((this.GetServerByIdOperationCompleted == null)) { + public void GetServerByIdAsync(int serverId, object userState) + { + if ((this.GetServerByIdOperationCompleted == null)) + { this.GetServerByIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetServerByIdOperationCompleted); } this.InvokeAsync("GetServerById", new object[] { serverId}, this.GetServerByIdOperationCompleted, userState); } - - private void OnGetServerByIdOperationCompleted(object arg) { - if ((this.GetServerByIdCompleted != null)) { + + private void OnGetServerByIdOperationCompleted(object arg) + { + if ((this.GetServerByIdCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetServerByIdCompleted(this, new GetServerByIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServerByName", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ServerInfo GetServerByName(string serverName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServerByName", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ServerInfo GetServerByName(string serverName) + { object[] results = this.Invoke("GetServerByName", new object[] { serverName}); return ((ServerInfo)(results[0])); } - + /// - public System.IAsyncResult BeginGetServerByName(string serverName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetServerByName(string serverName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetServerByName", new object[] { serverName}, callback, asyncState); } - + /// - public ServerInfo EndGetServerByName(System.IAsyncResult asyncResult) { + public ServerInfo EndGetServerByName(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ServerInfo)(results[0])); } - + /// - public void GetServerByNameAsync(string serverName) { + public void GetServerByNameAsync(string serverName) + { this.GetServerByNameAsync(serverName, null); } - + /// - public void GetServerByNameAsync(string serverName, object userState) { - if ((this.GetServerByNameOperationCompleted == null)) { + public void GetServerByNameAsync(string serverName, object userState) + { + if ((this.GetServerByNameOperationCompleted == null)) + { this.GetServerByNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetServerByNameOperationCompleted); } this.InvokeAsync("GetServerByName", new object[] { serverName}, this.GetServerByNameOperationCompleted, userState); } - - private void OnGetServerByNameOperationCompleted(object arg) { - if ((this.GetServerByNameCompleted != null)) { + + private void OnGetServerByNameOperationCompleted(object arg) + { + if ((this.GetServerByNameCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetServerByNameCompleted(this, new GetServerByNameCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckServerAvailable", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CheckServerAvailable(string serverUrl, string password) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CheckServerAvailable", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CheckServerAvailable(string serverUrl, string password) + { object[] results = this.Invoke("CheckServerAvailable", new object[] { serverUrl, password}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCheckServerAvailable(string serverUrl, string password, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCheckServerAvailable(string serverUrl, string password, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CheckServerAvailable", new object[] { serverUrl, password}, callback, asyncState); } - + /// - public int EndCheckServerAvailable(System.IAsyncResult asyncResult) { + public int EndCheckServerAvailable(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CheckServerAvailableAsync(string serverUrl, string password) { + public void CheckServerAvailableAsync(string serverUrl, string password) + { this.CheckServerAvailableAsync(serverUrl, password, null); } - + /// - public void CheckServerAvailableAsync(string serverUrl, string password, object userState) { - if ((this.CheckServerAvailableOperationCompleted == null)) { + public void CheckServerAvailableAsync(string serverUrl, string password, object userState) + { + if ((this.CheckServerAvailableOperationCompleted == null)) + { this.CheckServerAvailableOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckServerAvailableOperationCompleted); } this.InvokeAsync("CheckServerAvailable", new object[] { serverUrl, password}, this.CheckServerAvailableOperationCompleted, userState); } - - private void OnCheckServerAvailableOperationCompleted(object arg) { - if ((this.CheckServerAvailableCompleted != null)) { + + private void OnCheckServerAvailableOperationCompleted(object arg) + { + if ((this.CheckServerAvailableCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CheckServerAvailableCompleted(this, new CheckServerAvailableCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddServer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddServer(ServerInfo server, bool autoDiscovery) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddServer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddServer(ServerInfo server, bool autoDiscovery) + { object[] results = this.Invoke("AddServer", new object[] { server, autoDiscovery}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddServer(ServerInfo server, bool autoDiscovery, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddServer(ServerInfo server, bool autoDiscovery, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddServer", new object[] { server, autoDiscovery}, callback, asyncState); } - + /// - public int EndAddServer(System.IAsyncResult asyncResult) { + public int EndAddServer(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddServerAsync(ServerInfo server, bool autoDiscovery) { + public void AddServerAsync(ServerInfo server, bool autoDiscovery) + { this.AddServerAsync(server, autoDiscovery, null); } - + /// - public void AddServerAsync(ServerInfo server, bool autoDiscovery, object userState) { - if ((this.AddServerOperationCompleted == null)) { + public void AddServerAsync(ServerInfo server, bool autoDiscovery, object userState) + { + if ((this.AddServerOperationCompleted == null)) + { this.AddServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddServerOperationCompleted); } this.InvokeAsync("AddServer", new object[] { server, autoDiscovery}, this.AddServerOperationCompleted, userState); } - - private void OnAddServerOperationCompleted(object arg) { - if ((this.AddServerCompleted != null)) { + + private void OnAddServerOperationCompleted(object arg) + { + if ((this.AddServerCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddServerCompleted(this, new AddServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateServer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int UpdateServer(ServerInfo server) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateServer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateServer(ServerInfo server) + { object[] results = this.Invoke("UpdateServer", new object[] { server}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateServer(ServerInfo server, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateServer(ServerInfo server, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateServer", new object[] { server}, callback, asyncState); } - + /// - public int EndUpdateServer(System.IAsyncResult asyncResult) { + public int EndUpdateServer(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void UpdateServerAsync(ServerInfo server) { + public void UpdateServerAsync(ServerInfo server) + { this.UpdateServerAsync(server, null); } - + /// - public void UpdateServerAsync(ServerInfo server, object userState) { - if ((this.UpdateServerOperationCompleted == null)) { + public void UpdateServerAsync(ServerInfo server, object userState) + { + if ((this.UpdateServerOperationCompleted == null)) + { this.UpdateServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateServerOperationCompleted); } this.InvokeAsync("UpdateServer", new object[] { server}, this.UpdateServerOperationCompleted, userState); } - - private void OnUpdateServerOperationCompleted(object arg) { - if ((this.UpdateServerCompleted != null)) { + + private void OnUpdateServerOperationCompleted(object arg) + { + if ((this.UpdateServerCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateServerCompleted(this, new UpdateServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateServerConnectionPassword", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int UpdateServerConnectionPassword(int serverId, string password) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateServerConnectionPassword", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateServerConnectionPassword(int serverId, string password) + { object[] results = this.Invoke("UpdateServerConnectionPassword", new object[] { serverId, password}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateServerConnectionPassword(int serverId, string password, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateServerConnectionPassword(int serverId, string password, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateServerConnectionPassword", new object[] { serverId, password}, callback, asyncState); } - + /// - public int EndUpdateServerConnectionPassword(System.IAsyncResult asyncResult) { + public int EndUpdateServerConnectionPassword(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void UpdateServerConnectionPasswordAsync(int serverId, string password) { + public void UpdateServerConnectionPasswordAsync(int serverId, string password) + { this.UpdateServerConnectionPasswordAsync(serverId, password, null); } - + /// - public void UpdateServerConnectionPasswordAsync(int serverId, string password, object userState) { - if ((this.UpdateServerConnectionPasswordOperationCompleted == null)) { + public void UpdateServerConnectionPasswordAsync(int serverId, string password, object userState) + { + if ((this.UpdateServerConnectionPasswordOperationCompleted == null)) + { this.UpdateServerConnectionPasswordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateServerConnectionPasswordOperationCompleted); } this.InvokeAsync("UpdateServerConnectionPassword", new object[] { serverId, password}, this.UpdateServerConnectionPasswordOperationCompleted, userState); } - - private void OnUpdateServerConnectionPasswordOperationCompleted(object arg) { - if ((this.UpdateServerConnectionPasswordCompleted != null)) { + + private void OnUpdateServerConnectionPasswordOperationCompleted(object arg) + { + if ((this.UpdateServerConnectionPasswordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateServerConnectionPasswordCompleted(this, new UpdateServerConnectionPasswordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateServerADPassword", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int UpdateServerADPassword(int serverId, string adPassword) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateServerADPassword", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateServerADPassword(int serverId, string adPassword) + { object[] results = this.Invoke("UpdateServerADPassword", new object[] { serverId, adPassword}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateServerADPassword(int serverId, string adPassword, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateServerADPassword(int serverId, string adPassword, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateServerADPassword", new object[] { serverId, adPassword}, callback, asyncState); } - + /// - public int EndUpdateServerADPassword(System.IAsyncResult asyncResult) { + public int EndUpdateServerADPassword(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void UpdateServerADPasswordAsync(int serverId, string adPassword) { + public void UpdateServerADPasswordAsync(int serverId, string adPassword) + { this.UpdateServerADPasswordAsync(serverId, adPassword, null); } - + /// - public void UpdateServerADPasswordAsync(int serverId, string adPassword, object userState) { - if ((this.UpdateServerADPasswordOperationCompleted == null)) { + public void UpdateServerADPasswordAsync(int serverId, string adPassword, object userState) + { + if ((this.UpdateServerADPasswordOperationCompleted == null)) + { this.UpdateServerADPasswordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateServerADPasswordOperationCompleted); } this.InvokeAsync("UpdateServerADPassword", new object[] { serverId, adPassword}, this.UpdateServerADPasswordOperationCompleted, userState); } - - private void OnUpdateServerADPasswordOperationCompleted(object arg) { - if ((this.UpdateServerADPasswordCompleted != null)) { + + private void OnUpdateServerADPasswordOperationCompleted(object arg) + { + if ((this.UpdateServerADPasswordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateServerADPasswordCompleted(this, new UpdateServerADPasswordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteServer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteServer(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteServer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteServer(int serverId) + { object[] results = this.Invoke("DeleteServer", new object[] { serverId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteServer(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteServer(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteServer", new object[] { serverId}, callback, asyncState); } - + /// - public int EndDeleteServer(System.IAsyncResult asyncResult) { + public int EndDeleteServer(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteServerAsync(int serverId) { + public void DeleteServerAsync(int serverId) + { this.DeleteServerAsync(serverId, null); } - + /// - public void DeleteServerAsync(int serverId, object userState) { - if ((this.DeleteServerOperationCompleted == null)) { + public void DeleteServerAsync(int serverId, object userState) + { + if ((this.DeleteServerOperationCompleted == null)) + { this.DeleteServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteServerOperationCompleted); } this.InvokeAsync("DeleteServer", new object[] { serverId}, this.DeleteServerOperationCompleted, userState); } - - private void OnDeleteServerOperationCompleted(object arg) { - if ((this.DeleteServerCompleted != null)) { + + private void OnDeleteServerOperationCompleted(object arg) + { + if ((this.DeleteServerCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteServerCompleted(this, new DeleteServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetVirtualServers", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetVirtualServers() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetVirtualServers", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetVirtualServers() + { object[] results = this.Invoke("GetVirtualServers", new object[0]); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetVirtualServers(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetVirtualServers(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetVirtualServers", new object[0], callback, asyncState); } - + /// - public System.Data.DataSet EndGetVirtualServers(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetVirtualServers(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetVirtualServersAsync() { + public void GetVirtualServersAsync() + { this.GetVirtualServersAsync(null); } - + /// - public void GetVirtualServersAsync(object userState) { - if ((this.GetVirtualServersOperationCompleted == null)) { + public void GetVirtualServersAsync(object userState) + { + if ((this.GetVirtualServersOperationCompleted == null)) + { this.GetVirtualServersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetVirtualServersOperationCompleted); } this.InvokeAsync("GetVirtualServers", new object[0], this.GetVirtualServersOperationCompleted, userState); } - - private void OnGetVirtualServersOperationCompleted(object arg) { - if ((this.GetVirtualServersCompleted != null)) { + + private void OnGetVirtualServersOperationCompleted(object arg) + { + if ((this.GetVirtualServersCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetVirtualServersCompleted(this, new GetVirtualServersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAvailableVirtualServices", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetAvailableVirtualServices(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetAvailableVirtualServices", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetAvailableVirtualServices(int serverId) + { object[] results = this.Invoke("GetAvailableVirtualServices", new object[] { serverId}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetAvailableVirtualServices(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetAvailableVirtualServices(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetAvailableVirtualServices", new object[] { serverId}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetAvailableVirtualServices(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetAvailableVirtualServices(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetAvailableVirtualServicesAsync(int serverId) { + public void GetAvailableVirtualServicesAsync(int serverId) + { this.GetAvailableVirtualServicesAsync(serverId, null); } - + /// - public void GetAvailableVirtualServicesAsync(int serverId, object userState) { - if ((this.GetAvailableVirtualServicesOperationCompleted == null)) { + public void GetAvailableVirtualServicesAsync(int serverId, object userState) + { + if ((this.GetAvailableVirtualServicesOperationCompleted == null)) + { this.GetAvailableVirtualServicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetAvailableVirtualServicesOperationCompleted); } this.InvokeAsync("GetAvailableVirtualServices", new object[] { serverId}, this.GetAvailableVirtualServicesOperationCompleted, userState); } - - private void OnGetAvailableVirtualServicesOperationCompleted(object arg) { - if ((this.GetAvailableVirtualServicesCompleted != null)) { + + private void OnGetAvailableVirtualServicesOperationCompleted(object arg) + { + if ((this.GetAvailableVirtualServicesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetAvailableVirtualServicesCompleted(this, new GetAvailableVirtualServicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetVirtualServices", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetVirtualServices(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetVirtualServices", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetVirtualServices(int serverId) + { object[] results = this.Invoke("GetVirtualServices", new object[] { serverId}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetVirtualServices(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetVirtualServices(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetVirtualServices", new object[] { serverId}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetVirtualServices(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetVirtualServices(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetVirtualServicesAsync(int serverId) { + public void GetVirtualServicesAsync(int serverId) + { this.GetVirtualServicesAsync(serverId, null); } - + /// - public void GetVirtualServicesAsync(int serverId, object userState) { - if ((this.GetVirtualServicesOperationCompleted == null)) { + public void GetVirtualServicesAsync(int serverId, object userState) + { + if ((this.GetVirtualServicesOperationCompleted == null)) + { this.GetVirtualServicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetVirtualServicesOperationCompleted); } this.InvokeAsync("GetVirtualServices", new object[] { serverId}, this.GetVirtualServicesOperationCompleted, userState); } - - private void OnGetVirtualServicesOperationCompleted(object arg) { - if ((this.GetVirtualServicesCompleted != null)) { + + private void OnGetVirtualServicesOperationCompleted(object arg) + { + if ((this.GetVirtualServicesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetVirtualServicesCompleted(this, new GetVirtualServicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddVirtualServices", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddVirtualServices(int serverId, int[] ids) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddVirtualServices", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddVirtualServices(int serverId, int[] ids) + { object[] results = this.Invoke("AddVirtualServices", new object[] { serverId, ids}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddVirtualServices(int serverId, int[] ids, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddVirtualServices(int serverId, int[] ids, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddVirtualServices", new object[] { serverId, ids}, callback, asyncState); } - + /// - public int EndAddVirtualServices(System.IAsyncResult asyncResult) { + public int EndAddVirtualServices(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddVirtualServicesAsync(int serverId, int[] ids) { + public void AddVirtualServicesAsync(int serverId, int[] ids) + { this.AddVirtualServicesAsync(serverId, ids, null); } - + /// - public void AddVirtualServicesAsync(int serverId, int[] ids, object userState) { - if ((this.AddVirtualServicesOperationCompleted == null)) { + public void AddVirtualServicesAsync(int serverId, int[] ids, object userState) + { + if ((this.AddVirtualServicesOperationCompleted == null)) + { this.AddVirtualServicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddVirtualServicesOperationCompleted); } this.InvokeAsync("AddVirtualServices", new object[] { serverId, ids}, this.AddVirtualServicesOperationCompleted, userState); } - - private void OnAddVirtualServicesOperationCompleted(object arg) { - if ((this.AddVirtualServicesCompleted != null)) { + + private void OnAddVirtualServicesOperationCompleted(object arg) + { + if ((this.AddVirtualServicesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddVirtualServicesCompleted(this, new AddVirtualServicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteVirtualServices", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteVirtualServices(int serverId, int[] ids) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteVirtualServices", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteVirtualServices(int serverId, int[] ids) + { object[] results = this.Invoke("DeleteVirtualServices", new object[] { serverId, ids}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteVirtualServices(int serverId, int[] ids, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteVirtualServices(int serverId, int[] ids, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteVirtualServices", new object[] { serverId, ids}, callback, asyncState); } - + /// - public int EndDeleteVirtualServices(System.IAsyncResult asyncResult) { + public int EndDeleteVirtualServices(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteVirtualServicesAsync(int serverId, int[] ids) { + public void DeleteVirtualServicesAsync(int serverId, int[] ids) + { this.DeleteVirtualServicesAsync(serverId, ids, null); } - + /// - public void DeleteVirtualServicesAsync(int serverId, int[] ids, object userState) { - if ((this.DeleteVirtualServicesOperationCompleted == null)) { + public void DeleteVirtualServicesAsync(int serverId, int[] ids, object userState) + { + if ((this.DeleteVirtualServicesOperationCompleted == null)) + { this.DeleteVirtualServicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteVirtualServicesOperationCompleted); } this.InvokeAsync("DeleteVirtualServices", new object[] { serverId, ids}, this.DeleteVirtualServicesOperationCompleted, userState); } - - private void OnDeleteVirtualServicesOperationCompleted(object arg) { - if ((this.DeleteVirtualServicesCompleted != null)) { + + private void OnDeleteVirtualServicesOperationCompleted(object arg) + { + if ((this.DeleteVirtualServicesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteVirtualServicesCompleted(this, new DeleteVirtualServicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateVirtualGroups", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int UpdateVirtualGroups(int serverId, VirtualGroupInfo[] groups) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateVirtualGroups", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateVirtualGroups(int serverId, VirtualGroupInfo[] groups) + { object[] results = this.Invoke("UpdateVirtualGroups", new object[] { serverId, groups}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateVirtualGroups(int serverId, VirtualGroupInfo[] groups, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateVirtualGroups(int serverId, VirtualGroupInfo[] groups, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateVirtualGroups", new object[] { serverId, groups}, callback, asyncState); } - + /// - public int EndUpdateVirtualGroups(System.IAsyncResult asyncResult) { + public int EndUpdateVirtualGroups(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void UpdateVirtualGroupsAsync(int serverId, VirtualGroupInfo[] groups) { + public void UpdateVirtualGroupsAsync(int serverId, VirtualGroupInfo[] groups) + { this.UpdateVirtualGroupsAsync(serverId, groups, null); } - + /// - public void UpdateVirtualGroupsAsync(int serverId, VirtualGroupInfo[] groups, object userState) { - if ((this.UpdateVirtualGroupsOperationCompleted == null)) { + public void UpdateVirtualGroupsAsync(int serverId, VirtualGroupInfo[] groups, object userState) + { + if ((this.UpdateVirtualGroupsOperationCompleted == null)) + { this.UpdateVirtualGroupsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateVirtualGroupsOperationCompleted); } this.InvokeAsync("UpdateVirtualGroups", new object[] { serverId, groups}, this.UpdateVirtualGroupsOperationCompleted, userState); } - - private void OnUpdateVirtualGroupsOperationCompleted(object arg) { - if ((this.UpdateVirtualGroupsCompleted != null)) { + + private void OnUpdateVirtualGroupsOperationCompleted(object arg) + { + if ((this.UpdateVirtualGroupsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateVirtualGroupsCompleted(this, new UpdateVirtualGroupsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawServicesByServerId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawServicesByServerId(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawServicesByServerId", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawServicesByServerId(int serverId) + { object[] results = this.Invoke("GetRawServicesByServerId", new object[] { serverId}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawServicesByServerId(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawServicesByServerId(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawServicesByServerId", new object[] { serverId}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawServicesByServerId(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawServicesByServerId(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawServicesByServerIdAsync(int serverId) { + public void GetRawServicesByServerIdAsync(int serverId) + { this.GetRawServicesByServerIdAsync(serverId, null); } - + /// - public void GetRawServicesByServerIdAsync(int serverId, object userState) { - if ((this.GetRawServicesByServerIdOperationCompleted == null)) { + public void GetRawServicesByServerIdAsync(int serverId, object userState) + { + if ((this.GetRawServicesByServerIdOperationCompleted == null)) + { this.GetRawServicesByServerIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawServicesByServerIdOperationCompleted); } this.InvokeAsync("GetRawServicesByServerId", new object[] { serverId}, this.GetRawServicesByServerIdOperationCompleted, userState); } - - private void OnGetRawServicesByServerIdOperationCompleted(object arg) { - if ((this.GetRawServicesByServerIdCompleted != null)) { + + private void OnGetRawServicesByServerIdOperationCompleted(object arg) + { + if ((this.GetRawServicesByServerIdCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawServicesByServerIdCompleted(this, new GetRawServicesByServerIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServicesByServerId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ServiceInfo[] GetServicesByServerId(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServicesByServerId", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ServiceInfo[] GetServicesByServerId(int serverId) + { object[] results = this.Invoke("GetServicesByServerId", new object[] { serverId}); return ((ServiceInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetServicesByServerId(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetServicesByServerId(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetServicesByServerId", new object[] { serverId}, callback, asyncState); } - + /// - public ServiceInfo[] EndGetServicesByServerId(System.IAsyncResult asyncResult) { + public ServiceInfo[] EndGetServicesByServerId(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ServiceInfo[])(results[0])); } - + /// - public void GetServicesByServerIdAsync(int serverId) { + public void GetServicesByServerIdAsync(int serverId) + { this.GetServicesByServerIdAsync(serverId, null); } - + /// - public void GetServicesByServerIdAsync(int serverId, object userState) { - if ((this.GetServicesByServerIdOperationCompleted == null)) { + public void GetServicesByServerIdAsync(int serverId, object userState) + { + if ((this.GetServicesByServerIdOperationCompleted == null)) + { this.GetServicesByServerIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetServicesByServerIdOperationCompleted); } this.InvokeAsync("GetServicesByServerId", new object[] { serverId}, this.GetServicesByServerIdOperationCompleted, userState); } - - private void OnGetServicesByServerIdOperationCompleted(object arg) { - if ((this.GetServicesByServerIdCompleted != null)) { + + private void OnGetServicesByServerIdOperationCompleted(object arg) + { + if ((this.GetServicesByServerIdCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetServicesByServerIdCompleted(this, new GetServicesByServerIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServicesByServerIdGroupName", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ServiceInfo[] GetServicesByServerIdGroupName(int serverId, string groupName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServicesByServerIdGroupName", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ServiceInfo[] GetServicesByServerIdGroupName(int serverId, string groupName) + { object[] results = this.Invoke("GetServicesByServerIdGroupName", new object[] { serverId, groupName}); return ((ServiceInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetServicesByServerIdGroupName(int serverId, string groupName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetServicesByServerIdGroupName(int serverId, string groupName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetServicesByServerIdGroupName", new object[] { serverId, groupName}, callback, asyncState); } - + /// - public ServiceInfo[] EndGetServicesByServerIdGroupName(System.IAsyncResult asyncResult) { + public ServiceInfo[] EndGetServicesByServerIdGroupName(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ServiceInfo[])(results[0])); } - + /// - public void GetServicesByServerIdGroupNameAsync(int serverId, string groupName) { + public void GetServicesByServerIdGroupNameAsync(int serverId, string groupName) + { this.GetServicesByServerIdGroupNameAsync(serverId, groupName, null); } - + /// - public void GetServicesByServerIdGroupNameAsync(int serverId, string groupName, object userState) { - if ((this.GetServicesByServerIdGroupNameOperationCompleted == null)) { + public void GetServicesByServerIdGroupNameAsync(int serverId, string groupName, object userState) + { + if ((this.GetServicesByServerIdGroupNameOperationCompleted == null)) + { this.GetServicesByServerIdGroupNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetServicesByServerIdGroupNameOperationCompleted); } this.InvokeAsync("GetServicesByServerIdGroupName", new object[] { serverId, groupName}, this.GetServicesByServerIdGroupNameOperationCompleted, userState); } - - private void OnGetServicesByServerIdGroupNameOperationCompleted(object arg) { - if ((this.GetServicesByServerIdGroupNameCompleted != null)) { + + private void OnGetServicesByServerIdGroupNameOperationCompleted(object arg) + { + if ((this.GetServicesByServerIdGroupNameCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetServicesByServerIdGroupNameCompleted(this, new GetServicesByServerIdGroupNameCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawServicesByGroupId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawServicesByGroupId(int groupId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawServicesByGroupId", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawServicesByGroupId(int groupId) + { object[] results = this.Invoke("GetRawServicesByGroupId", new object[] { groupId}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawServicesByGroupId(int groupId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawServicesByGroupId(int groupId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawServicesByGroupId", new object[] { groupId}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawServicesByGroupId(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawServicesByGroupId(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawServicesByGroupIdAsync(int groupId) { + public void GetRawServicesByGroupIdAsync(int groupId) + { this.GetRawServicesByGroupIdAsync(groupId, null); } - + /// - public void GetRawServicesByGroupIdAsync(int groupId, object userState) { - if ((this.GetRawServicesByGroupIdOperationCompleted == null)) { + public void GetRawServicesByGroupIdAsync(int groupId, object userState) + { + if ((this.GetRawServicesByGroupIdOperationCompleted == null)) + { this.GetRawServicesByGroupIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawServicesByGroupIdOperationCompleted); } this.InvokeAsync("GetRawServicesByGroupId", new object[] { groupId}, this.GetRawServicesByGroupIdOperationCompleted, userState); } - - private void OnGetRawServicesByGroupIdOperationCompleted(object arg) { - if ((this.GetRawServicesByGroupIdCompleted != null)) { + + private void OnGetRawServicesByGroupIdOperationCompleted(object arg) + { + if ((this.GetRawServicesByGroupIdCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawServicesByGroupIdCompleted(this, new GetRawServicesByGroupIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawServicesByGroupName", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawServicesByGroupName(string groupName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawServicesByGroupName", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawServicesByGroupName(string groupName) + { object[] results = this.Invoke("GetRawServicesByGroupName", new object[] { groupName}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawServicesByGroupName(string groupName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawServicesByGroupName(string groupName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawServicesByGroupName", new object[] { groupName}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawServicesByGroupName(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawServicesByGroupName(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawServicesByGroupNameAsync(string groupName) { + public void GetRawServicesByGroupNameAsync(string groupName) + { this.GetRawServicesByGroupNameAsync(groupName, null); } - + /// - public void GetRawServicesByGroupNameAsync(string groupName, object userState) { - if ((this.GetRawServicesByGroupNameOperationCompleted == null)) { + public void GetRawServicesByGroupNameAsync(string groupName, object userState) + { + if ((this.GetRawServicesByGroupNameOperationCompleted == null)) + { this.GetRawServicesByGroupNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawServicesByGroupNameOperationCompleted); } this.InvokeAsync("GetRawServicesByGroupName", new object[] { groupName}, this.GetRawServicesByGroupNameOperationCompleted, userState); } - - private void OnGetRawServicesByGroupNameOperationCompleted(object arg) { - if ((this.GetRawServicesByGroupNameCompleted != null)) { + + private void OnGetRawServicesByGroupNameOperationCompleted(object arg) + { + if ((this.GetRawServicesByGroupNameCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawServicesByGroupNameCompleted(this, new GetRawServicesByGroupNameCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServiceInfo", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ServiceInfo GetServiceInfo(int serviceId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServiceInfo", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ServiceInfo GetServiceInfo(int serviceId) + { object[] results = this.Invoke("GetServiceInfo", new object[] { serviceId}); return ((ServiceInfo)(results[0])); } - + /// - public System.IAsyncResult BeginGetServiceInfo(int serviceId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetServiceInfo(int serviceId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetServiceInfo", new object[] { serviceId}, callback, asyncState); } - + /// - public ServiceInfo EndGetServiceInfo(System.IAsyncResult asyncResult) { + public ServiceInfo EndGetServiceInfo(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ServiceInfo)(results[0])); } - + /// - public void GetServiceInfoAsync(int serviceId) { + public void GetServiceInfoAsync(int serviceId) + { this.GetServiceInfoAsync(serviceId, null); } - + /// - public void GetServiceInfoAsync(int serviceId, object userState) { - if ((this.GetServiceInfoOperationCompleted == null)) { + public void GetServiceInfoAsync(int serviceId, object userState) + { + if ((this.GetServiceInfoOperationCompleted == null)) + { this.GetServiceInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetServiceInfoOperationCompleted); } this.InvokeAsync("GetServiceInfo", new object[] { serviceId}, this.GetServiceInfoOperationCompleted, userState); } - - private void OnGetServiceInfoOperationCompleted(object arg) { - if ((this.GetServiceInfoCompleted != null)) { + + private void OnGetServiceInfoOperationCompleted(object arg) + { + if ((this.GetServiceInfoCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetServiceInfoCompleted(this, new GetServiceInfoCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddService", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddService(ServiceInfo service) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddService", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddService(ServiceInfo service) + { object[] results = this.Invoke("AddService", new object[] { service}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddService(ServiceInfo service, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddService(ServiceInfo service, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddService", new object[] { service}, callback, asyncState); } - + /// - public int EndAddService(System.IAsyncResult asyncResult) { + public int EndAddService(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddServiceAsync(ServiceInfo service) { + public void AddServiceAsync(ServiceInfo service) + { this.AddServiceAsync(service, null); } - + /// - public void AddServiceAsync(ServiceInfo service, object userState) { - if ((this.AddServiceOperationCompleted == null)) { + public void AddServiceAsync(ServiceInfo service, object userState) + { + if ((this.AddServiceOperationCompleted == null)) + { this.AddServiceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddServiceOperationCompleted); } this.InvokeAsync("AddService", new object[] { service}, this.AddServiceOperationCompleted, userState); } - - private void OnAddServiceOperationCompleted(object arg) { - if ((this.AddServiceCompleted != null)) { + + private void OnAddServiceOperationCompleted(object arg) + { + if ((this.AddServiceCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddServiceCompleted(this, new AddServiceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateService", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int UpdateService(ServiceInfo service) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateService", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateService(ServiceInfo service) + { object[] results = this.Invoke("UpdateService", new object[] { service}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateService(ServiceInfo service, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateService(ServiceInfo service, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateService", new object[] { service}, callback, asyncState); } - + /// - public int EndUpdateService(System.IAsyncResult asyncResult) { + public int EndUpdateService(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void UpdateServiceAsync(ServiceInfo service) { + public void UpdateServiceAsync(ServiceInfo service) + { this.UpdateServiceAsync(service, null); } - + /// - public void UpdateServiceAsync(ServiceInfo service, object userState) { - if ((this.UpdateServiceOperationCompleted == null)) { + public void UpdateServiceAsync(ServiceInfo service, object userState) + { + if ((this.UpdateServiceOperationCompleted == null)) + { this.UpdateServiceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateServiceOperationCompleted); } this.InvokeAsync("UpdateService", new object[] { service}, this.UpdateServiceOperationCompleted, userState); } - - private void OnUpdateServiceOperationCompleted(object arg) { - if ((this.UpdateServiceCompleted != null)) { + + private void OnUpdateServiceOperationCompleted(object arg) + { + if ((this.UpdateServiceCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateServiceCompleted(this, new UpdateServiceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteService", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteService(int serviceId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteService", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteService(int serviceId) + { object[] results = this.Invoke("DeleteService", new object[] { serviceId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteService(int serviceId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteService(int serviceId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteService", new object[] { serviceId}, callback, asyncState); } - + /// - public int EndDeleteService(System.IAsyncResult asyncResult) { + public int EndDeleteService(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteServiceAsync(int serviceId) { + public void DeleteServiceAsync(int serviceId) + { this.DeleteServiceAsync(serviceId, null); } - + /// - public void DeleteServiceAsync(int serviceId, object userState) { - if ((this.DeleteServiceOperationCompleted == null)) { + public void DeleteServiceAsync(int serviceId, object userState) + { + if ((this.DeleteServiceOperationCompleted == null)) + { this.DeleteServiceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteServiceOperationCompleted); } this.InvokeAsync("DeleteService", new object[] { serviceId}, this.DeleteServiceOperationCompleted, userState); } - - private void OnDeleteServiceOperationCompleted(object arg) { - if ((this.DeleteServiceCompleted != null)) { + + private void OnDeleteServiceOperationCompleted(object arg) + { + if ((this.DeleteServiceCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteServiceCompleted(this, new DeleteServiceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServiceSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string[] GetServiceSettings(int serviceId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServiceSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetServiceSettings(int serviceId) + { object[] results = this.Invoke("GetServiceSettings", new object[] { serviceId}); return ((string[])(results[0])); } - + /// - public System.IAsyncResult BeginGetServiceSettings(int serviceId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetServiceSettings(int serviceId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetServiceSettings", new object[] { serviceId}, callback, asyncState); } - + /// - public string[] EndGetServiceSettings(System.IAsyncResult asyncResult) { + public string[] EndGetServiceSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string[])(results[0])); } - + /// - public void GetServiceSettingsAsync(int serviceId) { + public void GetServiceSettingsAsync(int serviceId) + { this.GetServiceSettingsAsync(serviceId, null); } - + /// - public void GetServiceSettingsAsync(int serviceId, object userState) { - if ((this.GetServiceSettingsOperationCompleted == null)) { + public void GetServiceSettingsAsync(int serviceId, object userState) + { + if ((this.GetServiceSettingsOperationCompleted == null)) + { this.GetServiceSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetServiceSettingsOperationCompleted); } this.InvokeAsync("GetServiceSettings", new object[] { serviceId}, this.GetServiceSettingsOperationCompleted, userState); } - - private void OnGetServiceSettingsOperationCompleted(object arg) { - if ((this.GetServiceSettingsCompleted != null)) { + + private void OnGetServiceSettingsOperationCompleted(object arg) + { + if ((this.GetServiceSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetServiceSettingsCompleted(this, new GetServiceSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateServiceSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int UpdateServiceSettings(int serviceId, string[] settings) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateServiceSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateServiceSettings(int serviceId, string[] settings) + { object[] results = this.Invoke("UpdateServiceSettings", new object[] { serviceId, settings}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateServiceSettings(int serviceId, string[] settings, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateServiceSettings(int serviceId, string[] settings, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateServiceSettings", new object[] { serviceId, settings}, callback, asyncState); } - + /// - public int EndUpdateServiceSettings(System.IAsyncResult asyncResult) { + public int EndUpdateServiceSettings(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void UpdateServiceSettingsAsync(int serviceId, string[] settings) { + public void UpdateServiceSettingsAsync(int serviceId, string[] settings) + { this.UpdateServiceSettingsAsync(serviceId, settings, null); } - + /// - public void UpdateServiceSettingsAsync(int serviceId, string[] settings, object userState) { - if ((this.UpdateServiceSettingsOperationCompleted == null)) { + public void UpdateServiceSettingsAsync(int serviceId, string[] settings, object userState) + { + if ((this.UpdateServiceSettingsOperationCompleted == null)) + { this.UpdateServiceSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateServiceSettingsOperationCompleted); } this.InvokeAsync("UpdateServiceSettings", new object[] { serviceId, settings}, this.UpdateServiceSettingsOperationCompleted, userState); } - - private void OnUpdateServiceSettingsOperationCompleted(object arg) { - if ((this.UpdateServiceSettingsCompleted != null)) { + + private void OnUpdateServiceSettingsOperationCompleted(object arg) + { + if ((this.UpdateServiceSettingsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateServiceSettingsCompleted(this, new UpdateServiceSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/InstallService", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string[] InstallService(int serviceId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/InstallService", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] InstallService(int serviceId) + { object[] results = this.Invoke("InstallService", new object[] { serviceId}); return ((string[])(results[0])); } - + /// - public System.IAsyncResult BeginInstallService(int serviceId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginInstallService(int serviceId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("InstallService", new object[] { serviceId}, callback, asyncState); } - + /// - public string[] EndInstallService(System.IAsyncResult asyncResult) { + public string[] EndInstallService(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string[])(results[0])); } - + /// - public void InstallServiceAsync(int serviceId) { + public void InstallServiceAsync(int serviceId) + { this.InstallServiceAsync(serviceId, null); } - + /// - public void InstallServiceAsync(int serviceId, object userState) { - if ((this.InstallServiceOperationCompleted == null)) { + public void InstallServiceAsync(int serviceId, object userState) + { + if ((this.InstallServiceOperationCompleted == null)) + { this.InstallServiceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallServiceOperationCompleted); } this.InvokeAsync("InstallService", new object[] { serviceId}, this.InstallServiceOperationCompleted, userState); } - - private void OnInstallServiceOperationCompleted(object arg) { - if ((this.InstallServiceCompleted != null)) { + + private void OnInstallServiceOperationCompleted(object arg) + { + if ((this.InstallServiceCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.InstallServiceCompleted(this, new InstallServiceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetProviderServiceQuota", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public QuotaInfo GetProviderServiceQuota(int providerId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetProviderServiceQuota", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public QuotaInfo GetProviderServiceQuota(int providerId) + { object[] results = this.Invoke("GetProviderServiceQuota", new object[] { providerId}); return ((QuotaInfo)(results[0])); } - + /// - public System.IAsyncResult BeginGetProviderServiceQuota(int providerId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetProviderServiceQuota(int providerId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetProviderServiceQuota", new object[] { providerId}, callback, asyncState); } - + /// - public QuotaInfo EndGetProviderServiceQuota(System.IAsyncResult asyncResult) { + public QuotaInfo EndGetProviderServiceQuota(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((QuotaInfo)(results[0])); } - + /// - public void GetProviderServiceQuotaAsync(int providerId) { + public void GetProviderServiceQuotaAsync(int providerId) + { this.GetProviderServiceQuotaAsync(providerId, null); } - + /// - public void GetProviderServiceQuotaAsync(int providerId, object userState) { - if ((this.GetProviderServiceQuotaOperationCompleted == null)) { + public void GetProviderServiceQuotaAsync(int providerId, object userState) + { + if ((this.GetProviderServiceQuotaOperationCompleted == null)) + { this.GetProviderServiceQuotaOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetProviderServiceQuotaOperationCompleted); } this.InvokeAsync("GetProviderServiceQuota", new object[] { providerId}, this.GetProviderServiceQuotaOperationCompleted, userState); } - - private void OnGetProviderServiceQuotaOperationCompleted(object arg) { - if ((this.GetProviderServiceQuotaCompleted != null)) { + + private void OnGetProviderServiceQuotaOperationCompleted(object arg) + { + if ((this.GetProviderServiceQuotaCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetProviderServiceQuotaCompleted(this, new GetProviderServiceQuotaCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetInstalledProviders", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ProviderInfo[] GetInstalledProviders(int groupId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetInstalledProviders", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ProviderInfo[] GetInstalledProviders(int groupId) + { object[] results = this.Invoke("GetInstalledProviders", new object[] { groupId}); return ((ProviderInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetInstalledProviders(int groupId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetInstalledProviders(int groupId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetInstalledProviders", new object[] { groupId}, callback, asyncState); } - + /// - public ProviderInfo[] EndGetInstalledProviders(System.IAsyncResult asyncResult) { + public ProviderInfo[] EndGetInstalledProviders(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ProviderInfo[])(results[0])); } - + /// - public void GetInstalledProvidersAsync(int groupId) { + public void GetInstalledProvidersAsync(int groupId) + { this.GetInstalledProvidersAsync(groupId, null); } - + /// - public void GetInstalledProvidersAsync(int groupId, object userState) { - if ((this.GetInstalledProvidersOperationCompleted == null)) { + public void GetInstalledProvidersAsync(int groupId, object userState) + { + if ((this.GetInstalledProvidersOperationCompleted == null)) + { this.GetInstalledProvidersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetInstalledProvidersOperationCompleted); } this.InvokeAsync("GetInstalledProviders", new object[] { groupId}, this.GetInstalledProvidersOperationCompleted, userState); } - - private void OnGetInstalledProvidersOperationCompleted(object arg) { - if ((this.GetInstalledProvidersCompleted != null)) { + + private void OnGetInstalledProvidersOperationCompleted(object arg) + { + if ((this.GetInstalledProvidersCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetInstalledProvidersCompleted(this, new GetInstalledProvidersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetResourceGroups", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResourceGroupInfo[] GetResourceGroups() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetResourceGroups", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResourceGroupInfo[] GetResourceGroups() + { object[] results = this.Invoke("GetResourceGroups", new object[0]); return ((ResourceGroupInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetResourceGroups(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetResourceGroups(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetResourceGroups", new object[0], callback, asyncState); } - + /// - public ResourceGroupInfo[] EndGetResourceGroups(System.IAsyncResult asyncResult) { + public ResourceGroupInfo[] EndGetResourceGroups(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ResourceGroupInfo[])(results[0])); } - + /// - public void GetResourceGroupsAsync() { + public void GetResourceGroupsAsync() + { this.GetResourceGroupsAsync(null); } - + /// - public void GetResourceGroupsAsync(object userState) { - if ((this.GetResourceGroupsOperationCompleted == null)) { + public void GetResourceGroupsAsync(object userState) + { + if ((this.GetResourceGroupsOperationCompleted == null)) + { this.GetResourceGroupsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetResourceGroupsOperationCompleted); } this.InvokeAsync("GetResourceGroups", new object[0], this.GetResourceGroupsOperationCompleted, userState); } - - private void OnGetResourceGroupsOperationCompleted(object arg) { - if ((this.GetResourceGroupsCompleted != null)) { + + private void OnGetResourceGroupsOperationCompleted(object arg) + { + if ((this.GetResourceGroupsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetResourceGroupsCompleted(this, new GetResourceGroupsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetResourceGroup", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResourceGroupInfo GetResourceGroup(int groupId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetResourceGroup", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResourceGroupInfo GetResourceGroup(int groupId) + { object[] results = this.Invoke("GetResourceGroup", new object[] { groupId}); return ((ResourceGroupInfo)(results[0])); } - + /// - public System.IAsyncResult BeginGetResourceGroup(int groupId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetResourceGroup(int groupId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetResourceGroup", new object[] { groupId}, callback, asyncState); } - + /// - public ResourceGroupInfo EndGetResourceGroup(System.IAsyncResult asyncResult) { + public ResourceGroupInfo EndGetResourceGroup(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ResourceGroupInfo)(results[0])); } - + /// - public void GetResourceGroupAsync(int groupId) { + public void GetResourceGroupAsync(int groupId) + { this.GetResourceGroupAsync(groupId, null); } - + /// - public void GetResourceGroupAsync(int groupId, object userState) { - if ((this.GetResourceGroupOperationCompleted == null)) { + public void GetResourceGroupAsync(int groupId, object userState) + { + if ((this.GetResourceGroupOperationCompleted == null)) + { this.GetResourceGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetResourceGroupOperationCompleted); } this.InvokeAsync("GetResourceGroup", new object[] { groupId}, this.GetResourceGroupOperationCompleted, userState); } - - private void OnGetResourceGroupOperationCompleted(object arg) { - if ((this.GetResourceGroupCompleted != null)) { + + private void OnGetResourceGroupOperationCompleted(object arg) + { + if ((this.GetResourceGroupCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetResourceGroupCompleted(this, new GetResourceGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetProvider", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ProviderInfo GetProvider(int providerId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetProvider", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ProviderInfo GetProvider(int providerId) + { object[] results = this.Invoke("GetProvider", new object[] { providerId}); return ((ProviderInfo)(results[0])); } - + /// - public System.IAsyncResult BeginGetProvider(int providerId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetProvider(int providerId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetProvider", new object[] { providerId}, callback, asyncState); } - + /// - public ProviderInfo EndGetProvider(System.IAsyncResult asyncResult) { + public ProviderInfo EndGetProvider(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ProviderInfo)(results[0])); } - + /// - public void GetProviderAsync(int providerId) { + public void GetProviderAsync(int providerId) + { this.GetProviderAsync(providerId, null); } - + /// - public void GetProviderAsync(int providerId, object userState) { - if ((this.GetProviderOperationCompleted == null)) { + public void GetProviderAsync(int providerId, object userState) + { + if ((this.GetProviderOperationCompleted == null)) + { this.GetProviderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetProviderOperationCompleted); } this.InvokeAsync("GetProvider", new object[] { providerId}, this.GetProviderOperationCompleted, userState); } - - private void OnGetProviderOperationCompleted(object arg) { - if ((this.GetProviderCompleted != null)) { + + private void OnGetProviderOperationCompleted(object arg) + { + if ((this.GetProviderCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetProviderCompleted(this, new GetProviderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetProviders", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ProviderInfo[] GetProviders() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetProviders", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ProviderInfo[] GetProviders() + { object[] results = this.Invoke("GetProviders", new object[0]); return ((ProviderInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetProviders(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetProviders(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetProviders", new object[0], callback, asyncState); } - + /// - public ProviderInfo[] EndGetProviders(System.IAsyncResult asyncResult) { + public ProviderInfo[] EndGetProviders(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ProviderInfo[])(results[0])); } - + /// - public void GetProvidersAsync() { + public void GetProvidersAsync() + { this.GetProvidersAsync(null); } - + /// - public void GetProvidersAsync(object userState) { - if ((this.GetProvidersOperationCompleted == null)) { + public void GetProvidersAsync(object userState) + { + if ((this.GetProvidersOperationCompleted == null)) + { this.GetProvidersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetProvidersOperationCompleted); } this.InvokeAsync("GetProviders", new object[0], this.GetProvidersOperationCompleted, userState); } - - private void OnGetProvidersOperationCompleted(object arg) { - if ((this.GetProvidersCompleted != null)) { + + private void OnGetProvidersOperationCompleted(object arg) + { + if ((this.GetProvidersCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetProvidersCompleted(this, new GetProvidersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetProvidersByGroupId", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ProviderInfo[] GetProvidersByGroupId(int groupId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetProvidersByGroupId", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ProviderInfo[] GetProvidersByGroupId(int groupId) + { object[] results = this.Invoke("GetProvidersByGroupId", new object[] { groupId}); return ((ProviderInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetProvidersByGroupId(int groupId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetProvidersByGroupId(int groupId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetProvidersByGroupId", new object[] { groupId}, callback, asyncState); } - + /// - public ProviderInfo[] EndGetProvidersByGroupId(System.IAsyncResult asyncResult) { + public ProviderInfo[] EndGetProvidersByGroupId(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ProviderInfo[])(results[0])); } - + /// - public void GetProvidersByGroupIdAsync(int groupId) { + public void GetProvidersByGroupIdAsync(int groupId) + { this.GetProvidersByGroupIdAsync(groupId, null); } - + /// - public void GetProvidersByGroupIdAsync(int groupId, object userState) { - if ((this.GetProvidersByGroupIdOperationCompleted == null)) { + public void GetProvidersByGroupIdAsync(int groupId, object userState) + { + if ((this.GetProvidersByGroupIdOperationCompleted == null)) + { this.GetProvidersByGroupIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetProvidersByGroupIdOperationCompleted); } this.InvokeAsync("GetProvidersByGroupId", new object[] { groupId}, this.GetProvidersByGroupIdOperationCompleted, userState); } - - private void OnGetProvidersByGroupIdOperationCompleted(object arg) { - if ((this.GetProvidersByGroupIdCompleted != null)) { + + private void OnGetProvidersByGroupIdOperationCompleted(object arg) + { + if ((this.GetProvidersByGroupIdCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetProvidersByGroupIdCompleted(this, new GetProvidersByGroupIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPackageServiceProvider", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ProviderInfo GetPackageServiceProvider(int packageId, string groupName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPackageServiceProvider", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ProviderInfo GetPackageServiceProvider(int packageId, string groupName) + { object[] results = this.Invoke("GetPackageServiceProvider", new object[] { packageId, groupName}); return ((ProviderInfo)(results[0])); } - + /// - public System.IAsyncResult BeginGetPackageServiceProvider(int packageId, string groupName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetPackageServiceProvider(int packageId, string groupName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetPackageServiceProvider", new object[] { packageId, groupName}, callback, asyncState); } - + /// - public ProviderInfo EndGetPackageServiceProvider(System.IAsyncResult asyncResult) { + public ProviderInfo EndGetPackageServiceProvider(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ProviderInfo)(results[0])); } - + /// - public void GetPackageServiceProviderAsync(int packageId, string groupName) { + public void GetPackageServiceProviderAsync(int packageId, string groupName) + { this.GetPackageServiceProviderAsync(packageId, groupName, null); } - + /// - public void GetPackageServiceProviderAsync(int packageId, string groupName, object userState) { - if ((this.GetPackageServiceProviderOperationCompleted == null)) { + public void GetPackageServiceProviderAsync(int packageId, string groupName, object userState) + { + if ((this.GetPackageServiceProviderOperationCompleted == null)) + { this.GetPackageServiceProviderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPackageServiceProviderOperationCompleted); } this.InvokeAsync("GetPackageServiceProvider", new object[] { packageId, groupName}, this.GetPackageServiceProviderOperationCompleted, userState); } - - private void OnGetPackageServiceProviderOperationCompleted(object arg) { - if ((this.GetPackageServiceProviderCompleted != null)) { + + private void OnGetPackageServiceProviderOperationCompleted(object arg) + { + if ((this.GetPackageServiceProviderCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPackageServiceProviderCompleted(this, new GetPackageServiceProviderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/IsInstalled", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public BoolResult IsInstalled(int serverId, int providerId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/IsInstalled", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public BoolResult IsInstalled(int serverId, int providerId) + { object[] results = this.Invoke("IsInstalled", new object[] { serverId, providerId}); return ((BoolResult)(results[0])); } - + /// - public System.IAsyncResult BeginIsInstalled(int serverId, int providerId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginIsInstalled(int serverId, int providerId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("IsInstalled", new object[] { serverId, providerId}, callback, asyncState); } - + /// - public BoolResult EndIsInstalled(System.IAsyncResult asyncResult) { + public BoolResult EndIsInstalled(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((BoolResult)(results[0])); } - + /// - public void IsInstalledAsync(int serverId, int providerId) { + public void IsInstalledAsync(int serverId, int providerId) + { this.IsInstalledAsync(serverId, providerId, null); } - + /// - public void IsInstalledAsync(int serverId, int providerId, object userState) { - if ((this.IsInstalledOperationCompleted == null)) { + public void IsInstalledAsync(int serverId, int providerId, object userState) + { + if ((this.IsInstalledOperationCompleted == null)) + { this.IsInstalledOperationCompleted = new System.Threading.SendOrPostCallback(this.OnIsInstalledOperationCompleted); } this.InvokeAsync("IsInstalled", new object[] { serverId, providerId}, this.IsInstalledOperationCompleted, userState); } - - private void OnIsInstalledOperationCompleted(object arg) { - if ((this.IsInstalledCompleted != null)) { + + private void OnIsInstalledOperationCompleted(object arg) + { + if ((this.IsInstalledCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.IsInstalledCompleted(this, new IsInstalledCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServerVersion", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string GetServerVersion(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetServerVersion", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string GetServerVersion(int serverId) + { object[] results = this.Invoke("GetServerVersion", new object[] { serverId}); return ((string)(results[0])); } - + /// - public System.IAsyncResult BeginGetServerVersion(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetServerVersion(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetServerVersion", new object[] { serverId}, callback, asyncState); } - + /// - public string EndGetServerVersion(System.IAsyncResult asyncResult) { + public string EndGetServerVersion(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string)(results[0])); } - + /// - public void GetServerVersionAsync(int serverId) { + public void GetServerVersionAsync(int serverId) + { this.GetServerVersionAsync(serverId, null); } - + /// - public void GetServerVersionAsync(int serverId, object userState) { - if ((this.GetServerVersionOperationCompleted == null)) { + public void GetServerVersionAsync(int serverId, object userState) + { + if ((this.GetServerVersionOperationCompleted == null)) + { this.GetServerVersionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetServerVersionOperationCompleted); } this.InvokeAsync("GetServerVersion", new object[] { serverId}, this.GetServerVersionOperationCompleted, userState); } - - private void OnGetServerVersionOperationCompleted(object arg) { - if ((this.GetServerVersionCompleted != null)) { + + private void OnGetServerVersionOperationCompleted(object arg) + { + if ((this.GetServerVersionCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetServerVersionCompleted(this, new GetServerVersionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetIPAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public IPAddressInfo[] GetIPAddresses(IPAddressPool pool, int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetIPAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public IPAddressInfo[] GetIPAddresses(IPAddressPool pool, int serverId) + { object[] results = this.Invoke("GetIPAddresses", new object[] { pool, serverId}); return ((IPAddressInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetIPAddresses(IPAddressPool pool, int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetIPAddresses(IPAddressPool pool, int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetIPAddresses", new object[] { pool, serverId}, callback, asyncState); } - + /// - public IPAddressInfo[] EndGetIPAddresses(System.IAsyncResult asyncResult) { + public IPAddressInfo[] EndGetIPAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((IPAddressInfo[])(results[0])); } - + /// - public void GetIPAddressesAsync(IPAddressPool pool, int serverId) { + public void GetIPAddressesAsync(IPAddressPool pool, int serverId) + { this.GetIPAddressesAsync(pool, serverId, null); } - + /// - public void GetIPAddressesAsync(IPAddressPool pool, int serverId, object userState) { - if ((this.GetIPAddressesOperationCompleted == null)) { + public void GetIPAddressesAsync(IPAddressPool pool, int serverId, object userState) + { + if ((this.GetIPAddressesOperationCompleted == null)) + { this.GetIPAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetIPAddressesOperationCompleted); } this.InvokeAsync("GetIPAddresses", new object[] { pool, serverId}, this.GetIPAddressesOperationCompleted, userState); } - - private void OnGetIPAddressesOperationCompleted(object arg) { - if ((this.GetIPAddressesCompleted != null)) { + + private void OnGetIPAddressesOperationCompleted(object arg) + { + if ((this.GetIPAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetIPAddressesCompleted(this, new GetIPAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetIPAddressesPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public IPAddressesPaged GetIPAddressesPaged(IPAddressPool pool, int serverId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetIPAddressesPaged", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public IPAddressesPaged GetIPAddressesPaged(IPAddressPool pool, int serverId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { object[] results = this.Invoke("GetIPAddressesPaged", new object[] { pool, serverId, @@ -2319,9 +2716,10 @@ namespace WebsitePanel.EnterpriseServer { maximumRows}); return ((IPAddressesPaged)(results[0])); } - + /// - public System.IAsyncResult BeginGetIPAddressesPaged(IPAddressPool pool, int serverId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetIPAddressesPaged(IPAddressPool pool, int serverId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetIPAddressesPaged", new object[] { pool, serverId, @@ -2331,21 +2729,25 @@ namespace WebsitePanel.EnterpriseServer { startRow, maximumRows}, callback, asyncState); } - + /// - public IPAddressesPaged EndGetIPAddressesPaged(System.IAsyncResult asyncResult) { + public IPAddressesPaged EndGetIPAddressesPaged(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((IPAddressesPaged)(results[0])); } - + /// - public void GetIPAddressesPagedAsync(IPAddressPool pool, int serverId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + public void GetIPAddressesPagedAsync(IPAddressPool pool, int serverId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { this.GetIPAddressesPagedAsync(pool, serverId, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetIPAddressesPagedAsync(IPAddressPool pool, int serverId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { - if ((this.GetIPAddressesPagedOperationCompleted == null)) { + public void GetIPAddressesPagedAsync(IPAddressPool pool, int serverId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) + { + if ((this.GetIPAddressesPagedOperationCompleted == null)) + { this.GetIPAddressesPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetIPAddressesPagedOperationCompleted); } this.InvokeAsync("GetIPAddressesPaged", new object[] { @@ -2357,58 +2759,69 @@ namespace WebsitePanel.EnterpriseServer { startRow, maximumRows}, this.GetIPAddressesPagedOperationCompleted, userState); } - - private void OnGetIPAddressesPagedOperationCompleted(object arg) { - if ((this.GetIPAddressesPagedCompleted != null)) { + + private void OnGetIPAddressesPagedOperationCompleted(object arg) + { + if ((this.GetIPAddressesPagedCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetIPAddressesPagedCompleted(this, new GetIPAddressesPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetIPAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public IPAddressInfo GetIPAddress(int addressId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetIPAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public IPAddressInfo GetIPAddress(int addressId) + { object[] results = this.Invoke("GetIPAddress", new object[] { addressId}); return ((IPAddressInfo)(results[0])); } - + /// - public System.IAsyncResult BeginGetIPAddress(int addressId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetIPAddress(int addressId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetIPAddress", new object[] { addressId}, callback, asyncState); } - + /// - public IPAddressInfo EndGetIPAddress(System.IAsyncResult asyncResult) { + public IPAddressInfo EndGetIPAddress(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((IPAddressInfo)(results[0])); } - + /// - public void GetIPAddressAsync(int addressId) { + public void GetIPAddressAsync(int addressId) + { this.GetIPAddressAsync(addressId, null); } - + /// - public void GetIPAddressAsync(int addressId, object userState) { - if ((this.GetIPAddressOperationCompleted == null)) { + public void GetIPAddressAsync(int addressId, object userState) + { + if ((this.GetIPAddressOperationCompleted == null)) + { this.GetIPAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetIPAddressOperationCompleted); } this.InvokeAsync("GetIPAddress", new object[] { addressId}, this.GetIPAddressOperationCompleted, userState); } - - private void OnGetIPAddressOperationCompleted(object arg) { - if ((this.GetIPAddressCompleted != null)) { + + private void OnGetIPAddressOperationCompleted(object arg) + { + if ((this.GetIPAddressCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetIPAddressCompleted(this, new GetIPAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddIPAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public IntResult AddIPAddress(IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddIPAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public IntResult AddIPAddress(IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments) + { object[] results = this.Invoke("AddIPAddress", new object[] { pool, serverId, @@ -2419,9 +2832,10 @@ namespace WebsitePanel.EnterpriseServer { comments}); return ((IntResult)(results[0])); } - + /// - public System.IAsyncResult BeginAddIPAddress(IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddIPAddress(IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddIPAddress", new object[] { pool, serverId, @@ -2431,21 +2845,25 @@ namespace WebsitePanel.EnterpriseServer { defaultGateway, comments}, callback, asyncState); } - + /// - public IntResult EndAddIPAddress(System.IAsyncResult asyncResult) { + public IntResult EndAddIPAddress(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((IntResult)(results[0])); } - + /// - public void AddIPAddressAsync(IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments) { + public void AddIPAddressAsync(IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments) + { this.AddIPAddressAsync(pool, serverId, externalIP, internalIP, subnetMask, defaultGateway, comments, null); } - + /// - public void AddIPAddressAsync(IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments, object userState) { - if ((this.AddIPAddressOperationCompleted == null)) { + public void AddIPAddressAsync(IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments, object userState) + { + if ((this.AddIPAddressOperationCompleted == null)) + { this.AddIPAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddIPAddressOperationCompleted); } this.InvokeAsync("AddIPAddress", new object[] { @@ -2457,17 +2875,20 @@ namespace WebsitePanel.EnterpriseServer { defaultGateway, comments}, this.AddIPAddressOperationCompleted, userState); } - - private void OnAddIPAddressOperationCompleted(object arg) { - if ((this.AddIPAddressCompleted != null)) { + + private void OnAddIPAddressOperationCompleted(object arg) + { + if ((this.AddIPAddressCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddIPAddressCompleted(this, new AddIPAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddIPAddressesRange", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject AddIPAddressesRange(IPAddressPool pool, int serverId, string externalIP, string endIP, string internalIP, string subnetMask, string defaultGateway, string comments) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddIPAddressesRange", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject AddIPAddressesRange(IPAddressPool pool, int serverId, string externalIP, string endIP, string internalIP, string subnetMask, string defaultGateway, string comments) + { object[] results = this.Invoke("AddIPAddressesRange", new object[] { pool, serverId, @@ -2479,9 +2900,10 @@ namespace WebsitePanel.EnterpriseServer { comments}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginAddIPAddressesRange(IPAddressPool pool, int serverId, string externalIP, string endIP, string internalIP, string subnetMask, string defaultGateway, string comments, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddIPAddressesRange(IPAddressPool pool, int serverId, string externalIP, string endIP, string internalIP, string subnetMask, string defaultGateway, string comments, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddIPAddressesRange", new object[] { pool, serverId, @@ -2492,21 +2914,25 @@ namespace WebsitePanel.EnterpriseServer { defaultGateway, comments}, callback, asyncState); } - + /// - public ResultObject EndAddIPAddressesRange(System.IAsyncResult asyncResult) { + public ResultObject EndAddIPAddressesRange(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void AddIPAddressesRangeAsync(IPAddressPool pool, int serverId, string externalIP, string endIP, string internalIP, string subnetMask, string defaultGateway, string comments) { + public void AddIPAddressesRangeAsync(IPAddressPool pool, int serverId, string externalIP, string endIP, string internalIP, string subnetMask, string defaultGateway, string comments) + { this.AddIPAddressesRangeAsync(pool, serverId, externalIP, endIP, internalIP, subnetMask, defaultGateway, comments, null); } - + /// - public void AddIPAddressesRangeAsync(IPAddressPool pool, int serverId, string externalIP, string endIP, string internalIP, string subnetMask, string defaultGateway, string comments, object userState) { - if ((this.AddIPAddressesRangeOperationCompleted == null)) { + public void AddIPAddressesRangeAsync(IPAddressPool pool, int serverId, string externalIP, string endIP, string internalIP, string subnetMask, string defaultGateway, string comments, object userState) + { + if ((this.AddIPAddressesRangeOperationCompleted == null)) + { this.AddIPAddressesRangeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddIPAddressesRangeOperationCompleted); } this.InvokeAsync("AddIPAddressesRange", new object[] { @@ -2519,17 +2945,20 @@ namespace WebsitePanel.EnterpriseServer { defaultGateway, comments}, this.AddIPAddressesRangeOperationCompleted, userState); } - - private void OnAddIPAddressesRangeOperationCompleted(object arg) { - if ((this.AddIPAddressesRangeCompleted != null)) { + + private void OnAddIPAddressesRangeOperationCompleted(object arg) + { + if ((this.AddIPAddressesRangeCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddIPAddressesRangeCompleted(this, new AddIPAddressesRangeCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateIPAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject UpdateIPAddress(int addressId, IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateIPAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject UpdateIPAddress(int addressId, IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments) + { object[] results = this.Invoke("UpdateIPAddress", new object[] { addressId, pool, @@ -2541,9 +2970,10 @@ namespace WebsitePanel.EnterpriseServer { comments}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateIPAddress(int addressId, IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateIPAddress(int addressId, IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateIPAddress", new object[] { addressId, pool, @@ -2554,21 +2984,25 @@ namespace WebsitePanel.EnterpriseServer { defaultGateway, comments}, callback, asyncState); } - + /// - public ResultObject EndUpdateIPAddress(System.IAsyncResult asyncResult) { + public ResultObject EndUpdateIPAddress(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void UpdateIPAddressAsync(int addressId, IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments) { + public void UpdateIPAddressAsync(int addressId, IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments) + { this.UpdateIPAddressAsync(addressId, pool, serverId, externalIP, internalIP, subnetMask, defaultGateway, comments, null); } - + /// - public void UpdateIPAddressAsync(int addressId, IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments, object userState) { - if ((this.UpdateIPAddressOperationCompleted == null)) { + public void UpdateIPAddressAsync(int addressId, IPAddressPool pool, int serverId, string externalIP, string internalIP, string subnetMask, string defaultGateway, string comments, object userState) + { + if ((this.UpdateIPAddressOperationCompleted == null)) + { this.UpdateIPAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateIPAddressOperationCompleted); } this.InvokeAsync("UpdateIPAddress", new object[] { @@ -2581,17 +3015,20 @@ namespace WebsitePanel.EnterpriseServer { defaultGateway, comments}, this.UpdateIPAddressOperationCompleted, userState); } - - private void OnUpdateIPAddressOperationCompleted(object arg) { - if ((this.UpdateIPAddressCompleted != null)) { + + private void OnUpdateIPAddressOperationCompleted(object arg) + { + if ((this.UpdateIPAddressCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateIPAddressCompleted(this, new UpdateIPAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateIPAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject UpdateIPAddresses(int[] addresses, IPAddressPool pool, int serverId, string subnetMask, string defaultGateway, string comments) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateIPAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject UpdateIPAddresses(int[] addresses, IPAddressPool pool, int serverId, string subnetMask, string defaultGateway, string comments) + { object[] results = this.Invoke("UpdateIPAddresses", new object[] { addresses, pool, @@ -2601,9 +3038,10 @@ namespace WebsitePanel.EnterpriseServer { comments}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateIPAddresses(int[] addresses, IPAddressPool pool, int serverId, string subnetMask, string defaultGateway, string comments, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateIPAddresses(int[] addresses, IPAddressPool pool, int serverId, string subnetMask, string defaultGateway, string comments, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateIPAddresses", new object[] { addresses, pool, @@ -2612,21 +3050,25 @@ namespace WebsitePanel.EnterpriseServer { defaultGateway, comments}, callback, asyncState); } - + /// - public ResultObject EndUpdateIPAddresses(System.IAsyncResult asyncResult) { + public ResultObject EndUpdateIPAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void UpdateIPAddressesAsync(int[] addresses, IPAddressPool pool, int serverId, string subnetMask, string defaultGateway, string comments) { + public void UpdateIPAddressesAsync(int[] addresses, IPAddressPool pool, int serverId, string subnetMask, string defaultGateway, string comments) + { this.UpdateIPAddressesAsync(addresses, pool, serverId, subnetMask, defaultGateway, comments, null); } - + /// - public void UpdateIPAddressesAsync(int[] addresses, IPAddressPool pool, int serverId, string subnetMask, string defaultGateway, string comments, object userState) { - if ((this.UpdateIPAddressesOperationCompleted == null)) { + public void UpdateIPAddressesAsync(int[] addresses, IPAddressPool pool, int serverId, string subnetMask, string defaultGateway, string comments, object userState) + { + if ((this.UpdateIPAddressesOperationCompleted == null)) + { this.UpdateIPAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateIPAddressesOperationCompleted); } this.InvokeAsync("UpdateIPAddresses", new object[] { @@ -2637,128 +3079,152 @@ namespace WebsitePanel.EnterpriseServer { defaultGateway, comments}, this.UpdateIPAddressesOperationCompleted, userState); } - - private void OnUpdateIPAddressesOperationCompleted(object arg) { - if ((this.UpdateIPAddressesCompleted != null)) { + + private void OnUpdateIPAddressesOperationCompleted(object arg) + { + if ((this.UpdateIPAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateIPAddressesCompleted(this, new UpdateIPAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteIPAddress", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject DeleteIPAddress(int addressId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteIPAddress", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject DeleteIPAddress(int addressId) + { object[] results = this.Invoke("DeleteIPAddress", new object[] { addressId}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteIPAddress(int addressId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteIPAddress(int addressId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteIPAddress", new object[] { addressId}, callback, asyncState); } - + /// - public ResultObject EndDeleteIPAddress(System.IAsyncResult asyncResult) { + public ResultObject EndDeleteIPAddress(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void DeleteIPAddressAsync(int addressId) { + public void DeleteIPAddressAsync(int addressId) + { this.DeleteIPAddressAsync(addressId, null); } - + /// - public void DeleteIPAddressAsync(int addressId, object userState) { - if ((this.DeleteIPAddressOperationCompleted == null)) { + public void DeleteIPAddressAsync(int addressId, object userState) + { + if ((this.DeleteIPAddressOperationCompleted == null)) + { this.DeleteIPAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteIPAddressOperationCompleted); } this.InvokeAsync("DeleteIPAddress", new object[] { addressId}, this.DeleteIPAddressOperationCompleted, userState); } - - private void OnDeleteIPAddressOperationCompleted(object arg) { - if ((this.DeleteIPAddressCompleted != null)) { + + private void OnDeleteIPAddressOperationCompleted(object arg) + { + if ((this.DeleteIPAddressCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteIPAddressCompleted(this, new DeleteIPAddressCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteIPAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject DeleteIPAddresses(int[] addresses) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteIPAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject DeleteIPAddresses(int[] addresses) + { object[] results = this.Invoke("DeleteIPAddresses", new object[] { addresses}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteIPAddresses(int[] addresses, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteIPAddresses(int[] addresses, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteIPAddresses", new object[] { addresses}, callback, asyncState); } - + /// - public ResultObject EndDeleteIPAddresses(System.IAsyncResult asyncResult) { + public ResultObject EndDeleteIPAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void DeleteIPAddressesAsync(int[] addresses) { + public void DeleteIPAddressesAsync(int[] addresses) + { this.DeleteIPAddressesAsync(addresses, null); } - + /// - public void DeleteIPAddressesAsync(int[] addresses, object userState) { - if ((this.DeleteIPAddressesOperationCompleted == null)) { + public void DeleteIPAddressesAsync(int[] addresses, object userState) + { + if ((this.DeleteIPAddressesOperationCompleted == null)) + { this.DeleteIPAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteIPAddressesOperationCompleted); } this.InvokeAsync("DeleteIPAddresses", new object[] { addresses}, this.DeleteIPAddressesOperationCompleted, userState); } - - private void OnDeleteIPAddressesOperationCompleted(object arg) { - if ((this.DeleteIPAddressesCompleted != null)) { + + private void OnDeleteIPAddressesOperationCompleted(object arg) + { + if ((this.DeleteIPAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteIPAddressesCompleted(this, new DeleteIPAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetUnallottedIPAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public IPAddressInfo[] GetUnallottedIPAddresses(int packageId, string groupName, IPAddressPool pool) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetUnallottedIPAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public IPAddressInfo[] GetUnallottedIPAddresses(int packageId, string groupName, IPAddressPool pool) + { object[] results = this.Invoke("GetUnallottedIPAddresses", new object[] { packageId, groupName, pool}); return ((IPAddressInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetUnallottedIPAddresses(int packageId, string groupName, IPAddressPool pool, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetUnallottedIPAddresses(int packageId, string groupName, IPAddressPool pool, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetUnallottedIPAddresses", new object[] { packageId, groupName, pool}, callback, asyncState); } - + /// - public IPAddressInfo[] EndGetUnallottedIPAddresses(System.IAsyncResult asyncResult) { + public IPAddressInfo[] EndGetUnallottedIPAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((IPAddressInfo[])(results[0])); } - + /// - public void GetUnallottedIPAddressesAsync(int packageId, string groupName, IPAddressPool pool) { + public void GetUnallottedIPAddressesAsync(int packageId, string groupName, IPAddressPool pool) + { this.GetUnallottedIPAddressesAsync(packageId, groupName, pool, null); } - + /// - public void GetUnallottedIPAddressesAsync(int packageId, string groupName, IPAddressPool pool, object userState) { - if ((this.GetUnallottedIPAddressesOperationCompleted == null)) { + public void GetUnallottedIPAddressesAsync(int packageId, string groupName, IPAddressPool pool, object userState) + { + if ((this.GetUnallottedIPAddressesOperationCompleted == null)) + { this.GetUnallottedIPAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetUnallottedIPAddressesOperationCompleted); } this.InvokeAsync("GetUnallottedIPAddresses", new object[] { @@ -2766,17 +3232,20 @@ namespace WebsitePanel.EnterpriseServer { groupName, pool}, this.GetUnallottedIPAddressesOperationCompleted, userState); } - - private void OnGetUnallottedIPAddressesOperationCompleted(object arg) { - if ((this.GetUnallottedIPAddressesCompleted != null)) { + + private void OnGetUnallottedIPAddressesOperationCompleted(object arg) + { + if ((this.GetUnallottedIPAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetUnallottedIPAddressesCompleted(this, new GetUnallottedIPAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPackageIPAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public PackageIPAddressesPaged GetPackageIPAddresses(int packageId, IPAddressPool pool, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPackageIPAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public PackageIPAddressesPaged GetPackageIPAddresses(int packageId, IPAddressPool pool, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive) + { object[] results = this.Invoke("GetPackageIPAddresses", new object[] { packageId, pool, @@ -2788,9 +3257,10 @@ namespace WebsitePanel.EnterpriseServer { recursive}); return ((PackageIPAddressesPaged)(results[0])); } - + /// - public System.IAsyncResult BeginGetPackageIPAddresses(int packageId, IPAddressPool pool, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetPackageIPAddresses(int packageId, IPAddressPool pool, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetPackageIPAddresses", new object[] { packageId, pool, @@ -2801,21 +3271,25 @@ namespace WebsitePanel.EnterpriseServer { maximumRows, recursive}, callback, asyncState); } - + /// - public PackageIPAddressesPaged EndGetPackageIPAddresses(System.IAsyncResult asyncResult) { + public PackageIPAddressesPaged EndGetPackageIPAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((PackageIPAddressesPaged)(results[0])); } - + /// - public void GetPackageIPAddressesAsync(int packageId, IPAddressPool pool, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive) { + public void GetPackageIPAddressesAsync(int packageId, IPAddressPool pool, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive) + { this.GetPackageIPAddressesAsync(packageId, pool, filterColumn, filterValue, sortColumn, startRow, maximumRows, recursive, null); } - + /// - public void GetPackageIPAddressesAsync(int packageId, IPAddressPool pool, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive, object userState) { - if ((this.GetPackageIPAddressesOperationCompleted == null)) { + public void GetPackageIPAddressesAsync(int packageId, IPAddressPool pool, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, bool recursive, object userState) + { + if ((this.GetPackageIPAddressesOperationCompleted == null)) + { this.GetPackageIPAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPackageIPAddressesOperationCompleted); } this.InvokeAsync("GetPackageIPAddresses", new object[] { @@ -2828,61 +3302,72 @@ namespace WebsitePanel.EnterpriseServer { maximumRows, recursive}, this.GetPackageIPAddressesOperationCompleted, userState); } - - private void OnGetPackageIPAddressesOperationCompleted(object arg) { - if ((this.GetPackageIPAddressesCompleted != null)) { + + private void OnGetPackageIPAddressesOperationCompleted(object arg) + { + if ((this.GetPackageIPAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPackageIPAddressesCompleted(this, new GetPackageIPAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPackageUnassignedIPAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public PackageIPAddress[] GetPackageUnassignedIPAddresses(int packageId, IPAddressPool pool) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetPackageUnassignedIPAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public PackageIPAddress[] GetPackageUnassignedIPAddresses(int packageId, IPAddressPool pool) + { object[] results = this.Invoke("GetPackageUnassignedIPAddresses", new object[] { packageId, pool}); return ((PackageIPAddress[])(results[0])); } - + /// - public System.IAsyncResult BeginGetPackageUnassignedIPAddresses(int packageId, IPAddressPool pool, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetPackageUnassignedIPAddresses(int packageId, IPAddressPool pool, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetPackageUnassignedIPAddresses", new object[] { packageId, pool}, callback, asyncState); } - + /// - public PackageIPAddress[] EndGetPackageUnassignedIPAddresses(System.IAsyncResult asyncResult) { + public PackageIPAddress[] EndGetPackageUnassignedIPAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((PackageIPAddress[])(results[0])); } - + /// - public void GetPackageUnassignedIPAddressesAsync(int packageId, IPAddressPool pool) { + public void GetPackageUnassignedIPAddressesAsync(int packageId, IPAddressPool pool) + { this.GetPackageUnassignedIPAddressesAsync(packageId, pool, null); } - + /// - public void GetPackageUnassignedIPAddressesAsync(int packageId, IPAddressPool pool, object userState) { - if ((this.GetPackageUnassignedIPAddressesOperationCompleted == null)) { + public void GetPackageUnassignedIPAddressesAsync(int packageId, IPAddressPool pool, object userState) + { + if ((this.GetPackageUnassignedIPAddressesOperationCompleted == null)) + { this.GetPackageUnassignedIPAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPackageUnassignedIPAddressesOperationCompleted); } this.InvokeAsync("GetPackageUnassignedIPAddresses", new object[] { packageId, pool}, this.GetPackageUnassignedIPAddressesOperationCompleted, userState); } - - private void OnGetPackageUnassignedIPAddressesOperationCompleted(object arg) { - if ((this.GetPackageUnassignedIPAddressesCompleted != null)) { + + private void OnGetPackageUnassignedIPAddressesOperationCompleted(object arg) + { + if ((this.GetPackageUnassignedIPAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetPackageUnassignedIPAddressesCompleted(this, new GetPackageUnassignedIPAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AllocatePackageIPAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject AllocatePackageIPAddresses(int packageId, string groupName, IPAddressPool pool, bool allocateRandom, int addressesNumber, int[] addressId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AllocatePackageIPAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject AllocatePackageIPAddresses(int packageId, string groupName, IPAddressPool pool, bool allocateRandom, int addressesNumber, int[] addressId) + { object[] results = this.Invoke("AllocatePackageIPAddresses", new object[] { packageId, groupName, @@ -2892,9 +3377,10 @@ namespace WebsitePanel.EnterpriseServer { addressId}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginAllocatePackageIPAddresses(int packageId, string groupName, IPAddressPool pool, bool allocateRandom, int addressesNumber, int[] addressId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAllocatePackageIPAddresses(int packageId, string groupName, IPAddressPool pool, bool allocateRandom, int addressesNumber, int[] addressId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AllocatePackageIPAddresses", new object[] { packageId, groupName, @@ -2903,21 +3389,25 @@ namespace WebsitePanel.EnterpriseServer { addressesNumber, addressId}, callback, asyncState); } - + /// - public ResultObject EndAllocatePackageIPAddresses(System.IAsyncResult asyncResult) { + public ResultObject EndAllocatePackageIPAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void AllocatePackageIPAddressesAsync(int packageId, string groupName, IPAddressPool pool, bool allocateRandom, int addressesNumber, int[] addressId) { + public void AllocatePackageIPAddressesAsync(int packageId, string groupName, IPAddressPool pool, bool allocateRandom, int addressesNumber, int[] addressId) + { this.AllocatePackageIPAddressesAsync(packageId, groupName, pool, allocateRandom, addressesNumber, addressId, null); } - + /// - public void AllocatePackageIPAddressesAsync(int packageId, string groupName, IPAddressPool pool, bool allocateRandom, int addressesNumber, int[] addressId, object userState) { - if ((this.AllocatePackageIPAddressesOperationCompleted == null)) { + public void AllocatePackageIPAddressesAsync(int packageId, string groupName, IPAddressPool pool, bool allocateRandom, int addressesNumber, int[] addressId, object userState) + { + if ((this.AllocatePackageIPAddressesOperationCompleted == null)) + { this.AllocatePackageIPAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAllocatePackageIPAddressesOperationCompleted); } this.InvokeAsync("AllocatePackageIPAddresses", new object[] { @@ -2928,46 +3418,54 @@ namespace WebsitePanel.EnterpriseServer { addressesNumber, addressId}, this.AllocatePackageIPAddressesOperationCompleted, userState); } - - private void OnAllocatePackageIPAddressesOperationCompleted(object arg) { - if ((this.AllocatePackageIPAddressesCompleted != null)) { + + private void OnAllocatePackageIPAddressesOperationCompleted(object arg) + { + if ((this.AllocatePackageIPAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AllocatePackageIPAddressesCompleted(this, new AllocatePackageIPAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AllocateMaximumPackageIPAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject AllocateMaximumPackageIPAddresses(int packageId, string groupName, IPAddressPool pool) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AllocateMaximumPackageIPAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject AllocateMaximumPackageIPAddresses(int packageId, string groupName, IPAddressPool pool) + { object[] results = this.Invoke("AllocateMaximumPackageIPAddresses", new object[] { packageId, groupName, pool}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginAllocateMaximumPackageIPAddresses(int packageId, string groupName, IPAddressPool pool, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAllocateMaximumPackageIPAddresses(int packageId, string groupName, IPAddressPool pool, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AllocateMaximumPackageIPAddresses", new object[] { packageId, groupName, pool}, callback, asyncState); } - + /// - public ResultObject EndAllocateMaximumPackageIPAddresses(System.IAsyncResult asyncResult) { + public ResultObject EndAllocateMaximumPackageIPAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void AllocateMaximumPackageIPAddressesAsync(int packageId, string groupName, IPAddressPool pool) { + public void AllocateMaximumPackageIPAddressesAsync(int packageId, string groupName, IPAddressPool pool) + { this.AllocateMaximumPackageIPAddressesAsync(packageId, groupName, pool, null); } - + /// - public void AllocateMaximumPackageIPAddressesAsync(int packageId, string groupName, IPAddressPool pool, object userState) { - if ((this.AllocateMaximumPackageIPAddressesOperationCompleted == null)) { + public void AllocateMaximumPackageIPAddressesAsync(int packageId, string groupName, IPAddressPool pool, object userState) + { + if ((this.AllocateMaximumPackageIPAddressesOperationCompleted == null)) + { this.AllocateMaximumPackageIPAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAllocateMaximumPackageIPAddressesOperationCompleted); } this.InvokeAsync("AllocateMaximumPackageIPAddresses", new object[] { @@ -2975,796 +3473,951 @@ namespace WebsitePanel.EnterpriseServer { groupName, pool}, this.AllocateMaximumPackageIPAddressesOperationCompleted, userState); } - - private void OnAllocateMaximumPackageIPAddressesOperationCompleted(object arg) { - if ((this.AllocateMaximumPackageIPAddressesCompleted != null)) { + + private void OnAllocateMaximumPackageIPAddressesOperationCompleted(object arg) + { + if ((this.AllocateMaximumPackageIPAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AllocateMaximumPackageIPAddressesCompleted(this, new AllocateMaximumPackageIPAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeallocatePackageIPAddresses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject DeallocatePackageIPAddresses(int packageId, int[] addressId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeallocatePackageIPAddresses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject DeallocatePackageIPAddresses(int packageId, int[] addressId) + { object[] results = this.Invoke("DeallocatePackageIPAddresses", new object[] { packageId, addressId}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginDeallocatePackageIPAddresses(int packageId, int[] addressId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeallocatePackageIPAddresses(int packageId, int[] addressId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeallocatePackageIPAddresses", new object[] { packageId, addressId}, callback, asyncState); } - + /// - public ResultObject EndDeallocatePackageIPAddresses(System.IAsyncResult asyncResult) { + public ResultObject EndDeallocatePackageIPAddresses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void DeallocatePackageIPAddressesAsync(int packageId, int[] addressId) { + public void DeallocatePackageIPAddressesAsync(int packageId, int[] addressId) + { this.DeallocatePackageIPAddressesAsync(packageId, addressId, null); } - + /// - public void DeallocatePackageIPAddressesAsync(int packageId, int[] addressId, object userState) { - if ((this.DeallocatePackageIPAddressesOperationCompleted == null)) { + public void DeallocatePackageIPAddressesAsync(int packageId, int[] addressId, object userState) + { + if ((this.DeallocatePackageIPAddressesOperationCompleted == null)) + { this.DeallocatePackageIPAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeallocatePackageIPAddressesOperationCompleted); } this.InvokeAsync("DeallocatePackageIPAddresses", new object[] { packageId, addressId}, this.DeallocatePackageIPAddressesOperationCompleted, userState); } - - private void OnDeallocatePackageIPAddressesOperationCompleted(object arg) { - if ((this.DeallocatePackageIPAddressesCompleted != null)) { + + private void OnDeallocatePackageIPAddressesOperationCompleted(object arg) + { + if ((this.DeallocatePackageIPAddressesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeallocatePackageIPAddressesCompleted(this, new DeallocatePackageIPAddressesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetClusters", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ClusterInfo[] GetClusters() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetClusters", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ClusterInfo[] GetClusters() + { object[] results = this.Invoke("GetClusters", new object[0]); return ((ClusterInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetClusters(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetClusters(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetClusters", new object[0], callback, asyncState); } - + /// - public ClusterInfo[] EndGetClusters(System.IAsyncResult asyncResult) { + public ClusterInfo[] EndGetClusters(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((ClusterInfo[])(results[0])); } - + /// - public void GetClustersAsync() { + public void GetClustersAsync() + { this.GetClustersAsync(null); } - + /// - public void GetClustersAsync(object userState) { - if ((this.GetClustersOperationCompleted == null)) { + public void GetClustersAsync(object userState) + { + if ((this.GetClustersOperationCompleted == null)) + { this.GetClustersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetClustersOperationCompleted); } this.InvokeAsync("GetClusters", new object[0], this.GetClustersOperationCompleted, userState); } - - private void OnGetClustersOperationCompleted(object arg) { - if ((this.GetClustersCompleted != null)) { + + private void OnGetClustersOperationCompleted(object arg) + { + if ((this.GetClustersCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetClustersCompleted(this, new GetClustersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddCluster", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddCluster(ClusterInfo cluster) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddCluster", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddCluster(ClusterInfo cluster) + { object[] results = this.Invoke("AddCluster", new object[] { cluster}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddCluster(ClusterInfo cluster, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddCluster(ClusterInfo cluster, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddCluster", new object[] { cluster}, callback, asyncState); } - + /// - public int EndAddCluster(System.IAsyncResult asyncResult) { + public int EndAddCluster(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddClusterAsync(ClusterInfo cluster) { + public void AddClusterAsync(ClusterInfo cluster) + { this.AddClusterAsync(cluster, null); } - + /// - public void AddClusterAsync(ClusterInfo cluster, object userState) { - if ((this.AddClusterOperationCompleted == null)) { + public void AddClusterAsync(ClusterInfo cluster, object userState) + { + if ((this.AddClusterOperationCompleted == null)) + { this.AddClusterOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddClusterOperationCompleted); } this.InvokeAsync("AddCluster", new object[] { cluster}, this.AddClusterOperationCompleted, userState); } - - private void OnAddClusterOperationCompleted(object arg) { - if ((this.AddClusterCompleted != null)) { + + private void OnAddClusterOperationCompleted(object arg) + { + if ((this.AddClusterCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddClusterCompleted(this, new AddClusterCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteCluster", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteCluster(int clusterId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteCluster", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteCluster(int clusterId) + { object[] results = this.Invoke("DeleteCluster", new object[] { clusterId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteCluster(int clusterId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteCluster(int clusterId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteCluster", new object[] { clusterId}, callback, asyncState); } - + /// - public int EndDeleteCluster(System.IAsyncResult asyncResult) { + public int EndDeleteCluster(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteClusterAsync(int clusterId) { + public void DeleteClusterAsync(int clusterId) + { this.DeleteClusterAsync(clusterId, null); } - + /// - public void DeleteClusterAsync(int clusterId, object userState) { - if ((this.DeleteClusterOperationCompleted == null)) { + public void DeleteClusterAsync(int clusterId, object userState) + { + if ((this.DeleteClusterOperationCompleted == null)) + { this.DeleteClusterOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteClusterOperationCompleted); } this.InvokeAsync("DeleteCluster", new object[] { clusterId}, this.DeleteClusterOperationCompleted, userState); } - - private void OnDeleteClusterOperationCompleted(object arg) { - if ((this.DeleteClusterCompleted != null)) { + + private void OnDeleteClusterOperationCompleted(object arg) + { + if ((this.DeleteClusterCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteClusterCompleted(this, new DeleteClusterCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawDnsRecordsByService", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawDnsRecordsByService(int serviceId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawDnsRecordsByService", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawDnsRecordsByService(int serviceId) + { object[] results = this.Invoke("GetRawDnsRecordsByService", new object[] { serviceId}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawDnsRecordsByService(int serviceId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawDnsRecordsByService(int serviceId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawDnsRecordsByService", new object[] { serviceId}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawDnsRecordsByService(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawDnsRecordsByService(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawDnsRecordsByServiceAsync(int serviceId) { + public void GetRawDnsRecordsByServiceAsync(int serviceId) + { this.GetRawDnsRecordsByServiceAsync(serviceId, null); } - + /// - public void GetRawDnsRecordsByServiceAsync(int serviceId, object userState) { - if ((this.GetRawDnsRecordsByServiceOperationCompleted == null)) { + public void GetRawDnsRecordsByServiceAsync(int serviceId, object userState) + { + if ((this.GetRawDnsRecordsByServiceOperationCompleted == null)) + { this.GetRawDnsRecordsByServiceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawDnsRecordsByServiceOperationCompleted); } this.InvokeAsync("GetRawDnsRecordsByService", new object[] { serviceId}, this.GetRawDnsRecordsByServiceOperationCompleted, userState); } - - private void OnGetRawDnsRecordsByServiceOperationCompleted(object arg) { - if ((this.GetRawDnsRecordsByServiceCompleted != null)) { + + private void OnGetRawDnsRecordsByServiceOperationCompleted(object arg) + { + if ((this.GetRawDnsRecordsByServiceCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawDnsRecordsByServiceCompleted(this, new GetRawDnsRecordsByServiceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawDnsRecordsByServer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawDnsRecordsByServer(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawDnsRecordsByServer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawDnsRecordsByServer(int serverId) + { object[] results = this.Invoke("GetRawDnsRecordsByServer", new object[] { serverId}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawDnsRecordsByServer(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawDnsRecordsByServer(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawDnsRecordsByServer", new object[] { serverId}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawDnsRecordsByServer(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawDnsRecordsByServer(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawDnsRecordsByServerAsync(int serverId) { + public void GetRawDnsRecordsByServerAsync(int serverId) + { this.GetRawDnsRecordsByServerAsync(serverId, null); } - + /// - public void GetRawDnsRecordsByServerAsync(int serverId, object userState) { - if ((this.GetRawDnsRecordsByServerOperationCompleted == null)) { + public void GetRawDnsRecordsByServerAsync(int serverId, object userState) + { + if ((this.GetRawDnsRecordsByServerOperationCompleted == null)) + { this.GetRawDnsRecordsByServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawDnsRecordsByServerOperationCompleted); } this.InvokeAsync("GetRawDnsRecordsByServer", new object[] { serverId}, this.GetRawDnsRecordsByServerOperationCompleted, userState); } - - private void OnGetRawDnsRecordsByServerOperationCompleted(object arg) { - if ((this.GetRawDnsRecordsByServerCompleted != null)) { + + private void OnGetRawDnsRecordsByServerOperationCompleted(object arg) + { + if ((this.GetRawDnsRecordsByServerCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawDnsRecordsByServerCompleted(this, new GetRawDnsRecordsByServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawDnsRecordsByPackage", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawDnsRecordsByPackage(int packageId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawDnsRecordsByPackage", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawDnsRecordsByPackage(int packageId) + { object[] results = this.Invoke("GetRawDnsRecordsByPackage", new object[] { packageId}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawDnsRecordsByPackage(int packageId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawDnsRecordsByPackage(int packageId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawDnsRecordsByPackage", new object[] { packageId}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawDnsRecordsByPackage(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawDnsRecordsByPackage(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawDnsRecordsByPackageAsync(int packageId) { + public void GetRawDnsRecordsByPackageAsync(int packageId) + { this.GetRawDnsRecordsByPackageAsync(packageId, null); } - + /// - public void GetRawDnsRecordsByPackageAsync(int packageId, object userState) { - if ((this.GetRawDnsRecordsByPackageOperationCompleted == null)) { + public void GetRawDnsRecordsByPackageAsync(int packageId, object userState) + { + if ((this.GetRawDnsRecordsByPackageOperationCompleted == null)) + { this.GetRawDnsRecordsByPackageOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawDnsRecordsByPackageOperationCompleted); } this.InvokeAsync("GetRawDnsRecordsByPackage", new object[] { packageId}, this.GetRawDnsRecordsByPackageOperationCompleted, userState); } - - private void OnGetRawDnsRecordsByPackageOperationCompleted(object arg) { - if ((this.GetRawDnsRecordsByPackageCompleted != null)) { + + private void OnGetRawDnsRecordsByPackageOperationCompleted(object arg) + { + if ((this.GetRawDnsRecordsByPackageCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawDnsRecordsByPackageCompleted(this, new GetRawDnsRecordsByPackageCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawDnsRecordsByGroup", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawDnsRecordsByGroup(int groupId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawDnsRecordsByGroup", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawDnsRecordsByGroup(int groupId) + { object[] results = this.Invoke("GetRawDnsRecordsByGroup", new object[] { groupId}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawDnsRecordsByGroup(int groupId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawDnsRecordsByGroup(int groupId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawDnsRecordsByGroup", new object[] { groupId}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawDnsRecordsByGroup(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawDnsRecordsByGroup(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawDnsRecordsByGroupAsync(int groupId) { + public void GetRawDnsRecordsByGroupAsync(int groupId) + { this.GetRawDnsRecordsByGroupAsync(groupId, null); } - + /// - public void GetRawDnsRecordsByGroupAsync(int groupId, object userState) { - if ((this.GetRawDnsRecordsByGroupOperationCompleted == null)) { + public void GetRawDnsRecordsByGroupAsync(int groupId, object userState) + { + if ((this.GetRawDnsRecordsByGroupOperationCompleted == null)) + { this.GetRawDnsRecordsByGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawDnsRecordsByGroupOperationCompleted); } this.InvokeAsync("GetRawDnsRecordsByGroup", new object[] { groupId}, this.GetRawDnsRecordsByGroupOperationCompleted, userState); } - - private void OnGetRawDnsRecordsByGroupOperationCompleted(object arg) { - if ((this.GetRawDnsRecordsByGroupCompleted != null)) { + + private void OnGetRawDnsRecordsByGroupOperationCompleted(object arg) + { + if ((this.GetRawDnsRecordsByGroupCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawDnsRecordsByGroupCompleted(this, new GetRawDnsRecordsByGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDnsRecordsByService", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public GlobalDnsRecord[] GetDnsRecordsByService(int serviceId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDnsRecordsByService", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public GlobalDnsRecord[] GetDnsRecordsByService(int serviceId) + { object[] results = this.Invoke("GetDnsRecordsByService", new object[] { serviceId}); return ((GlobalDnsRecord[])(results[0])); } - + /// - public System.IAsyncResult BeginGetDnsRecordsByService(int serviceId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDnsRecordsByService(int serviceId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDnsRecordsByService", new object[] { serviceId}, callback, asyncState); } - + /// - public GlobalDnsRecord[] EndGetDnsRecordsByService(System.IAsyncResult asyncResult) { + public GlobalDnsRecord[] EndGetDnsRecordsByService(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((GlobalDnsRecord[])(results[0])); } - + /// - public void GetDnsRecordsByServiceAsync(int serviceId) { + public void GetDnsRecordsByServiceAsync(int serviceId) + { this.GetDnsRecordsByServiceAsync(serviceId, null); } - + /// - public void GetDnsRecordsByServiceAsync(int serviceId, object userState) { - if ((this.GetDnsRecordsByServiceOperationCompleted == null)) { + public void GetDnsRecordsByServiceAsync(int serviceId, object userState) + { + if ((this.GetDnsRecordsByServiceOperationCompleted == null)) + { this.GetDnsRecordsByServiceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDnsRecordsByServiceOperationCompleted); } this.InvokeAsync("GetDnsRecordsByService", new object[] { serviceId}, this.GetDnsRecordsByServiceOperationCompleted, userState); } - - private void OnGetDnsRecordsByServiceOperationCompleted(object arg) { - if ((this.GetDnsRecordsByServiceCompleted != null)) { + + private void OnGetDnsRecordsByServiceOperationCompleted(object arg) + { + if ((this.GetDnsRecordsByServiceCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDnsRecordsByServiceCompleted(this, new GetDnsRecordsByServiceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDnsRecordsByServer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public GlobalDnsRecord[] GetDnsRecordsByServer(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDnsRecordsByServer", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public GlobalDnsRecord[] GetDnsRecordsByServer(int serverId) + { object[] results = this.Invoke("GetDnsRecordsByServer", new object[] { serverId}); return ((GlobalDnsRecord[])(results[0])); } - + /// - public System.IAsyncResult BeginGetDnsRecordsByServer(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDnsRecordsByServer(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDnsRecordsByServer", new object[] { serverId}, callback, asyncState); } - + /// - public GlobalDnsRecord[] EndGetDnsRecordsByServer(System.IAsyncResult asyncResult) { + public GlobalDnsRecord[] EndGetDnsRecordsByServer(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((GlobalDnsRecord[])(results[0])); } - + /// - public void GetDnsRecordsByServerAsync(int serverId) { + public void GetDnsRecordsByServerAsync(int serverId) + { this.GetDnsRecordsByServerAsync(serverId, null); } - + /// - public void GetDnsRecordsByServerAsync(int serverId, object userState) { - if ((this.GetDnsRecordsByServerOperationCompleted == null)) { + public void GetDnsRecordsByServerAsync(int serverId, object userState) + { + if ((this.GetDnsRecordsByServerOperationCompleted == null)) + { this.GetDnsRecordsByServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDnsRecordsByServerOperationCompleted); } this.InvokeAsync("GetDnsRecordsByServer", new object[] { serverId}, this.GetDnsRecordsByServerOperationCompleted, userState); } - - private void OnGetDnsRecordsByServerOperationCompleted(object arg) { - if ((this.GetDnsRecordsByServerCompleted != null)) { + + private void OnGetDnsRecordsByServerOperationCompleted(object arg) + { + if ((this.GetDnsRecordsByServerCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDnsRecordsByServerCompleted(this, new GetDnsRecordsByServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDnsRecordsByPackage", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public GlobalDnsRecord[] GetDnsRecordsByPackage(int packageId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDnsRecordsByPackage", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public GlobalDnsRecord[] GetDnsRecordsByPackage(int packageId) + { object[] results = this.Invoke("GetDnsRecordsByPackage", new object[] { packageId}); return ((GlobalDnsRecord[])(results[0])); } - + /// - public System.IAsyncResult BeginGetDnsRecordsByPackage(int packageId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDnsRecordsByPackage(int packageId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDnsRecordsByPackage", new object[] { packageId}, callback, asyncState); } - + /// - public GlobalDnsRecord[] EndGetDnsRecordsByPackage(System.IAsyncResult asyncResult) { + public GlobalDnsRecord[] EndGetDnsRecordsByPackage(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((GlobalDnsRecord[])(results[0])); } - + /// - public void GetDnsRecordsByPackageAsync(int packageId) { + public void GetDnsRecordsByPackageAsync(int packageId) + { this.GetDnsRecordsByPackageAsync(packageId, null); } - + /// - public void GetDnsRecordsByPackageAsync(int packageId, object userState) { - if ((this.GetDnsRecordsByPackageOperationCompleted == null)) { + public void GetDnsRecordsByPackageAsync(int packageId, object userState) + { + if ((this.GetDnsRecordsByPackageOperationCompleted == null)) + { this.GetDnsRecordsByPackageOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDnsRecordsByPackageOperationCompleted); } this.InvokeAsync("GetDnsRecordsByPackage", new object[] { packageId}, this.GetDnsRecordsByPackageOperationCompleted, userState); } - - private void OnGetDnsRecordsByPackageOperationCompleted(object arg) { - if ((this.GetDnsRecordsByPackageCompleted != null)) { + + private void OnGetDnsRecordsByPackageOperationCompleted(object arg) + { + if ((this.GetDnsRecordsByPackageCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDnsRecordsByPackageCompleted(this, new GetDnsRecordsByPackageCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDnsRecordsByGroup", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public GlobalDnsRecord[] GetDnsRecordsByGroup(int groupId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDnsRecordsByGroup", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public GlobalDnsRecord[] GetDnsRecordsByGroup(int groupId) + { object[] results = this.Invoke("GetDnsRecordsByGroup", new object[] { groupId}); return ((GlobalDnsRecord[])(results[0])); } - + /// - public System.IAsyncResult BeginGetDnsRecordsByGroup(int groupId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDnsRecordsByGroup(int groupId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDnsRecordsByGroup", new object[] { groupId}, callback, asyncState); } - + /// - public GlobalDnsRecord[] EndGetDnsRecordsByGroup(System.IAsyncResult asyncResult) { + public GlobalDnsRecord[] EndGetDnsRecordsByGroup(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((GlobalDnsRecord[])(results[0])); } - + /// - public void GetDnsRecordsByGroupAsync(int groupId) { + public void GetDnsRecordsByGroupAsync(int groupId) + { this.GetDnsRecordsByGroupAsync(groupId, null); } - + /// - public void GetDnsRecordsByGroupAsync(int groupId, object userState) { - if ((this.GetDnsRecordsByGroupOperationCompleted == null)) { + public void GetDnsRecordsByGroupAsync(int groupId, object userState) + { + if ((this.GetDnsRecordsByGroupOperationCompleted == null)) + { this.GetDnsRecordsByGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDnsRecordsByGroupOperationCompleted); } this.InvokeAsync("GetDnsRecordsByGroup", new object[] { groupId}, this.GetDnsRecordsByGroupOperationCompleted, userState); } - - private void OnGetDnsRecordsByGroupOperationCompleted(object arg) { - if ((this.GetDnsRecordsByGroupCompleted != null)) { + + private void OnGetDnsRecordsByGroupOperationCompleted(object arg) + { + if ((this.GetDnsRecordsByGroupCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDnsRecordsByGroupCompleted(this, new GetDnsRecordsByGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDnsRecord", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public GlobalDnsRecord GetDnsRecord(int recordId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDnsRecord", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public GlobalDnsRecord GetDnsRecord(int recordId) + { object[] results = this.Invoke("GetDnsRecord", new object[] { recordId}); return ((GlobalDnsRecord)(results[0])); } - + /// - public System.IAsyncResult BeginGetDnsRecord(int recordId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDnsRecord(int recordId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDnsRecord", new object[] { recordId}, callback, asyncState); } - + /// - public GlobalDnsRecord EndGetDnsRecord(System.IAsyncResult asyncResult) { + public GlobalDnsRecord EndGetDnsRecord(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((GlobalDnsRecord)(results[0])); } - + /// - public void GetDnsRecordAsync(int recordId) { + public void GetDnsRecordAsync(int recordId) + { this.GetDnsRecordAsync(recordId, null); } - + /// - public void GetDnsRecordAsync(int recordId, object userState) { - if ((this.GetDnsRecordOperationCompleted == null)) { + public void GetDnsRecordAsync(int recordId, object userState) + { + if ((this.GetDnsRecordOperationCompleted == null)) + { this.GetDnsRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDnsRecordOperationCompleted); } this.InvokeAsync("GetDnsRecord", new object[] { recordId}, this.GetDnsRecordOperationCompleted, userState); } - - private void OnGetDnsRecordOperationCompleted(object arg) { - if ((this.GetDnsRecordCompleted != null)) { + + private void OnGetDnsRecordOperationCompleted(object arg) + { + if ((this.GetDnsRecordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDnsRecordCompleted(this, new GetDnsRecordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDnsRecord", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddDnsRecord(GlobalDnsRecord record) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDnsRecord", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddDnsRecord(GlobalDnsRecord record) + { object[] results = this.Invoke("AddDnsRecord", new object[] { record}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddDnsRecord(GlobalDnsRecord record, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddDnsRecord(GlobalDnsRecord record, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddDnsRecord", new object[] { record}, callback, asyncState); } - + /// - public int EndAddDnsRecord(System.IAsyncResult asyncResult) { + public int EndAddDnsRecord(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddDnsRecordAsync(GlobalDnsRecord record) { + public void AddDnsRecordAsync(GlobalDnsRecord record) + { this.AddDnsRecordAsync(record, null); } - + /// - public void AddDnsRecordAsync(GlobalDnsRecord record, object userState) { - if ((this.AddDnsRecordOperationCompleted == null)) { + public void AddDnsRecordAsync(GlobalDnsRecord record, object userState) + { + if ((this.AddDnsRecordOperationCompleted == null)) + { this.AddDnsRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddDnsRecordOperationCompleted); } this.InvokeAsync("AddDnsRecord", new object[] { record}, this.AddDnsRecordOperationCompleted, userState); } - - private void OnAddDnsRecordOperationCompleted(object arg) { - if ((this.AddDnsRecordCompleted != null)) { + + private void OnAddDnsRecordOperationCompleted(object arg) + { + if ((this.AddDnsRecordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddDnsRecordCompleted(this, new AddDnsRecordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateDnsRecord", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int UpdateDnsRecord(GlobalDnsRecord record) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateDnsRecord", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateDnsRecord(GlobalDnsRecord record) + { object[] results = this.Invoke("UpdateDnsRecord", new object[] { record}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateDnsRecord(GlobalDnsRecord record, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateDnsRecord(GlobalDnsRecord record, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateDnsRecord", new object[] { record}, callback, asyncState); } - + /// - public int EndUpdateDnsRecord(System.IAsyncResult asyncResult) { + public int EndUpdateDnsRecord(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void UpdateDnsRecordAsync(GlobalDnsRecord record) { + public void UpdateDnsRecordAsync(GlobalDnsRecord record) + { this.UpdateDnsRecordAsync(record, null); } - + /// - public void UpdateDnsRecordAsync(GlobalDnsRecord record, object userState) { - if ((this.UpdateDnsRecordOperationCompleted == null)) { + public void UpdateDnsRecordAsync(GlobalDnsRecord record, object userState) + { + if ((this.UpdateDnsRecordOperationCompleted == null)) + { this.UpdateDnsRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateDnsRecordOperationCompleted); } this.InvokeAsync("UpdateDnsRecord", new object[] { record}, this.UpdateDnsRecordOperationCompleted, userState); } - - private void OnUpdateDnsRecordOperationCompleted(object arg) { - if ((this.UpdateDnsRecordCompleted != null)) { + + private void OnUpdateDnsRecordOperationCompleted(object arg) + { + if ((this.UpdateDnsRecordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateDnsRecordCompleted(this, new UpdateDnsRecordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDnsRecord", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteDnsRecord(int recordId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDnsRecord", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteDnsRecord(int recordId) + { object[] results = this.Invoke("DeleteDnsRecord", new object[] { recordId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteDnsRecord(int recordId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteDnsRecord(int recordId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteDnsRecord", new object[] { recordId}, callback, asyncState); } - + /// - public int EndDeleteDnsRecord(System.IAsyncResult asyncResult) { + public int EndDeleteDnsRecord(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteDnsRecordAsync(int recordId) { + public void DeleteDnsRecordAsync(int recordId) + { this.DeleteDnsRecordAsync(recordId, null); } - + /// - public void DeleteDnsRecordAsync(int recordId, object userState) { - if ((this.DeleteDnsRecordOperationCompleted == null)) { + public void DeleteDnsRecordAsync(int recordId, object userState) + { + if ((this.DeleteDnsRecordOperationCompleted == null)) + { this.DeleteDnsRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDnsRecordOperationCompleted); } this.InvokeAsync("DeleteDnsRecord", new object[] { recordId}, this.DeleteDnsRecordOperationCompleted, userState); } - - private void OnDeleteDnsRecordOperationCompleted(object arg) { - if ((this.DeleteDnsRecordCompleted != null)) { + + private void OnDeleteDnsRecordOperationCompleted(object arg) + { + if ((this.DeleteDnsRecordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteDnsRecordCompleted(this, new DeleteDnsRecordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDomains", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public DomainInfo[] GetDomains(int packageId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDomains", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public DomainInfo[] GetDomains(int packageId) + { object[] results = this.Invoke("GetDomains", new object[] { packageId}); return ((DomainInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetDomains(int packageId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDomains(int packageId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDomains", new object[] { packageId}, callback, asyncState); } - + /// - public DomainInfo[] EndGetDomains(System.IAsyncResult asyncResult) { + public DomainInfo[] EndGetDomains(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((DomainInfo[])(results[0])); } - + /// - public void GetDomainsAsync(int packageId) { + public void GetDomainsAsync(int packageId) + { this.GetDomainsAsync(packageId, null); } - + /// - public void GetDomainsAsync(int packageId, object userState) { - if ((this.GetDomainsOperationCompleted == null)) { + public void GetDomainsAsync(int packageId, object userState) + { + if ((this.GetDomainsOperationCompleted == null)) + { this.GetDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDomainsOperationCompleted); } this.InvokeAsync("GetDomains", new object[] { packageId}, this.GetDomainsOperationCompleted, userState); } - - private void OnGetDomainsOperationCompleted(object arg) { - if ((this.GetDomainsCompleted != null)) { + + private void OnGetDomainsOperationCompleted(object arg) + { + if ((this.GetDomainsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDomainsCompleted(this, new GetDomainsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMyDomains", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public DomainInfo[] GetMyDomains(int packageId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetMyDomains", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public DomainInfo[] GetMyDomains(int packageId) + { object[] results = this.Invoke("GetMyDomains", new object[] { packageId}); return ((DomainInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetMyDomains(int packageId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetMyDomains(int packageId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetMyDomains", new object[] { packageId}, callback, asyncState); } - + /// - public DomainInfo[] EndGetMyDomains(System.IAsyncResult asyncResult) { + public DomainInfo[] EndGetMyDomains(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((DomainInfo[])(results[0])); } - + /// - public void GetMyDomainsAsync(int packageId) { + public void GetMyDomainsAsync(int packageId) + { this.GetMyDomainsAsync(packageId, null); } - + /// - public void GetMyDomainsAsync(int packageId, object userState) { - if ((this.GetMyDomainsOperationCompleted == null)) { + public void GetMyDomainsAsync(int packageId, object userState) + { + if ((this.GetMyDomainsOperationCompleted == null)) + { this.GetMyDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetMyDomainsOperationCompleted); } this.InvokeAsync("GetMyDomains", new object[] { packageId}, this.GetMyDomainsOperationCompleted, userState); } - - private void OnGetMyDomainsOperationCompleted(object arg) { - if ((this.GetMyDomainsCompleted != null)) { + + private void OnGetMyDomainsOperationCompleted(object arg) + { + if ((this.GetMyDomainsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetMyDomainsCompleted(this, new GetMyDomainsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetResellerDomains", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public DomainInfo[] GetResellerDomains(int packageId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetResellerDomains", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public DomainInfo[] GetResellerDomains(int packageId) + { object[] results = this.Invoke("GetResellerDomains", new object[] { packageId}); return ((DomainInfo[])(results[0])); } - + /// - public System.IAsyncResult BeginGetResellerDomains(int packageId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetResellerDomains(int packageId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetResellerDomains", new object[] { packageId}, callback, asyncState); } - + /// - public DomainInfo[] EndGetResellerDomains(System.IAsyncResult asyncResult) { + public DomainInfo[] EndGetResellerDomains(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((DomainInfo[])(results[0])); } - + /// - public void GetResellerDomainsAsync(int packageId) { + public void GetResellerDomainsAsync(int packageId) + { this.GetResellerDomainsAsync(packageId, null); } - + /// - public void GetResellerDomainsAsync(int packageId, object userState) { - if ((this.GetResellerDomainsOperationCompleted == null)) { + public void GetResellerDomainsAsync(int packageId, object userState) + { + if ((this.GetResellerDomainsOperationCompleted == null)) + { this.GetResellerDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetResellerDomainsOperationCompleted); } this.InvokeAsync("GetResellerDomains", new object[] { packageId}, this.GetResellerDomainsOperationCompleted, userState); } - - private void OnGetResellerDomainsOperationCompleted(object arg) { - if ((this.GetResellerDomainsCompleted != null)) { + + private void OnGetResellerDomainsOperationCompleted(object arg) + { + if ((this.GetResellerDomainsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetResellerDomainsCompleted(this, new GetResellerDomainsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDomainsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetDomainsPaged(int packageId, int serverId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDomainsPaged", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetDomainsPaged(int packageId, int serverId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { object[] results = this.Invoke("GetDomainsPaged", new object[] { packageId, serverId, @@ -3776,9 +4429,10 @@ namespace WebsitePanel.EnterpriseServer { maximumRows}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetDomainsPaged(int packageId, int serverId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDomainsPaged(int packageId, int serverId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDomainsPaged", new object[] { packageId, serverId, @@ -3789,21 +4443,25 @@ namespace WebsitePanel.EnterpriseServer { startRow, maximumRows}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetDomainsPaged(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetDomainsPaged(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetDomainsPagedAsync(int packageId, int serverId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + public void GetDomainsPagedAsync(int packageId, int serverId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { this.GetDomainsPagedAsync(packageId, serverId, recursive, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); } - + /// - public void GetDomainsPagedAsync(int packageId, int serverId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { - if ((this.GetDomainsPagedOperationCompleted == null)) { + public void GetDomainsPagedAsync(int packageId, int serverId, bool recursive, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) + { + if ((this.GetDomainsPagedOperationCompleted == null)) + { this.GetDomainsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDomainsPagedOperationCompleted); } this.InvokeAsync("GetDomainsPaged", new object[] { @@ -3816,99 +4474,118 @@ namespace WebsitePanel.EnterpriseServer { startRow, maximumRows}, this.GetDomainsPagedOperationCompleted, userState); } - - private void OnGetDomainsPagedOperationCompleted(object arg) { - if ((this.GetDomainsPagedCompleted != null)) { + + private void OnGetDomainsPagedOperationCompleted(object arg) + { + if ((this.GetDomainsPagedCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDomainsPagedCompleted(this, new GetDomainsPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDomain", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public DomainInfo GetDomain(int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDomain", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public DomainInfo GetDomain(int domainId) + { object[] results = this.Invoke("GetDomain", new object[] { domainId}); return ((DomainInfo)(results[0])); } - + /// - public System.IAsyncResult BeginGetDomain(int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDomain(int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDomain", new object[] { domainId}, callback, asyncState); } - + /// - public DomainInfo EndGetDomain(System.IAsyncResult asyncResult) { + public DomainInfo EndGetDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((DomainInfo)(results[0])); } - + /// - public void GetDomainAsync(int domainId) { + public void GetDomainAsync(int domainId) + { this.GetDomainAsync(domainId, null); } - + /// - public void GetDomainAsync(int domainId, object userState) { - if ((this.GetDomainOperationCompleted == null)) { + public void GetDomainAsync(int domainId, object userState) + { + if ((this.GetDomainOperationCompleted == null)) + { this.GetDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDomainOperationCompleted); } this.InvokeAsync("GetDomain", new object[] { domainId}, this.GetDomainOperationCompleted, userState); } - - private void OnGetDomainOperationCompleted(object arg) { - if ((this.GetDomainCompleted != null)) { + + private void OnGetDomainOperationCompleted(object arg) + { + if ((this.GetDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDomainCompleted(this, new GetDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDomain", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddDomain(DomainInfo domain) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDomain", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddDomain(DomainInfo domain) + { object[] results = this.Invoke("AddDomain", new object[] { domain}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddDomain(DomainInfo domain, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddDomain(DomainInfo domain, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddDomain", new object[] { domain}, callback, asyncState); } - + /// - public int EndAddDomain(System.IAsyncResult asyncResult) { + public int EndAddDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddDomainAsync(DomainInfo domain) { + public void AddDomainAsync(DomainInfo domain) + { this.AddDomainAsync(domain, null); } - + /// - public void AddDomainAsync(DomainInfo domain, object userState) { - if ((this.AddDomainOperationCompleted == null)) { + public void AddDomainAsync(DomainInfo domain, object userState) + { + if ((this.AddDomainOperationCompleted == null)) + { this.AddDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddDomainOperationCompleted); } this.InvokeAsync("AddDomain", new object[] { domain}, this.AddDomainOperationCompleted, userState); } - - private void OnAddDomainOperationCompleted(object arg) { - if ((this.AddDomainCompleted != null)) { + + private void OnAddDomainOperationCompleted(object arg) + { + if ((this.AddDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddDomainCompleted(this, new AddDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDomainWithProvisioning", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddDomainWithProvisioning(int packageId, string domainName, DomainType domainType, bool createWebSite, int pointWebSiteId, int pointMailDomainId, bool createDnsZone, bool createInstantAlias, bool allowSubDomains) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDomainWithProvisioning", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddDomainWithProvisioning(int packageId, string domainName, DomainType domainType, bool createWebSite, int pointWebSiteId, int pointMailDomainId, bool createDnsZone, bool createInstantAlias, bool allowSubDomains) + { object[] results = this.Invoke("AddDomainWithProvisioning", new object[] { packageId, domainName, @@ -3921,9 +4598,10 @@ namespace WebsitePanel.EnterpriseServer { allowSubDomains}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddDomainWithProvisioning(int packageId, string domainName, DomainType domainType, bool createWebSite, int pointWebSiteId, int pointMailDomainId, bool createDnsZone, bool createInstantAlias, bool allowSubDomains, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddDomainWithProvisioning(int packageId, string domainName, DomainType domainType, bool createWebSite, int pointWebSiteId, int pointMailDomainId, bool createDnsZone, bool createInstantAlias, bool allowSubDomains, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddDomainWithProvisioning", new object[] { packageId, domainName, @@ -3935,21 +4613,25 @@ namespace WebsitePanel.EnterpriseServer { createInstantAlias, allowSubDomains}, callback, asyncState); } - + /// - public int EndAddDomainWithProvisioning(System.IAsyncResult asyncResult) { + public int EndAddDomainWithProvisioning(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddDomainWithProvisioningAsync(int packageId, string domainName, DomainType domainType, bool createWebSite, int pointWebSiteId, int pointMailDomainId, bool createDnsZone, bool createInstantAlias, bool allowSubDomains) { + public void AddDomainWithProvisioningAsync(int packageId, string domainName, DomainType domainType, bool createWebSite, int pointWebSiteId, int pointMailDomainId, bool createDnsZone, bool createInstantAlias, bool allowSubDomains) + { this.AddDomainWithProvisioningAsync(packageId, domainName, domainType, createWebSite, pointWebSiteId, pointMailDomainId, createDnsZone, createInstantAlias, allowSubDomains, null); } - + /// - public void AddDomainWithProvisioningAsync(int packageId, string domainName, DomainType domainType, bool createWebSite, int pointWebSiteId, int pointMailDomainId, bool createDnsZone, bool createInstantAlias, bool allowSubDomains, object userState) { - if ((this.AddDomainWithProvisioningOperationCompleted == null)) { + public void AddDomainWithProvisioningAsync(int packageId, string domainName, DomainType domainType, bool createWebSite, int pointWebSiteId, int pointMailDomainId, bool createDnsZone, bool createInstantAlias, bool allowSubDomains, object userState) + { + if ((this.AddDomainWithProvisioningOperationCompleted == null)) + { this.AddDomainWithProvisioningOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddDomainWithProvisioningOperationCompleted); } this.InvokeAsync("AddDomainWithProvisioning", new object[] { @@ -3963,419 +4645,508 @@ namespace WebsitePanel.EnterpriseServer { createInstantAlias, allowSubDomains}, this.AddDomainWithProvisioningOperationCompleted, userState); } - - private void OnAddDomainWithProvisioningOperationCompleted(object arg) { - if ((this.AddDomainWithProvisioningCompleted != null)) { + + private void OnAddDomainWithProvisioningOperationCompleted(object arg) + { + if ((this.AddDomainWithProvisioningCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddDomainWithProvisioningCompleted(this, new AddDomainWithProvisioningCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateDomain", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int UpdateDomain(DomainInfo domain) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateDomain", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateDomain(DomainInfo domain) + { object[] results = this.Invoke("UpdateDomain", new object[] { domain}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateDomain(DomainInfo domain, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateDomain(DomainInfo domain, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateDomain", new object[] { domain}, callback, asyncState); } - + /// - public int EndUpdateDomain(System.IAsyncResult asyncResult) { + public int EndUpdateDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void UpdateDomainAsync(DomainInfo domain) { + public void UpdateDomainAsync(DomainInfo domain) + { this.UpdateDomainAsync(domain, null); } - + /// - public void UpdateDomainAsync(DomainInfo domain, object userState) { - if ((this.UpdateDomainOperationCompleted == null)) { + public void UpdateDomainAsync(DomainInfo domain, object userState) + { + if ((this.UpdateDomainOperationCompleted == null)) + { this.UpdateDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateDomainOperationCompleted); } this.InvokeAsync("UpdateDomain", new object[] { domain}, this.UpdateDomainOperationCompleted, userState); } - - private void OnUpdateDomainOperationCompleted(object arg) { - if ((this.UpdateDomainCompleted != null)) { + + private void OnUpdateDomainOperationCompleted(object arg) + { + if ((this.UpdateDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateDomainCompleted(this, new UpdateDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDomain", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteDomain(int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDomain", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteDomain(int domainId) + { object[] results = this.Invoke("DeleteDomain", new object[] { domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteDomain(int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteDomain(int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteDomain", new object[] { domainId}, callback, asyncState); } - + /// - public int EndDeleteDomain(System.IAsyncResult asyncResult) { + public int EndDeleteDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteDomainAsync(int domainId) { + public void DeleteDomainAsync(int domainId) + { this.DeleteDomainAsync(domainId, null); } - + /// - public void DeleteDomainAsync(int domainId, object userState) { - if ((this.DeleteDomainOperationCompleted == null)) { + public void DeleteDomainAsync(int domainId, object userState) + { + if ((this.DeleteDomainOperationCompleted == null)) + { this.DeleteDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDomainOperationCompleted); } this.InvokeAsync("DeleteDomain", new object[] { domainId}, this.DeleteDomainOperationCompleted, userState); } - - private void OnDeleteDomainOperationCompleted(object arg) { - if ((this.DeleteDomainCompleted != null)) { + + private void OnDeleteDomainOperationCompleted(object arg) + { + if ((this.DeleteDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteDomainCompleted(this, new DeleteDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DetachDomain", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DetachDomain(int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DetachDomain", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DetachDomain(int domainId) + { object[] results = this.Invoke("DetachDomain", new object[] { domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDetachDomain(int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDetachDomain(int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DetachDomain", new object[] { domainId}, callback, asyncState); } - + /// - public int EndDetachDomain(System.IAsyncResult asyncResult) { + public int EndDetachDomain(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DetachDomainAsync(int domainId) { + public void DetachDomainAsync(int domainId) + { this.DetachDomainAsync(domainId, null); } - + /// - public void DetachDomainAsync(int domainId, object userState) { - if ((this.DetachDomainOperationCompleted == null)) { + public void DetachDomainAsync(int domainId, object userState) + { + if ((this.DetachDomainOperationCompleted == null)) + { this.DetachDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDetachDomainOperationCompleted); } this.InvokeAsync("DetachDomain", new object[] { domainId}, this.DetachDomainOperationCompleted, userState); } - - private void OnDetachDomainOperationCompleted(object arg) { - if ((this.DetachDomainCompleted != null)) { + + private void OnDetachDomainOperationCompleted(object arg) + { + if ((this.DetachDomainCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DetachDomainCompleted(this, new DetachDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/EnableDomainDns", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int EnableDomainDns(int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/EnableDomainDns", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int EnableDomainDns(int domainId) + { object[] results = this.Invoke("EnableDomainDns", new object[] { domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginEnableDomainDns(int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginEnableDomainDns(int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("EnableDomainDns", new object[] { domainId}, callback, asyncState); } - + /// - public int EndEnableDomainDns(System.IAsyncResult asyncResult) { + public int EndEnableDomainDns(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void EnableDomainDnsAsync(int domainId) { + public void EnableDomainDnsAsync(int domainId) + { this.EnableDomainDnsAsync(domainId, null); } - + /// - public void EnableDomainDnsAsync(int domainId, object userState) { - if ((this.EnableDomainDnsOperationCompleted == null)) { + public void EnableDomainDnsAsync(int domainId, object userState) + { + if ((this.EnableDomainDnsOperationCompleted == null)) + { this.EnableDomainDnsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnEnableDomainDnsOperationCompleted); } this.InvokeAsync("EnableDomainDns", new object[] { domainId}, this.EnableDomainDnsOperationCompleted, userState); } - - private void OnEnableDomainDnsOperationCompleted(object arg) { - if ((this.EnableDomainDnsCompleted != null)) { + + private void OnEnableDomainDnsOperationCompleted(object arg) + { + if ((this.EnableDomainDnsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.EnableDomainDnsCompleted(this, new EnableDomainDnsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableDomainDns", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DisableDomainDns(int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DisableDomainDns", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DisableDomainDns(int domainId) + { object[] results = this.Invoke("DisableDomainDns", new object[] { domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDisableDomainDns(int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDisableDomainDns(int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DisableDomainDns", new object[] { domainId}, callback, asyncState); } - + /// - public int EndDisableDomainDns(System.IAsyncResult asyncResult) { + public int EndDisableDomainDns(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DisableDomainDnsAsync(int domainId) { + public void DisableDomainDnsAsync(int domainId) + { this.DisableDomainDnsAsync(domainId, null); } - + /// - public void DisableDomainDnsAsync(int domainId, object userState) { - if ((this.DisableDomainDnsOperationCompleted == null)) { + public void DisableDomainDnsAsync(int domainId, object userState) + { + if ((this.DisableDomainDnsOperationCompleted == null)) + { this.DisableDomainDnsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDisableDomainDnsOperationCompleted); } this.InvokeAsync("DisableDomainDns", new object[] { domainId}, this.DisableDomainDnsOperationCompleted, userState); } - - private void OnDisableDomainDnsOperationCompleted(object arg) { - if ((this.DisableDomainDnsCompleted != null)) { + + private void OnDisableDomainDnsOperationCompleted(object arg) + { + if ((this.DisableDomainDnsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DisableDomainDnsCompleted(this, new DisableDomainDnsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateDomainInstantAlias", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CreateDomainInstantAlias(int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CreateDomainInstantAlias", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CreateDomainInstantAlias(string hostName, int domainId) + { object[] results = this.Invoke("CreateDomainInstantAlias", new object[] { + hostName, domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCreateDomainInstantAlias(int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateDomainInstantAlias(string hostName, int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateDomainInstantAlias", new object[] { + hostName, domainId}, callback, asyncState); } - + /// - public int EndCreateDomainInstantAlias(System.IAsyncResult asyncResult) { + public int EndCreateDomainInstantAlias(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CreateDomainInstantAliasAsync(int domainId) { - this.CreateDomainInstantAliasAsync(domainId, null); + public void CreateDomainInstantAliasAsync(string hostName, int domainId) + { + this.CreateDomainInstantAliasAsync(hostName, domainId, null); } - + /// - public void CreateDomainInstantAliasAsync(int domainId, object userState) { - if ((this.CreateDomainInstantAliasOperationCompleted == null)) { + public void CreateDomainInstantAliasAsync(string hostName, int domainId, object userState) + { + if ((this.CreateDomainInstantAliasOperationCompleted == null)) + { this.CreateDomainInstantAliasOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateDomainInstantAliasOperationCompleted); } this.InvokeAsync("CreateDomainInstantAlias", new object[] { + hostName, domainId}, this.CreateDomainInstantAliasOperationCompleted, userState); } - - private void OnCreateDomainInstantAliasOperationCompleted(object arg) { - if ((this.CreateDomainInstantAliasCompleted != null)) { + + private void OnCreateDomainInstantAliasOperationCompleted(object arg) + { + if ((this.CreateDomainInstantAliasCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateDomainInstantAliasCompleted(this, new CreateDomainInstantAliasCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDomainInstantAlias", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteDomainInstantAlias(int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDomainInstantAlias", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteDomainInstantAlias(int domainId) + { object[] results = this.Invoke("DeleteDomainInstantAlias", new object[] { domainId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteDomainInstantAlias(int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteDomainInstantAlias(int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteDomainInstantAlias", new object[] { domainId}, callback, asyncState); } - + /// - public int EndDeleteDomainInstantAlias(System.IAsyncResult asyncResult) { + public int EndDeleteDomainInstantAlias(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteDomainInstantAliasAsync(int domainId) { + public void DeleteDomainInstantAliasAsync(int domainId) + { this.DeleteDomainInstantAliasAsync(domainId, null); } - + /// - public void DeleteDomainInstantAliasAsync(int domainId, object userState) { - if ((this.DeleteDomainInstantAliasOperationCompleted == null)) { + public void DeleteDomainInstantAliasAsync(int domainId, object userState) + { + if ((this.DeleteDomainInstantAliasOperationCompleted == null)) + { this.DeleteDomainInstantAliasOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDomainInstantAliasOperationCompleted); } this.InvokeAsync("DeleteDomainInstantAlias", new object[] { domainId}, this.DeleteDomainInstantAliasOperationCompleted, userState); } - - private void OnDeleteDomainInstantAliasOperationCompleted(object arg) { - if ((this.DeleteDomainInstantAliasCompleted != null)) { + + private void OnDeleteDomainInstantAliasOperationCompleted(object arg) + { + if ((this.DeleteDomainInstantAliasCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteDomainInstantAliasCompleted(this, new DeleteDomainInstantAliasCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDnsZoneRecords", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public DnsRecord[] GetDnsZoneRecords(int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDnsZoneRecords", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public DnsRecord[] GetDnsZoneRecords(int domainId) + { object[] results = this.Invoke("GetDnsZoneRecords", new object[] { domainId}); return ((DnsRecord[])(results[0])); } - + /// - public System.IAsyncResult BeginGetDnsZoneRecords(int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetDnsZoneRecords(int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetDnsZoneRecords", new object[] { domainId}, callback, asyncState); } - + /// - public DnsRecord[] EndGetDnsZoneRecords(System.IAsyncResult asyncResult) { + public DnsRecord[] EndGetDnsZoneRecords(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((DnsRecord[])(results[0])); } - + /// - public void GetDnsZoneRecordsAsync(int domainId) { + public void GetDnsZoneRecordsAsync(int domainId) + { this.GetDnsZoneRecordsAsync(domainId, null); } - + /// - public void GetDnsZoneRecordsAsync(int domainId, object userState) { - if ((this.GetDnsZoneRecordsOperationCompleted == null)) { + public void GetDnsZoneRecordsAsync(int domainId, object userState) + { + if ((this.GetDnsZoneRecordsOperationCompleted == null)) + { this.GetDnsZoneRecordsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDnsZoneRecordsOperationCompleted); } this.InvokeAsync("GetDnsZoneRecords", new object[] { domainId}, this.GetDnsZoneRecordsOperationCompleted, userState); } - - private void OnGetDnsZoneRecordsOperationCompleted(object arg) { - if ((this.GetDnsZoneRecordsCompleted != null)) { + + private void OnGetDnsZoneRecordsOperationCompleted(object arg) + { + if ((this.GetDnsZoneRecordsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetDnsZoneRecordsCompleted(this, new GetDnsZoneRecordsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawDnsZoneRecords", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public System.Data.DataSet GetRawDnsZoneRecords(int domainId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRawDnsZoneRecords", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataSet GetRawDnsZoneRecords(int domainId) + { object[] results = this.Invoke("GetRawDnsZoneRecords", new object[] { domainId}); return ((System.Data.DataSet)(results[0])); } - + /// - public System.IAsyncResult BeginGetRawDnsZoneRecords(int domainId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetRawDnsZoneRecords(int domainId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetRawDnsZoneRecords", new object[] { domainId}, callback, asyncState); } - + /// - public System.Data.DataSet EndGetRawDnsZoneRecords(System.IAsyncResult asyncResult) { + public System.Data.DataSet EndGetRawDnsZoneRecords(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((System.Data.DataSet)(results[0])); } - + /// - public void GetRawDnsZoneRecordsAsync(int domainId) { + public void GetRawDnsZoneRecordsAsync(int domainId) + { this.GetRawDnsZoneRecordsAsync(domainId, null); } - + /// - public void GetRawDnsZoneRecordsAsync(int domainId, object userState) { - if ((this.GetRawDnsZoneRecordsOperationCompleted == null)) { + public void GetRawDnsZoneRecordsAsync(int domainId, object userState) + { + if ((this.GetRawDnsZoneRecordsOperationCompleted == null)) + { this.GetRawDnsZoneRecordsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRawDnsZoneRecordsOperationCompleted); } this.InvokeAsync("GetRawDnsZoneRecords", new object[] { domainId}, this.GetRawDnsZoneRecordsOperationCompleted, userState); } - - private void OnGetRawDnsZoneRecordsOperationCompleted(object arg) { - if ((this.GetRawDnsZoneRecordsCompleted != null)) { + + private void OnGetRawDnsZoneRecordsOperationCompleted(object arg) + { + if ((this.GetRawDnsZoneRecordsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetRawDnsZoneRecordsCompleted(this, new GetRawDnsZoneRecordsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDnsZoneRecord", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddDnsZoneRecord(int domainId, string recordName, DnsRecordType recordType, string recordData, int mxPriority) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddDnsZoneRecord", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int AddDnsZoneRecord(int domainId, string recordName, DnsRecordType recordType, string recordData, int mxPriority, int srvPriority, int srvWeight, int srvPortNumber) + { object[] results = this.Invoke("AddDnsZoneRecord", new object[] { domainId, recordName, recordType, recordData, - mxPriority}); + mxPriority, + srvPriority, + srvWeight, + srvPortNumber}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginAddDnsZoneRecord(int domainId, string recordName, DnsRecordType recordType, string recordData, int mxPriority, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddDnsZoneRecord(int domainId, string recordName, DnsRecordType recordType, string recordData, int mxPriority, int srvPriority, int srvWeight, int srvPortNumber, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddDnsZoneRecord", new object[] { domainId, recordName, recordType, recordData, - mxPriority}, callback, asyncState); + mxPriority, + srvPriority, + srvWeight, + srvPortNumber}, callback, asyncState); } - + /// - public int EndAddDnsZoneRecord(System.IAsyncResult asyncResult) { + public int EndAddDnsZoneRecord(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void AddDnsZoneRecordAsync(int domainId, string recordName, DnsRecordType recordType, string recordData, int mxPriority) { - this.AddDnsZoneRecordAsync(domainId, recordName, recordType, recordData, mxPriority, null); + public void AddDnsZoneRecordAsync(int domainId, string recordName, DnsRecordType recordType, string recordData, int mxPriority, int srvPriority, int srvWeight, int srvPortNumber) + { + this.AddDnsZoneRecordAsync(domainId, recordName, recordType, recordData, mxPriority, srvPriority, srvWeight, srvPortNumber, null); } - + /// - public void AddDnsZoneRecordAsync(int domainId, string recordName, DnsRecordType recordType, string recordData, int mxPriority, object userState) { - if ((this.AddDnsZoneRecordOperationCompleted == null)) { + public void AddDnsZoneRecordAsync(int domainId, string recordName, DnsRecordType recordType, string recordData, int mxPriority, int srvPriority, int srvWeight, int srvPortNumber, object userState) + { + if ((this.AddDnsZoneRecordOperationCompleted == null)) + { this.AddDnsZoneRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddDnsZoneRecordOperationCompleted); } this.InvokeAsync("AddDnsZoneRecord", new object[] { @@ -4383,19 +5154,25 @@ namespace WebsitePanel.EnterpriseServer { recordName, recordType, recordData, - mxPriority}, this.AddDnsZoneRecordOperationCompleted, userState); + mxPriority, + srvPriority, + srvWeight, + srvPortNumber}, this.AddDnsZoneRecordOperationCompleted, userState); } - - private void OnAddDnsZoneRecordOperationCompleted(object arg) { - if ((this.AddDnsZoneRecordCompleted != null)) { + + private void OnAddDnsZoneRecordOperationCompleted(object arg) + { + if ((this.AddDnsZoneRecordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddDnsZoneRecordCompleted(this, new AddDnsZoneRecordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateDnsZoneRecord", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int UpdateDnsZoneRecord(int domainId, string originalRecordName, string originalRecordData, string recordName, DnsRecordType recordType, string recordData, int mxPriority) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateDnsZoneRecord", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateDnsZoneRecord(int domainId, string originalRecordName, string originalRecordData, string recordName, DnsRecordType recordType, string recordData, int mxPriority, int srvPriority, int srvWeight, int srvPortNumber) + { object[] results = this.Invoke("UpdateDnsZoneRecord", new object[] { domainId, originalRecordName, @@ -4403,12 +5180,16 @@ namespace WebsitePanel.EnterpriseServer { recordName, recordType, recordData, - mxPriority}); + mxPriority, + srvPriority, + srvWeight, + srvPortNumber}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginUpdateDnsZoneRecord(int domainId, string originalRecordName, string originalRecordData, string recordName, DnsRecordType recordType, string recordData, int mxPriority, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateDnsZoneRecord(int domainId, string originalRecordName, string originalRecordData, string recordName, DnsRecordType recordType, string recordData, int mxPriority, int srvPriority, int srvWeight, int srvPortNumber, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateDnsZoneRecord", new object[] { domainId, originalRecordName, @@ -4416,23 +5197,30 @@ namespace WebsitePanel.EnterpriseServer { recordName, recordType, recordData, - mxPriority}, callback, asyncState); + mxPriority, + srvPriority, + srvWeight, + srvPortNumber}, callback, asyncState); } - + /// - public int EndUpdateDnsZoneRecord(System.IAsyncResult asyncResult) { + public int EndUpdateDnsZoneRecord(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void UpdateDnsZoneRecordAsync(int domainId, string originalRecordName, string originalRecordData, string recordName, DnsRecordType recordType, string recordData, int mxPriority) { - this.UpdateDnsZoneRecordAsync(domainId, originalRecordName, originalRecordData, recordName, recordType, recordData, mxPriority, null); + public void UpdateDnsZoneRecordAsync(int domainId, string originalRecordName, string originalRecordData, string recordName, DnsRecordType recordType, string recordData, int mxPriority, int srvPriority, int srvWeight, int srvPortNumber) + { + this.UpdateDnsZoneRecordAsync(domainId, originalRecordName, originalRecordData, recordName, recordType, recordData, mxPriority, srvPriority, srvWeight, srvPortNumber, null); } - + /// - public void UpdateDnsZoneRecordAsync(int domainId, string originalRecordName, string originalRecordData, string recordName, DnsRecordType recordType, string recordData, int mxPriority, object userState) { - if ((this.UpdateDnsZoneRecordOperationCompleted == null)) { + public void UpdateDnsZoneRecordAsync(int domainId, string originalRecordName, string originalRecordData, string recordName, DnsRecordType recordType, string recordData, int mxPriority, int srvPriority, int srvWeight, int srvPortNumber, object userState) + { + if ((this.UpdateDnsZoneRecordOperationCompleted == null)) + { this.UpdateDnsZoneRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateDnsZoneRecordOperationCompleted); } this.InvokeAsync("UpdateDnsZoneRecord", new object[] { @@ -4442,19 +5230,25 @@ namespace WebsitePanel.EnterpriseServer { recordName, recordType, recordData, - mxPriority}, this.UpdateDnsZoneRecordOperationCompleted, userState); + mxPriority, + srvPriority, + srvWeight, + srvPortNumber}, this.UpdateDnsZoneRecordOperationCompleted, userState); } - - private void OnUpdateDnsZoneRecordOperationCompleted(object arg) { - if ((this.UpdateDnsZoneRecordCompleted != null)) { + + private void OnUpdateDnsZoneRecordOperationCompleted(object arg) + { + if ((this.UpdateDnsZoneRecordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateDnsZoneRecordCompleted(this, new UpdateDnsZoneRecordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDnsZoneRecord", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int DeleteDnsZoneRecord(int domainId, string recordName, DnsRecordType recordType, string recordData) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/DeleteDnsZoneRecord", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int DeleteDnsZoneRecord(int domainId, string recordName, DnsRecordType recordType, string recordData) + { object[] results = this.Invoke("DeleteDnsZoneRecord", new object[] { domainId, recordName, @@ -4462,30 +5256,35 @@ namespace WebsitePanel.EnterpriseServer { recordData}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteDnsZoneRecord(int domainId, string recordName, DnsRecordType recordType, string recordData, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteDnsZoneRecord(int domainId, string recordName, DnsRecordType recordType, string recordData, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteDnsZoneRecord", new object[] { domainId, recordName, recordType, recordData}, callback, asyncState); } - + /// - public int EndDeleteDnsZoneRecord(System.IAsyncResult asyncResult) { + public int EndDeleteDnsZoneRecord(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void DeleteDnsZoneRecordAsync(int domainId, string recordName, DnsRecordType recordType, string recordData) { + public void DeleteDnsZoneRecordAsync(int domainId, string recordName, DnsRecordType recordType, string recordData) + { this.DeleteDnsZoneRecordAsync(domainId, recordName, recordType, recordData, null); } - + /// - public void DeleteDnsZoneRecordAsync(int domainId, string recordName, DnsRecordType recordType, string recordData, object userState) { - if ((this.DeleteDnsZoneRecordOperationCompleted == null)) { + public void DeleteDnsZoneRecordAsync(int domainId, string recordName, DnsRecordType recordType, string recordData, object userState) + { + if ((this.DeleteDnsZoneRecordOperationCompleted == null)) + { this.DeleteDnsZoneRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteDnsZoneRecordOperationCompleted); } this.InvokeAsync("DeleteDnsZoneRecord", new object[] { @@ -4494,183 +5293,680 @@ namespace WebsitePanel.EnterpriseServer { recordType, recordData}, this.DeleteDnsZoneRecordOperationCompleted, userState); } - - private void OnDeleteDnsZoneRecordOperationCompleted(object arg) { - if ((this.DeleteDnsZoneRecordCompleted != null)) { + + private void OnDeleteDnsZoneRecordOperationCompleted(object arg) + { + if ((this.DeleteDnsZoneRecordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteDnsZoneRecordCompleted(this, new DeleteDnsZoneRecordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetTerminalServicesSessions", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public TerminalSession[] GetTerminalServicesSessions(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetTerminalServicesSessions", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public TerminalSession[] GetTerminalServicesSessions(int serverId) + { object[] results = this.Invoke("GetTerminalServicesSessions", new object[] { serverId}); return ((TerminalSession[])(results[0])); } - + /// - public System.IAsyncResult BeginGetTerminalServicesSessions(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetTerminalServicesSessions(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetTerminalServicesSessions", new object[] { serverId}, callback, asyncState); } - + /// - public TerminalSession[] EndGetTerminalServicesSessions(System.IAsyncResult asyncResult) { + public TerminalSession[] EndGetTerminalServicesSessions(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((TerminalSession[])(results[0])); } - + /// - public void GetTerminalServicesSessionsAsync(int serverId) { + public void GetTerminalServicesSessionsAsync(int serverId) + { this.GetTerminalServicesSessionsAsync(serverId, null); } - + /// - public void GetTerminalServicesSessionsAsync(int serverId, object userState) { - if ((this.GetTerminalServicesSessionsOperationCompleted == null)) { + public void GetTerminalServicesSessionsAsync(int serverId, object userState) + { + if ((this.GetTerminalServicesSessionsOperationCompleted == null)) + { this.GetTerminalServicesSessionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetTerminalServicesSessionsOperationCompleted); } this.InvokeAsync("GetTerminalServicesSessions", new object[] { serverId}, this.GetTerminalServicesSessionsOperationCompleted, userState); } - - private void OnGetTerminalServicesSessionsOperationCompleted(object arg) { - if ((this.GetTerminalServicesSessionsCompleted != null)) { + + private void OnGetTerminalServicesSessionsOperationCompleted(object arg) + { + if ((this.GetTerminalServicesSessionsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetTerminalServicesSessionsCompleted(this, new GetTerminalServicesSessionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CloseTerminalServicesSession", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int CloseTerminalServicesSession(int serverId, int sessionId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CloseTerminalServicesSession", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int CloseTerminalServicesSession(int serverId, int sessionId) + { object[] results = this.Invoke("CloseTerminalServicesSession", new object[] { serverId, sessionId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginCloseTerminalServicesSession(int serverId, int sessionId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCloseTerminalServicesSession(int serverId, int sessionId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CloseTerminalServicesSession", new object[] { serverId, sessionId}, callback, asyncState); } - + /// - public int EndCloseTerminalServicesSession(System.IAsyncResult asyncResult) { + public int EndCloseTerminalServicesSession(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void CloseTerminalServicesSessionAsync(int serverId, int sessionId) { + public void CloseTerminalServicesSessionAsync(int serverId, int sessionId) + { this.CloseTerminalServicesSessionAsync(serverId, sessionId, null); } - + /// - public void CloseTerminalServicesSessionAsync(int serverId, int sessionId, object userState) { - if ((this.CloseTerminalServicesSessionOperationCompleted == null)) { + public void CloseTerminalServicesSessionAsync(int serverId, int sessionId, object userState) + { + if ((this.CloseTerminalServicesSessionOperationCompleted == null)) + { this.CloseTerminalServicesSessionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCloseTerminalServicesSessionOperationCompleted); } this.InvokeAsync("CloseTerminalServicesSession", new object[] { serverId, sessionId}, this.CloseTerminalServicesSessionOperationCompleted, userState); } - - private void OnCloseTerminalServicesSessionOperationCompleted(object arg) { - if ((this.CloseTerminalServicesSessionCompleted != null)) { + + private void OnCloseTerminalServicesSessionOperationCompleted(object arg) + { + if ((this.CloseTerminalServicesSessionCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CloseTerminalServicesSessionCompleted(this, new CloseTerminalServicesSessionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWindowsProcesses", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public WindowsProcess[] GetWindowsProcesses(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWindowsProcesses", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WindowsProcess[] GetWindowsProcesses(int serverId) + { object[] results = this.Invoke("GetWindowsProcesses", new object[] { serverId}); return ((WindowsProcess[])(results[0])); } - + /// - public System.IAsyncResult BeginGetWindowsProcesses(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetWindowsProcesses(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetWindowsProcesses", new object[] { serverId}, callback, asyncState); } - + /// - public WindowsProcess[] EndGetWindowsProcesses(System.IAsyncResult asyncResult) { + public WindowsProcess[] EndGetWindowsProcesses(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((WindowsProcess[])(results[0])); } - + /// - public void GetWindowsProcessesAsync(int serverId) { + public void GetWindowsProcessesAsync(int serverId) + { this.GetWindowsProcessesAsync(serverId, null); } - + /// - public void GetWindowsProcessesAsync(int serverId, object userState) { - if ((this.GetWindowsProcessesOperationCompleted == null)) { + public void GetWindowsProcessesAsync(int serverId, object userState) + { + if ((this.GetWindowsProcessesOperationCompleted == null)) + { this.GetWindowsProcessesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWindowsProcessesOperationCompleted); } this.InvokeAsync("GetWindowsProcesses", new object[] { serverId}, this.GetWindowsProcessesOperationCompleted, userState); } - - private void OnGetWindowsProcessesOperationCompleted(object arg) { - if ((this.GetWindowsProcessesCompleted != null)) { + + private void OnGetWindowsProcessesOperationCompleted(object arg) + { + if ((this.GetWindowsProcessesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetWindowsProcessesCompleted(this, new GetWindowsProcessesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/TerminateWindowsProcess", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int TerminateWindowsProcess(int serverId, int pid) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/TerminateWindowsProcess", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int TerminateWindowsProcess(int serverId, int pid) + { object[] results = this.Invoke("TerminateWindowsProcess", new object[] { serverId, pid}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginTerminateWindowsProcess(int serverId, int pid, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginTerminateWindowsProcess(int serverId, int pid, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("TerminateWindowsProcess", new object[] { serverId, pid}, callback, asyncState); } - + /// - public int EndTerminateWindowsProcess(System.IAsyncResult asyncResult) { + public int EndTerminateWindowsProcess(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void TerminateWindowsProcessAsync(int serverId, int pid) { + public void TerminateWindowsProcessAsync(int serverId, int pid) + { this.TerminateWindowsProcessAsync(serverId, pid, null); } - + /// - public void TerminateWindowsProcessAsync(int serverId, int pid, object userState) { - if ((this.TerminateWindowsProcessOperationCompleted == null)) { + public void TerminateWindowsProcessAsync(int serverId, int pid, object userState) + { + if ((this.TerminateWindowsProcessOperationCompleted == null)) + { this.TerminateWindowsProcessOperationCompleted = new System.Threading.SendOrPostCallback(this.OnTerminateWindowsProcessOperationCompleted); } this.InvokeAsync("TerminateWindowsProcess", new object[] { serverId, pid}, this.TerminateWindowsProcessOperationCompleted, userState); } - - private void OnTerminateWindowsProcessOperationCompleted(object arg) { - if ((this.TerminateWindowsProcessCompleted != null)) { + + private void OnTerminateWindowsProcessOperationCompleted(object arg) + { + if ((this.TerminateWindowsProcessCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.TerminateWindowsProcessCompleted(this, new TerminateWindowsProcessCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/InitWPIFeeds", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void InitWPIFeeds(int serverId) { + this.Invoke("InitWPIFeeds", new object[] { + serverId}); + } + + /// + public System.IAsyncResult BeginInitWPIFeeds(int serverId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("InitWPIFeeds", new object[] { + serverId}, callback, asyncState); + } + + /// + public void EndInitWPIFeeds(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void InitWPIFeedsAsync(int serverId) { + this.InitWPIFeedsAsync(serverId, null); + } + + /// + public void InitWPIFeedsAsync(int serverId, object userState) { + if ((this.InitWPIFeedsOperationCompleted == null)) { + this.InitWPIFeedsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInitWPIFeedsOperationCompleted); + } + this.InvokeAsync("InitWPIFeeds", new object[] { + serverId}, this.InitWPIFeedsOperationCompleted, userState); + } + + private void OnInitWPIFeedsOperationCompleted(object arg) { + if ((this.InitWPIFeedsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.InitWPIFeedsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWPITabs", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WPITab[] GetWPITabs(int serverId) { + object[] results = this.Invoke("GetWPITabs", new object[] { + serverId}); + return ((WPITab[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetWPITabs(int serverId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWPITabs", new object[] { + serverId}, callback, asyncState); + } + + /// + public WPITab[] EndGetWPITabs(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((WPITab[])(results[0])); + } + + /// + public void GetWPITabsAsync(int serverId) { + this.GetWPITabsAsync(serverId, null); + } + + /// + public void GetWPITabsAsync(int serverId, object userState) { + if ((this.GetWPITabsOperationCompleted == null)) { + this.GetWPITabsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPITabsOperationCompleted); + } + this.InvokeAsync("GetWPITabs", new object[] { + serverId}, this.GetWPITabsOperationCompleted, userState); + } + + private void OnGetWPITabsOperationCompleted(object arg) { + if ((this.GetWPITabsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWPITabsCompleted(this, new GetWPITabsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWPIKeywords", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WPIKeyword[] GetWPIKeywords(int serverId) { + object[] results = this.Invoke("GetWPIKeywords", new object[] { + serverId}); + return ((WPIKeyword[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetWPIKeywords(int serverId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWPIKeywords", new object[] { + serverId}, callback, asyncState); + } + + /// + public WPIKeyword[] EndGetWPIKeywords(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((WPIKeyword[])(results[0])); + } + + /// + public void GetWPIKeywordsAsync(int serverId) { + this.GetWPIKeywordsAsync(serverId, null); + } + + /// + public void GetWPIKeywordsAsync(int serverId, object userState) { + if ((this.GetWPIKeywordsOperationCompleted == null)) { + this.GetWPIKeywordsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIKeywordsOperationCompleted); + } + this.InvokeAsync("GetWPIKeywords", new object[] { + serverId}, this.GetWPIKeywordsOperationCompleted, userState); + } + + private void OnGetWPIKeywordsOperationCompleted(object arg) { + if ((this.GetWPIKeywordsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWPIKeywordsCompleted(this, new GetWPIKeywordsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWPIProducts", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WPIProduct[] GetWPIProducts(int serverId, string tabId, string keywordId) { + object[] results = this.Invoke("GetWPIProducts", new object[] { + serverId, + tabId, + keywordId}); + return ((WPIProduct[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetWPIProducts(int serverId, string tabId, string keywordId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWPIProducts", new object[] { + serverId, + tabId, + keywordId}, callback, asyncState); + } + + /// + public WPIProduct[] EndGetWPIProducts(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((WPIProduct[])(results[0])); + } + + /// + public void GetWPIProductsAsync(int serverId, string tabId, string keywordId) { + this.GetWPIProductsAsync(serverId, tabId, keywordId, null); + } + + /// + public void GetWPIProductsAsync(int serverId, string tabId, string keywordId, object userState) { + if ((this.GetWPIProductsOperationCompleted == null)) { + this.GetWPIProductsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIProductsOperationCompleted); + } + this.InvokeAsync("GetWPIProducts", new object[] { + serverId, + tabId, + keywordId}, this.GetWPIProductsOperationCompleted, userState); + } + + private void OnGetWPIProductsOperationCompleted(object arg) { + if ((this.GetWPIProductsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWPIProductsCompleted(this, new GetWPIProductsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWPIProductsFiltered", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WPIProduct[] GetWPIProductsFiltered(int serverId, string keywordId) { + object[] results = this.Invoke("GetWPIProductsFiltered", new object[] { + serverId, + keywordId}); + return ((WPIProduct[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetWPIProductsFiltered(int serverId, string keywordId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWPIProductsFiltered", new object[] { + serverId, + keywordId}, callback, asyncState); + } + + /// + public WPIProduct[] EndGetWPIProductsFiltered(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((WPIProduct[])(results[0])); + } + + /// + public void GetWPIProductsFilteredAsync(int serverId, string keywordId) { + this.GetWPIProductsFilteredAsync(serverId, keywordId, null); + } + + /// + public void GetWPIProductsFilteredAsync(int serverId, string keywordId, object userState) { + if ((this.GetWPIProductsFilteredOperationCompleted == null)) { + this.GetWPIProductsFilteredOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIProductsFilteredOperationCompleted); + } + this.InvokeAsync("GetWPIProductsFiltered", new object[] { + serverId, + keywordId}, this.GetWPIProductsFilteredOperationCompleted, userState); + } + + private void OnGetWPIProductsFilteredOperationCompleted(object arg) { + if ((this.GetWPIProductsFilteredCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWPIProductsFilteredCompleted(this, new GetWPIProductsFilteredCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWPIProductsWithDependencies", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WPIProduct[] GetWPIProductsWithDependencies(int serverId, string[] products) { + object[] results = this.Invoke("GetWPIProductsWithDependencies", new object[] { + serverId, + products}); + return ((WPIProduct[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetWPIProductsWithDependencies(int serverId, string[] products, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWPIProductsWithDependencies", new object[] { + serverId, + products}, callback, asyncState); + } + + /// + public WPIProduct[] EndGetWPIProductsWithDependencies(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((WPIProduct[])(results[0])); + } + + /// + public void GetWPIProductsWithDependenciesAsync(int serverId, string[] products) { + this.GetWPIProductsWithDependenciesAsync(serverId, products, null); + } + + /// + public void GetWPIProductsWithDependenciesAsync(int serverId, string[] products, object userState) { + if ((this.GetWPIProductsWithDependenciesOperationCompleted == null)) { + this.GetWPIProductsWithDependenciesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIProductsWithDependenciesOperationCompleted); + } + this.InvokeAsync("GetWPIProductsWithDependencies", new object[] { + serverId, + products}, this.GetWPIProductsWithDependenciesOperationCompleted, userState); + } + + private void OnGetWPIProductsWithDependenciesOperationCompleted(object arg) { + if ((this.GetWPIProductsWithDependenciesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWPIProductsWithDependenciesCompleted(this, new GetWPIProductsWithDependenciesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/InstallWPIProducts", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void InstallWPIProducts(int serverId, string[] products) { + this.Invoke("InstallWPIProducts", new object[] { + serverId, + products}); + } + + /// + public System.IAsyncResult BeginInstallWPIProducts(int serverId, string[] products, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("InstallWPIProducts", new object[] { + serverId, + products}, callback, asyncState); + } + + /// + public void EndInstallWPIProducts(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void InstallWPIProductsAsync(int serverId, string[] products) { + this.InstallWPIProductsAsync(serverId, products, null); + } + + /// + public void InstallWPIProductsAsync(int serverId, string[] products, object userState) { + if ((this.InstallWPIProductsOperationCompleted == null)) { + this.InstallWPIProductsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallWPIProductsOperationCompleted); + } + this.InvokeAsync("InstallWPIProducts", new object[] { + serverId, + products}, this.InstallWPIProductsOperationCompleted, userState); + } + + private void OnInstallWPIProductsOperationCompleted(object arg) { + if ((this.InstallWPIProductsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.InstallWPIProductsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/CancelInstallWPIProducts", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void CancelInstallWPIProducts(int serviceId) { + this.Invoke("CancelInstallWPIProducts", new object[] { + serviceId}); + } + + /// + public System.IAsyncResult BeginCancelInstallWPIProducts(int serviceId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("CancelInstallWPIProducts", new object[] { + serviceId}, callback, asyncState); + } + + /// + public void EndCancelInstallWPIProducts(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void CancelInstallWPIProductsAsync(int serviceId) { + this.CancelInstallWPIProductsAsync(serviceId, null); + } + + /// + public void CancelInstallWPIProductsAsync(int serviceId, object userState) { + if ((this.CancelInstallWPIProductsOperationCompleted == null)) { + this.CancelInstallWPIProductsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCancelInstallWPIProductsOperationCompleted); + } + this.InvokeAsync("CancelInstallWPIProducts", new object[] { + serviceId}, this.CancelInstallWPIProductsOperationCompleted, userState); + } + + private void OnCancelInstallWPIProductsOperationCompleted(object arg) { + if ((this.CancelInstallWPIProductsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CancelInstallWPIProductsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWPIStatus", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string GetWPIStatus(int serverId) { + object[] results = this.Invoke("GetWPIStatus", new object[] { + serverId}); + return ((string)(results[0])); + } + + /// + public System.IAsyncResult BeginGetWPIStatus(int serverId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWPIStatus", new object[] { + serverId}, callback, asyncState); + } + + /// + public string EndGetWPIStatus(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string)(results[0])); + } + + /// + public void GetWPIStatusAsync(int serverId) { + this.GetWPIStatusAsync(serverId, null); + } + + /// + public void GetWPIStatusAsync(int serverId, object userState) { + if ((this.GetWPIStatusOperationCompleted == null)) { + this.GetWPIStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIStatusOperationCompleted); + } + this.InvokeAsync("GetWPIStatus", new object[] { + serverId}, this.GetWPIStatusOperationCompleted, userState); + } + + private void OnGetWPIStatusOperationCompleted(object arg) { + if ((this.GetWPIStatusCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWPIStatusCompleted(this, new GetWPIStatusCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/WpiGetLogFileDirectory", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string WpiGetLogFileDirectory(int serverId) { + object[] results = this.Invoke("WpiGetLogFileDirectory", new object[] { + serverId}); + return ((string)(results[0])); + } + + /// + public System.IAsyncResult BeginWpiGetLogFileDirectory(int serverId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("WpiGetLogFileDirectory", new object[] { + serverId}, callback, asyncState); + } + + /// + public string EndWpiGetLogFileDirectory(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string)(results[0])); + } + + /// + public void WpiGetLogFileDirectoryAsync(int serverId) { + this.WpiGetLogFileDirectoryAsync(serverId, null); + } + + /// + public void WpiGetLogFileDirectoryAsync(int serverId, object userState) { + if ((this.WpiGetLogFileDirectoryOperationCompleted == null)) { + this.WpiGetLogFileDirectoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWpiGetLogFileDirectoryOperationCompleted); + } + this.InvokeAsync("WpiGetLogFileDirectory", new object[] { + serverId}, this.WpiGetLogFileDirectoryOperationCompleted, userState); + } + + private void OnWpiGetLogFileDirectoryOperationCompleted(object arg) { + if ((this.WpiGetLogFileDirectoryCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.WpiGetLogFileDirectoryCompleted(this, new WpiGetLogFileDirectoryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/WpiGetLogsInDirectory", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SettingPair[] WpiGetLogsInDirectory(int serverId, string Path) { + object[] results = this.Invoke("WpiGetLogsInDirectory", new object[] { + serverId, + Path}); + return ((SettingPair[])(results[0])); + } + + /// + public System.IAsyncResult BeginWpiGetLogsInDirectory(int serverId, string Path, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("WpiGetLogsInDirectory", new object[] { + serverId, + Path}, callback, asyncState); + } + + /// + public SettingPair[] EndWpiGetLogsInDirectory(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((SettingPair[])(results[0])); + } + + /// + public void WpiGetLogsInDirectoryAsync(int serverId, string Path) { + this.WpiGetLogsInDirectoryAsync(serverId, Path, null); + } + + /// + public void WpiGetLogsInDirectoryAsync(int serverId, string Path, object userState) { + if ((this.WpiGetLogsInDirectoryOperationCompleted == null)) { + this.WpiGetLogsInDirectoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWpiGetLogsInDirectoryOperationCompleted); + } + this.InvokeAsync("WpiGetLogsInDirectory", new object[] { + serverId, + Path}, this.WpiGetLogsInDirectoryOperationCompleted, userState); + } + + private void OnWpiGetLogsInDirectoryOperationCompleted(object arg) { + if ((this.WpiGetLogsInDirectoryCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.WpiGetLogsInDirectoryCompleted(this, new WpiGetLogsInDirectoryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWindowsServices", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] @@ -4679,72 +5975,85 @@ namespace WebsitePanel.EnterpriseServer { serverId}); return ((WindowsService[])(results[0])); } - + /// - public System.IAsyncResult BeginGetWindowsServices(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetWindowsServices(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetWindowsServices", new object[] { serverId}, callback, asyncState); } - + /// - public WindowsService[] EndGetWindowsServices(System.IAsyncResult asyncResult) { + public WindowsService[] EndGetWindowsServices(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((WindowsService[])(results[0])); } - + /// - public void GetWindowsServicesAsync(int serverId) { + public void GetWindowsServicesAsync(int serverId) + { this.GetWindowsServicesAsync(serverId, null); } - + /// - public void GetWindowsServicesAsync(int serverId, object userState) { - if ((this.GetWindowsServicesOperationCompleted == null)) { + public void GetWindowsServicesAsync(int serverId, object userState) + { + if ((this.GetWindowsServicesOperationCompleted == null)) + { this.GetWindowsServicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWindowsServicesOperationCompleted); } this.InvokeAsync("GetWindowsServices", new object[] { serverId}, this.GetWindowsServicesOperationCompleted, userState); } - - private void OnGetWindowsServicesOperationCompleted(object arg) { - if ((this.GetWindowsServicesCompleted != null)) { + + private void OnGetWindowsServicesOperationCompleted(object arg) + { + if ((this.GetWindowsServicesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetWindowsServicesCompleted(this, new GetWindowsServicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/ChangeWindowsServiceStatus", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int ChangeWindowsServiceStatus(int serverId, string id, WindowsServiceStatus status) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/ChangeWindowsServiceStatus", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int ChangeWindowsServiceStatus(int serverId, string id, WindowsServiceStatus status) + { object[] results = this.Invoke("ChangeWindowsServiceStatus", new object[] { serverId, id, status}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginChangeWindowsServiceStatus(int serverId, string id, WindowsServiceStatus status, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginChangeWindowsServiceStatus(int serverId, string id, WindowsServiceStatus status, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("ChangeWindowsServiceStatus", new object[] { serverId, id, status}, callback, asyncState); } - + /// - public int EndChangeWindowsServiceStatus(System.IAsyncResult asyncResult) { + public int EndChangeWindowsServiceStatus(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void ChangeWindowsServiceStatusAsync(int serverId, string id, WindowsServiceStatus status) { + public void ChangeWindowsServiceStatusAsync(int serverId, string id, WindowsServiceStatus status) + { this.ChangeWindowsServiceStatusAsync(serverId, id, status, null); } - + /// - public void ChangeWindowsServiceStatusAsync(int serverId, string id, WindowsServiceStatus status, object userState) { - if ((this.ChangeWindowsServiceStatusOperationCompleted == null)) { + public void ChangeWindowsServiceStatusAsync(int serverId, string id, WindowsServiceStatus status, object userState) + { + if ((this.ChangeWindowsServiceStatusOperationCompleted == null)) + { this.ChangeWindowsServiceStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnChangeWindowsServiceStatusOperationCompleted); } this.InvokeAsync("ChangeWindowsServiceStatus", new object[] { @@ -4752,102 +6061,121 @@ namespace WebsitePanel.EnterpriseServer { id, status}, this.ChangeWindowsServiceStatusOperationCompleted, userState); } - - private void OnChangeWindowsServiceStatusOperationCompleted(object arg) { - if ((this.ChangeWindowsServiceStatusCompleted != null)) { + + private void OnChangeWindowsServiceStatusOperationCompleted(object arg) + { + if ((this.ChangeWindowsServiceStatusCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ChangeWindowsServiceStatusCompleted(this, new ChangeWindowsServiceStatusCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetLogNames", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string[] GetLogNames(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetLogNames", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetLogNames(int serverId) + { object[] results = this.Invoke("GetLogNames", new object[] { serverId}); return ((string[])(results[0])); } - + /// - public System.IAsyncResult BeginGetLogNames(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetLogNames(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetLogNames", new object[] { serverId}, callback, asyncState); } - + /// - public string[] EndGetLogNames(System.IAsyncResult asyncResult) { + public string[] EndGetLogNames(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string[])(results[0])); } - + /// - public void GetLogNamesAsync(int serverId) { + public void GetLogNamesAsync(int serverId) + { this.GetLogNamesAsync(serverId, null); } - + /// - public void GetLogNamesAsync(int serverId, object userState) { - if ((this.GetLogNamesOperationCompleted == null)) { + public void GetLogNamesAsync(int serverId, object userState) + { + if ((this.GetLogNamesOperationCompleted == null)) + { this.GetLogNamesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLogNamesOperationCompleted); } this.InvokeAsync("GetLogNames", new object[] { serverId}, this.GetLogNamesOperationCompleted, userState); } - - private void OnGetLogNamesOperationCompleted(object arg) { - if ((this.GetLogNamesCompleted != null)) { + + private void OnGetLogNamesOperationCompleted(object arg) + { + if ((this.GetLogNamesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetLogNamesCompleted(this, new GetLogNamesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetLogEntries", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SystemLogEntry[] GetLogEntries(int serverId, string logName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetLogEntries", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SystemLogEntry[] GetLogEntries(int serverId, string logName) + { object[] results = this.Invoke("GetLogEntries", new object[] { serverId, logName}); return ((SystemLogEntry[])(results[0])); } - + /// - public System.IAsyncResult BeginGetLogEntries(int serverId, string logName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetLogEntries(int serverId, string logName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetLogEntries", new object[] { serverId, logName}, callback, asyncState); } - + /// - public SystemLogEntry[] EndGetLogEntries(System.IAsyncResult asyncResult) { + public SystemLogEntry[] EndGetLogEntries(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((SystemLogEntry[])(results[0])); } - + /// - public void GetLogEntriesAsync(int serverId, string logName) { + public void GetLogEntriesAsync(int serverId, string logName) + { this.GetLogEntriesAsync(serverId, logName, null); } - + /// - public void GetLogEntriesAsync(int serverId, string logName, object userState) { - if ((this.GetLogEntriesOperationCompleted == null)) { + public void GetLogEntriesAsync(int serverId, string logName, object userState) + { + if ((this.GetLogEntriesOperationCompleted == null)) + { this.GetLogEntriesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLogEntriesOperationCompleted); } this.InvokeAsync("GetLogEntries", new object[] { serverId, logName}, this.GetLogEntriesOperationCompleted, userState); } - - private void OnGetLogEntriesOperationCompleted(object arg) { - if ((this.GetLogEntriesCompleted != null)) { + + private void OnGetLogEntriesOperationCompleted(object arg) + { + if ((this.GetLogEntriesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetLogEntriesCompleted(this, new GetLogEntriesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetLogEntriesPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SystemLogEntriesPaged GetLogEntriesPaged(int serverId, string logName, int startRow, int maximumRows) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetLogEntriesPaged", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SystemLogEntriesPaged GetLogEntriesPaged(int serverId, string logName, int startRow, int maximumRows) + { object[] results = this.Invoke("GetLogEntriesPaged", new object[] { serverId, logName, @@ -4855,30 +6183,35 @@ namespace WebsitePanel.EnterpriseServer { maximumRows}); return ((SystemLogEntriesPaged)(results[0])); } - + /// - public System.IAsyncResult BeginGetLogEntriesPaged(int serverId, string logName, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetLogEntriesPaged(int serverId, string logName, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetLogEntriesPaged", new object[] { serverId, logName, startRow, maximumRows}, callback, asyncState); } - + /// - public SystemLogEntriesPaged EndGetLogEntriesPaged(System.IAsyncResult asyncResult) { + public SystemLogEntriesPaged EndGetLogEntriesPaged(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((SystemLogEntriesPaged)(results[0])); } - + /// - public void GetLogEntriesPagedAsync(int serverId, string logName, int startRow, int maximumRows) { + public void GetLogEntriesPagedAsync(int serverId, string logName, int startRow, int maximumRows) + { this.GetLogEntriesPagedAsync(serverId, logName, startRow, maximumRows, null); } - + /// - public void GetLogEntriesPagedAsync(int serverId, string logName, int startRow, int maximumRows, object userState) { - if ((this.GetLogEntriesPagedOperationCompleted == null)) { + public void GetLogEntriesPagedAsync(int serverId, string logName, int startRow, int maximumRows, object userState) + { + if ((this.GetLogEntriesPagedOperationCompleted == null)) + { this.GetLogEntriesPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLogEntriesPagedOperationCompleted); } this.InvokeAsync("GetLogEntriesPaged", new object[] { @@ -4887,1187 +6220,3099 @@ namespace WebsitePanel.EnterpriseServer { startRow, maximumRows}, this.GetLogEntriesPagedOperationCompleted, userState); } - - private void OnGetLogEntriesPagedOperationCompleted(object arg) { - if ((this.GetLogEntriesPagedCompleted != null)) { + + private void OnGetLogEntriesPagedOperationCompleted(object arg) + { + if ((this.GetLogEntriesPagedCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetLogEntriesPagedCompleted(this, new GetLogEntriesPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/ClearLog", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int ClearLog(int serverId, string logName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/ClearLog", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int ClearLog(int serverId, string logName) + { object[] results = this.Invoke("ClearLog", new object[] { serverId, logName}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginClearLog(int serverId, string logName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginClearLog(int serverId, string logName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("ClearLog", new object[] { serverId, logName}, callback, asyncState); } - + /// - public int EndClearLog(System.IAsyncResult asyncResult) { + public int EndClearLog(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void ClearLogAsync(int serverId, string logName) { + public void ClearLogAsync(int serverId, string logName) + { this.ClearLogAsync(serverId, logName, null); } - + /// - public void ClearLogAsync(int serverId, string logName, object userState) { - if ((this.ClearLogOperationCompleted == null)) { + public void ClearLogAsync(int serverId, string logName, object userState) + { + if ((this.ClearLogOperationCompleted == null)) + { this.ClearLogOperationCompleted = new System.Threading.SendOrPostCallback(this.OnClearLogOperationCompleted); } this.InvokeAsync("ClearLog", new object[] { serverId, logName}, this.ClearLogOperationCompleted, userState); } - - private void OnClearLogOperationCompleted(object arg) { - if ((this.ClearLogCompleted != null)) { + + private void OnClearLogOperationCompleted(object arg) + { + if ((this.ClearLogCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ClearLogCompleted(this, new ClearLogCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RebootSystem", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int RebootSystem(int serverId) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RebootSystem", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int RebootSystem(int serverId) + { object[] results = this.Invoke("RebootSystem", new object[] { serverId}); return ((int)(results[0])); } - + /// - public System.IAsyncResult BeginRebootSystem(int serverId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginRebootSystem(int serverId, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("RebootSystem", new object[] { serverId}, callback, asyncState); } - + /// - public int EndRebootSystem(System.IAsyncResult asyncResult) { + public int EndRebootSystem(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int)(results[0])); } - + /// - public void RebootSystemAsync(int serverId) { + public void RebootSystemAsync(int serverId) + { this.RebootSystemAsync(serverId, null); } - + /// - public void RebootSystemAsync(int serverId, object userState) { - if ((this.RebootSystemOperationCompleted == null)) { + public void RebootSystemAsync(int serverId, object userState) + { + if ((this.RebootSystemOperationCompleted == null)) + { this.RebootSystemOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRebootSystemOperationCompleted); } this.InvokeAsync("RebootSystem", new object[] { serverId}, this.RebootSystemOperationCompleted, userState); } - - private void OnRebootSystemOperationCompleted(object arg) { - if ((this.RebootSystemCompleted != null)) { + + private void OnRebootSystemOperationCompleted(object arg) + { + if ((this.RebootSystemCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.RebootSystemCompleted(this, new RebootSystemCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - public new void CancelAsync(object userState) { + public new void CancelAsync(object userState) + { base.CancelAsync(userState); } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetAllServersCompletedEventHandler(object sender, GetAllServersCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetAllServersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetAllServersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetAllServersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetAllServersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ServerInfo[] Result { - get { + public ServerInfo[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ServerInfo[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetRawAllServersCompletedEventHandler(object sender, GetRawAllServersCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawAllServersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetRawAllServersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetRawAllServersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetRawAllServersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public System.Data.DataSet Result { - get { + public System.Data.DataSet Result + { + get + { this.RaiseExceptionIfNecessary(); return ((System.Data.DataSet)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetServersCompletedEventHandler(object sender, GetServersCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetServersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetServersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetServersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetServersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ServerInfo[] Result { - get { + public ServerInfo[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ServerInfo[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetRawServersCompletedEventHandler(object sender, GetRawServersCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawServersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetRawServersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetRawServersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetRawServersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public System.Data.DataSet Result { - get { + public System.Data.DataSet Result + { + get + { this.RaiseExceptionIfNecessary(); return ((System.Data.DataSet)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetServerShortDetailsCompletedEventHandler(object sender, GetServerShortDetailsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetServerShortDetailsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetServerShortDetailsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetServerShortDetailsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetServerShortDetailsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ServerInfo Result { - get { + public ServerInfo Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ServerInfo)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetServerByIdCompletedEventHandler(object sender, GetServerByIdCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetServerByIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetServerByIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetServerByIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetServerByIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ServerInfo Result { - get { + public ServerInfo Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ServerInfo)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetServerByNameCompletedEventHandler(object sender, GetServerByNameCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetServerByNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetServerByNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetServerByNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetServerByNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ServerInfo Result { - get { + public ServerInfo Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ServerInfo)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CheckServerAvailableCompletedEventHandler(object sender, CheckServerAvailableCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CheckServerAvailableCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class CheckServerAvailableCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal CheckServerAvailableCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal CheckServerAvailableCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddServerCompletedEventHandler(object sender, AddServerCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class AddServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal AddServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal AddServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateServerCompletedEventHandler(object sender, UpdateServerCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class UpdateServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal UpdateServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal UpdateServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateServerConnectionPasswordCompletedEventHandler(object sender, UpdateServerConnectionPasswordCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateServerConnectionPasswordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class UpdateServerConnectionPasswordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal UpdateServerConnectionPasswordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal UpdateServerConnectionPasswordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateServerADPasswordCompletedEventHandler(object sender, UpdateServerADPasswordCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateServerADPasswordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class UpdateServerADPasswordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal UpdateServerADPasswordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal UpdateServerADPasswordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteServerCompletedEventHandler(object sender, DeleteServerCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeleteServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeleteServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeleteServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetVirtualServersCompletedEventHandler(object sender, GetVirtualServersCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetVirtualServersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetVirtualServersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetVirtualServersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetVirtualServersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public System.Data.DataSet Result { - get { + public System.Data.DataSet Result + { + get + { this.RaiseExceptionIfNecessary(); return ((System.Data.DataSet)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetAvailableVirtualServicesCompletedEventHandler(object sender, GetAvailableVirtualServicesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetAvailableVirtualServicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetAvailableVirtualServicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetAvailableVirtualServicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetAvailableVirtualServicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public System.Data.DataSet Result { - get { + public System.Data.DataSet Result + { + get + { this.RaiseExceptionIfNecessary(); return ((System.Data.DataSet)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetVirtualServicesCompletedEventHandler(object sender, GetVirtualServicesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetVirtualServicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetVirtualServicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetVirtualServicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetVirtualServicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public System.Data.DataSet Result { - get { + public System.Data.DataSet Result + { + get + { this.RaiseExceptionIfNecessary(); return ((System.Data.DataSet)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddVirtualServicesCompletedEventHandler(object sender, AddVirtualServicesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddVirtualServicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class AddVirtualServicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal AddVirtualServicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal AddVirtualServicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteVirtualServicesCompletedEventHandler(object sender, DeleteVirtualServicesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteVirtualServicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeleteVirtualServicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeleteVirtualServicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeleteVirtualServicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateVirtualGroupsCompletedEventHandler(object sender, UpdateVirtualGroupsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateVirtualGroupsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class UpdateVirtualGroupsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal UpdateVirtualGroupsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal UpdateVirtualGroupsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetRawServicesByServerIdCompletedEventHandler(object sender, GetRawServicesByServerIdCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawServicesByServerIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetRawServicesByServerIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetRawServicesByServerIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetRawServicesByServerIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public System.Data.DataSet Result { - get { + public System.Data.DataSet Result + { + get + { this.RaiseExceptionIfNecessary(); return ((System.Data.DataSet)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetServicesByServerIdCompletedEventHandler(object sender, GetServicesByServerIdCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetServicesByServerIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetServicesByServerIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetServicesByServerIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetServicesByServerIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ServiceInfo[] Result { - get { + public ServiceInfo[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ServiceInfo[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetServicesByServerIdGroupNameCompletedEventHandler(object sender, GetServicesByServerIdGroupNameCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetServicesByServerIdGroupNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetServicesByServerIdGroupNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetServicesByServerIdGroupNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetServicesByServerIdGroupNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ServiceInfo[] Result { - get { + public ServiceInfo[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ServiceInfo[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetRawServicesByGroupIdCompletedEventHandler(object sender, GetRawServicesByGroupIdCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawServicesByGroupIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetRawServicesByGroupIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetRawServicesByGroupIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetRawServicesByGroupIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public System.Data.DataSet Result { - get { + public System.Data.DataSet Result + { + get + { this.RaiseExceptionIfNecessary(); return ((System.Data.DataSet)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetRawServicesByGroupNameCompletedEventHandler(object sender, GetRawServicesByGroupNameCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawServicesByGroupNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetRawServicesByGroupNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetRawServicesByGroupNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetRawServicesByGroupNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public System.Data.DataSet Result { - get { + public System.Data.DataSet Result + { + get + { this.RaiseExceptionIfNecessary(); return ((System.Data.DataSet)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetServiceInfoCompletedEventHandler(object sender, GetServiceInfoCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetServiceInfoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetServiceInfoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetServiceInfoCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetServiceInfoCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ServiceInfo Result { - get { + public ServiceInfo Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ServiceInfo)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddServiceCompletedEventHandler(object sender, AddServiceCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddServiceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class AddServiceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal AddServiceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal AddServiceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateServiceCompletedEventHandler(object sender, UpdateServiceCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateServiceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class UpdateServiceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal UpdateServiceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal UpdateServiceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteServiceCompletedEventHandler(object sender, DeleteServiceCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteServiceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class DeleteServiceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal DeleteServiceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal DeleteServiceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetServiceSettingsCompletedEventHandler(object sender, GetServiceSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetServiceSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetServiceSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetServiceSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetServiceSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public string[] Result { - get { + public string[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((string[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateServiceSettingsCompletedEventHandler(object sender, UpdateServiceSettingsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateServiceSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class UpdateServiceSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal UpdateServiceSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal UpdateServiceSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void InstallServiceCompletedEventHandler(object sender, InstallServiceCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class InstallServiceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class InstallServiceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal InstallServiceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal InstallServiceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public string[] Result { - get { + public string[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((string[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetProviderServiceQuotaCompletedEventHandler(object sender, GetProviderServiceQuotaCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetProviderServiceQuotaCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetProviderServiceQuotaCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetProviderServiceQuotaCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetProviderServiceQuotaCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public QuotaInfo Result { - get { + public QuotaInfo Result + { + get + { this.RaiseExceptionIfNecessary(); return ((QuotaInfo)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetInstalledProvidersCompletedEventHandler(object sender, GetInstalledProvidersCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetInstalledProvidersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetInstalledProvidersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetInstalledProvidersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetInstalledProvidersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ProviderInfo[] Result { - get { + public ProviderInfo[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ProviderInfo[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetResourceGroupsCompletedEventHandler(object sender, GetResourceGroupsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetResourceGroupsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetResourceGroupsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetResourceGroupsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetResourceGroupsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ResourceGroupInfo[] Result { - get { + public ResourceGroupInfo[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ResourceGroupInfo[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetResourceGroupCompletedEventHandler(object sender, GetResourceGroupCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetResourceGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetResourceGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetResourceGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetResourceGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ResourceGroupInfo Result { - get { + public ResourceGroupInfo Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ResourceGroupInfo)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetProviderCompletedEventHandler(object sender, GetProviderCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetProviderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetProviderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetProviderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetProviderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ProviderInfo Result { - get { + public ProviderInfo Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ProviderInfo)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetProvidersCompletedEventHandler(object sender, GetProvidersCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetProvidersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetProvidersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetProvidersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetProvidersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ProviderInfo[] Result { - get { + public ProviderInfo[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ProviderInfo[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetProvidersByGroupIdCompletedEventHandler(object sender, GetProvidersByGroupIdCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetProvidersByGroupIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetProvidersByGroupIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetProvidersByGroupIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetProvidersByGroupIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ProviderInfo[] Result { - get { + public ProviderInfo[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ProviderInfo[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetPackageServiceProviderCompletedEventHandler(object sender, GetPackageServiceProviderCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPackageServiceProviderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetPackageServiceProviderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetPackageServiceProviderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetPackageServiceProviderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public ProviderInfo Result { - get { + public ProviderInfo Result + { + get + { this.RaiseExceptionIfNecessary(); return ((ProviderInfo)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void IsInstalledCompletedEventHandler(object sender, IsInstalledCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class IsInstalledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class IsInstalledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal IsInstalledCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal IsInstalledCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public BoolResult Result { - get { + public BoolResult Result + { + get + { this.RaiseExceptionIfNecessary(); return ((BoolResult)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetServerVersionCompletedEventHandler(object sender, GetServerVersionCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetServerVersionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetServerVersionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public string Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetIPAddressesCompletedEventHandler(object sender, GetIPAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public IPAddressInfo[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((IPAddressInfo[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetIPAddressesPagedCompletedEventHandler(object sender, GetIPAddressesPagedCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetIPAddressesPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetIPAddressesPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public IPAddressesPaged Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((IPAddressesPaged)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetIPAddressCompletedEventHandler(object sender, GetIPAddressCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetIPAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetIPAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public IPAddressInfo Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((IPAddressInfo)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddIPAddressCompletedEventHandler(object sender, AddIPAddressCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddIPAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddIPAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public IntResult Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((IntResult)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddIPAddressesRangeCompletedEventHandler(object sender, AddIPAddressesRangeCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddIPAddressesRangeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddIPAddressesRangeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ResultObject Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void UpdateIPAddressCompletedEventHandler(object sender, UpdateIPAddressCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class UpdateIPAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal UpdateIPAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ResultObject Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void UpdateIPAddressesCompletedEventHandler(object sender, UpdateIPAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class UpdateIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal UpdateIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ResultObject Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteIPAddressCompletedEventHandler(object sender, DeleteIPAddressCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteIPAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteIPAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ResultObject Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteIPAddressesCompletedEventHandler(object sender, DeleteIPAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ResultObject Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetUnallottedIPAddressesCompletedEventHandler(object sender, GetUnallottedIPAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetUnallottedIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetUnallottedIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public IPAddressInfo[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((IPAddressInfo[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetPackageIPAddressesCompletedEventHandler(object sender, GetPackageIPAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPackageIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetPackageIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public PackageIPAddressesPaged Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((PackageIPAddressesPaged)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetPackageUnassignedIPAddressesCompletedEventHandler(object sender, GetPackageUnassignedIPAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPackageUnassignedIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetPackageUnassignedIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public PackageIPAddress[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((PackageIPAddress[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AllocatePackageIPAddressesCompletedEventHandler(object sender, AllocatePackageIPAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AllocatePackageIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AllocatePackageIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ResultObject Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AllocateMaximumPackageIPAddressesCompletedEventHandler(object sender, AllocateMaximumPackageIPAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AllocateMaximumPackageIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AllocateMaximumPackageIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ResultObject Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeallocatePackageIPAddressesCompletedEventHandler(object sender, DeallocatePackageIPAddressesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeallocatePackageIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeallocatePackageIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ResultObject Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetClustersCompletedEventHandler(object sender, GetClustersCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetClustersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetClustersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ClusterInfo[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ClusterInfo[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddClusterCompletedEventHandler(object sender, AddClusterCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddClusterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddClusterCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteClusterCompletedEventHandler(object sender, DeleteClusterCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteClusterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteClusterCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetRawDnsRecordsByServiceCompletedEventHandler(object sender, GetRawDnsRecordsByServiceCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRawDnsRecordsByServiceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetRawDnsRecordsByServiceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public System.Data.DataSet Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((System.Data.DataSet)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetRawDnsRecordsByServerCompletedEventHandler(object sender, GetRawDnsRecordsByServerCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRawDnsRecordsByServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetRawDnsRecordsByServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public System.Data.DataSet Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((System.Data.DataSet)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetRawDnsRecordsByPackageCompletedEventHandler(object sender, GetRawDnsRecordsByPackageCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRawDnsRecordsByPackageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetRawDnsRecordsByPackageCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public System.Data.DataSet Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((System.Data.DataSet)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetRawDnsRecordsByGroupCompletedEventHandler(object sender, GetRawDnsRecordsByGroupCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRawDnsRecordsByGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetRawDnsRecordsByGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public System.Data.DataSet Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((System.Data.DataSet)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDnsRecordsByServiceCompletedEventHandler(object sender, GetDnsRecordsByServiceCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDnsRecordsByServiceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDnsRecordsByServiceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public GlobalDnsRecord[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((GlobalDnsRecord[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDnsRecordsByServerCompletedEventHandler(object sender, GetDnsRecordsByServerCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDnsRecordsByServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDnsRecordsByServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public GlobalDnsRecord[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((GlobalDnsRecord[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDnsRecordsByPackageCompletedEventHandler(object sender, GetDnsRecordsByPackageCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDnsRecordsByPackageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDnsRecordsByPackageCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public GlobalDnsRecord[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((GlobalDnsRecord[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDnsRecordsByGroupCompletedEventHandler(object sender, GetDnsRecordsByGroupCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDnsRecordsByGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDnsRecordsByGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public GlobalDnsRecord[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((GlobalDnsRecord[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDnsRecordCompletedEventHandler(object sender, GetDnsRecordCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDnsRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDnsRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public GlobalDnsRecord Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((GlobalDnsRecord)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddDnsRecordCompletedEventHandler(object sender, AddDnsRecordCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddDnsRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddDnsRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void UpdateDnsRecordCompletedEventHandler(object sender, UpdateDnsRecordCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class UpdateDnsRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal UpdateDnsRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteDnsRecordCompletedEventHandler(object sender, DeleteDnsRecordCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteDnsRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteDnsRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDomainsCompletedEventHandler(object sender, GetDomainsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public DomainInfo[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((DomainInfo[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetMyDomainsCompletedEventHandler(object sender, GetMyDomainsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetMyDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetMyDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public DomainInfo[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((DomainInfo[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetResellerDomainsCompletedEventHandler(object sender, GetResellerDomainsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetResellerDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetResellerDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public DomainInfo[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((DomainInfo[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDomainsPagedCompletedEventHandler(object sender, GetDomainsPagedCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDomainsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDomainsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public System.Data.DataSet Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((System.Data.DataSet)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDomainCompletedEventHandler(object sender, GetDomainCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public DomainInfo Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((DomainInfo)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddDomainCompletedEventHandler(object sender, AddDomainCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddDomainWithProvisioningCompletedEventHandler(object sender, AddDomainWithProvisioningCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddDomainWithProvisioningCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddDomainWithProvisioningCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void UpdateDomainCompletedEventHandler(object sender, UpdateDomainCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class UpdateDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal UpdateDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteDomainCompletedEventHandler(object sender, DeleteDomainCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DetachDomainCompletedEventHandler(object sender, DetachDomainCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DetachDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DetachDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void EnableDomainDnsCompletedEventHandler(object sender, EnableDomainDnsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class EnableDomainDnsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal EnableDomainDnsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DisableDomainDnsCompletedEventHandler(object sender, DisableDomainDnsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DisableDomainDnsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DisableDomainDnsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateDomainInstantAliasCompletedEventHandler(object sender, CreateDomainInstantAliasCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateDomainInstantAliasCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CreateDomainInstantAliasCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteDomainInstantAliasCompletedEventHandler(object sender, DeleteDomainInstantAliasCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteDomainInstantAliasCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteDomainInstantAliasCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetDnsZoneRecordsCompletedEventHandler(object sender, GetDnsZoneRecordsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetDnsZoneRecordsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetDnsZoneRecordsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public DnsRecord[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((DnsRecord[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetRawDnsZoneRecordsCompletedEventHandler(object sender, GetRawDnsZoneRecordsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRawDnsZoneRecordsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetRawDnsZoneRecordsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public System.Data.DataSet Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((System.Data.DataSet)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddDnsZoneRecordCompletedEventHandler(object sender, AddDnsZoneRecordCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddDnsZoneRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddDnsZoneRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void UpdateDnsZoneRecordCompletedEventHandler(object sender, UpdateDnsZoneRecordCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class UpdateDnsZoneRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal UpdateDnsZoneRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteDnsZoneRecordCompletedEventHandler(object sender, DeleteDnsZoneRecordCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteDnsZoneRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteDnsZoneRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetTerminalServicesSessionsCompletedEventHandler(object sender, GetTerminalServicesSessionsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetTerminalServicesSessionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetTerminalServicesSessionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public TerminalSession[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((TerminalSession[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CloseTerminalServicesSessionCompletedEventHandler(object sender, CloseTerminalServicesSessionCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CloseTerminalServicesSessionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CloseTerminalServicesSessionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetWindowsProcessesCompletedEventHandler(object sender, GetWindowsProcessesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWindowsProcessesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetWindowsProcessesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public WindowsProcess[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((WindowsProcess[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void TerminateWindowsProcessCompletedEventHandler(object sender, TerminateWindowsProcessCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class TerminateWindowsProcessCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal TerminateWindowsProcessCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public int Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void InitWPIFeedsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetWPITabsCompletedEventHandler(object sender, GetWPITabsCompletedEventArgs e); /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetServerVersionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + public partial class GetWPITabsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; - internal GetServerVersionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + internal GetWPITabsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public WPITab[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((WPITab[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetWPIKeywordsCompletedEventHandler(object sender, GetWPIKeywordsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWPIKeywordsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWPIKeywordsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public WPIKeyword[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((WPIKeyword[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetWPIProductsCompletedEventHandler(object sender, GetWPIProductsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWPIProductsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWPIProductsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public WPIProduct[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((WPIProduct[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetWPIProductsFilteredCompletedEventHandler(object sender, GetWPIProductsFilteredCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWPIProductsFilteredCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWPIProductsFilteredCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public WPIProduct[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((WPIProduct[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetWPIProductsWithDependenciesCompletedEventHandler(object sender, GetWPIProductsWithDependenciesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWPIProductsWithDependenciesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWPIProductsWithDependenciesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public WPIProduct[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((WPIProduct[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void InstallWPIProductsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CancelInstallWPIProductsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetWPIStatusCompletedEventHandler(object sender, GetWPIStatusCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWPIStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWPIStatusCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } @@ -6083,1378 +9328,52 @@ namespace WebsitePanel.EnterpriseServer { /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetIPAddressesCompletedEventHandler(object sender, GetIPAddressesCompletedEventArgs e); + public delegate void WpiGetLogFileDirectoryCompletedEventHandler(object sender, WpiGetLogFileDirectoryCompletedEventArgs e); /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + public partial class WpiGetLogFileDirectoryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; - internal GetIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + internal WpiGetLogFileDirectoryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } /// - public IPAddressInfo[] Result { + public string Result { get { this.RaiseExceptionIfNecessary(); - return ((IPAddressInfo[])(this.results[0])); + return ((string)(this.results[0])); } } } /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetIPAddressesPagedCompletedEventHandler(object sender, GetIPAddressesPagedCompletedEventArgs e); + public delegate void WpiGetLogsInDirectoryCompletedEventHandler(object sender, WpiGetLogsInDirectoryCompletedEventArgs e); /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetIPAddressesPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + public partial class WpiGetLogsInDirectoryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; - internal GetIPAddressesPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + internal WpiGetLogsInDirectoryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } /// - public IPAddressesPaged Result { + public SettingPair[] Result { get { this.RaiseExceptionIfNecessary(); - return ((IPAddressesPaged)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetIPAddressCompletedEventHandler(object sender, GetIPAddressCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetIPAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetIPAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public IPAddressInfo Result { - get { - this.RaiseExceptionIfNecessary(); - return ((IPAddressInfo)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void AddIPAddressCompletedEventHandler(object sender, AddIPAddressCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddIPAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AddIPAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public IntResult Result { - get { - this.RaiseExceptionIfNecessary(); - return ((IntResult)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void AddIPAddressesRangeCompletedEventHandler(object sender, AddIPAddressesRangeCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddIPAddressesRangeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AddIPAddressesRangeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void UpdateIPAddressCompletedEventHandler(object sender, UpdateIPAddressCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateIPAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal UpdateIPAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void UpdateIPAddressesCompletedEventHandler(object sender, UpdateIPAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal UpdateIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DeleteIPAddressCompletedEventHandler(object sender, DeleteIPAddressCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteIPAddressCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteIPAddressCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DeleteIPAddressesCompletedEventHandler(object sender, DeleteIPAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetUnallottedIPAddressesCompletedEventHandler(object sender, GetUnallottedIPAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetUnallottedIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetUnallottedIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public IPAddressInfo[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((IPAddressInfo[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetPackageIPAddressesCompletedEventHandler(object sender, GetPackageIPAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPackageIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetPackageIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public PackageIPAddressesPaged Result { - get { - this.RaiseExceptionIfNecessary(); - return ((PackageIPAddressesPaged)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetPackageUnassignedIPAddressesCompletedEventHandler(object sender, GetPackageUnassignedIPAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetPackageUnassignedIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetPackageUnassignedIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public PackageIPAddress[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((PackageIPAddress[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void AllocatePackageIPAddressesCompletedEventHandler(object sender, AllocatePackageIPAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AllocatePackageIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AllocatePackageIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void AllocateMaximumPackageIPAddressesCompletedEventHandler(object sender, AllocateMaximumPackageIPAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AllocateMaximumPackageIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AllocateMaximumPackageIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DeallocatePackageIPAddressesCompletedEventHandler(object sender, DeallocatePackageIPAddressesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeallocatePackageIPAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeallocatePackageIPAddressesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ResultObject Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ResultObject)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetClustersCompletedEventHandler(object sender, GetClustersCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetClustersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetClustersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ClusterInfo[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ClusterInfo[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void AddClusterCompletedEventHandler(object sender, AddClusterCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddClusterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AddClusterCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DeleteClusterCompletedEventHandler(object sender, DeleteClusterCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteClusterCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteClusterCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetRawDnsRecordsByServiceCompletedEventHandler(object sender, GetRawDnsRecordsByServiceCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawDnsRecordsByServiceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetRawDnsRecordsByServiceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public System.Data.DataSet Result { - get { - this.RaiseExceptionIfNecessary(); - return ((System.Data.DataSet)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetRawDnsRecordsByServerCompletedEventHandler(object sender, GetRawDnsRecordsByServerCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawDnsRecordsByServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetRawDnsRecordsByServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public System.Data.DataSet Result { - get { - this.RaiseExceptionIfNecessary(); - return ((System.Data.DataSet)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetRawDnsRecordsByPackageCompletedEventHandler(object sender, GetRawDnsRecordsByPackageCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawDnsRecordsByPackageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetRawDnsRecordsByPackageCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public System.Data.DataSet Result { - get { - this.RaiseExceptionIfNecessary(); - return ((System.Data.DataSet)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetRawDnsRecordsByGroupCompletedEventHandler(object sender, GetRawDnsRecordsByGroupCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawDnsRecordsByGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetRawDnsRecordsByGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public System.Data.DataSet Result { - get { - this.RaiseExceptionIfNecessary(); - return ((System.Data.DataSet)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetDnsRecordsByServiceCompletedEventHandler(object sender, GetDnsRecordsByServiceCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDnsRecordsByServiceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDnsRecordsByServiceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public GlobalDnsRecord[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((GlobalDnsRecord[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetDnsRecordsByServerCompletedEventHandler(object sender, GetDnsRecordsByServerCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDnsRecordsByServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDnsRecordsByServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public GlobalDnsRecord[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((GlobalDnsRecord[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetDnsRecordsByPackageCompletedEventHandler(object sender, GetDnsRecordsByPackageCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDnsRecordsByPackageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDnsRecordsByPackageCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public GlobalDnsRecord[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((GlobalDnsRecord[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetDnsRecordsByGroupCompletedEventHandler(object sender, GetDnsRecordsByGroupCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDnsRecordsByGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDnsRecordsByGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public GlobalDnsRecord[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((GlobalDnsRecord[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetDnsRecordCompletedEventHandler(object sender, GetDnsRecordCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDnsRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDnsRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public GlobalDnsRecord Result { - get { - this.RaiseExceptionIfNecessary(); - return ((GlobalDnsRecord)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void AddDnsRecordCompletedEventHandler(object sender, AddDnsRecordCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddDnsRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AddDnsRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void UpdateDnsRecordCompletedEventHandler(object sender, UpdateDnsRecordCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateDnsRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal UpdateDnsRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DeleteDnsRecordCompletedEventHandler(object sender, DeleteDnsRecordCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteDnsRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteDnsRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetDomainsCompletedEventHandler(object sender, GetDomainsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public DomainInfo[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((DomainInfo[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetMyDomainsCompletedEventHandler(object sender, GetMyDomainsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetMyDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetMyDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public DomainInfo[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((DomainInfo[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetResellerDomainsCompletedEventHandler(object sender, GetResellerDomainsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetResellerDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetResellerDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public DomainInfo[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((DomainInfo[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetDomainsPagedCompletedEventHandler(object sender, GetDomainsPagedCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDomainsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDomainsPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public System.Data.DataSet Result { - get { - this.RaiseExceptionIfNecessary(); - return ((System.Data.DataSet)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetDomainCompletedEventHandler(object sender, GetDomainCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public DomainInfo Result { - get { - this.RaiseExceptionIfNecessary(); - return ((DomainInfo)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void AddDomainCompletedEventHandler(object sender, AddDomainCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AddDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void AddDomainWithProvisioningCompletedEventHandler(object sender, AddDomainWithProvisioningCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddDomainWithProvisioningCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AddDomainWithProvisioningCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void UpdateDomainCompletedEventHandler(object sender, UpdateDomainCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal UpdateDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DeleteDomainCompletedEventHandler(object sender, DeleteDomainCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DetachDomainCompletedEventHandler(object sender, DetachDomainCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DetachDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DetachDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void EnableDomainDnsCompletedEventHandler(object sender, EnableDomainDnsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class EnableDomainDnsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal EnableDomainDnsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DisableDomainDnsCompletedEventHandler(object sender, DisableDomainDnsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DisableDomainDnsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DisableDomainDnsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void CreateDomainInstantAliasCompletedEventHandler(object sender, CreateDomainInstantAliasCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateDomainInstantAliasCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CreateDomainInstantAliasCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DeleteDomainInstantAliasCompletedEventHandler(object sender, DeleteDomainInstantAliasCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteDomainInstantAliasCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteDomainInstantAliasCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetDnsZoneRecordsCompletedEventHandler(object sender, GetDnsZoneRecordsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetDnsZoneRecordsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetDnsZoneRecordsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public DnsRecord[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((DnsRecord[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetRawDnsZoneRecordsCompletedEventHandler(object sender, GetRawDnsZoneRecordsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetRawDnsZoneRecordsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetRawDnsZoneRecordsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public System.Data.DataSet Result { - get { - this.RaiseExceptionIfNecessary(); - return ((System.Data.DataSet)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void AddDnsZoneRecordCompletedEventHandler(object sender, AddDnsZoneRecordCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AddDnsZoneRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal AddDnsZoneRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void UpdateDnsZoneRecordCompletedEventHandler(object sender, UpdateDnsZoneRecordCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class UpdateDnsZoneRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal UpdateDnsZoneRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DeleteDnsZoneRecordCompletedEventHandler(object sender, DeleteDnsZoneRecordCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteDnsZoneRecordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal DeleteDnsZoneRecordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetTerminalServicesSessionsCompletedEventHandler(object sender, GetTerminalServicesSessionsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetTerminalServicesSessionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetTerminalServicesSessionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public TerminalSession[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((TerminalSession[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void CloseTerminalServicesSessionCompletedEventHandler(object sender, CloseTerminalServicesSessionCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CloseTerminalServicesSessionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CloseTerminalServicesSessionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetWindowsProcessesCompletedEventHandler(object sender, GetWindowsProcessesCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetWindowsProcessesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetWindowsProcessesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public WindowsProcess[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((WindowsProcess[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void TerminateWindowsProcessCompletedEventHandler(object sender, TerminateWindowsProcessCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class TerminateWindowsProcessCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal TerminateWindowsProcessCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public int Result { - get { - this.RaiseExceptionIfNecessary(); - return ((int)(this.results[0])); + return ((SettingPair[])(this.results[0])); } } } @@ -7462,179 +9381,207 @@ namespace WebsitePanel.EnterpriseServer { /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetWindowsServicesCompletedEventHandler(object sender, GetWindowsServicesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetWindowsServicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetWindowsServicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetWindowsServicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetWindowsServicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public WindowsService[] Result { - get { + public WindowsService[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((WindowsService[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void ChangeWindowsServiceStatusCompletedEventHandler(object sender, ChangeWindowsServiceStatusCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class ChangeWindowsServiceStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class ChangeWindowsServiceStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal ChangeWindowsServiceStatusCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal ChangeWindowsServiceStatusCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetLogNamesCompletedEventHandler(object sender, GetLogNamesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetLogNamesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetLogNamesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetLogNamesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetLogNamesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public string[] Result { - get { + public string[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((string[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetLogEntriesCompletedEventHandler(object sender, GetLogEntriesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetLogEntriesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetLogEntriesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetLogEntriesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetLogEntriesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public SystemLogEntry[] Result { - get { + public SystemLogEntry[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((SystemLogEntry[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetLogEntriesPagedCompletedEventHandler(object sender, GetLogEntriesPagedCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetLogEntriesPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetLogEntriesPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetLogEntriesPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetLogEntriesPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public SystemLogEntriesPaged Result { - get { + public SystemLogEntriesPaged Result + { + get + { this.RaiseExceptionIfNecessary(); return ((SystemLogEntriesPaged)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void ClearLogCompletedEventHandler(object sender, ClearLogCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class ClearLogCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class ClearLogCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal ClearLogCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal ClearLogCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void RebootSystemCompletedEventHandler(object sender, RebootSystemCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class RebootSystemCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class RebootSystemCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal RebootSystemCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal RebootSystemCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int Result { - get { + public int Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int)(this.results[0])); } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/SharePointServersProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/SharePointServersProxy.cs index 9a2c05fa..00bbbbac 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/SharePointServersProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/SharePointServersProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/StatisticsServersProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/StatisticsServersProxy.cs index da3fa419..a804868b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/StatisticsServersProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/StatisticsServersProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/SystemProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/SystemProxy.cs index 45c41e24..e1d018f8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/SystemProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/SystemProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/TasksProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/TasksProxy.cs index 92536d3c..1bdd595d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/TasksProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/TasksProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/UsersProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/UsersProxy.cs index 2e62ba9c..136b7a15 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/UsersProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/UsersProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/VirtualizationServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/VirtualizationServerProxy.cs index 96cae293..d4f54d2a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/VirtualizationServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/VirtualizationServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/VirtualizationServerProxyForPrivateCloud.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/VirtualizationServerProxyForPrivateCloud.cs index 6a29a73b..9835c050 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/VirtualizationServerProxyForPrivateCloud.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/VirtualizationServerProxyForPrivateCloud.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebApplicationGalleryProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebApplicationGalleryProxy.cs index 2e1a519b..5e40b991 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebApplicationGalleryProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebApplicationGalleryProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -39,30 +39,39 @@ // // This source code was auto-generated by wsdl, Version=2.0.50727.1432. // -namespace WebsitePanel.EnterpriseServer { +namespace WebsitePanel.EnterpriseServer +{ using System.Diagnostics; using System.Web.Services; using System.ComponentModel; using System.Web.Services.Protocols; using System; using System.Xml.Serialization; - using WebsitePanel.Providers.ResultObjects; - using WebsitePanel.Providers.WebAppGallery; - using WebsitePanel.Providers.Common; + using WebsitePanel.Providers.ResultObjects; + using WebsitePanel.Providers.WebAppGallery; + using WebsitePanel.Providers.Common; /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="esWebApplicationGallerySoap", Namespace="http://tempuri.org/")] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ResultObject))] public partial class esWebApplicationGallery : Microsoft.Web.Services3.WebServicesClientProtocol { + private System.Threading.SendOrPostCallback InitFeedsOperationCompleted; + + private System.Threading.SendOrPostCallback SetResourceLanguageOperationCompleted; + + private System.Threading.SendOrPostCallback GetGalleryLanguagesOperationCompleted; + private System.Threading.SendOrPostCallback GetGalleryApplicationsByServiceIdOperationCompleted; private System.Threading.SendOrPostCallback GetGalleryApplicationsOperationCompleted; + private System.Threading.SendOrPostCallback GetGalleryApplicationsFilteredOperationCompleted; + private System.Threading.SendOrPostCallback GetGalleryCategoriesOperationCompleted; private System.Threading.SendOrPostCallback GetGalleryApplicationDetailsOperationCompleted; @@ -75,15 +84,27 @@ namespace WebsitePanel.EnterpriseServer { /// public esWebApplicationGallery() { - this.Url = "http://localhost:1625/esWebApplicationGallery.asmx"; + this.Url = "http://localhost:9002/esWebApplicationGallery.asmx"; } + /// + public event InitFeedsCompletedEventHandler InitFeedsCompleted; + + /// + public event SetResourceLanguageCompletedEventHandler SetResourceLanguageCompleted; + + /// + public event GetGalleryLanguagesCompletedEventHandler GetGalleryLanguagesCompleted; + /// public event GetGalleryApplicationsByServiceIdCompletedEventHandler GetGalleryApplicationsByServiceIdCompleted; /// public event GetGalleryApplicationsCompletedEventHandler GetGalleryApplicationsCompleted; + /// + public event GetGalleryApplicationsFilteredCompletedEventHandler GetGalleryApplicationsFilteredCompleted; + /// public event GetGalleryCategoriesCompletedEventHandler GetGalleryCategoriesCompleted; @@ -99,6 +120,128 @@ namespace WebsitePanel.EnterpriseServer { /// public event GetGalleryApplicationStatusCompletedEventHandler GetGalleryApplicationStatusCompleted; + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/InitFeeds", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void InitFeeds(int packageId) { + this.Invoke("InitFeeds", new object[] { + packageId}); + } + + /// + public System.IAsyncResult BeginInitFeeds(int packageId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("InitFeeds", new object[] { + packageId}, callback, asyncState); + } + + /// + public void EndInitFeeds(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void InitFeedsAsync(int packageId) { + this.InitFeedsAsync(packageId, null); + } + + /// + public void InitFeedsAsync(int packageId, object userState) { + if ((this.InitFeedsOperationCompleted == null)) { + this.InitFeedsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInitFeedsOperationCompleted); + } + this.InvokeAsync("InitFeeds", new object[] { + packageId}, this.InitFeedsOperationCompleted, userState); + } + + private void OnInitFeedsOperationCompleted(object arg) { + if ((this.InitFeedsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.InitFeedsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetResourceLanguage", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SetResourceLanguage(int packageId, string resourceLanguage) { + this.Invoke("SetResourceLanguage", new object[] { + packageId, + resourceLanguage}); + } + + /// + public System.IAsyncResult BeginSetResourceLanguage(int packageId, string resourceLanguage, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetResourceLanguage", new object[] { + packageId, + resourceLanguage}, callback, asyncState); + } + + /// + public void EndSetResourceLanguage(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void SetResourceLanguageAsync(int packageId, string resourceLanguage) { + this.SetResourceLanguageAsync(packageId, resourceLanguage, null); + } + + /// + public void SetResourceLanguageAsync(int packageId, string resourceLanguage, object userState) { + if ((this.SetResourceLanguageOperationCompleted == null)) { + this.SetResourceLanguageOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetResourceLanguageOperationCompleted); + } + this.InvokeAsync("SetResourceLanguage", new object[] { + packageId, + resourceLanguage}, this.SetResourceLanguageOperationCompleted, userState); + } + + private void OnSetResourceLanguageOperationCompleted(object arg) { + if ((this.SetResourceLanguageCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetResourceLanguageCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetGalleryLanguages", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public GalleryLanguagesResult GetGalleryLanguages(int packageId) { + object[] results = this.Invoke("GetGalleryLanguages", new object[] { + packageId}); + return ((GalleryLanguagesResult)(results[0])); + } + + /// + public System.IAsyncResult BeginGetGalleryLanguages(int packageId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetGalleryLanguages", new object[] { + packageId}, callback, asyncState); + } + + /// + public GalleryLanguagesResult EndGetGalleryLanguages(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((GalleryLanguagesResult)(results[0])); + } + + /// + public void GetGalleryLanguagesAsync(int packageId) { + this.GetGalleryLanguagesAsync(packageId, null); + } + + /// + public void GetGalleryLanguagesAsync(int packageId, object userState) { + if ((this.GetGalleryLanguagesOperationCompleted == null)) { + this.GetGalleryLanguagesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetGalleryLanguagesOperationCompleted); + } + this.InvokeAsync("GetGalleryLanguages", new object[] { + packageId}, this.GetGalleryLanguagesOperationCompleted, userState); + } + + private void OnGetGalleryLanguagesOperationCompleted(object arg) { + if ((this.GetGalleryLanguagesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetGalleryLanguagesCompleted(this, new GetGalleryLanguagesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetGalleryApplicationsByServiceId", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public GalleryApplicationsResult GetGalleryApplicationsByServiceId(int serviceId) { @@ -184,6 +327,50 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetGalleryApplicationsFiltered", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public GalleryApplicationsResult GetGalleryApplicationsFiltered(int packageId, string pattern) { + object[] results = this.Invoke("GetGalleryApplicationsFiltered", new object[] { + packageId, + pattern}); + return ((GalleryApplicationsResult)(results[0])); + } + + /// + public System.IAsyncResult BeginGetGalleryApplicationsFiltered(int packageId, string pattern, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetGalleryApplicationsFiltered", new object[] { + packageId, + pattern}, callback, asyncState); + } + + /// + public GalleryApplicationsResult EndGetGalleryApplicationsFiltered(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((GalleryApplicationsResult)(results[0])); + } + + /// + public void GetGalleryApplicationsFilteredAsync(int packageId, string pattern) { + this.GetGalleryApplicationsFilteredAsync(packageId, pattern, null); + } + + /// + public void GetGalleryApplicationsFilteredAsync(int packageId, string pattern, object userState) { + if ((this.GetGalleryApplicationsFilteredOperationCompleted == null)) { + this.GetGalleryApplicationsFilteredOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetGalleryApplicationsFilteredOperationCompleted); + } + this.InvokeAsync("GetGalleryApplicationsFiltered", new object[] { + packageId, + pattern}, this.GetGalleryApplicationsFilteredOperationCompleted, userState); + } + + private void OnGetGalleryApplicationsFilteredOperationCompleted(object arg) { + if ((this.GetGalleryApplicationsFilteredCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetGalleryApplicationsFilteredCompleted(this, new GetGalleryApplicationsFilteredCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetGalleryCategories", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public GalleryCategoriesResult GetGalleryCategories(int packageId) { @@ -315,24 +502,26 @@ namespace WebsitePanel.EnterpriseServer { /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/Install", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public StringResultObject Install(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters) { + public StringResultObject Install(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters, string languageId) { object[] results = this.Invoke("Install", new object[] { packageId, webAppId, siteName, virtualDir, - parameters}); + parameters, + languageId}); return ((StringResultObject)(results[0])); } /// - public System.IAsyncResult BeginInstall(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginInstall(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters, string languageId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("Install", new object[] { packageId, webAppId, siteName, virtualDir, - parameters}, callback, asyncState); + parameters, + languageId}, callback, asyncState); } /// @@ -342,12 +531,12 @@ namespace WebsitePanel.EnterpriseServer { } /// - public void InstallAsync(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters) { - this.InstallAsync(packageId, webAppId, siteName, virtualDir, parameters, null); + public void InstallAsync(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters, string languageId) { + this.InstallAsync(packageId, webAppId, siteName, virtualDir, parameters, languageId, null); } /// - public void InstallAsync(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters, object userState) { + public void InstallAsync(int packageId, string webAppId, string siteName, string virtualDir, DeploymentParameter[] parameters, string languageId, object userState) { if ((this.InstallOperationCompleted == null)) { this.InstallOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallOperationCompleted); } @@ -356,7 +545,8 @@ namespace WebsitePanel.EnterpriseServer { webAppId, siteName, virtualDir, - parameters}, this.InstallOperationCompleted, userState); + parameters, + languageId}, this.InstallOperationCompleted, userState); } private void OnInstallOperationCompleted(object arg) { @@ -416,33 +606,46 @@ namespace WebsitePanel.EnterpriseServer { } } - - - - - - - - - - - - - - - - - - - - + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void InitFeedsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetResourceLanguageCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetGalleryLanguagesCompletedEventHandler(object sender, GetGalleryLanguagesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetGalleryLanguagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetGalleryLanguagesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public GalleryLanguagesResult Result { + get { + this.RaiseExceptionIfNecessary(); + return ((GalleryLanguagesResult)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGalleryApplicationsByServiceIdCompletedEventHandler(object sender, GetGalleryApplicationsByServiceIdCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGalleryApplicationsByServiceIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -464,11 +667,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGalleryApplicationsCompletedEventHandler(object sender, GetGalleryApplicationsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGalleryApplicationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -490,11 +693,37 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetGalleryApplicationsFilteredCompletedEventHandler(object sender, GetGalleryApplicationsFilteredCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetGalleryApplicationsFilteredCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetGalleryApplicationsFilteredCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public GalleryApplicationsResult Result { + get { + this.RaiseExceptionIfNecessary(); + return ((GalleryApplicationsResult)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGalleryCategoriesCompletedEventHandler(object sender, GetGalleryCategoriesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGalleryCategoriesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -516,11 +745,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGalleryApplicationDetailsCompletedEventHandler(object sender, GetGalleryApplicationDetailsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGalleryApplicationDetailsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -542,11 +771,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGalleryApplicationParamsCompletedEventHandler(object sender, GetGalleryApplicationParamsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGalleryApplicationParamsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -568,11 +797,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void InstallCompletedEventHandler(object sender, InstallCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class InstallCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -594,11 +823,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGalleryApplicationStatusCompletedEventHandler(object sender, GetGalleryApplicationStatusCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGalleryApplicationStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebServersProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebServersProxy.cs index a9ca83ea..ed922590 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebServersProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebServersProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebsitePanel.EnterpriseServer.Client.csproj b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebsitePanel.EnterpriseServer.Client.csproj index b9ac0a34..1390dff3 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebsitePanel.EnterpriseServer.Client.csproj +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/WebsitePanel.EnterpriseServer.Client.csproj @@ -84,14 +84,16 @@ + + code + + - - diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ecServiceHandlerProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ecServiceHandlerProxy.cs index 37b7808a..e13350f6 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ecServiceHandlerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ecServiceHandlerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ecStorefrontProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ecStorefrontProxy.cs index 509d97e1..406a07ef 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ecStorefrontProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ecStorefrontProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ecStorehouseProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ecStorehouseProxy.cs index 92a22980..2463a3d8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ecStorehouseProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/ecStorehouseProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Comments/CommentsController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Comments/CommentsController.cs index 5912f536..9bc4705c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Comments/CommentsController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Comments/CommentsController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ConfigSettings.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ConfigSettings.cs index b5856ee4..f7d791f8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ConfigSettings.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ConfigSettings.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/CryptoUtils.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/CryptoUtils.cs index 347a335e..49fb4ab4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/CryptoUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/CryptoUtils.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/EnterpriseServerIdentity.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/EnterpriseServerIdentity.cs index 7fece6fd..513ccf5e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/EnterpriseServerIdentity.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/EnterpriseServerIdentity.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/EnterpriseServerPrincipal.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/EnterpriseServerPrincipal.cs index 0554f468..59a40c1c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/EnterpriseServerPrincipal.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/EnterpriseServerPrincipal.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/FileUtils.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/FileUtils.cs index 5de8f81f..e9e25d22 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/FileUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/FileUtils.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/MailHelper.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/MailHelper.cs index 2c06e4aa..ff6b44d8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/MailHelper.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/MailHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ObjectUtils.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ObjectUtils.cs index 233039c0..1ab1650d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ObjectUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ObjectUtils.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/SecurityContext.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/SecurityContext.cs index 0f652aa4..bd037cd7 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/SecurityContext.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/SecurityContext.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -45,6 +45,10 @@ namespace WebsitePanel.EnterpriseServer public const string ROLE_ADMINISTRATOR = "Administrator"; public const string ROLE_RESELLER = "Reseller"; public const string ROLE_USER = "User"; + public const string ROLE_PLATFORMCSR = "PlatformCSR"; + public const string ROLE_PLATFORMHELPDESK = "PlatformHelpdesk"; + public const string ROLE_RESELLERCSR = "ResellerCSR"; + public const string ROLE_RESELLERHELPDESK = "ResellerHelpdesk"; public const string CONTEXT_USER_INFO = "CONTEXT_USER_INFO"; @@ -62,8 +66,26 @@ namespace WebsitePanel.EnterpriseServer // set roles array List roles = new List(); roles.Add(SecurityContext.ROLE_USER); + + if (user.Role == UserRole.Reseller || user.Role == UserRole.Administrator || + user.Role == UserRole.PlatformHelpdesk || user.Role == UserRole.ResellerHelpdesk) + roles.Add(SecurityContext.ROLE_RESELLERHELPDESK); + + if (user.Role == UserRole.Reseller || user.Role == UserRole.Administrator || + user.Role == UserRole.PlatformCSR || user.Role == UserRole.ResellerCSR) + roles.Add(SecurityContext.ROLE_RESELLERCSR); + + if (user.Role == UserRole.Reseller || user.Role == UserRole.Administrator || + user.Role == UserRole.PlatformHelpdesk) + roles.Add(SecurityContext.ROLE_PLATFORMHELPDESK); + + if (user.Role == UserRole.Reseller || user.Role == UserRole.Administrator || + user.Role == UserRole.PlatformCSR) + roles.Add(SecurityContext.ROLE_PLATFORMCSR); + if (user.Role == UserRole.Reseller || user.Role == UserRole.Administrator) roles.Add(SecurityContext.ROLE_RESELLER); + if (user.Role == UserRole.Administrator) roles.Add(SecurityContext.ROLE_ADMINISTRATOR); @@ -152,9 +174,40 @@ namespace WebsitePanel.EnterpriseServer { // should make a check if the account has Admin role if (!User.IsInRole(ROLE_RESELLER)) - return BusinessErrorCodes.ERROR_USER_ACCOUNT_SHOULD_BE_RESELLER; + return BusinessErrorCodes.ERROR_USER_ACCOUNT_NOT_ENOUGH_PERMISSIONS; } + if ((demand & DemandAccount.IsPlatformCSR) == DemandAccount.IsPlatformCSR) + { + // should make a check if the account has Admin role + if (!User.IsInRole(ROLE_PLATFORMCSR)) + return BusinessErrorCodes.ERROR_USER_ACCOUNT_NOT_ENOUGH_PERMISSIONS; + } + + if ((demand & DemandAccount.IsPlatformHelpdesk) == DemandAccount.IsPlatformHelpdesk) + { + // should make a check if the account has Admin role + if (!User.IsInRole(ROLE_PLATFORMHELPDESK)) + return BusinessErrorCodes.ERROR_USER_ACCOUNT_NOT_ENOUGH_PERMISSIONS; + } + + + if ((demand & DemandAccount.IsResellerHelpdesk) == DemandAccount.IsResellerHelpdesk) + { + // should make a check if the account has Admin role + if (!User.IsInRole(ROLE_RESELLERHELPDESK)) + return BusinessErrorCodes.ERROR_USER_ACCOUNT_NOT_ENOUGH_PERMISSIONS; + } + + + if ((demand & DemandAccount.IsResellerCSR) == DemandAccount.IsResellerCSR) + { + // should make a check if the account has Admin role + if (!User.IsInRole(ROLE_RESELLERCSR)) + return BusinessErrorCodes.ERROR_USER_ACCOUNT_NOT_ENOUGH_PERMISSIONS; + } + + return 0; } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ServiceProviderProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ServiceProviderProxy.cs index b03767c4..d7eda041 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ServiceProviderProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ServiceProviderProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ServiceUsernameTokenManager.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ServiceUsernameTokenManager.cs index 29361bc9..21bfb8ec 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ServiceUsernameTokenManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/ServiceUsernameTokenManager.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/UsernameAssertion.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/UsernameAssertion.cs index fab3a2a3..a2e8519b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/UsernameAssertion.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/UsernameAssertion.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Utils.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Utils.cs index c63d480a..f2cb1596 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Utils.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Common/Utils.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs index 59d8aca4..6d85886e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/DataProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -190,7 +190,7 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@Username", username)); } - public static int AddUser(int actorId, int ownerId, int roleId, int statusId, bool isDemo, + public static int AddUser(int actorId, int ownerId, int roleId, int statusId, int loginStatusId, bool isDemo, bool isPeer, string comments, string username, string password, string firstName, string lastName, string email, string secondaryEmail, string address, string city, string country, string state, string zip, @@ -208,6 +208,7 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@OwnerID", ownerId), new SqlParameter("@RoleID", roleId), new SqlParameter("@StatusId", statusId), + new SqlParameter("@LoginStatusId", loginStatusId), new SqlParameter("@IsDemo", isDemo), new SqlParameter("@IsPeer", isPeer), new SqlParameter("@Comments", comments), @@ -227,13 +228,13 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@fax", fax), new SqlParameter("@instantMessenger", instantMessenger), new SqlParameter("@htmlMail", htmlMail), - new SqlParameter("@CompanyName", companyName), - new SqlParameter("@EcommerceEnabled", ecommerceEnabled)); + new SqlParameter("@CompanyName", companyName), + new SqlParameter("@EcommerceEnabled", ecommerceEnabled)); return Convert.ToInt32(prmUserId.Value); } - public static void UpdateUser(int actorId, int userId, int roleId, int statusId, bool isDemo, + public static void UpdateUser(int actorId, int userId, int roleId, int statusId, int loginStatusId, bool isDemo, bool isPeer, string comments, string firstName, string lastName, string email, string secondaryEmail, string address, string city, string country, string state, string zip, string primaryPhone, string secondaryPhone, string fax, string instantMessenger, bool htmlMail, @@ -245,6 +246,7 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@ActorId", actorId), new SqlParameter("@RoleID", roleId), new SqlParameter("@StatusId", statusId), + new SqlParameter("@LoginStatusId", loginStatusId), new SqlParameter("@UserID", userId), new SqlParameter("@IsDemo", isDemo), new SqlParameter("@IsPeer", isPeer), @@ -263,11 +265,20 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@fax", fax), new SqlParameter("@instantMessenger", instantMessenger), new SqlParameter("@htmlMail", htmlMail), - new SqlParameter("@CompanyName", companyName), - new SqlParameter("@EcommerceEnabled", ecommerceEnabled), + new SqlParameter("@CompanyName", companyName), + new SqlParameter("@EcommerceEnabled", ecommerceEnabled), new SqlParameter("@AdditionalParams", additionalParams)); } + public static void UpdateUserFailedLoginAttempt(int userId, int lockOut, bool reset) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateUserFailedLoginAttempt", + new SqlParameter("@UserID", userId), + new SqlParameter("@LockOut", lockOut), + new SqlParameter("@Reset", reset)); + } + public static void DeleteUser(int actorId, int userId) { SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, @@ -675,7 +686,7 @@ namespace WebsitePanel.EnterpriseServer } public static void AddDnsRecord(int actorId, int serviceId, int serverId, int packageId, string recordType, - string recordName, string recordData, int mxPriority, int ipAddressId) + string recordName, string recordData, int mxPriority, int SrvPriority, int SrvWeight, int SrvPort, int ipAddressId) { SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, ObjectQualifier + "AddDnsRecord", @@ -687,11 +698,14 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@RecordName", recordName), new SqlParameter("@RecordData", recordData), new SqlParameter("@MXPriority", mxPriority), + new SqlParameter("@SrvPriority", SrvPriority), + new SqlParameter("@SrvWeight", SrvWeight), + new SqlParameter("@SrvPort", SrvPort), new SqlParameter("@IpAddressId", ipAddressId)); } public static void UpdateDnsRecord(int actorId, int recordId, string recordType, - string recordName, string recordData, int mxPriority, int ipAddressId) + string recordName, string recordData, int mxPriority, int SrvPriority, int SrvWeight, int SrvPort, int ipAddressId) { SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, ObjectQualifier + "UpdateDnsRecord", @@ -701,9 +715,13 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@RecordName", recordName), new SqlParameter("@RecordData", recordData), new SqlParameter("@MXPriority", mxPriority), + new SqlParameter("@SrvPriority", SrvPriority), + new SqlParameter("@SrvWeight", SrvWeight), + new SqlParameter("@SrvPort", SrvPort), new SqlParameter("@IpAddressId", ipAddressId)); } + public static void DeleteDnsRecord(int actorId, int recordId) { SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, @@ -763,7 +781,7 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@domainName", domainName)); } - public static int CheckDomain(int packageId, string domainName) + public static int CheckDomain(int packageId, string domainName, bool isDomainPointer) { SqlParameter prmId = new SqlParameter("@Result", SqlDbType.Int); prmId.Direction = ParameterDirection.Output; @@ -772,7 +790,8 @@ namespace WebsitePanel.EnterpriseServer ObjectQualifier + "CheckDomain", prmId, new SqlParameter("@packageId", packageId), - new SqlParameter("@domainName", domainName)); + new SqlParameter("@domainName", domainName), + new SqlParameter("@isDomainPointer", isDomainPointer)); return Convert.ToInt32(prmId.Value); } @@ -2057,33 +2076,36 @@ namespace WebsitePanel.EnterpriseServer #endregion #region Exchange Server - - public static int AddExchangeAccount(int itemId, int accountType, string accountName, + + public static int AddExchangeAccount(int itemId, int accountType, string accountName, string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, - string mailboxManagerActions, string samAccountName, string accountPassword) - { - SqlParameter outParam = new SqlParameter("@AccountID", SqlDbType.Int); - outParam.Direction = ParameterDirection.Output; + string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber) + { + SqlParameter outParam = new SqlParameter("@AccountID", SqlDbType.Int); + outParam.Direction = ParameterDirection.Output; - SqlHelper.ExecuteNonQuery( - ConnectionString, - CommandType.StoredProcedure, - "AddExchangeAccount", - outParam, - new SqlParameter("@ItemID", itemId), - new SqlParameter("@AccountType", accountType), - new SqlParameter("@AccountName", accountName), - new SqlParameter("@DisplayName", displayName), - new SqlParameter("@PrimaryEmailAddress", primaryEmailAddress), - new SqlParameter("@MailEnabledPublicFolder", mailEnabledPublicFolder), + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddExchangeAccount", + outParam, + new SqlParameter("@ItemID", itemId), + new SqlParameter("@AccountType", accountType), + new SqlParameter("@AccountName", accountName), + new SqlParameter("@DisplayName", displayName), + new SqlParameter("@PrimaryEmailAddress", primaryEmailAddress), + new SqlParameter("@MailEnabledPublicFolder", mailEnabledPublicFolder), new SqlParameter("@MailboxManagerActions", mailboxManagerActions), new SqlParameter("@SamAccountName", samAccountName), - new SqlParameter("@AccountPassword", accountPassword) - ); + new SqlParameter("@AccountPassword", accountPassword), + new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId), + new SqlParameter("@SubscriberNumber", (string.IsNullOrEmpty(subscriberNumber) ? (object)DBNull.Value : (object)subscriberNumber)) + ); + + return Convert.ToInt32(outParam.Value); + } - return Convert.ToInt32(outParam.Value); - } public static void AddExchangeAccountEmailAddress(int accountId, string emailAddress) { @@ -2151,6 +2173,7 @@ namespace WebsitePanel.EnterpriseServer ); } + public static void DeleteExchangeAccountEmailAddress(int accountId, string emailAddress) { SqlHelper.ExecuteNonQuery( @@ -2247,26 +2270,27 @@ namespace WebsitePanel.EnterpriseServer return Convert.ToBoolean(outParam.Value); } - public static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType, + public static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType, string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, - string mailboxManagerActions, string samAccountName, string accountPassword) - { - SqlHelper.ExecuteNonQuery( - ConnectionString, - CommandType.StoredProcedure, - "UpdateExchangeAccount", - new SqlParameter("@AccountID", accountId), - new SqlParameter("@AccountName", accountName), - new SqlParameter("@DisplayName", displayName), + string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "UpdateExchangeAccount", + new SqlParameter("@AccountID", accountId), + new SqlParameter("@AccountName", accountName), + new SqlParameter("@DisplayName", displayName), new SqlParameter("@AccountType", (int)accountType), - new SqlParameter("@PrimaryEmailAddress", primaryEmailAddress), - new SqlParameter("@MailEnabledPublicFolder", mailEnabledPublicFolder), + new SqlParameter("@PrimaryEmailAddress", primaryEmailAddress), + new SqlParameter("@MailEnabledPublicFolder", mailEnabledPublicFolder), new SqlParameter("@MailboxManagerActions", mailboxManagerActions), new SqlParameter("@Password", string.IsNullOrEmpty(accountPassword) ? (object)DBNull.Value : (object)accountPassword), - new SqlParameter("@SamAccountName", samAccountName) - - ); - } + new SqlParameter("@SamAccountName", samAccountName), + new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId), + new SqlParameter("@SubscriberNumber", (string.IsNullOrEmpty(subscriberNumber) ? (object)DBNull.Value : (object)subscriberNumber)) + ); + } public static IDataReader GetExchangeAccount(int itemId, int accountId) { @@ -2279,6 +2303,29 @@ namespace WebsitePanel.EnterpriseServer ); } + public static IDataReader GetExchangeAccountByAccountName(int itemId, string accountName) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeAccountByAccountName", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@AccountName", accountName) + ); + } + + public static IDataReader GetExchangeAccountByMailboxPlanId(int itemId, int MailboxPlanId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeAccountByMailboxPlanId", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@MailboxPlanId", MailboxPlanId) + ); + } + + public static IDataReader GetExchangeAccountEmailAddresses(int accountId) { return SqlHelper.ExecuteReader( @@ -2390,6 +2437,97 @@ namespace WebsitePanel.EnterpriseServer #endregion + #region Exchange Mailbox Plans + public static int AddExchangeMailboxPlan(int itemID, string mailboxPlan, bool enableActiveSync, bool enableIMAP, bool enableMAPI, bool enableOWA, bool enablePOP, + bool isDefault, int issueWarningPct, int keepDeletedItemsDays, int mailboxSizeMB, int maxReceiveMessageSizeKB, int maxRecipients, + int maxSendMessageSizeKB, int prohibitSendPct, int prohibitSendReceivePct, bool hideFromAddressBook) + { + SqlParameter outParam = new SqlParameter("@MailboxPlanId", SqlDbType.Int); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddExchangeMailboxPlan", + outParam, + new SqlParameter("@ItemID", itemID), + new SqlParameter("@MailboxPlan", mailboxPlan), + new SqlParameter("@EnableActiveSync", enableActiveSync), + new SqlParameter("@EnableIMAP", enableIMAP), + new SqlParameter("@EnableMAPI", enableMAPI), + new SqlParameter("@EnableOWA", enableOWA), + new SqlParameter("@EnablePOP", enablePOP), + new SqlParameter("@IsDefault", isDefault), + new SqlParameter("@IssueWarningPct", issueWarningPct), + new SqlParameter("@KeepDeletedItemsDays", keepDeletedItemsDays), + new SqlParameter("@MailboxSizeMB", mailboxSizeMB), + new SqlParameter("@MaxReceiveMessageSizeKB", maxReceiveMessageSizeKB), + new SqlParameter("@MaxRecipients", maxRecipients), + new SqlParameter("@MaxSendMessageSizeKB", maxSendMessageSizeKB), + new SqlParameter("@ProhibitSendPct", prohibitSendPct), + new SqlParameter("@ProhibitSendReceivePct", prohibitSendReceivePct), + new SqlParameter("@HideFromAddressBook", hideFromAddressBook) + ); + + return Convert.ToInt32(outParam.Value); + } + + + public static void DeleteExchangeMailboxPlan(int mailboxPlanId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "DeleteExchangeMailboxPlan", + new SqlParameter("@MailboxPlanId", mailboxPlanId) + ); + } + + + public static IDataReader GetExchangeMailboxPlan(int mailboxPlanId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeMailboxPlan", + new SqlParameter("@MailboxPlanId", mailboxPlanId) + ); + } + + public static IDataReader GetExchangeMailboxPlans(int itemId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetExchangeMailboxPlans", + new SqlParameter("@ItemID", itemId) + ); + } + + public static void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "SetOrganizationDefaultExchangeMailboxPlan", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@MailboxPlanId", mailboxPlanId) + ); + } + + public static void SetExchangeAccountMailboxPlan(int accountId, int mailboxPlanId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "SetExchangeAccountMailboxplan", + new SqlParameter("@AccountID", accountId), + new SqlParameter("@MailboxPlanId", (mailboxPlanId == 0) ? (object)DBNull.Value : (object)mailboxPlanId) + ); + } + + #endregion + #region Organizations public static void DeleteOrganizationUser(int itemId) @@ -3025,5 +3163,175 @@ namespace WebsitePanel.EnterpriseServer return Convert.ToBoolean(prmId.Value); } #endregion + + #region Lync + + public static void AddLyncUser(int accountId, int lyncUserPlanId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, + CommandType.StoredProcedure, + "AddLyncUser", + new[] + { + new SqlParameter("@AccountID", accountId), + new SqlParameter("@LyncUserPlanID", lyncUserPlanId) + }); + } + + public static bool CheckLyncUserExists(int accountId) + { + int res = (int)SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "CheckLyncUserExists", + new SqlParameter("@AccountID", accountId)); + return res > 0; + } + + public static IDataReader GetLyncUsers(int itemId, string sortColumn, string sortDirection, int startRow, int count) + { + SqlParameter[] sqlParams = new SqlParameter[] + { + new SqlParameter("@ItemID", itemId), + new SqlParameter("@SortColumn", sortColumn), + new SqlParameter("@SortDirection", sortDirection), + new SqlParameter("@StartRow", startRow), + new SqlParameter("Count", count) + }; + + + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetLyncUsers", sqlParams); + } + + + public static IDataReader GetLyncUsersByPlanId(int itemId, int planId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetLyncUsersByPlanId", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@PlanId", planId) + ); + } + + public static int GetLyncUsersCount(int itemId) + { + SqlParameter[] sqlParams = new SqlParameter[] + { + new SqlParameter("@ItemID", itemId) + }; + + return + (int) + SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, "GetLyncUsersCount", sqlParams); + } + + public static void DeleteLyncUser(int accountId) + { + SqlHelper.ExecuteNonQuery(ConnectionString, + CommandType.StoredProcedure, + "DeleteLyncUser", + new[] + { + new SqlParameter("@AccountId", accountId) + }); + + } + + public static int AddLyncUserPlan(int itemID, LyncUserPlan lyncUserPlan) + { + SqlParameter outParam = new SqlParameter("@LyncUserPlanId", SqlDbType.Int); + outParam.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddLyncUserPlan", + outParam, + + new SqlParameter("@ItemID", itemID), + new SqlParameter("@LyncUserPlanName", lyncUserPlan.LyncUserPlanName), + new SqlParameter("@IM", lyncUserPlan.IM), + new SqlParameter("@Mobility", lyncUserPlan.Mobility), + new SqlParameter("@MobilityEnableOutsideVoice", lyncUserPlan.MobilityEnableOutsideVoice), + new SqlParameter("@Federation", lyncUserPlan.Federation), + new SqlParameter("@Conferencing", lyncUserPlan.Conferencing), + new SqlParameter("@EnterpriseVoice", lyncUserPlan.EnterpriseVoice), + new SqlParameter("@VoicePolicy", lyncUserPlan.VoicePolicy), + new SqlParameter("@IsDefault", lyncUserPlan.IsDefault) + ); + + return Convert.ToInt32(outParam.Value); + } + + public static void DeleteLyncUserPlan(int lyncUserPlanId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "DeleteLyncUserPlan", + new SqlParameter("@LyncUserPlanId", lyncUserPlanId) + ); + } + + public static IDataReader GetLyncUserPlan(int lyncUserPlanId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetLyncUserPlan", + new SqlParameter("@LyncUserPlanId", lyncUserPlanId) + ); + } + + + public static IDataReader GetLyncUserPlans(int itemId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetLyncUserPlans", + new SqlParameter("@ItemID", itemId) + ); + } + + + public static void SetOrganizationDefaultLyncUserPlan(int itemId, int lyncUserPlanId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "SetOrganizationDefaultLyncUserPlan", + new SqlParameter("@ItemID", itemId), + new SqlParameter("@LyncUserPlanId", lyncUserPlanId) + ); + } + + public static IDataReader GetLyncUserPlanByAccountId(int AccountId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetLyncUserPlanByAccountId", + new SqlParameter("@AccountID", AccountId) + ); + } + + + public static void SetLyncUserLyncUserplan(int accountId, int lyncUserPlanId) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "SetLyncUserLyncUserplan", + new SqlParameter("@AccountID", accountId), + new SqlParameter("@LyncUserPlanId", (lyncUserPlanId == 0) ? (object)DBNull.Value : (object)lyncUserPlanId) + ); + } + + + #endregion + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/EcommerceProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/EcommerceProvider.cs index 4674a274..09b90752 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/EcommerceProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/EcommerceProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/SQLHelper.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/SQLHelper.cs index bd6b6f5f..ac2646ac 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/SQLHelper.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Data/SQLHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DatabaseServers/DatabaseServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DatabaseServers/DatabaseServerController.cs index 87277248..57c468b8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DatabaseServers/DatabaseServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DatabaseServers/DatabaseServerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs index 816a0004..1489176e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/DnsServers/DnsServerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -38,158 +38,157 @@ namespace WebsitePanel.EnterpriseServer { public class DnsServerController : IImportController, IBackupController { - private static DNSServer GetDNSServer(int serviceId) - { - DNSServer dns = new DNSServer(); - ServiceProviderProxy.Init(dns, serviceId); - return dns; - } + private static DNSServer GetDNSServer(int serviceId) + { + DNSServer dns = new DNSServer(); + ServiceProviderProxy.Init(dns, serviceId); + return dns; + } - public static int AddZone(int packageId, int serviceId, string zoneName) - { - return AddZone(packageId, serviceId, zoneName, true); - } + public static int AddZone(int packageId, int serviceId, string zoneName) + { + return AddZone(packageId, serviceId, zoneName, true); + } - public static int AddZone(int packageId, int serviceId, string zoneName, bool addPackageItem) - { - // get DNS provider - DNSServer dns = GetDNSServer(serviceId); + public static int AddZone(int packageId, int serviceId, string zoneName, bool addPackageItem) + { + // get DNS provider + DNSServer dns = GetDNSServer(serviceId); - // check if zone already exists - if (dns.ZoneExists(zoneName)) - return BusinessErrorCodes.ERROR_DNS_ZONE_EXISTS; + // check if zone already exists + if (dns.ZoneExists(zoneName)) + return BusinessErrorCodes.ERROR_DNS_ZONE_EXISTS; - // - TaskManager.StartTask("DNS_ZONE", "ADD", zoneName); - // - int zoneItemId = default(int); - // - try - { - // get secondary DNS services - StringDictionary primSettings = ServerController.GetServiceSettings(serviceId); - string[] primaryIPAddresses = GetExternalIPAddressesFromString(primSettings["ListeningIPAddresses"]); + // + TaskManager.StartTask("DNS_ZONE", "ADD", zoneName); + // + int zoneItemId = default(int); + // + try + { + // get secondary DNS services + StringDictionary primSettings = ServerController.GetServiceSettings(serviceId); + string[] primaryIPAddresses = GetExternalIPAddressesFromString(primSettings["ListeningIPAddresses"]); - List secondaryIPAddresses = new List(); - List secondaryServiceIds = new List(); - string strSecondaryServices = primSettings["SecondaryDNSServices"]; - if (!String.IsNullOrEmpty(strSecondaryServices)) - { - string[] secondaryServices = strSecondaryServices.Split(','); - foreach (string strSecondaryId in secondaryServices) - { - int secondaryId = Utils.ParseInt(strSecondaryId, 0); - if (secondaryId == 0) - continue; + List secondaryIPAddresses = new List(); + List secondaryServiceIds = new List(); + string strSecondaryServices = primSettings["SecondaryDNSServices"]; + if (!String.IsNullOrEmpty(strSecondaryServices)) + { + string[] secondaryServices = strSecondaryServices.Split(','); + foreach (string strSecondaryId in secondaryServices) + { + int secondaryId = Utils.ParseInt(strSecondaryId, 0); + if (secondaryId == 0) + continue; - secondaryServiceIds.Add(secondaryId); - StringDictionary secondarySettings = ServerController.GetServiceSettings(secondaryId); + secondaryServiceIds.Add(secondaryId); + StringDictionary secondarySettings = ServerController.GetServiceSettings(secondaryId); - // add secondary IPs to the master array - secondaryIPAddresses.AddRange( - GetExternalIPAddressesFromString(secondarySettings["ListeningIPAddresses"])); - } - } + // add secondary IPs to the master array + secondaryIPAddresses.AddRange( + GetExternalIPAddressesFromString(secondarySettings["ListeningIPAddresses"])); + } + } - // add "Allow zone transfers" - string allowTransfers = primSettings["AllowZoneTransfers"]; - if (!String.IsNullOrEmpty(allowTransfers)) - { - string[] ips = Utils.ParseDelimitedString(allowTransfers, '\n', ' ', ',', ';'); - foreach (string ip in ips) - { - if (!secondaryIPAddresses.Contains(ip)) - secondaryIPAddresses.Add(ip); - } - } + // add "Allow zone transfers" + string allowTransfers = primSettings["AllowZoneTransfers"]; + if (!String.IsNullOrEmpty(allowTransfers)) + { + string[] ips = Utils.ParseDelimitedString(allowTransfers, '\n', ' ', ',', ';'); + foreach (string ip in ips) + { + if (!secondaryIPAddresses.Contains(ip)) + secondaryIPAddresses.Add(ip); + } + } - // add primary zone - dns.AddPrimaryZone(zoneName, secondaryIPAddresses.ToArray()); + // add primary zone + dns.AddPrimaryZone(zoneName, secondaryIPAddresses.ToArray()); - // get DNS zone records - List records = ServerController.GetDnsRecordsTotal(packageId); + // get DNS zone records + List records = ServerController.GetDnsRecordsTotal(packageId); - // get name servers - PackageSettings packageSettings = PackageController.GetPackageSettings(packageId, PackageSettings.NAME_SERVERS); - string[] nameServers = new string[] { }; - if (!String.IsNullOrEmpty(packageSettings["NameServers"])) - nameServers = packageSettings["NameServers"].Split(';'); + // get name servers + PackageSettings packageSettings = PackageController.GetPackageSettings(packageId, PackageSettings.NAME_SERVERS); + string[] nameServers = new string[] { }; + if (!String.IsNullOrEmpty(packageSettings["NameServers"])) + nameServers = packageSettings["NameServers"].Split(';'); - // build records list - List zoneRecords = new List(); + // build records list + List zoneRecords = new List(); - string primaryNameServer = "ns." + zoneName; + string primaryNameServer = "ns." + zoneName; - if (nameServers.Length > 0) - primaryNameServer = nameServers[0]; + if (nameServers.Length > 0) + primaryNameServer = nameServers[0]; - // update SOA record + // update SOA record - string hostmaster = primSettings["ResponsiblePerson"]; - if (String.IsNullOrEmpty(hostmaster)) - { - hostmaster = "hostmaster." + zoneName; - } - else - { - hostmaster = Utils.ReplaceStringVariable(hostmaster, "domain_name", zoneName); - } + string hostmaster = primSettings["ResponsiblePerson"]; + if (String.IsNullOrEmpty(hostmaster)) + { + hostmaster = "hostmaster." + zoneName; + } + else + { + hostmaster = Utils.ReplaceStringVariable(hostmaster, "domain_name", zoneName); + } - dns.UpdateSoaRecord(zoneName, "", primaryNameServer, hostmaster); + dns.UpdateSoaRecord(zoneName, "", primaryNameServer, hostmaster); - // add name servers - foreach (string nameServer in nameServers) - { - DnsRecord ns = new DnsRecord(); - ns.RecordType = DnsRecordType.NS; - ns.RecordName = ""; - ns.RecordData = nameServer; + // add name servers + foreach (string nameServer in nameServers) + { + DnsRecord ns = new DnsRecord(); + ns.RecordType = DnsRecordType.NS; + ns.RecordName = ""; + ns.RecordData = nameServer; - zoneRecords.Add(ns); - } + zoneRecords.Add(ns); + } - // add all other records - zoneRecords.AddRange( - BuildDnsResourceRecords(records, zoneName, "")); + // add all other records + zoneRecords.AddRange(BuildDnsResourceRecords(records, zoneName, "")); - // add zone records - dns.AddZoneRecords(zoneName, zoneRecords.ToArray()); + // add zone records + dns.AddZoneRecords(zoneName, zoneRecords.ToArray()); - // add secondary zones - foreach (int secondaryId in secondaryServiceIds) - { - try - { - // add secondary zone - DNSServer secDns = GetDNSServer(secondaryId); - secDns.AddSecondaryZone(zoneName, primaryIPAddresses); - RegisterZoneItems(packageId, secondaryId, zoneName, false); - } - catch (Exception ex) - { - TaskManager.WriteError(ex, "Error adding secondary zone (service ID = " + secondaryId + ")"); - } - } + // add secondary zones + foreach (int secondaryId in secondaryServiceIds) + { + try + { + // add secondary zone + DNSServer secDns = GetDNSServer(secondaryId); + secDns.AddSecondaryZone(zoneName, primaryIPAddresses); + RegisterZoneItems(packageId, secondaryId, zoneName, false); + } + catch (Exception ex) + { + TaskManager.WriteError(ex, "Error adding secondary zone (service ID = " + secondaryId + ")"); + } + } - if (!addPackageItem) - return 0; - // add service item - zoneItemId = RegisterZoneItems(packageId, serviceId, zoneName, true); - // - TaskManager.ItemId = zoneItemId; - } - catch (Exception ex) - { - TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - // - return zoneItemId; - } + if (!addPackageItem) + return 0; + // add service item + zoneItemId = RegisterZoneItems(packageId, serviceId, zoneName, true); + // + TaskManager.ItemId = zoneItemId; + } + catch (Exception ex) + { + TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + // + return zoneItemId; + } private static int RegisterZoneItems(int spaceId, int serviceId, string zoneName, bool primaryZone) @@ -202,131 +201,138 @@ namespace WebsitePanel.EnterpriseServer int zoneItemId = PackageController.AddPackageItem(zone); return zoneItemId; } - + public static int DeleteZone(int zoneItemId) - { - // delete DNS zone if applicable + { + // delete DNS zone if applicable DnsZone zoneItem = (DnsZone)PackageController.GetPackageItem(zoneItemId); - // - if (zoneItem != null) - { - TaskManager.StartTask("DNS_ZONE", "DELETE", zoneItem.Name); - // - try - { - // - TaskManager.ItemId = zoneItemId; - // delete DNS zone - DNSServer dns = new DNSServer(); - ServiceProviderProxy.Init(dns, zoneItem.ServiceId); + // + if (zoneItem != null) + { + TaskManager.StartTask("DNS_ZONE", "DELETE", zoneItem.Name); + // + try + { + // + TaskManager.ItemId = zoneItemId; + // delete DNS zone + DNSServer dns = new DNSServer(); + ServiceProviderProxy.Init(dns, zoneItem.ServiceId); - // delete secondary zones - StringDictionary primSettings = ServerController.GetServiceSettings(zoneItem.ServiceId); - string strSecondaryServices = primSettings["SecondaryDNSServices"]; - if (!String.IsNullOrEmpty(strSecondaryServices)) - { - string[] secondaryServices = strSecondaryServices.Split(','); - foreach (string strSecondaryId in secondaryServices) - { - try - { - int secondaryId = Utils.ParseInt(strSecondaryId, 0); - if (secondaryId == 0) - continue; + // delete secondary zones + StringDictionary primSettings = ServerController.GetServiceSettings(zoneItem.ServiceId); + string strSecondaryServices = primSettings["SecondaryDNSServices"]; + if (!String.IsNullOrEmpty(strSecondaryServices)) + { + string[] secondaryServices = strSecondaryServices.Split(','); + foreach (string strSecondaryId in secondaryServices) + { + try + { + int secondaryId = Utils.ParseInt(strSecondaryId, 0); + if (secondaryId == 0) + continue; - DNSServer secDns = new DNSServer(); - ServiceProviderProxy.Init(secDns, secondaryId); + DNSServer secDns = new DNSServer(); + ServiceProviderProxy.Init(secDns, secondaryId); - secDns.DeleteZone(zoneItem.Name); - } - catch (Exception ex1) - { - // problem when deleting secondary zone - TaskManager.WriteError(ex1, "Error deleting secondary DNS zone"); - } - } - } + secDns.DeleteZone(zoneItem.Name); + } + catch (Exception ex1) + { + // problem when deleting secondary zone + TaskManager.WriteError(ex1, "Error deleting secondary DNS zone"); + } + } + } - try - { - dns.DeleteZone(zoneItem.Name); - } - catch (Exception ex2) - { - TaskManager.WriteError(ex2, "Error deleting primary DNS zone"); - } + try + { + dns.DeleteZone(zoneItem.Name); + } + catch (Exception ex2) + { + TaskManager.WriteError(ex2, "Error deleting primary DNS zone"); + } - // delete service item - PackageController.DeletePackageItem(zoneItemId); - } - catch (Exception ex) - { - TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - // - return 0; - } + // delete service item + PackageController.DeletePackageItem(zoneItemId); + } + catch (Exception ex) + { + TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + // + return 0; + } - public static List BuildDnsResourceRecords(List records, - string domainName, string serviceIP) - { - List zoneRecords = new List(); + public static List BuildDnsResourceRecords(List records, string domainName, string serviceIP) + { + List zoneRecords = new List(); - foreach (GlobalDnsRecord record in records) - { - DnsRecord rr = new DnsRecord(); - rr.RecordType = (DnsRecordType)Enum.Parse(typeof(DnsRecordType), record.RecordType, true); - rr.RecordName = record.RecordName; + foreach (GlobalDnsRecord record in records) + { + DnsRecord rr = new DnsRecord(); + rr.RecordType = (DnsRecordType)Enum.Parse(typeof(DnsRecordType), record.RecordType, true); + rr.RecordName = record.RecordName; + + if (record.RecordType == "A") + { + rr.RecordData = String.IsNullOrEmpty(record.RecordData) ? record.ExternalIP : record.RecordData; + rr.RecordData = Utils.ReplaceStringVariable(rr.RecordData, "ip", record.ExternalIP); - if (record.RecordType == "A") - { - rr.RecordData = String.IsNullOrEmpty(record.RecordData) ? record.ExternalIP : record.RecordData; - rr.RecordData = Utils.ReplaceStringVariable(rr.RecordData, "ip", record.ExternalIP); + if (String.IsNullOrEmpty(rr.RecordData) && !String.IsNullOrEmpty(serviceIP)) + rr.RecordData = serviceIP; + } + else if (record.RecordType == "SRV") + { + rr.SrvPriority = record.SrvPriority; + rr.SrvWeight = record.SrvWeight; + rr.SrvPort = record.SrvPort; + rr.RecordText = record.RecordData; + rr.RecordData = record.RecordData; + } + else + { + rr.RecordData = record.RecordData; + } - if (String.IsNullOrEmpty(rr.RecordData) && !String.IsNullOrEmpty(serviceIP)) - rr.RecordData = serviceIP; - } - else - { - rr.RecordData = record.RecordData; - } + // substitute variables + rr.RecordData = Utils.ReplaceStringVariable(rr.RecordData, "domain_name", domainName); - // substitute variables - rr.RecordData = Utils.ReplaceStringVariable(rr.RecordData, "domain_name", domainName); + // add MX priority + if (record.RecordType == "MX") + rr.MxPriority = record.MxPriority; - // add MX priority - if (record.RecordType == "MX") - rr.MxPriority = record.MxPriority; + if (!String.IsNullOrEmpty(rr.RecordData)) + zoneRecords.Add(rr); + } - if (!String.IsNullOrEmpty(rr.RecordData)) - zoneRecords.Add(rr); - } + return zoneRecords; + } - return zoneRecords; - } + public static string[] GetExternalIPAddressesFromString(string str) + { + List ips = new List(); - public static string[] GetExternalIPAddressesFromString(string str) - { - List ips = new List(); + if (str != null && str.Trim() != "") + { + string[] sips = str.Split(','); + foreach (string sip in sips) + { + IPAddressInfo ip = ServerController.GetIPAddress(Int32.Parse(sip)); + if (ip != null) + ips.Add(ip.ExternalIP); + } + } - if (str != null && str.Trim() != "") - { - string[] sips = str.Split(','); - foreach (string sip in sips) - { - IPAddressInfo ip = ServerController.GetIPAddress(Int32.Parse(sip)); - if (ip != null) - ips.Add(ip.ExternalIP); - } - } - - return ips.ToArray(); - } + return ips.ToArray(); + } #region IImportController Members @@ -350,7 +356,7 @@ namespace WebsitePanel.EnterpriseServer } public void ImportItem(int packageId, int itemTypeId, Type itemType, - ResourceGroupInfo group, string itemName) + ResourceGroupInfo group, string itemName) { // get service id int serviceId = PackageController.GetPackageServiceId(packageId, group.GroupName); @@ -395,11 +401,11 @@ namespace WebsitePanel.EnterpriseServer public int BackupItem(string tempFolder, XmlWriter writer, ServiceProviderItem item, ResourceGroupInfo group) { - if (!(item is DnsZone)) - return 0; + if (!(item is DnsZone)) + return 0; // DNS provider - DNSServer dns = GetDNSServer(item.ServiceId); + DNSServer dns = GetDNSServer(item.ServiceId); // zone records serialized XmlSerializer serializer = new XmlSerializer(typeof(DnsRecord)); @@ -424,31 +430,31 @@ namespace WebsitePanel.EnterpriseServer public int RestoreItem(string tempFolder, XmlNode itemNode, int itemId, Type itemType, string itemName, int packageId, int serviceId, ResourceGroupInfo group) { - if (itemType != typeof(DnsZone)) - return 0; + if (itemType != typeof(DnsZone)) + return 0; - // DNS provider - DNSServer dns = GetDNSServer(serviceId); + // DNS provider + DNSServer dns = GetDNSServer(serviceId); - // check service item - if (!dns.ZoneExists(itemName)) - { - // create primary and secondary zones - AddZone(packageId, serviceId, itemName, false); + // check service item + if (!dns.ZoneExists(itemName)) + { + // create primary and secondary zones + AddZone(packageId, serviceId, itemName, false); - // restore records - XmlSerializer serializer = new XmlSerializer(typeof(DnsRecord)); - List records = new List(); - foreach (XmlNode childNode in itemNode.ChildNodes) - { - if (childNode.Name == "DnsRecord") - { - records.Add((DnsRecord)serializer.Deserialize(new XmlNodeReader(childNode))); - } - } + // restore records + XmlSerializer serializer = new XmlSerializer(typeof(DnsRecord)); + List records = new List(); + foreach (XmlNode childNode in itemNode.ChildNodes) + { + if (childNode.Name == "DnsRecord") + { + records.Add((DnsRecord)serializer.Deserialize(new XmlNodeReader(childNode))); + } + } - dns.AddZoneRecords(itemName, records.ToArray()); - } + dns.AddZoneRecords(itemName, records.ToArray()); + } // check if meta-item exists int zoneId = 0; @@ -470,7 +476,7 @@ namespace WebsitePanel.EnterpriseServer // restore domains RestoreDomainByZone(itemName, packageId, zoneId); - return 0; + return 0; } #endregion diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/CategoryController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/CategoryController.cs index aab82090..fec75e73 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/CategoryController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/CategoryController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ContractSystem/ContractController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ContractSystem/ContractController.cs index 698da883..05920e1a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ContractSystem/ContractController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ContractSystem/ContractController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Helpers.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Helpers.cs index ed034e42..525efdab 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Helpers.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Helpers.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/InvoiceController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/InvoiceController.cs index bc7f403a..bd06bd04 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/InvoiceController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/InvoiceController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/MiscController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/MiscController.cs index 0e94d1bc..104dbd54 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/MiscController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/MiscController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/PaymentGatewayController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/PaymentGatewayController.cs index 10fa878c..21f85fce 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/PaymentGatewayController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/PaymentGatewayController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/DomainNameController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/DomainNameController.cs index e4105025..c0b9bf12 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/DomainNameController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/DomainNameController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingAddonController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingAddonController.cs index ee45fac6..bcc67ac4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingAddonController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingAddonController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingPackageController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingPackageController.cs index abb5973c..196c6f88 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingPackageController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/HostingPackageController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/IServiceProvisioning.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/IServiceProvisioning.cs index 3d5775b5..1e09d960 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/IServiceProvisioning.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/IServiceProvisioning.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ProvisioningContext.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ProvisioningContext.cs index db06090a..9a2bdc70 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ProvisioningContext.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ProvisioningContext.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ServiceProvisioningBase.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ServiceProvisioningBase.cs index 7779d05e..50673c48 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ServiceProvisioningBase.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/Provisioning/ServiceProvisioningBase.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ServiceController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ServiceController.cs index d884927f..d3686164 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ServiceController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ServiceController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ServiceHandlers/ServiceHandlerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ServiceHandlers/ServiceHandlerController.cs index 455087c9..098bba6c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ServiceHandlers/ServiceHandlerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/ServiceHandlers/ServiceHandlerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorefrontController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorefrontController.cs index b1e02b16..71c98a16 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorefrontController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorefrontController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorehouseController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorehouseController.cs index 8b4eb507..737fdb5c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorehouseController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/StorehouseController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/SystemPluginController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/SystemPluginController.cs index 21f190cd..c9f01256 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/SystemPluginController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/SystemPluginController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SendEmailNotification.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SendEmailNotification.cs index 1035c47e..d13af554 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SendEmailNotification.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SendEmailNotification.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SystemTriggersAgent.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SystemTriggersAgent.cs index 7ff2e3a6..1ce637c4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SystemTriggersAgent.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TaskEventHandlers/SystemTriggersAgent.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TriggerSystem/CommonTrigger.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TriggerSystem/CommonTrigger.cs index 64952033..0409e887 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TriggerSystem/CommonTrigger.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TriggerSystem/CommonTrigger.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TriggerSystem/TriggerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TriggerSystem/TriggerController.cs index 5a0397e1..a9bc8328 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TriggerSystem/TriggerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Ecommerce/TriggerSystem/TriggerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeHostedEdition/ExchangeHostedEditionController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeHostedEdition/ExchangeHostedEditionController.cs deleted file mode 100644 index 36dda983..00000000 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeHostedEdition/ExchangeHostedEditionController.cs +++ /dev/null @@ -1,896 +0,0 @@ -// Copyright (c) 2011, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Web; -using WebsitePanel.Providers.ExchangeHostedEdition; -using WebsitePanel.Providers.ResultObjects; -using WebsitePanel.Providers.Common; -using WebsitePanel.Providers; -using System.Collections.Specialized; -using System.Collections; -using System.Net.Mail; - -namespace WebsitePanel.EnterpriseServer -{ - public class ExchangeHostedEditionController - { - // messages - public const string GeneralError = "GeneralError"; - public const string ExchangeServiceNotEnabledError = "ExchangeServiceNotEnabledError"; - public const string ProgramIdIsNotSetError = "ProgramIdIsNotSetError"; - public const string OfferIdIsNotSetError = "OfferIdIsNotSetError"; - public const string CreateOrganizationError = "CreateOrganizationError"; - public const string OrganizationNotFoundError = "OrganizationNotFoundError"; - public const string SendOrganizationSummaryError = "SendOrganizationSummaryError"; - public const string SendOrganizationTemplateNotSetError = "SendOrganizationTemplateNotSetError"; - public const string AddDomainError = "AddDomainError"; - public const string AddDomainQuotaExceededError = "AddDomainQuotaExceededError"; - public const string AddDomainExistsError = "AddDomainExistsError"; - public const string AddDomainAlreadyUsedError = "AddDomainAlreadyUsedError"; - public const string DeleteDomainError = "DeleteDomainError"; - public const string UpdateQuotasError = "UpdateQuotasError"; - public const string UpdateQuotasWrongQuotaError = "UpdateQuotasWrongQuotaError"; - public const string UpdateCatchAllError = "UpdateCatchAllError"; - public const string UpdateServicePlanError = "UpdateServicePlanError"; - public const string DeleteOrganizationError = "DeleteOrganizationError"; - - public const string TempDomainSetting = "temporaryDomain"; - public const string ExchangeControlPanelUrlSetting = "ecpURL"; - - // other constants - public const string TaskManagerSource = "ExchangeHostedEdition"; - - public static IntResult CreateOrganization(int packageId, string organizationId, - string domain, string adminName, string adminEmail, string adminPassword) - { - IntResult result = new IntResult(); - result.IsSuccess = true; - - try - { - // initialize task manager - TaskManager.StartTask(TaskManagerSource, "CREATE_ORGANIZATION"); - TaskManager.WriteParameter("packageId", packageId); - TaskManager.WriteParameter("organizationId", organizationId); - TaskManager.WriteParameter("domain", domain); - TaskManager.WriteParameter("adminName", adminName); - TaskManager.WriteParameter("adminEmail", adminEmail); - TaskManager.WriteParameter("adminPassword", adminPassword); - - // get Exchange service ID - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.ExchangeHostedEdition); - if(serviceId < 1) - return Error(ExchangeServiceNotEnabledError); - - #region Check Space and Account - // Check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) - return Warning((-accountCheck).ToString()); - - // Check space - int packageCheck = SecurityContext.CheckPackage(packageId, DemandPackage.IsActive); - if (packageCheck < 0) - return Warning((-packageCheck).ToString()); - #endregion - - // get Exchange service - ExchangeServerHostedEdition exchange = GetExchangeService(serviceId); - - // load service settings to know ProgramID, OfferID - StringDictionary serviceSettings = ServerController.GetServiceSettings(serviceId); - string programId = serviceSettings["programID"]; - string offerId = serviceSettings["offerID"]; - - // check settings - if(String.IsNullOrEmpty(programId)) - result.ErrorCodes.Add(ProgramIdIsNotSetError); - if (String.IsNullOrEmpty(offerId)) - result.ErrorCodes.Add(OfferIdIsNotSetError); - - if (result.ErrorCodes.Count > 0) - { - result.IsSuccess = false; - return result; - } - - #region Create organization - int itemId = -1; - ExchangeOrganization org = null; - try - { - // create organization - exchange.CreateOrganization(organizationId, programId, offerId, domain, adminName, adminEmail, adminPassword); - - // save item into meta-base - org = new ExchangeOrganization(); - org.Name = organizationId; - org.PackageId = packageId; - org.ServiceId = serviceId; - itemId = PackageController.AddPackageItem(org); - } - catch (Exception ex) - { - // log error - TaskManager.WriteError(ex); - return Error(CreateOrganizationError); - } - #endregion - - #region Update organization quotas - // update max org quotas - UpdateOrganizationQuotas(org); - - // override quotas - ResultObject quotasResult = ExchangeHostedEditionController.UpdateOrganizationQuotas(itemId, - org.MaxMailboxCountQuota, - org.MaxContactCountQuota, - org.MaxDistributionListCountQuota); - - if (!quotasResult.IsSuccess) - return Error(quotasResult, CreateOrganizationError); - #endregion - - #region Add temporary domain - // load settings - PackageSettings settings = GetExchangePackageSettings(org); - string tempDomainTemplate = settings[TempDomainSetting]; - if (!String.IsNullOrEmpty(tempDomainTemplate)) - { - // add temp domain - string tempDomain = String.Format("{0}.{1}", domain, tempDomainTemplate); - AddOrganizationDomain(itemId, tempDomain); - } - - #endregion - - result.Value = itemId; - return result; - } - catch (Exception ex) - { - // log error - TaskManager.WriteError(ex); - - // exit with error code - return Error(GeneralError, ex.Message); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static List GetOrganizations(int packageId) - { - List items = PackageController.GetPackageItemsByType( - packageId, typeof(ExchangeOrganization), false); - - return items.ConvertAll(i => { return (ExchangeOrganization)i; }); - } - - public static ExchangeOrganization GetOrganizationDetails(int itemId) - { - // load organization item - ExchangeOrganization item = PackageController.GetPackageItem(itemId) as ExchangeOrganization; - if (item == null) - return null; // organization item not found - - // get Exchange service - ExchangeServerHostedEdition exchange = GetExchangeService(item.ServiceId); - - // get organization details - ExchangeOrganization org = exchange.GetOrganizationDetails(item.Name); - - //ExchangeOrganization org = new ExchangeOrganization - //{ - // Id = item.Id, - // PackageId = item.PackageId, - // ServiceId = item.ServiceId, - // Name = item.Name, - // AdministratorEmail = "admin@email.com", - // AdministratorName = "Administrator Mailbox", - // CatchAllAddress = "", - // ContactCount = 1, - // ContactCountQuota = 2, - // MaxContactCountQuota = 3, - // DistinguishedName = "DN=....", - // DistributionListCount = 2, - // DistributionListCountQuota = 3, - // MaxDistributionListCountQuota = 3, - // MaxDomainsCountQuota = 4, - // ExchangeControlPanelUrl = "http://ecp.domain.com", - // MailboxCount = 3, - // MailboxCountQuota = 4, - // MaxMailboxCountQuota = 4, - // ProgramId = "HostedExchange", - // OfferId = "2", - // ServicePlan = "HostedExchange_Basic", - // Domains = GetOrganizationDomains(item.Id).ToArray() - //}; - - // update item props - org.Id = item.Id; - org.PackageId = item.PackageId; - org.ServiceId = item.ServiceId; - org.Name = item.Name; - org.CatchAllAddress = item.CatchAllAddress; - - // update max quotas - UpdateOrganizationQuotas(org); - - // process summary information - org.SummaryInformation = GetExchangeOrganizationSummary(org); - - // process domains - PackageSettings settings = GetExchangePackageSettings(org); - if(settings != null) - { - // get settings - string tempDomain = settings[TempDomainSetting]; - string ecpUrl = settings[ExchangeControlPanelUrlSetting]; - - // iterate through domains - foreach (ExchangeOrganizationDomain domain in org.Domains) - { - if (tempDomain != null && domain.Name.EndsWith("." + tempDomain, StringComparison.InvariantCultureIgnoreCase)) - domain.IsTemp = true; - if (domain.IsDefault && ecpUrl != null) - org.ExchangeControlPanelUrl = Utils.ReplaceStringVariable(ecpUrl, "domain_name", domain.Name); - } - } - - // return org - return org; - } - - public static void UpdateOrganizationQuotas(ExchangeOrganization org) - { - // load default package quotas - PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - if (!cntx.Groups.ContainsKey(ResourceGroups.ExchangeHostedEdition)) - return; - - org.MaxMailboxCountQuota = cntx.Quotas[Quotas.EXCHANGEHOSTEDEDITION_MAILBOXES].QuotaAllocatedValue; - org.MaxContactCountQuota = cntx.Quotas[Quotas.EXCHANGEHOSTEDEDITION_CONTACTS].QuotaAllocatedValue; - org.MaxDistributionListCountQuota = cntx.Quotas[Quotas.EXCHANGEHOSTEDEDITION_DISTRIBUTIONLISTS].QuotaAllocatedValue; - org.MaxDomainsCountQuota = cntx.Quotas[Quotas.EXCHANGEHOSTEDEDITION_DOMAINS].QuotaAllocatedValue; - } - - public static List GetOrganizationDomains(int itemId) - { - // load organization item - ExchangeOrganization item = PackageController.GetPackageItem(itemId) as ExchangeOrganization; - if (item == null) - return null; // organization item not found - - // get Exchange service - ExchangeServerHostedEdition exchange = GetExchangeService(item.ServiceId); - - // get organization domains - List domains = new List(); - domains.AddRange(exchange.GetOrganizationDomains(item.Name)); - return domains; - - //return new List - //{ - // new ExchangeOrganizationDomain { Identity = "org101\\domain1.com", Name = "domain1.com", IsDefault = true, IsTemp = false }, - // new ExchangeOrganizationDomain { Identity = "org101\\org101.tempdomain.com", Name = "org101.tempdomain.com", IsDefault = false, IsTemp = true }, - // new ExchangeOrganizationDomain { Identity = "org101\\myseconddomain.com", Name = "myseconddomain.com", IsDefault = false, IsTemp = false } - //}; - } - - public static string GetExchangeOrganizationSummary(int itemId) - { - // load organization details - ExchangeOrganization org = GetOrganizationDetails(itemId); - if (org == null) - return null; // organization not found - - return GetExchangeOrganizationSummary(org); - } - - private static string GetExchangeOrganizationSummary(ExchangeOrganization org) - { - // evaluate template - MailTemplate template = EvaluateOrganizationSummaryTemplate(org); - if (template == null || template.Body == null) - return null; - - return template.IsHtml ? template.Body : template.Body.Replace("\n", "
    "); - } - - private static MailTemplate EvaluateOrganizationSummaryTemplate(ExchangeOrganization org) - { - #region create template context - Hashtable items = new Hashtable(); - - // add organization - items["org"] = org; - - // add package information - PackageInfo space = PackageController.GetPackage(org.PackageId); - items["space"] = space; - - // add user information - UserInfo user = UserController.GetUser(space.UserId); - items["user"] = user; - #endregion - - #region load template - // load template settings - UserSettings settings = UserController.GetUserSettings(user.UserId, UserSettings.EXCHANGE_HOSTED_EDITION_ORGANIZATION_SUMMARY); - if(settings == null) - return null; - - // create template - MailTemplate template = new MailTemplate(); - - // from - template.From = settings["From"]; - - // BCC - template.Bcc = settings["CC"]; - - // subject - template.Subject = settings["Subject"]; - - // body - template.IsHtml = user.HtmlMail; - string bodySetting = template.IsHtml ? "HtmlBody" : "TextBody"; - template.Body = settings[bodySetting]; - - // priority - string priority = settings["Priority"]; - template.Priority = String.IsNullOrEmpty(priority) - ? MailPriority.Normal - : (MailPriority)Enum.Parse(typeof(MailPriority), priority, true); - #endregion - - #region evaluate template - if(template.Subject != null) - template.Subject = PackageController.EvaluateTemplate(template.Subject, items); - - if(template.Body != null) - template.Body = PackageController.EvaluateTemplate(template.Body, items); - #endregion - - return template; - } - - private static PackageSettings GetExchangePackageSettings(ExchangeOrganization org) - { - // load package settings - return PackageController.GetPackageSettings(org.PackageId, PackageSettings.EXCHANGE_HOSTED_EDITION); - } - - public static ResultObject SendExchangeOrganizationSummary(int itemId, string toEmail) - { - ResultObject result = new ResultObject(); - result.IsSuccess = true; - - try - { - // initialize task manager - TaskManager.StartTask(TaskManagerSource, "SEND_SUMMARY"); - TaskManager.WriteParameter("Item ID", itemId); - TaskManager.WriteParameter("To e-mail", toEmail); - - // load organization item - ExchangeOrganization item = PackageController.GetPackageItem(itemId) as ExchangeOrganization; - if (item == null) - return Error(OrganizationNotFoundError); - - #region Check Space and Account - // Check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) - return Warning((-accountCheck).ToString()); - - // Check space - int packageCheck = SecurityContext.CheckPackage(item.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) - return Warning((-packageCheck).ToString()); - #endregion - - // load organization details - ExchangeOrganization org = GetOrganizationDetails(item.Id); - if(org == null) - return Error(OrganizationNotFoundError); - - // get evaluated summary information - MailTemplate msg = EvaluateOrganizationSummaryTemplate(org); - if (msg == null) - return Error(SendOrganizationTemplateNotSetError); - - // send message - int sendResult = MailHelper.SendMessage(msg.From, toEmail, msg.Bcc, msg.Subject, msg.Body, msg.Priority, msg.IsHtml); - if (sendResult < 0) - return Error((-sendResult).ToString()); - - return result; - } - catch (Exception ex) - { - // log error - TaskManager.WriteError(ex); - - // exit with error code - return Error(SendOrganizationSummaryError, ex.Message); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ResultObject AddOrganizationDomain(int itemId, string domainName) - { - ResultObject result = new ResultObject(); - result.IsSuccess = true; - - try - { - // initialize task manager - TaskManager.StartTask(TaskManagerSource, "ADD_DOMAIN"); - TaskManager.WriteParameter("itemId", itemId); - TaskManager.WriteParameter("domain", domainName); - - // load organization item - ExchangeOrganization item = PackageController.GetPackageItem(itemId) as ExchangeOrganization; - if (item == null) - return Error(OrganizationNotFoundError); - - #region Check Space and Account - // Check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) - return Warning((-accountCheck).ToString()); - - // Check space - int packageCheck = SecurityContext.CheckPackage(item.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) - return Warning((-packageCheck).ToString()); - #endregion - - // get organization details - ExchangeOrganization org = GetOrganizationDetails(item.Id); - if (org == null) - return Error(OrganizationNotFoundError); - - // check domains quota - if(org.MaxDomainsCountQuota > -1 && org.Domains.Length >= org.MaxDomainsCountQuota) - return Error(AddDomainQuotaExceededError); - - // check if the domain already exists - DomainInfo domain = null; - int checkResult = ServerController.CheckDomain(domainName); - if (checkResult == BusinessErrorCodes.ERROR_DOMAIN_ALREADY_EXISTS) - { - // domain exists - // check if it belongs to the same space - domain = ServerController.GetDomain(domainName); - if (domain == null) - return Error((-checkResult).ToString()); - - if (domain.PackageId != org.PackageId) - return Error((-checkResult).ToString()); - - // check if domain is already used in this organization - foreach (ExchangeOrganizationDomain orgDomain in org.Domains) - { - if(String.Equals(orgDomain.Name, domainName, StringComparison.InvariantCultureIgnoreCase)) - return Error(AddDomainAlreadyUsedError); - } - } - else if (checkResult == BusinessErrorCodes.ERROR_RESTRICTED_DOMAIN) - { - return Error((-checkResult).ToString()); - } - - // create domain if required - if (domain == null) - { - domain = new DomainInfo(); - domain.PackageId = org.PackageId; - domain.DomainName = domainName; - domain.IsInstantAlias = false; - domain.IsSubDomain = false; - - int domainId = ServerController.AddDomain(domain); - if (domainId < 0) - return Error((-domainId).ToString()); - - // add domain - domain.DomainId = domainId; - } - - // get Exchange service - ExchangeServerHostedEdition exchange = GetExchangeService(item.ServiceId); - - // add domain - exchange.AddOrganizationDomain(item.Name, domainName); - - return result; - } - catch (Exception ex) - { - // log error - TaskManager.WriteError(ex); - - // exit with error code - return Error(AddDomainError, ex.Message); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ResultObject DeleteOrganizationDomain(int itemId, string domainName) - { - ResultObject result = new ResultObject(); - result.IsSuccess = true; - - try - { - // initialize task manager - TaskManager.StartTask(TaskManagerSource, "DELETE_DOMAIN"); - TaskManager.WriteParameter("itemId", itemId); - TaskManager.WriteParameter("domain", domainName); - - // load organization item - ExchangeOrganization item = PackageController.GetPackageItem(itemId) as ExchangeOrganization; - if (item == null) - return Error(OrganizationNotFoundError); - - #region Check Space and Account - // Check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) - return Warning((-accountCheck).ToString()); - - // Check space - int packageCheck = SecurityContext.CheckPackage(item.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) - return Warning((-packageCheck).ToString()); - #endregion - - // get Exchange service - ExchangeServerHostedEdition exchange = GetExchangeService(item.ServiceId); - - // delete domain - exchange.DeleteOrganizationDomain(item.Name, domainName); - - return result; - } - catch (Exception ex) - { - // log error - TaskManager.WriteError(ex); - - // exit with error code - return Error(DeleteDomainError, ex.Message); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ResultObject UpdateOrganizationQuotas(int itemId, int mailboxesNumber, int contactsNumber, int distributionListsNumber) - { - ResultObject result = new ResultObject(); - result.IsSuccess = true; - - try - { - // initialize task manager - TaskManager.StartTask(TaskManagerSource, "UPDATE_QUOTAS"); - TaskManager.WriteParameter("itemId", itemId); - TaskManager.WriteParameter("mailboxesNumber", mailboxesNumber); - TaskManager.WriteParameter("contactsNumber", contactsNumber); - TaskManager.WriteParameter("distributionListsNumber", distributionListsNumber); - - // load organization item - ExchangeOrganization item = PackageController.GetPackageItem(itemId) as ExchangeOrganization; - if (item == null) - return Error(OrganizationNotFoundError); - - #region Check Space and Account - // Check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) - return Warning((-accountCheck).ToString()); - - // Check space - int packageCheck = SecurityContext.CheckPackage(item.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) - return Warning((-packageCheck).ToString()); - #endregion - - // check quotas - UpdateOrganizationQuotas(item); - - if(item.MaxMailboxCountQuota > -1 && mailboxesNumber > item.MaxMailboxCountQuota) - return Error(UpdateQuotasWrongQuotaError); - if (item.MaxContactCountQuota > -1 && contactsNumber > item.MaxContactCountQuota) - return Error(UpdateQuotasWrongQuotaError); - if (item.MaxDistributionListCountQuota > -1 && distributionListsNumber > item.MaxDistributionListCountQuota) - return Error(UpdateQuotasWrongQuotaError); - - // get Exchange service - ExchangeServerHostedEdition exchange = GetExchangeService(item.ServiceId); - - // update quotas - exchange.UpdateOrganizationQuotas(item.Name, mailboxesNumber, contactsNumber, distributionListsNumber); - - return result; - } - catch (Exception ex) - { - // log error - TaskManager.WriteError(ex); - - // exit with error code - return Error(UpdateQuotasError, ex.Message); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ResultObject UpdateOrganizationCatchAllAddress(int itemId, string catchAllEmail) - { - ResultObject result = new ResultObject(); - result.IsSuccess = true; - - try - { - // initialize task manager - TaskManager.StartTask(TaskManagerSource, "UPDATE_CATCHALL"); - TaskManager.WriteParameter("itemId", itemId); - TaskManager.WriteParameter("catchAllEmail", catchAllEmail); - - // load organization item - ExchangeOrganization item = PackageController.GetPackageItem(itemId) as ExchangeOrganization; - if (item == null) - return Error(OrganizationNotFoundError); - - #region Check Space and Account - // Check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) - return Warning((-accountCheck).ToString()); - - // Check space - int packageCheck = SecurityContext.CheckPackage(item.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) - return Warning((-packageCheck).ToString()); - #endregion - - // get Exchange service - ExchangeServerHostedEdition exchange = GetExchangeService(item.ServiceId); - - // update catch-all - exchange.UpdateOrganizationCatchAllAddress(item.Name, catchAllEmail); - - // save new catch-all in the item - item.CatchAllAddress = catchAllEmail; - PackageController.UpdatePackageItem(item); - - return result; - } - catch (Exception ex) - { - // log error - TaskManager.WriteError(ex); - - // exit with error code - return Error(UpdateCatchAllError, ex.Message); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ResultObject UpdateOrganizationServicePlan(int itemId, int newServiceId) - { - ResultObject result = new ResultObject(); - result.IsSuccess = true; - - try - { - // initialize task manager - TaskManager.StartTask(TaskManagerSource, "UPDATE_SERVICE"); - TaskManager.WriteParameter("itemId", itemId); - TaskManager.WriteParameter("newServiceId", newServiceId); - - // load organization item - ExchangeOrganization item = PackageController.GetPackageItem(itemId) as ExchangeOrganization; - if (item == null) - return Error(OrganizationNotFoundError); - - #region Check Space and Account - // Check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsAdmin | DemandAccount.IsActive); - if (accountCheck < 0) - return Warning((-accountCheck).ToString()); - - // Check space - int packageCheck = SecurityContext.CheckPackage(item.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) - return Warning((-packageCheck).ToString()); - #endregion - - // get Exchange service - ExchangeServerHostedEdition exchange = GetExchangeService(item.ServiceId); - - // load service settings to know ProgramID, OfferID - StringDictionary serviceSettings = ServerController.GetServiceSettings(newServiceId); - string programId = serviceSettings["programID"]; - string offerId = serviceSettings["offerID"]; - - // check settings - if(String.IsNullOrEmpty(programId)) - result.ErrorCodes.Add(ProgramIdIsNotSetError); - if (String.IsNullOrEmpty(offerId)) - result.ErrorCodes.Add(OfferIdIsNotSetError); - - // update service plan - exchange.UpdateOrganizationServicePlan(item.Name, programId, offerId); - - // move item between services - int moveResult = PackageController.MovePackageItem(itemId, newServiceId); - if (moveResult < 0) - return Error((-moveResult).ToString()); - - return result; - } - catch (Exception ex) - { - // log error - TaskManager.WriteError(ex); - - // exit with error code - return Error(UpdateServicePlanError, ex.Message); - } - finally - { - TaskManager.CompleteTask(); - } - } - - public static ResultObject DeleteOrganization(int itemId) - { - ResultObject result = new ResultObject(); - result.IsSuccess = true; - - try - { - // initialize task manager - TaskManager.StartTask(TaskManagerSource, "DELETE_ORGANIZATION"); - TaskManager.WriteParameter("itemId", itemId); - - // load organization item - ExchangeOrganization item = PackageController.GetPackageItem(itemId) as ExchangeOrganization; - if (item == null) - return Error(OrganizationNotFoundError); - - #region Check Space and Account - // Check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) - return Warning((-accountCheck).ToString()); - - // Check space - int packageCheck = SecurityContext.CheckPackage(item.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) - return Warning((-packageCheck).ToString()); - #endregion - - // get Exchange service - ExchangeServerHostedEdition exchange = GetExchangeService(item.ServiceId); - - // delete organization - exchange.DeleteOrganization(item.Name); - - // delete meta-item - PackageController.DeletePackageItem(itemId); - - return result; - } - catch (Exception ex) - { - // log error - TaskManager.WriteError(ex); - - // exit with error code - return Error(DeleteOrganizationError, ex.Message); - } - finally - { - TaskManager.CompleteTask(); - } - } - - #region Private helpers - public static ExchangeServerHostedEdition GetExchangeService(int serviceId) - { - ExchangeServerHostedEdition ws = new ExchangeServerHostedEdition(); - ServiceProviderProxy.Init(ws, serviceId); - return ws; - } - #endregion - - #region Result object routines - private static T Warning(params string[] messageParts) - { - return Warning(null, messageParts); - } - - private static T Warning(ResultObject innerResult, params string[] messageParts) - { - return Result(innerResult, false, messageParts); - } - - private static T Error(params string[] messageParts) - { - return Error(null, messageParts); - } - - private static T Error(ResultObject innerResult, params string[] messageParts) - { - return Result(innerResult, true, messageParts); - } - - private static T Result(ResultObject innerResult, bool isError, params string[] messageParts) - { - object obj = Activator.CreateInstance(); - ResultObject result = (ResultObject)obj; - - // set error - result.IsSuccess = !isError; - - // add message - if (messageParts != null) - result.ErrorCodes.Add(String.Join(":", messageParts)); - - // copy errors from inner result - if (innerResult != null) - result.ErrorCodes.AddRange(innerResult.ErrorCodes); - - return (T)obj; - } - #endregion - } -} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs index f3641624..232439d8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/ExchangeServer/ExchangeServerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -120,9 +120,6 @@ namespace WebsitePanel.EnterpriseServer org.Id = 1; org.OrganizationId = "fabrikam"; org.Name = "Fabrikam Inc"; - org.IssueWarningKB = 150000; - org.ProhibitSendKB = 170000; - org.ProhibitSendReceiveKB = 190000; org.KeepDeletedItemsDays = 14; return org; } @@ -167,7 +164,7 @@ namespace WebsitePanel.EnterpriseServer DataProvider.GetExchangeOrganizationStatistics(itemId)); // disk space - stats.UsedDiskSpace = org.DiskSpace; + //stats.UsedDiskSpace = org.DiskSpace; // allocated quotas PackageContext cntx = PackageController.GetPackageContext(org.PackageId); @@ -295,10 +292,6 @@ namespace WebsitePanel.EnterpriseServer ExchangeServer mailboxRole = GetExchangeServer(serviceId, org.ServiceId); - - - - bool authDomainCreated = false; @@ -307,10 +300,15 @@ namespace WebsitePanel.EnterpriseServer List domains = null; try - { + { + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + // 1) Create Organization (Mailbox) // ================================ - Organization exchangeOrganization = mailboxRole.ExtendToExchangeOrganization(org.OrganizationId, org.SecurityGroup); + Organization exchangeOrganization = mailboxRole.ExtendToExchangeOrganization(org.OrganizationId, + org.SecurityGroup, + Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue)); + organizationExtended = true; exchangeOrganization.OrganizationId = org.OrganizationId; @@ -386,17 +384,17 @@ namespace WebsitePanel.EnterpriseServer break; } - PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - // organization limits - org.IssueWarningKB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; - if (org.IssueWarningKB > 0) - org.IssueWarningKB *= Convert.ToInt32(1024*0.9); //90% - org.ProhibitSendKB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; - if (org.ProhibitSendKB > 0) - org.ProhibitSendKB *= 1024; //100% - org.ProhibitSendReceiveKB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; - if (org.ProhibitSendReceiveKB > 0) - org.ProhibitSendReceiveKB *= 1024; //100% + + // 4) Add the address book policy (Exchange 2010 SP2 + // + // ========================================== + Organization OrgTmp = mailboxRole.CreateOrganizationAddressBookPolicy(org.OrganizationId, + org.GlobalAddressList, + org.AddressList, + org.RoomsAddressList, + org.OfflineAddressBook); + + org.AddressBookPolicy = OrgTmp.AddressBookPolicy; StringDictionary settings = ServerController.GetServiceSettings(serviceId); org.KeepDeletedItemsDays = Utils.ParseInt(settings["KeepDeletedItemsDays"], 14); @@ -406,9 +404,9 @@ namespace WebsitePanel.EnterpriseServer { // rollback organization creation - if (organizationExtended) + if (organizationExtended) mailboxRole.DeleteOrganization(org.OrganizationId, org.DistinguishedName, - org.GlobalAddressList, org.AddressList, org.RoomsAddressList, org.OfflineAddressBook, org.SecurityGroup); + org.GlobalAddressList, org.AddressList, org.RoomsAddressList, org.OfflineAddressBook, org.SecurityGroup, org.AddressBookPolicy); // rollback domain if (authDomainCreated) @@ -498,16 +496,16 @@ namespace WebsitePanel.EnterpriseServer int exchangeServiceId = GetExchangeServiceID(org.PackageId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - bool successful = exchange.DeleteOrganization( - org.OrganizationId, - org.DistinguishedName, - org.GlobalAddressList, - org.AddressList, - org.RoomsAddressList, - org.OfflineAddressBook, - org.SecurityGroup); + bool successful = exchange.DeleteOrganization( + org.OrganizationId, + org.DistinguishedName, + org.GlobalAddressList, + org.AddressList, + org.RoomsAddressList, + org.OfflineAddressBook, + org.SecurityGroup, + org.AddressBookPolicy); return successful ? 0 : BusinessErrorCodes.ERROR_EXCHANGE_DELETE_SOME_PROBLEMS; @@ -571,9 +569,6 @@ namespace WebsitePanel.EnterpriseServer return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; // set limits - org.IssueWarningKB = issueWarningKB; - org.ProhibitSendKB = prohibitSendKB; - org.ProhibitSendReceiveKB = prohibitSendReceiveKB; org.KeepDeletedItemsDays = keepDeletedItemsDays; // save organization @@ -665,6 +660,39 @@ namespace WebsitePanel.EnterpriseServer } } + public static ExchangeMailboxStatistics GetMailboxStatistics(int itemId, int accountId) + { + // place log record + TaskManager.StartTask("EXCHANGE", "GET_MAILBOX_STATS"); + TaskManager.ItemId = itemId; + + try + { + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + return null; + + + // get stats + int exchangeServiceId = GetExchangeServiceID(org.PackageId); + ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); + + // load account + ExchangeAccount account = GetAccount(itemId, accountId); + + return exchange.GetMailboxStatistics(account.AccountName); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + public static ExchangeItemStatistics[] GetPublicFoldersStatistics(int itemId) { #region Demo Mode @@ -916,6 +944,13 @@ namespace WebsitePanel.EnterpriseServer DataProvider.GetExchangeAccounts(itemId, (int)accountType)); } + + public static List GetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId) + { + return ObjectUtils.CreateListFromDataReader(DataProvider.GetExchangeAccountByMailboxPlanId(itemId, mailboxPlanId)); + } + + public static List GetExchangeMailboxes(int itemId) { return ObjectUtils.CreateListFromDataReader(DataProvider.GetExchangeMailboxes(itemId)); @@ -1087,21 +1122,22 @@ namespace WebsitePanel.EnterpriseServer return account; } - private static int AddAccount(int itemId, ExchangeAccountType accountType, - string accountName, string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, - MailboxManagerActions mailboxManagerActions, string samAccountName, string accountPassword) - { - return DataProvider.AddExchangeAccount(itemId, (int)accountType, - accountName, displayName, primaryEmailAddress, mailEnabledPublicFolder, - mailboxManagerActions.ToString(), samAccountName, CryptoUtils.Encrypt(accountPassword)); - } + private static int AddAccount(int itemId, ExchangeAccountType accountType, + string accountName, string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, + MailboxManagerActions mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber) + { + return DataProvider.AddExchangeAccount(itemId, (int)accountType, + accountName, displayName, primaryEmailAddress, mailEnabledPublicFolder, + mailboxManagerActions.ToString(), samAccountName, CryptoUtils.Encrypt(accountPassword), mailboxPlanId, (string.IsNullOrEmpty(subscriberNumber) ? null : subscriberNumber.Trim())); + } - private static void UpdateAccount(ExchangeAccount account) - { - DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName, - account.PrimaryEmailAddress,account.MailEnabledPublicFolder, - account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword); - } + private static void UpdateAccount(ExchangeAccount account) + { + DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName, + account.PrimaryEmailAddress, account.MailEnabledPublicFolder, + account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword, account.MailboxPlanId, + (string.IsNullOrEmpty(account.SubscriberNumber) ? null : account.SubscriberNumber.Trim())); + } private static void DeleteAccount(int itemId, int accountId) { @@ -1112,29 +1148,41 @@ namespace WebsitePanel.EnterpriseServer DataProvider.DeleteExchangeAccount(itemId, accountId); } - private static string BuildAccountName(string orgId, string name) - { - int maxLen = 19 - orgId.Length; + private static string BuildAccountName(string orgId, string name) + { + string accountName = name = name.Replace(" ", ""); + string CounterStr = "00000"; + int counter = 0; + bool bFound = false; + do + { + accountName = genSamLogin(name, CounterStr); - // try to choose name - int i = 0; - while (true) - { - string num = i > 0 ? i.ToString() : ""; - int len = maxLen - num.Length; + if (!AccountExists(accountName)) bFound = true; - if (name.Length > len) - name = name.Substring(0, len); + CounterStr = counter.ToString("d5"); + counter++; + } + while (!bFound); - string accountName = name + num + "_" + orgId; + return accountName; + } - // check if already exists - if (!AccountExists(accountName)) - return accountName; + private static string genSamLogin(string login, string strCounter) + { + int maxLogin = 20; + int fullLen = login.Length + strCounter.Length; + if (fullLen <= maxLogin) + return login + strCounter; + else + { + if (login.Length - (fullLen - maxLogin) > 0) + return login.Substring(0, login.Length - (fullLen - maxLogin)) + strCounter; + else return strCounter; // ???? + } + + } - i++; - } - } #endregion @@ -1375,160 +1423,198 @@ namespace WebsitePanel.EnterpriseServer #endregion #region Mailboxes - - private static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType, + + private static void UpdateExchangeAccount(int accountId, string accountName, ExchangeAccountType accountType, string displayName, string primaryEmailAddress, bool mailEnabledPublicFolder, - string mailboxManagerActions, string samAccountName, string accountPassword) - { - DataProvider.UpdateExchangeAccount(accountId, - accountName, - accountType, - displayName, - primaryEmailAddress, - mailEnabledPublicFolder, + string mailboxManagerActions, string samAccountName, string accountPassword, int mailboxPlanId, string subscriberNumber) + { + DataProvider.UpdateExchangeAccount(accountId, + accountName, + accountType, + displayName, + primaryEmailAddress, + mailEnabledPublicFolder, mailboxManagerActions, samAccountName, - CryptoUtils.Encrypt(accountPassword)); + CryptoUtils.Encrypt(accountPassword), + mailboxPlanId, + (string.IsNullOrEmpty(subscriberNumber) ? null : subscriberNumber.Trim())); } - public static int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, - string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; + public static int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, + string displayName, string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) + { + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; - // check mailbox quota - OrganizationStatistics orgStats = GetOrganizationStatistics(itemId); - if ((orgStats.AllocatedMailboxes > -1 ) && ( orgStats.CreatedMailboxes >= orgStats.AllocatedMailboxes)) - return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT; - - // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_MAILBOX"); - TaskManager.ItemId = itemId; - bool userCreated = false; - Organization org = null; - try - { - // load organization - org = GetOrganization(itemId); - if (org == null) - return -1; - - // e-mail - string email = name + "@" + domain; - bool enabled = (accountType == ExchangeAccountType.Mailbox); - - - // string accountName = string.Empty; - //Create AD user if needed - if (accountId == 0) - { - accountId = OrganizationController.CreateUser(org.Id, displayName, name, domain, password, enabled, false, string.Empty, out accountName); - if (accountId > 0) - userCreated = true; - } - if (accountId < 0) - return accountId; - - int exchangeServiceId = PackageController.GetPackageServiceId(org.PackageId, ResourceGroups.Exchange); - - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); + // check mailbox quota + OrganizationStatistics orgStats = GetOrganizationStatistics(itemId); + if ((orgStats.AllocatedMailboxes > -1) && (orgStats.CreatedMailboxes >= orgStats.AllocatedMailboxes)) + return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT; - //Create Exchange Organization - if (string.IsNullOrEmpty(org.GlobalAddressList)) - { - ExtendToExchangeOrganization(ref org); - - PackageController.UpdatePackageItem(org); - } - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; + // place log record + TaskManager.StartTask("EXCHANGE", "CREATE_MAILBOX"); + TaskManager.ItemId = itemId; + bool userCreated = false; + Organization org = null; + try + { + accountName = accountName.Trim(); + displayName = displayName.Trim(); + name = name.Trim(); + domain = domain.Trim(); - // load package context - PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + // load organization + org = GetOrganization(itemId); + if (org == null) + return -1; + + // e-mail + string email = name + "@" + domain; + bool enabled = (accountType == ExchangeAccountType.Mailbox); - string samAccount = exchange.CreateMailEnableUser(email, org.OrganizationId, org.DistinguishedName, accountType, org.Database, - org.OfflineAddressBook, - accountName, - QuotaEnabled(cntx, Quotas.EXCHANGE2007_POP3ENABLED), - QuotaEnabled(cntx, Quotas.EXCHANGE2007_IMAPENABLED), - QuotaEnabled(cntx, Quotas.EXCHANGE2007_OWAENABLED), - QuotaEnabled(cntx, Quotas.EXCHANGE2007_MAPIENABLED), - QuotaEnabled(cntx, Quotas.EXCHANGE2007_ACTIVESYNCENABLED), - org.IssueWarningKB, - org.ProhibitSendKB, - org.ProhibitSendReceiveKB, - org.KeepDeletedItemsDays); + // string accountName = string.Empty; + //Create AD user if needed + if (accountId == 0) + { + accountId = OrganizationController.CreateUser(org.Id, displayName, name, domain, password, subscriberNumber, enabled, false, string.Empty, out accountName); + if (accountId > 0) + userCreated = true; + } + if (accountId < 0) + return accountId; - MailboxManagerActions pmmActions = MailboxManagerActions.GeneralSettings - | MailboxManagerActions.MailFlowSettings - | MailboxManagerActions.AdvancedSettings - | MailboxManagerActions.EmailAddresses; + // get mailbox settings + Organizations orgProxy = OrganizationController.GetOrganizationProxy(org.ServiceId); + OrganizationUser retUser = orgProxy.GetUserGeneralSettings(accountName, org.OrganizationId); - UpdateExchangeAccount(accountId, accountName, accountType, displayName, email, false, pmmActions.ToString(), samAccount, password); + int exchangeServiceId = PackageController.GetPackageServiceId(org.PackageId, ResourceGroups.Exchange); + + ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); + + + //Create Exchange Organization + if (string.IsNullOrEmpty(org.GlobalAddressList)) + { + ExtendToExchangeOrganization(ref org); + + PackageController.UpdatePackageItem(org); + } + + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; + + //verify if the mailbox fits in the storage quota + // load package context + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + int maxDiskSpace = -1; + int quotaUsed = 0; + if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_DISKSPACE) + && cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue > 0) + { + maxDiskSpace = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; + quotaUsed = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaUsedValue; + } + + ExchangeMailboxPlan plan = GetExchangeMailboxPlan(itemId, mailboxPlanId); + if (maxDiskSpace != -1) + { + if ((quotaUsed + plan.MailboxSizeMB) > (maxDiskSpace)) + return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; + } + + //GetServiceSettings + StringDictionary primSettings = ServerController.GetServiceSettings(exchangeServiceId); + + string samAccount = exchange.CreateMailEnableUser(email, org.OrganizationId, org.DistinguishedName, accountType, primSettings["mailboxdatabase"], + org.OfflineAddressBook, + org.AddressBookPolicy, + retUser.SamAccountName, + plan.EnablePOP, + plan.EnableIMAP, + plan.EnableOWA, + plan.EnableMAPI, + plan.EnableActiveSync, + (int)Math.Round((double)((plan.IssueWarningPct * plan.MailboxSizeMB * 1024) / 100)), + (int)Math.Round((double)((plan.ProhibitSendPct * plan.MailboxSizeMB * 1024) / 100)), + (int)Math.Round((double)((plan.ProhibitSendReceivePct * plan.MailboxSizeMB * 1024) / 100)), + plan.KeepDeletedItemsDays, + plan.MaxRecipients, + plan.MaxSendMessageSizeKB, + plan.MaxReceiveMessageSizeKB, + plan.HideFromAddressBook, + Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue)); + + MailboxManagerActions pmmActions = MailboxManagerActions.GeneralSettings + | MailboxManagerActions.MailFlowSettings + | MailboxManagerActions.AdvancedSettings + | MailboxManagerActions.EmailAddresses; + + + UpdateExchangeAccount(accountId, accountName, accountType, displayName, email, false, pmmActions.ToString(), samAccount, password, mailboxPlanId, subscriberNumber); - // send setup instructions - if (sendSetupInstructions) - { - try - { - // send setup instructions - int sendResult = SendMailboxSetupInstructions(itemId, accountId, true, setupInstructionMailAddress, null); - if (sendResult < 0) - TaskManager.WriteWarning("Setup instructions were not sent. Error code: " + sendResult); - } - catch (Exception ex) - { - TaskManager.WriteError(ex); - } - } + // send setup instructions + if (sendSetupInstructions) + { + try + { + // send setup instructions + int sendResult = SendMailboxSetupInstructions(itemId, accountId, true, setupInstructionMailAddress, null); + if (sendResult < 0) + TaskManager.WriteWarning("Setup instructions were not sent. Error code: " + sendResult); + } + catch (Exception ex) + { + TaskManager.WriteError(ex); + } + } - try - { - // update OAB - // check if this is the first mailbox within the organization - if (GetAccounts(itemId, ExchangeAccountType.Mailbox).Count == 1) - exchange.UpdateOrganizationOfflineAddressBook(org.OfflineAddressBook); - } - catch (Exception ex) - { - TaskManager.WriteError(ex); - } + try + { + // update OAB + // check if this is the first mailbox within the organization + if (GetAccounts(itemId, ExchangeAccountType.Mailbox).Count == 1) + exchange.UpdateOrganizationOfflineAddressBook(org.OfflineAddressBook); + } + catch (Exception ex) + { + TaskManager.WriteError(ex); + } - return accountId; - } - catch (Exception ex) - { - //rollback AD user - if (userCreated) - { - try - { - OrganizationController.DeleteUser(org.Id, accountId); - } - catch (Exception rollbackException) - { - TaskManager.WriteError(rollbackException); - } - } - throw TaskManager.WriteError(ex); + return accountId; + } + catch (Exception ex) + { + //rollback AD user + if (userCreated) + { + try + { + OrganizationController.DeleteUser(org.Id, accountId); + } + catch (Exception rollbackException) + { + TaskManager.WriteError(rollbackException); + } + } + throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + } + finally + { + TaskManager.CompleteTask(); + } + } public static int DisableMailbox(int itemId, int accountId) { @@ -1694,85 +1780,56 @@ namespace WebsitePanel.EnterpriseServer } } - public static int SetMailboxGeneralSettings(int itemId, int accountId, string displayName, - string password, bool hideAddressBook, bool disabled, string firstName, string initials, - string lastName, string address, string city, string state, string zip, string country, - string jobTitle, string company, string department, string office, string managerAccountName, - string businessPhone, string fax, string homePhone, string mobilePhone, string pager, - string webPage, string notes) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; + public static int SetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled) + { + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_GENERAL"); - TaskManager.ItemId = itemId; + // place log record + TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_GENERAL"); + TaskManager.ItemId = itemId; - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return -1; - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; - // load account - ExchangeAccount account = GetAccount(itemId, accountId); + // load account + ExchangeAccount account = GetAccount(itemId, accountId); - // get mailbox settings + // get mailbox settings int exchangeServiceId = GetExchangeServiceID(org.PackageId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetMailboxGeneralSettings( - account.AccountName, - displayName, - password, - hideAddressBook, - disabled, - firstName, - initials, - lastName, - address, - city, - state, - zip, - country, - jobTitle, - company, - department, - office, - managerAccountName, - businessPhone, - fax, - homePhone, - mobilePhone, - pager, - webPage, - notes); - // update account - account.DisplayName = displayName; - if (!String.IsNullOrEmpty(password)) - account.AccountPassword = CryptoUtils.Encrypt(password); + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - UpdateAccount(account); + if (Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue)) + hideAddressBook = true; - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + exchange.SetMailboxGeneralSettings( + account.AccountName, + hideAddressBook, + disabled); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } public static ExchangeEmailAddress[] GetMailboxEmailAddresses(int itemId, int accountId) { @@ -2002,61 +2059,58 @@ namespace WebsitePanel.EnterpriseServer } } - public static int SetMailboxMailFlowSettings(int itemId, int accountId, - bool enableForwarding, string forwardingAccountName, bool forwardToBoth, - string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, - int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, + public static int SetMailboxMailFlowSettings(int itemId, int accountId, + bool enableForwarding, string forwardingAccountName, bool forwardToBoth, + string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; + { + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_MAILFLOW"); - TaskManager.ItemId = itemId; + // place log record + TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_MAILFLOW"); + TaskManager.ItemId = itemId; - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return -1; - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; - // load account - ExchangeAccount account = GetAccount(itemId, accountId); + // load account + ExchangeAccount account = GetAccount(itemId, accountId); - // get mailbox settings + // get mailbox settings int exchangeServiceId = GetExchangeServiceID(org.PackageId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetMailboxMailFlowSettings(account.AccountName, - enableForwarding, - forwardingAccountName, - forwardToBoth, - sendOnBehalfAccounts, - acceptAccounts, - rejectAccounts, - maxRecipients, - maxSendMessageSizeKB, - maxReceiveMessageSizeKB, - requireSenderAuthentication); - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + exchange.SetMailboxMailFlowSettings(account.AccountName, + enableForwarding, + forwardingAccountName, + forwardToBoth, + sendOnBehalfAccounts, + acceptAccounts, + rejectAccounts, + requireSenderAuthentication); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + public static ExchangeMailbox GetMailboxAdvancedSettings(int itemId, int accountId) { @@ -2098,75 +2152,6 @@ namespace WebsitePanel.EnterpriseServer } } - public static int SetMailboxAdvancedSettings(int itemId, int accountId, bool enablePOP, - bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, - int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; - - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_MAILBOX_ADVANCED"); - TaskManager.ItemId = itemId; - - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - // load account - ExchangeAccount account = GetAccount(itemId, accountId); - - // load package context - PackageContext cntx = PackageController.GetPackageContext(org.PackageId); - - int maxDiskSpace = 0; - if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_DISKSPACE) - && cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue > 0) - maxDiskSpace = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue * 1024; - - if ((maxDiskSpace > 0 && - (issueWarningKB > maxDiskSpace - || prohibitSendKB > maxDiskSpace - || prohibitSendReceiveKB > maxDiskSpace || issueWarningKB == -1 || prohibitSendKB == -1 || prohibitSendReceiveKB == -1))) - return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; - - // get mailbox settings - int exchangeServiceId = GetExchangeServiceID(org.PackageId); - ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetMailboxAdvancedSettings( - org.OrganizationId, - account.AccountName, - QuotaEnabled(cntx, Quotas.EXCHANGE2007_POP3ALLOWED) && enablePOP, - QuotaEnabled(cntx, Quotas.EXCHANGE2007_IMAPALLOWED) && enableIMAP, - QuotaEnabled(cntx, Quotas.EXCHANGE2007_OWAALLOWED) && enableOWA, - QuotaEnabled(cntx, Quotas.EXCHANGE2007_MAPIALLOWED) && enableMAPI, - QuotaEnabled(cntx, Quotas.EXCHANGE2007_ACTIVESYNCALLOWED) && enableActiveSync, - issueWarningKB, - prohibitSendKB, - prohibitSendReceiveKB, - keepDeletedItemsDays); - - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - public static int SetMailboxManagerSettings(int itemId, int accountId, bool pmmAllowed, MailboxManagerActions action) { // check account @@ -2421,44 +2406,266 @@ namespace WebsitePanel.EnterpriseServer #endregion - #region Contacts - public static int CreateContact(int itemId, string displayName, string email) + + #region Mailbox plan + public static int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId) + { + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + // place log record + TaskManager.StartTask("EXCHANGE", "SET_MAILBOXPLAN"); + TaskManager.ItemId = itemId; + + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return -1; + + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; + + // load account + ExchangeAccount account = GetAccount(itemId, accountId); + + // load package context + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + int maxDiskSpace = -1; + int quotaUsed = 0; + if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_DISKSPACE) + && cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue > 0) + { + maxDiskSpace = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; + quotaUsed = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaUsedValue; + } + + ExchangeMailboxPlan plan = GetExchangeMailboxPlan(itemId, mailboxPlanId); + if (maxDiskSpace != -1) + { + if ((quotaUsed + plan.MailboxSizeMB) > (maxDiskSpace)) + return BusinessErrorCodes.ERROR_EXCHANGE_STORAGE_QUOTAS_EXCEED_HOST_VALUES; + } + + // get mailbox settings + int exchangeServiceId = GetExchangeServiceID(org.PackageId); + ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); + + exchange.SetMailboxAdvancedSettings( + org.OrganizationId, + account.AccountName, + plan.EnablePOP, + plan.EnableIMAP, + plan.EnableOWA, + plan.EnableMAPI, + plan.EnableActiveSync, + (int)Math.Round((double)((plan.IssueWarningPct * plan.MailboxSizeMB * 1024) / 100)), + (int)Math.Round((double)((plan.ProhibitSendPct * plan.MailboxSizeMB * 1024) / 100)), + (int)Math.Round((double)((plan.ProhibitSendReceivePct * plan.MailboxSizeMB * 1024) / 100)), + plan.KeepDeletedItemsDays, + plan.MaxRecipients, + plan.MaxSendMessageSizeKB, + plan.MaxReceiveMessageSizeKB); + + DataProvider.SetExchangeAccountMailboxPlan(accountId, mailboxPlanId); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + public static List GetExchangeMailboxPlans(int itemId) + { + // place log record + TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_MAILBOXPLANS"); + TaskManager.ItemId = itemId; + + try + { + return ObjectUtils.CreateListFromDataReader( + DataProvider.GetExchangeMailboxPlans(itemId)); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + public static ExchangeMailboxPlan GetExchangeMailboxPlan(int itemID, int mailboxPlanId) + { + + // place log record + TaskManager.StartTask("EXCHANGE", "GET_EXCHANGE_MAILBOXPLAN"); + TaskManager.ItemId = mailboxPlanId; + + try + { + return ObjectUtils.FillObjectFromDataReader( + DataProvider.GetExchangeMailboxPlan(mailboxPlanId)); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + public static int AddExchangeMailboxPlan(int itemID, ExchangeMailboxPlan mailboxPlan) + { + // place log record + TaskManager.StartTask("EXCHANGE", "ADD_EXCHANGE_MAILBOXPLAN"); + TaskManager.ItemId = itemID; + + try + { + Organization org = GetOrganization(itemID); + if (org == null) + return -1; + + // load package context + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + mailboxPlan.EnableActiveSync = mailboxPlan.EnableActiveSync & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ACTIVESYNCALLOWED].QuotaAllocatedValue); + mailboxPlan.EnableIMAP = mailboxPlan.EnableIMAP & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_IMAPALLOWED].QuotaAllocatedValue); + mailboxPlan.EnableMAPI = mailboxPlan.EnableMAPI & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_MAPIALLOWED].QuotaAllocatedValue); + mailboxPlan.EnableOWA = mailboxPlan.EnableOWA & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_OWAALLOWED].QuotaAllocatedValue); + mailboxPlan.EnablePOP = mailboxPlan.EnablePOP & Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_POP3ALLOWED].QuotaAllocatedValue); + if (mailboxPlan.KeepDeletedItemsDays > cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue) + mailboxPlan.KeepDeletedItemsDays = cntx.Quotas[Quotas.EXCHANGE2007_KEEPDELETEDITEMSDAYS].QuotaAllocatedValue; + if (cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue != -1) + if (mailboxPlan.MailboxSizeMB > cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue) + mailboxPlan.MailboxSizeMB = cntx.Quotas[Quotas.EXCHANGE2007_DISKSPACE].QuotaAllocatedValue; + if (mailboxPlan.MaxReceiveMessageSizeKB > cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue) + mailboxPlan.MaxReceiveMessageSizeKB = cntx.Quotas[Quotas.EXCHANGE2007_MAXRECEIVEMESSAGESIZEKB].QuotaAllocatedValue; + if (mailboxPlan.MaxSendMessageSizeKB > cntx.Quotas[Quotas.EXCHANGE2007_MAXSENDMESSAGESIZEKB].QuotaAllocatedValue) + mailboxPlan.MaxSendMessageSizeKB = cntx.Quotas[Quotas.EXCHANGE2007_MAXSENDMESSAGESIZEKB].QuotaAllocatedValue; + if (cntx.Quotas[Quotas.EXCHANGE2007_MAXRECIPIENTS].QuotaAllocatedValue != -1) + if (mailboxPlan.MaxRecipients > cntx.Quotas[Quotas.EXCHANGE2007_MAXRECIPIENTS].QuotaAllocatedValue) + mailboxPlan.MaxRecipients = cntx.Quotas[Quotas.EXCHANGE2007_MAXRECIPIENTS].QuotaAllocatedValue; + if (Convert.ToBoolean(cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue)) mailboxPlan.HideFromAddressBook = true; + + return DataProvider.AddExchangeMailboxPlan(itemID, mailboxPlan.MailboxPlan, mailboxPlan.EnableActiveSync, mailboxPlan.EnableIMAP, mailboxPlan.EnableMAPI, mailboxPlan.EnableOWA, mailboxPlan.EnablePOP, + mailboxPlan.IsDefault, mailboxPlan.IssueWarningPct, mailboxPlan.KeepDeletedItemsDays, mailboxPlan.MailboxSizeMB, mailboxPlan.MaxReceiveMessageSizeKB, mailboxPlan.MaxRecipients, + mailboxPlan.MaxSendMessageSizeKB, mailboxPlan.ProhibitSendPct, mailboxPlan.ProhibitSendReceivePct, mailboxPlan.HideFromAddressBook); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + public static int DeleteExchangeMailboxPlan(int itemID, int mailboxPlanId) + { + TaskManager.StartTask("EXCHANGE", "DELETE_EXCHANGE_MAILBOXPLAN"); + TaskManager.ItemId = itemID; + + try + { + DataProvider.DeleteExchangeMailboxPlan(mailboxPlanId); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + public static void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId) + { + TaskManager.StartTask("EXCHANGE", "SET_EXCHANGE_MAILBOXPLAN"); + TaskManager.ItemId = itemId; + + try + { + DataProvider.SetOrganizationDefaultExchangeMailboxPlan(itemId, mailboxPlanId); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + + + #endregion + + + #region Contacts + public static int CreateContact(int itemId, string displayName, string email) { //if (EmailAddressExists(email)) - // return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; - + // return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; + // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; // check mailbox quota - OrganizationStatistics orgStats = GetOrganizationStatistics(itemId); - if (orgStats.AllocatedContacts > -1 - && orgStats.CreatedContacts >= orgStats.AllocatedContacts) - return BusinessErrorCodes.ERROR_EXCHANGE_CONTACTS_QUOTA_LIMIT; + OrganizationStatistics orgStats = GetOrganizationStatistics(itemId); + if (orgStats.AllocatedContacts > -1 + && orgStats.CreatedContacts >= orgStats.AllocatedContacts) + return BusinessErrorCodes.ERROR_EXCHANGE_CONTACTS_QUOTA_LIMIT; - // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_CONTACT"); - TaskManager.ItemId = itemId; + // place log record + TaskManager.StartTask("EXCHANGE", "CREATE_CONTACT"); + TaskManager.ItemId = itemId; - try - { - // load organization - Organization org = GetOrganization(itemId); + try + { - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; + displayName = displayName.Trim(); + email = email.Trim(); - string name = email; - int idx = email.IndexOf("@"); - if (idx > -1) - name = email.Substring(0, idx); + // load organization + Organization org = GetOrganization(itemId); - string accountName = BuildAccountName(org.OrganizationId, name); + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; - // add contact + string name = email; + int idx = email.IndexOf("@"); + if (idx > -1) + name = email.Substring(0, idx); + + string accountName = BuildAccountName(org.OrganizationId, name); + + // add contact int exchangeServiceId = GetExchangeServiceID(org.PackageId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); @@ -2469,30 +2676,32 @@ namespace WebsitePanel.EnterpriseServer PackageController.UpdatePackageItem(org); } - + exchange.CreateContact( - org.OrganizationId, - org.DistinguishedName, - displayName, - accountName, + org.OrganizationId, + org.DistinguishedName, + displayName, + accountName, email, org.DefaultDomain); - // add meta-item - int accountId = AddAccount(itemId, ExchangeAccountType.Contact, accountName, - displayName, email, false, - 0, "", null); + ExchangeContact contact = exchange.GetContactGeneralSettings(accountName); - return accountId; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + // add meta-item + int accountId = AddAccount(itemId, ExchangeAccountType.Contact, accountName, + displayName, email, false, + 0, contact.SAMAccountName, null, 0, null); + + return accountId; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } public static int DeleteContact(int itemId, int accountId) { @@ -2593,75 +2802,80 @@ namespace WebsitePanel.EnterpriseServer string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes, int useMapiRichTextFormat) { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_CONTACT_GENERAL"); - TaskManager.ItemId = itemId; + // place log record + TaskManager.StartTask("EXCHANGE", "UPDATE_CONTACT_GENERAL"); + TaskManager.ItemId = itemId; - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; + try + { + displayName = displayName.Trim(); + emailAddress = emailAddress.Trim(); + firstName = firstName.Trim(); + lastName = lastName.Trim(); - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return -1; - // load account - ExchangeAccount account = GetAccount(itemId, accountId); + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; - // get mailbox settings + // load account + ExchangeAccount account = GetAccount(itemId, accountId); + + // get mailbox settings int exchangeServiceId = GetExchangeServiceID(org.PackageId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetContactGeneralSettings( - account.AccountName, - displayName, - emailAddress, - hideAddressBook, - firstName, - initials, - lastName, - address, - city, - state, - zip, - country, - jobTitle, - company, - department, - office, - managerAccountName, - businessPhone, - fax, - homePhone, - mobilePhone, - pager, - webPage, - notes, + + exchange.SetContactGeneralSettings( + account.AccountName, + displayName, + emailAddress, + hideAddressBook, + firstName, + initials, + lastName, + address, + city, + state, + zip, + country, + jobTitle, + company, + department, + office, + managerAccountName, + businessPhone, + fax, + homePhone, + mobilePhone, + pager, + webPage, + notes, useMapiRichTextFormat, org.DefaultDomain); - // update account - account.DisplayName = displayName; - account.PrimaryEmailAddress = emailAddress; - UpdateAccount(account); + // update account + account.DisplayName = displayName; + account.PrimaryEmailAddress = emailAddress; + UpdateAccount(account); - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } public static ExchangeContact GetContactMailFlowSettings(int itemId, int accountId) { @@ -2754,40 +2968,44 @@ namespace WebsitePanel.EnterpriseServer #region Distribution Lists public static int CreateDistributionList(int itemId, string displayName, string name, string domain, int managerId) { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; - // check mailbox quota - OrganizationStatistics orgStats = GetOrganizationStatistics(itemId); - if (orgStats.AllocatedDistributionLists > -1 - && orgStats.CreatedDistributionLists >= orgStats.AllocatedDistributionLists) - return BusinessErrorCodes.ERROR_EXCHANGE_DLISTS_QUOTA_LIMIT; + // check mailbox quota + OrganizationStatistics orgStats = GetOrganizationStatistics(itemId); + if (orgStats.AllocatedDistributionLists > -1 + && orgStats.CreatedDistributionLists >= orgStats.AllocatedDistributionLists) + return BusinessErrorCodes.ERROR_EXCHANGE_DLISTS_QUOTA_LIMIT; - // place log record - TaskManager.StartTask("EXCHANGE", "CREATE_DISTR_LIST"); - TaskManager.ItemId = itemId; + // place log record + TaskManager.StartTask("EXCHANGE", "CREATE_DISTR_LIST"); + TaskManager.ItemId = itemId; - try - { - // e-mail - string email = name + "@" + domain; + try + { + displayName = displayName.Trim(); + name = name.Trim(); + domain = domain.Trim(); - // check e-mail - if (EmailAddressExists(email)) - return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; + // e-mail + string email = name + "@" + domain; - // load organization - Organization org = GetOrganization(itemId); + // check e-mail + if (EmailAddressExists(email)) + return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; + // load organization + Organization org = GetOrganization(itemId); - string accountName = BuildAccountName(org.OrganizationId, name); + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; - // add account - // add contact + string accountName = BuildAccountName(org.OrganizationId, name); + + // add account + // add contact int exchangeServiceId = GetExchangeServiceID(org.PackageId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); @@ -2799,34 +3017,41 @@ namespace WebsitePanel.EnterpriseServer PackageController.UpdatePackageItem(org); } - OrganizationUser manager = OrganizationController.GetAccount(itemId, managerId); - exchange.CreateDistributionList( - org.OrganizationId, - org.DistinguishedName, - displayName, - accountName, - name, - domain, manager.AccountName); + OrganizationUser manager = OrganizationController.GetAccount(itemId, managerId); - // add meta-item - int accountId = AddAccount(itemId, ExchangeAccountType.DistributionList, accountName, - displayName, email, false, - 0, "", null); + List addressLists = new List(); + addressLists.Add(org.GlobalAddressList); + addressLists.Add(org.AddressList); - // register email address - AddAccountEmailAddress(accountId, email); + exchange.CreateDistributionList( + org.OrganizationId, + org.DistinguishedName, + displayName, + accountName, + name, + domain, manager.AccountName, addressLists.ToArray()); - return accountId; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + ExchangeDistributionList dl = exchange.GetDistributionListGeneralSettings(accountName); + + // add meta-item + int accountId = AddAccount(itemId, ExchangeAccountType.DistributionList, email, + displayName, email, false, + 0, dl.SAMAccountName, null, 0, null); + + // register email address + AddAccountEmailAddress(accountId, email); + + return accountId; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } public static int DeleteDistributionList(int itemId, int accountId) { @@ -2923,55 +3148,62 @@ namespace WebsitePanel.EnterpriseServer bool hideAddressBook, string managerAccount, string[] memberAccounts, string notes) { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_DISTR_LIST_GENERAL"); - TaskManager.ItemId = itemId; + // place log record + TaskManager.StartTask("EXCHANGE", "UPDATE_DISTR_LIST_GENERAL"); + TaskManager.ItemId = itemId; - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; + try + { + displayName = displayName.Trim(); - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return -1; - // load account - ExchangeAccount account = GetAccount(itemId, accountId); + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; - // get mailbox settings + // load account + ExchangeAccount account = GetAccount(itemId, accountId); + + // get mailbox settings int exchangeServiceId = GetExchangeServiceID(org.PackageId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetDistributionListGeneralSettings( - account.AccountName, - displayName, - hideAddressBook, - managerAccount, - memberAccounts, - notes); - // update account - account.DisplayName = displayName; - UpdateAccount(account); + List addressLists = new List(); + addressLists.Add(org.GlobalAddressList); + addressLists.Add(org.AddressList); - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + exchange.SetDistributionListGeneralSettings( + account.AccountName, + displayName, + hideAddressBook, + managerAccount, + memberAccounts, + notes, + addressLists.ToArray()); + + // update account + account.DisplayName = displayName; + UpdateAccount(account); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } public static ExchangeDistributionList GetDistributionListMailFlowSettings(int itemId, int accountId) { @@ -3017,48 +3249,54 @@ namespace WebsitePanel.EnterpriseServer public static int SetDistributionListMailFlowSettings(int itemId, int accountId, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; - // place log record - TaskManager.StartTask("EXCHANGE", "UPDATE_DISTR_LIST_MAILFLOW"); - TaskManager.ItemId = itemId; + // place log record + TaskManager.StartTask("EXCHANGE", "UPDATE_DISTR_LIST_MAILFLOW"); + TaskManager.ItemId = itemId; - try - { - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return -1; - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; - // load account - ExchangeAccount account = GetAccount(itemId, accountId); + // load account + ExchangeAccount account = GetAccount(itemId, accountId); - // get mailbox settings + // get mailbox settings int exchangeServiceId = GetExchangeServiceID(org.PackageId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetDistributionListMailFlowSettings(account.AccountName, - acceptAccounts, - rejectAccounts, - requireSenderAuthentication); - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + List addressLists = new List(); + addressLists.Add(org.GlobalAddressList); + addressLists.Add(org.AddressList); + + + exchange.SetDistributionListMailFlowSettings(account.AccountName, + acceptAccounts, + rejectAccounts, + requireSenderAuthentication, + addressLists.ToArray()); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } public static ExchangeEmailAddress[] GetDistributionListEmailAddresses(int itemId, int accountId) { @@ -3082,152 +3320,165 @@ namespace WebsitePanel.EnterpriseServer public static int AddDistributionListEmailAddress(int itemId, int accountId, string emailAddress) { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; - // place log record - TaskManager.StartTask("EXCHANGE", "ADD_DISTR_LIST_ADDRESS"); - TaskManager.ItemId = itemId; + // place log record + TaskManager.StartTask("EXCHANGE", "ADD_DISTR_LIST_ADDRESS"); + TaskManager.ItemId = itemId; - try - { - // check - if (EmailAddressExists(emailAddress)) - return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; + try + { + // check + if (EmailAddressExists(emailAddress)) + return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return -1; - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; - // load account - ExchangeAccount account = GetAccount(itemId, accountId); + // load account + ExchangeAccount account = GetAccount(itemId, accountId); - // add e-mail - AddAccountEmailAddress(accountId, emailAddress); + // add e-mail + AddAccountEmailAddress(accountId, emailAddress); - // update e-mail addresses + // update e-mail addresses int exchangeServiceId = GetExchangeServiceID(org.PackageId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetDistributionListEmailAddresses( - account.AccountName, - GetAccountSimpleEmailAddresses(itemId, accountId)); - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + List addressLists = new List(); + addressLists.Add(org.GlobalAddressList); + addressLists.Add(org.AddressList); + + exchange.SetDistributionListEmailAddresses( + account.AccountName, + GetAccountSimpleEmailAddresses(itemId, accountId), addressLists.ToArray()); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } public static int SetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress) { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; - // place log record - TaskManager.StartTask("EXCHANGE", "SET_PRIMARY_DISTR_LIST_ADDRESS"); - TaskManager.ItemId = itemId; + // place log record + TaskManager.StartTask("EXCHANGE", "SET_PRIMARY_DISTR_LIST_ADDRESS"); + TaskManager.ItemId = itemId; - try - { - // get account - ExchangeAccount account = GetAccount(itemId, accountId); - account.PrimaryEmailAddress = emailAddress; + try + { + // get account + ExchangeAccount account = GetAccount(itemId, accountId); + account.PrimaryEmailAddress = emailAddress; - // update exchange - Organization org = GetOrganization(itemId); - if (org == null) - return -1; + // update exchange + Organization org = GetOrganization(itemId); + if (org == null) + return -1; - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; int exchangeServiceId = GetExchangeServiceID(org.PackageId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetDistributionListPrimaryEmailAddress( - account.AccountName, - emailAddress); - // save account - UpdateAccount(account); + List addressLists = new List(); + addressLists.Add(org.GlobalAddressList); + addressLists.Add(org.AddressList); - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + exchange.SetDistributionListPrimaryEmailAddress( + account.AccountName, + emailAddress, + addressLists.ToArray()); + + // save account + UpdateAccount(account); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } public static int DeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses) { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) return accountCheck; + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; - // place log record - TaskManager.StartTask("EXCHANGE", "DELETE_DISTR_LIST_ADDRESSES"); - TaskManager.ItemId = itemId; + // place log record + TaskManager.StartTask("EXCHANGE", "DELETE_DISTR_LIST_ADDRESSES"); + TaskManager.ItemId = itemId; - try - { - // get account - ExchangeAccount account = GetAccount(itemId, accountId); + try + { + // get account + ExchangeAccount account = GetAccount(itemId, accountId); - // delete e-mail addresses - List toDelete = new List(); - foreach (string emailAddress in emailAddresses) - { - if (String.Compare(account.PrimaryEmailAddress, emailAddress, true) != 0) - toDelete.Add(emailAddress); - } + // delete e-mail addresses + List toDelete = new List(); + foreach (string emailAddress in emailAddresses) + { + if (String.Compare(account.PrimaryEmailAddress, emailAddress, true) != 0) + toDelete.Add(emailAddress); + } - // delete from meta-base - DeleteAccountEmailAddresses(accountId, toDelete.ToArray()); + // delete from meta-base + DeleteAccountEmailAddresses(accountId, toDelete.ToArray()); - // delete from Exchange - Organization org = GetOrganization(itemId); - if (org == null) - return -1; + // delete from Exchange + Organization org = GetOrganization(itemId); + if (org == null) + return -1; - // update e-mail addresses + // update e-mail addresses int exchangeServiceId = GetExchangeServiceID(org.PackageId); ExchangeServer exchange = GetExchangeServer(exchangeServiceId, org.ServiceId); - - exchange.SetDistributionListEmailAddresses( - account.AccountName, - GetAccountSimpleEmailAddresses(itemId, accountId)); - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + List addressLists = new List(); + addressLists.Add(org.GlobalAddressList); + addressLists.Add(org.AddressList); + + exchange.SetDistributionListEmailAddresses( + account.AccountName, + GetAccountSimpleEmailAddresses(itemId, accountId), addressLists.ToArray()); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } public static ResultObject SetDistributionListPermissions(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts) @@ -3273,8 +3524,12 @@ namespace WebsitePanel.EnterpriseServer try { + List addressLists = new List(); + addressLists.Add(org.GlobalAddressList); + addressLists.Add(org.AddressList); + exchange.SetDistributionListPermissions(org.OrganizationId, account.AccountName, sendAsAccounts, - sendOnBehalfAccounts); + sendOnBehalfAccounts, addressLists.ToArray()); } catch(Exception ex) { @@ -3419,10 +3674,13 @@ namespace WebsitePanel.EnterpriseServer name, domain); + + ExchangePublicFolder folder = exchange.GetPublicFolderGeneralSettings(parentFolder + "\\" + folderName); + // add meta-item int accountId = AddAccount(itemId, ExchangeAccountType.PublicFolder, accountName, folderPath, email, mailEnabled, - 0, "", null); + 0, folder.NETBIOS+"\\"+accountName, null, 0, null); // register email address if(mailEnabled) @@ -3636,7 +3894,7 @@ namespace WebsitePanel.EnterpriseServer c.DisplayName = "\\fabrikam\\Documents"; c.MailEnabled = true; c.Name = "Documents"; - c.AuthorsAccounts = GetAccounts(0, ExchangeAccountType.Mailbox).ToArray(); + c.Accounts = GetAccounts(0, ExchangeAccountType.Mailbox).ToArray(); c.AcceptAccounts = GetAccounts(0, ExchangeAccountType.Mailbox).ToArray(); return c; } @@ -3683,7 +3941,7 @@ namespace WebsitePanel.EnterpriseServer } public static int SetPublicFolderGeneralSettings(int itemId, int accountId, string newName, - bool hideAddressBook, string[] authorAccounts) + bool hideAddressBook, ExchangeAccount[] accounts) { // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); @@ -3714,8 +3972,9 @@ namespace WebsitePanel.EnterpriseServer exchange.SetPublicFolderGeneralSettings( account.DisplayName, newName, - authorAccounts, - hideAddressBook); + hideAddressBook, + accounts + ); // update folder name string origName = account.DisplayName; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Files/FilesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Files/FilesController.cs index d973ef5e..7784cad8 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Files/FilesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Files/FilesController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/FtpServers/FtpServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/FtpServers/FtpServerController.cs index b033665e..4c174bf0 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/FtpServers/FtpServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/FtpServers/FtpServerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/BlackBerryController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/BlackBerryController.cs index 22735495..342b5c48 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/BlackBerryController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/BlackBerryController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/CRMController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/CRMController.cs index a012f49e..c2edc1bb 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/CRMController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/CRMController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -74,7 +74,7 @@ namespace WebsitePanel.EnterpriseServer } } - int res = ServerController.AddDnsZoneRecord(domainId, recordName, DnsRecordType.A, ip, 0); + int res = ServerController.AddDnsZoneRecord(domainId, recordName, DnsRecordType.A, ip, 0, 0, 0, 0); if (res != 0) { CompleteTask(ret, CrmErrorCodes.CANNOT_CREATE_DNS_ZONE, null, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/LyncController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/LyncController.cs new file mode 100644 index 00000000..7bc57248 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/LyncController.cs @@ -0,0 +1,826 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Data; +using System.Xml; +using WebsitePanel.Providers; +using WebsitePanel.Providers.Common; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Providers.Lync; + +namespace WebsitePanel.EnterpriseServer.Code.HostedSolution +{ + public class LyncController + { + + + public static LyncServer GetLyncServer(int lyncServiceId, int organizationServiceId) + { + LyncServer ws = new LyncServer(); + + ServiceProviderProxy.Init(ws, lyncServiceId); + + string[] lyncSettings = ws.ServiceProviderSettingsSoapHeaderValue.Settings; + + List resSettings = new List(lyncSettings); + + ExtendLyncSettings(resSettings, "primarydomaincontroller", GetProviderProperty(organizationServiceId, "primarydomaincontroller")); + ExtendLyncSettings(resSettings, "rootou", GetProviderProperty(organizationServiceId, "rootou")); + ws.ServiceProviderSettingsSoapHeaderValue.Settings = resSettings.ToArray(); + return ws; + } + + private static string GetProviderProperty(int organizationServiceId, string property) + { + + Organizations orgProxy = new Organizations(); + + ServiceProviderProxy.Init(orgProxy, organizationServiceId); + + string[] organizationSettings = orgProxy.ServiceProviderSettingsSoapHeaderValue.Settings; + + string value = string.Empty; + foreach (string str in organizationSettings) + { + string[] props = str.Split('='); + if (props[0].ToLower() == property) + { + value = str; + break; + } + } + + return value; + } + + private static void ExtendLyncSettings(List lyncSettings, string property, string value) + { + bool isAdded = false; + for (int i = 0; i < lyncSettings.Count; i++) + { + string[] props = lyncSettings[i].Split('='); + if (props[0].ToLower() == property) + { + lyncSettings[i] = value; + isAdded = true; + break; + } + } + + if (!isAdded) + { + lyncSettings.Add(value); + } + } + + private static int GetLyncServiceID(int packageId) + { + return PackageController.GetPackageServiceId(packageId, ResourceGroups.Lync); + } + + + private static bool CheckQuota(int itemId) + { + Organization org = OrganizationController.GetOrganization(itemId); + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + IntResult userCount = GetLyncUsersCount(itemId); + + int allocatedUsers = cntx.Quotas[Quotas.LYNC_USERS].QuotaAllocatedValue; + + return allocatedUsers == -1 || allocatedUsers > userCount.Value; + } + + + public static LyncUserResult CreateLyncUser(int itemId, int accountId, int lyncUserPlanId) + { + LyncUserResult res = TaskManager.StartResultTask("LYNC", "CREATE_LYNC_USER"); + + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED); + return res; + } + + + LyncUser retLyncUser = new LyncUser(); + bool isLyncUser; + + isLyncUser = DataProvider.CheckLyncUserExists(accountId); + if (isLyncUser) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.USER_IS_ALREADY_LYNC_USER); + return res; + } + + OrganizationUser user; + user = OrganizationController.GetAccount(itemId, accountId); + if (user == null) + { + TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_GET_ACCOUNT); + return res; + } + + user = OrganizationController.GetUserGeneralSettings(itemId, accountId); + if (string.IsNullOrEmpty(user.FirstName)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.USER_FIRST_NAME_IS_NOT_SPECIFIED); + return res; + } + + if (string.IsNullOrEmpty(user.LastName)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.USER_LAST_NAME_IS_NOT_SPECIFIED); + return res; + } + + bool quota = CheckQuota(itemId); + if (!quota) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.USER_QUOTA_HAS_BEEN_REACHED); + return res; + } + + + LyncServer lync; + + try + { + + bool bReloadConfiguration = false; + + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + lync = GetLyncServer(lyncServiceId, org.ServiceId); + + if (string.IsNullOrEmpty(org.LyncTenantId)) + { + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + org.LyncTenantId = lync.CreateOrganization(org.OrganizationId, + org.DefaultDomain, + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue), + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue), + Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue), + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue), + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue)); + + if (string.IsNullOrEmpty(org.LyncTenantId)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ENABLE_ORG); + return res; + } + else + { + PackageController.UpdatePackageItem(org); + + bReloadConfiguration = true; + } + } + + LyncUserPlan plan = GetLyncUserPlan(itemId, lyncUserPlanId); + + if (!lync.CreateUser(org.OrganizationId, user.PrimaryEmailAddress, plan)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER); + return res; + } + + if (bReloadConfiguration) + { + LyncControllerAsync userWorker = new LyncControllerAsync(); + userWorker.LyncServiceId = lyncServiceId; + userWorker.OrganizationServiceId = org.ServiceId; + userWorker.Enable_CsComputerAsync(); + } + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER, ex); + return res; + } + + try + { + DataProvider.AddLyncUser(accountId, lyncUserPlanId); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER_TO_DATABASE, ex); + return res; + } + + res.IsSuccess = true; + TaskManager.CompleteResultTask(); + return res; + + } + + + private static int[] ParseMultiSetting(int lyncServiceId, string settingName) + { + List retIds = new List(); + StringDictionary settings = ServerController.GetServiceSettings(lyncServiceId); + if (!String.IsNullOrEmpty(settings[settingName])) + { + string[] ids = settings[settingName].Split(','); + + int res; + foreach (string id in ids) + { + if (int.TryParse(id, out res)) + retIds.Add(res); + } + } + + if (retIds.Count == 0) + retIds.Add(lyncServiceId); + + return retIds.ToArray(); + + } + + + public static void GetLyncServices(int lyncServiceId, out int[] lyncServiceIds) + { + lyncServiceIds = ParseMultiSetting(lyncServiceId, "LyncServersServiceID"); + } + + + + public static LyncUser GetLyncUserGeneralSettings(int itemId, int accountId) + { + TaskManager.StartTask("LYNC", "GET_LYNC_USER_GENERAL_SETTINGS"); + + LyncUser user = null; + + try + { + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + OrganizationUser usr; + usr = OrganizationController.GetAccount(itemId, accountId); + + if (usr != null) + user = lync.GetLyncUserGeneralSettings(org.OrganizationId, usr.PrimaryEmailAddress); + + if (user != null) + { + LyncUserPlan plan = ObjectUtils.FillObjectFromDataReader(DataProvider.GetLyncUserPlanByAccountId(accountId)); + + if (plan != null) + { + user.LyncUserPlanId = plan.LyncUserPlanId; + user.LyncUserPlanName = plan.LyncUserPlanName; + } + } + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + + } + TaskManager.CompleteTask(); + return user; + + } + + public static int DeleteOrganization(int itemId) + { + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + // place log record + TaskManager.StartTask("LYNC", "DELETE_ORG"); + TaskManager.ItemId = itemId; + + try + { + // delete organization in Exchange + //System.Threading.Thread.Sleep(5000); + Organization org = (Organization)PackageController.GetPackageItem(itemId); + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + bool successful = lync.DeleteOrganization(org.OrganizationId, org.DefaultDomain); + + return successful ? 0 : BusinessErrorCodes.ERROR_LYNC_DELETE_SOME_PROBLEMS; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + + public static LyncUserResult SetUserLyncPlan(int itemId, int accountId, int lyncUserPlanId) + { + LyncUserResult res = TaskManager.StartResultTask("LYNC", "SET_LYNC_USER_LYNCPLAN"); + + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED); + return res; + } + + try + { + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + LyncUserPlan plan = GetLyncUserPlan(itemId, lyncUserPlanId); + + OrganizationUser user; + user = OrganizationController.GetAccount(itemId, accountId); + + if (!lync.SetLyncUserPlan(org.OrganizationId, user.PrimaryEmailAddress, plan)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER); + return res; + } + + try + { + DataProvider.SetLyncUserLyncUserplan(accountId, lyncUserPlanId); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_USER_TO_DATABASE, ex); + return res; + } + + res.IsSuccess = true; + TaskManager.CompleteResultTask(); + return res; + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_UPDATE_LYNC_USER, ex); + return res; + } + + } + + public static LyncUsersPagedResult GetLyncUsers(int itemId, string sortColumn, string sortDirection, int startRow, int count) + { + LyncUsersPagedResult res = TaskManager.StartResultTask("LYNC", "GET_LYNC_USERS"); + + try + { + IDataReader reader = + DataProvider.GetLyncUsers(itemId, sortColumn, sortDirection, startRow, count); + List accounts = new List(); + ObjectUtils.FillCollectionFromDataReader(accounts, reader); + res.Value = new LyncUsersPaged { PageUsers = accounts.ToArray() }; + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.GET_LYNC_USERS, ex); + return res; + } + + IntResult intRes = GetLyncUsersCount(itemId); + res.ErrorCodes.AddRange(intRes.ErrorCodes); + if (!intRes.IsSuccess) + { + TaskManager.CompleteResultTask(res); + return res; + } + res.Value.RecordsCount = intRes.Value; + + TaskManager.CompleteResultTask(); + return res; + } + + public static List GetLyncUsersByPlanId(int itemId, int planId) + { + return ObjectUtils.CreateListFromDataReader(DataProvider.GetLyncUsersByPlanId(itemId, planId)); + } + + public static IntResult GetLyncUsersCount(int itemId) + { + IntResult res = TaskManager.StartResultTask("LYNC", "GET_LYNC_USERS_COUNT"); + try + { + res.Value = DataProvider.GetLyncUsersCount(itemId); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.GET_LYNC_USER_COUNT, ex); + return res; + } + + TaskManager.CompleteResultTask(); + return res; + } + + public static LyncUserResult DeleteLyncUser(int itemId, int accountId) + { + LyncUserResult res = TaskManager.StartResultTask("LYNC", "DELETE_LYNC_USER"); + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + + if (accountCheck < 0) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED); + return res; + } + + LyncServer lync; + + try + { + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + lync = GetLyncServer(lyncServiceId, org.ServiceId); + + OrganizationUser user; + user = OrganizationController.GetAccount(itemId, accountId); + + if (user != null) + lync.DeleteUser(user.PrimaryEmailAddress); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_DELETE_LYNC_USER, ex); + return res; + } + + try + { + DataProvider.DeleteLyncUser(accountId); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_DELETE_LYNC_USER_FROM_METADATA, ex); + return res; + } + + TaskManager.CompleteResultTask(); + return res; + } + + + public static Organization GetOrganization(int itemId) + { + return (Organization)PackageController.GetPackageItem(itemId); + } + + + #region Lync Plans + public static List GetLyncUserPlans(int itemId) + { + // place log record + TaskManager.StartTask("LYNC", "GET_LYNC_LYNCUSERPLANS"); + TaskManager.ItemId = itemId; + + try + { + return ObjectUtils.CreateListFromDataReader( + DataProvider.GetLyncUserPlans(itemId)); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + public static LyncUserPlan GetLyncUserPlan(int itemID, int lyncUserPlanId) + { + + // place log record + TaskManager.StartTask("LYNC", "GET_LYNC_LYNCUSERPLAN"); + TaskManager.ItemId = lyncUserPlanId; + + try + { + return ObjectUtils.FillObjectFromDataReader( + DataProvider.GetLyncUserPlan(lyncUserPlanId)); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + public static int AddLyncUserPlan(int itemID, LyncUserPlan lyncUserPlan) + { + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + // place log record + TaskManager.StartTask("LYNC", "ADD_LYNC_LYNCUSERPLAN"); + TaskManager.ItemId = itemID; + + try + { + Organization org = GetOrganization(itemID); + if (org == null) + return -1; + + // load package context + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + lyncUserPlan.Conferencing = lyncUserPlan.Conferencing & Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue); + lyncUserPlan.EnterpriseVoice = lyncUserPlan.EnterpriseVoice & Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ENTERPRISEVOICE].QuotaAllocatedValue); + if (!lyncUserPlan.EnterpriseVoice) + lyncUserPlan.VoicePolicy = LyncVoicePolicyType.None; + lyncUserPlan.IM = true; + + return DataProvider.AddLyncUserPlan(itemID, lyncUserPlan); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + public static int DeleteLyncUserPlan(int itemID, int lyncUserPlanId) + { + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + TaskManager.StartTask("LYNC", "DELETE_LYNC_LYNCPLAN"); + TaskManager.ItemId = itemID; + + try + { + DataProvider.DeleteLyncUserPlan(lyncUserPlanId); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + } + + public static int SetOrganizationDefaultLyncUserPlan(int itemId, int lyncUserPlanId) + { + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) return accountCheck; + + TaskManager.StartTask("LYNC", "SET_LYNC_LYNCUSERPLAN"); + TaskManager.ItemId = itemId; + + try + { + DataProvider.SetOrganizationDefaultLyncUserPlan(itemId, lyncUserPlanId); + + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + return 1; + + } + + #endregion + + #region Federation Domains + public static LyncFederationDomain[] GetFederationDomains(int itemId) + { + // place log record + TaskManager.StartTask("LYNC", "GET_LYNC_FEDERATIONDOMAINS"); + TaskManager.ItemId = itemId; + + LyncFederationDomain[] lyncFederationDomains = null; + + try + { + Organization org = (Organization)PackageController.GetPackageItem(itemId); + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + lyncFederationDomains = lync.GetFederationDomains(org.OrganizationId); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + return lyncFederationDomains; + } + + public static LyncUserResult AddFederationDomain(int itemId, string domainName, string proxyFqdn) + { + LyncUserResult res = TaskManager.StartResultTask("LYNC", "ADD_LYNC_FEDERATIONDOMAIN"); + TaskManager.ItemId = itemId; + TaskManager.TaskParameters["domainName"] = domainName; + TaskManager.TaskParameters["proxyFqdn"] = proxyFqdn; + + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + + if (accountCheck < 0) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED); + return res; + } + + + try + { + + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + if (string.IsNullOrEmpty(org.LyncTenantId)) + { + PackageContext cntx = PackageController.GetPackageContext(org.PackageId); + + org.LyncTenantId = lync.CreateOrganization(org.OrganizationId, + org.DefaultDomain, + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue), + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue), + Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue), + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue), + Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue)); + + if (string.IsNullOrEmpty(org.LyncTenantId)) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ENABLE_ORG); + return res; + } + else + PackageController.UpdatePackageItem(org); + } + + lync = GetLyncServer(lyncServiceId, org.ServiceId); + + lync.AddFederationDomain(org.OrganizationId, domainName, proxyFqdn); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ADD_LYNC_FEDERATIONDOMAIN, ex); + return res; + } + + TaskManager.CompleteResultTask(); + return res; + } + + public static LyncUserResult RemoveFederationDomain(int itemId, string domainName) + { + LyncUserResult res = TaskManager.StartResultTask("LYNC", "REMOVE_LYNC_FEDERATIONDOMAIN"); + TaskManager.ItemId = itemId; + TaskManager.TaskParameters["domainName"] = domainName; + + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + + if (accountCheck < 0) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.NOT_AUTHORIZED); + return res; + } + + try + { + Organization org = (Organization)PackageController.GetPackageItem(itemId); + if (org == null) + { + throw new ApplicationException( + string.Format("Organization is null. ItemId={0}", itemId)); + } + + int lyncServiceId = GetLyncServiceID(org.PackageId); + LyncServer lync = GetLyncServer(lyncServiceId, org.ServiceId); + + if (org.OrganizationId.ToLower() == domainName.ToLower()) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN); + return res; + } + + lync.RemoveFederationDomain(org.OrganizationId, domainName); + } + catch (Exception ex) + { + TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN, ex); + return res; + } + + TaskManager.CompleteResultTask(); + return res; + } + + + #endregion + + + #region Private methods + public static UInt64 ConvertPhoneNumberToLong(string ip) + { + return Convert.ToUInt64(ip); + } + + public static string ConvertLongToPhoneNumber(UInt64 ip) + { + if (ip == 0) + return ""; + + return ip.ToString(); + } + #endregion + + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/LyncControllerAsync.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/LyncControllerAsync.cs new file mode 100644 index 00000000..f30dc4f6 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/LyncControllerAsync.cs @@ -0,0 +1,97 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Threading; +using System.Collections.Generic; +using System.Text; +using WebsitePanel.Providers; +using WebsitePanel.Providers.Common; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Providers.Lync; +using WebsitePanel.EnterpriseServer.Code.HostedSolution; + + +namespace WebsitePanel.EnterpriseServer.Code.HostedSolution +{ + public class LyncControllerAsync + { + private int lyncServiceId; + private int organizationServiceId; + + public int LyncServiceId + { + get { return this.lyncServiceId; } + set { this.lyncServiceId = value; } + } + + public int OrganizationServiceId + { + get { return this.organizationServiceId; } + set { this.organizationServiceId = value; } + } + + + public void Enable_CsComputerAsync() + { + // start asynchronously + Thread t = new Thread(new ThreadStart(Enable_CsComputer)); + t.Start(); + } + + private void Enable_CsComputer() + { + int[] lyncServiceIds; + + LyncController.GetLyncServices(lyncServiceId, out lyncServiceIds); + + foreach (int id in lyncServiceIds) + { + LyncServer lync = null; + try + { + lync = LyncController.GetLyncServer(id, organizationServiceId); + if (lync != null) + { + lync.ReloadConfiguration(); + } + } + catch (Exception exe) + { + TaskManager.WriteError(exe); + continue; + } + } + + + } + + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OCSController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OCSController.cs index 92595ccc..56b08755 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OCSController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OCSController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs index b8428563..4d1901d3 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/OrganizationController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -40,6 +40,11 @@ using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.ResultObjects; using WebsitePanel.Providers.SharePoint; using WebsitePanel.Providers.Common; + +using System.IO; +using System.Xml; +using System.Xml.Serialization; + namespace WebsitePanel.EnterpriseServer { public class OrganizationController @@ -352,6 +357,62 @@ namespace WebsitePanel.EnterpriseServer PackageController.AddPackageItem(orgDomain); + + if (cntx.Quotas[Quotas.EXCHANGE2007_MAILBOXES] != null) + { + // 5) Create default mailbox plans + // load user info + UserInfo user = PackageController.GetPackageOwner(org.PackageId); + + // get settings + UserSettings userSettings = UserController.GetUserSettings(user.UserId, "ExchangeMailboxPlansPolicy"); + + if (!string.IsNullOrEmpty(userSettings[UserSettings.DEFAULT_MAILBOXPLANS])) + { + + List list = new List(); + + XmlSerializer serializer = new XmlSerializer(list.GetType()); + + StringReader reader = new StringReader(userSettings[UserSettings.DEFAULT_MAILBOXPLANS]); + + list = (List)serializer.Deserialize(reader); + + foreach (ExchangeMailboxPlan p in list) + { + ExchangeServerController.AddExchangeMailboxPlan(itemId, p); + } + } + } + + if (cntx.Quotas[Quotas.LYNC_USERS] != null) + { + // 5) Create default mailbox plans + // load user info + UserInfo user = PackageController.GetPackageOwner(org.PackageId); + + // get settings + UserSettings userSettings = UserController.GetUserSettings(user.UserId, "LyncUserPlansPolicy"); + + if (!string.IsNullOrEmpty(userSettings[UserSettings.DEFAULT_LYNCUSERPLANS])) + { + + List list = new List(); + + XmlSerializer serializer = new XmlSerializer(list.GetType()); + + StringReader reader = new StringReader(userSettings[UserSettings.DEFAULT_LYNCUSERPLANS]); + + list = (List)serializer.Deserialize(reader); + + foreach (LyncUserPlan p in list) + { + LyncController.AddLyncUserPlan(itemId, p); + } + } + } + + } catch (Exception ex) { @@ -482,6 +543,66 @@ namespace WebsitePanel.EnterpriseServer } } + + private static bool DeleteLyncUsers(int itemId) + { + bool successful = false; + + try + { + LyncUsersPagedResult res = LyncController.GetLyncUsers(itemId, string.Empty, string.Empty, 0, int.MaxValue); + + if (res.IsSuccess) + { + successful = true; + foreach (LyncUser user in res.Value.PageUsers) + { + try + { + ResultObject delUserResult = LyncController.DeleteLyncUser(itemId, user.AccountID); + if (!delUserResult.IsSuccess) + { + StringBuilder sb = new StringBuilder(); + foreach (string str in delUserResult.ErrorCodes) + { + sb.Append(str); + sb.Append('\n'); + } + + throw new ApplicationException(sb.ToString()); + } + } + catch (Exception ex) + { + successful = false; + TaskManager.WriteError(ex); + } + } + + return successful; + } + else + { + StringBuilder sb = new StringBuilder(); + foreach (string str in res.ErrorCodes) + { + sb.Append(str); + sb.Append('\n'); + } + + throw new ApplicationException(sb.ToString()); + } + } + catch (Exception ex) + { + successful = false; + TaskManager.WriteError(ex); + } + + return successful; + } + + public static int DeleteOrganization(int itemId) { // check account @@ -570,7 +691,22 @@ namespace WebsitePanel.EnterpriseServer successful = false; TaskManager.WriteError(ex); } - + + //Cleanup Lync + try + { + if (!string.IsNullOrEmpty(org.LyncTenantId)) + if (DeleteLyncUsers(itemId)) + LyncController.DeleteOrganization(itemId); + } + catch (Exception ex) + { + successful = false; + TaskManager.WriteError(ex); + } + + + //Cleanup Exchange try { if (!string.IsNullOrEmpty(org.GlobalAddressList)) @@ -633,7 +769,7 @@ namespace WebsitePanel.EnterpriseServer } - private static Organizations GetOrganizationProxy(int serviceId) + public static Organizations GetOrganizationProxy(int serviceId) { Organizations ws = new Organizations(); ServiceProviderProxy.Init(ws, serviceId); @@ -710,9 +846,6 @@ namespace WebsitePanel.EnterpriseServer org.Id = 1; org.OrganizationId = "fabrikam"; org.Name = "Fabrikam Inc"; - org.IssueWarningKB = 150000; - org.ProhibitSendKB = 170000; - org.ProhibitSendReceiveKB = 190000; org.KeepDeletedItemsDays = 14; org.GlobalAddressList = "FabrikamGAL"; return org; @@ -794,6 +927,11 @@ namespace WebsitePanel.EnterpriseServer stats.AllocatedOCSUsers = cntx.Quotas[Quotas.OCS_USERS].QuotaAllocatedValue; } + if (cntx.Groups.ContainsKey(ResourceGroups.Lync)) + { + stats.CreatedLyncUsers = LyncController.GetLyncUsersCount(org.Id).Value; + stats.AllocatedLyncUsers = cntx.Quotas[Quotas.LYNC_USERS].QuotaAllocatedValue; + } return stats; } @@ -980,8 +1118,17 @@ namespace WebsitePanel.EnterpriseServer OrganizationUsersPaged result = new OrganizationUsersPaged(); result.RecordsCount = (int)ds.Tables[0].Rows[0][0]; + List Tmpaccounts = new List(); + ObjectUtils.FillCollectionFromDataView(Tmpaccounts, ds.Tables[1].DefaultView); + result.PageUsers = Tmpaccounts.ToArray(); + List accounts = new List(); - ObjectUtils.FillCollectionFromDataView(accounts, ds.Tables[1].DefaultView); + + foreach (OrganizationUser user in Tmpaccounts.ToArray()) + { + accounts.Add(GetUserGeneralSettings(itemId, user.AccountId)); + } + result.PageUsers = accounts.ToArray(); return result; } @@ -993,22 +1140,23 @@ namespace WebsitePanel.EnterpriseServer return DataProvider.ExchangeAccountEmailAddressExists(emailAddress); } - - private static int AddOrganizationUser(int itemId, string accountName, string displayName, string email, string accountPassword) - { + + private static int AddOrganizationUser(int itemId, string accountName, string displayName, string email, string sAMAccountName, string accountPassword, string subscriberNumber) + { return DataProvider.AddExchangeAccount(itemId, (int)ExchangeAccountType.User, accountName, displayName, email, false, string.Empty, - string.Empty, CryptoUtils.Encrypt(accountPassword)); - - } + sAMAccountName, CryptoUtils.Encrypt(accountPassword), 0, subscriberNumber.Trim()); + + } public static string GetAccountName(string loginName) { - string []parts = loginName.Split('@'); - return parts != null && parts.Length > 1 ? parts[0] : loginName; + //string []parts = loginName.Split('@'); + //return parts != null && parts.Length > 1 ? parts[0] : loginName; + return loginName; } - public static int CreateUser(int itemId, string displayName, string name, string domain, string password, bool enabled, bool sendNotification, string to, out string accountName) + public static int CreateUser(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool enabled, bool sendNotification, string to, out string accountName) { if (string.IsNullOrEmpty(displayName)) throw new ArgumentNullException("displayName"); @@ -1023,55 +1171,171 @@ namespace WebsitePanel.EnterpriseServer throw new ArgumentNullException("password"); accountName = string.Empty; - + // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); if (accountCheck < 0) return accountCheck; - + // place log record TaskManager.StartTask("ORGANIZATION", "CREATE_USER"); TaskManager.ItemId = itemId; + TaskManager.Write("Organization ID :" + itemId); + TaskManager.Write("name :" + name); + TaskManager.Write("domain :" + domain); + TaskManager.Write("subscriberNumber :" + subscriberNumber); - // e-mail - string email = name + "@" + domain; + int userId = -1; - if (EmailAddressExists(email)) - return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; - - // load organization - Organization org = GetOrganization(itemId); - if (org == null) - return -1; - - // check package - int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) return packageCheck; - - int errorCode; - if (!CheckUserQuota(org.Id, out errorCode)) - return errorCode; - - - Organizations orgProxy = GetOrganizationProxy(org.ServiceId); - - string upn = string.Format("{0}@{1}", name, domain); - accountName = BuildAccountName(org.OrganizationId, name); - orgProxy.CreateUser(org.OrganizationId, accountName, displayName, upn, password, enabled); - - int userId = AddOrganizationUser(itemId, accountName, displayName, email, password); - - // register email address - AddAccountEmailAddress(userId, email); - - if (sendNotification) + try { - SendSummaryLetter(org.Id, userId, true, to, ""); + displayName = displayName.Trim(); + name = name.Trim(); + domain = domain.Trim(); + + // e-mail + string email = name + "@" + domain; + + if (EmailAddressExists(email)) + return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; + + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return -1; + + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; + + int errorCode; + if (!CheckUserQuota(org.Id, out errorCode)) + return errorCode; + + + Organizations orgProxy = GetOrganizationProxy(org.ServiceId); + + string upn = string.Format("{0}@{1}", name, domain); + string sAMAccountName = BuildAccountName(org.OrganizationId, name); + + TaskManager.Write("accountName :" + sAMAccountName); + TaskManager.Write("upn :" + upn); + + if (orgProxy.CreateUser(org.OrganizationId, sAMAccountName, displayName, upn, password, enabled) == 0) + { + OrganizationUser retUser = orgProxy.GetUserGeneralSettings(upn, org.OrganizationId); + TaskManager.Write("sAMAccountName :" + retUser.DomainUserName); + + userId = AddOrganizationUser(itemId, upn, displayName, email, retUser.DomainUserName, password, subscriberNumber); + accountName = upn; + + // register email address + AddAccountEmailAddress(userId, email); + + if (sendNotification) + { + SendSummaryLetter(org.Id, userId, true, to, ""); + } + } + else + { + TaskManager.WriteError("Failed to create user"); + } } + catch (Exception ex) + { + TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + + return userId; + } + + + + public static int ImportUser(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber) + { + if (string.IsNullOrEmpty(accountName)) + throw new ArgumentNullException("accountName"); + + if (string.IsNullOrEmpty(displayName)) + throw new ArgumentNullException("displayName"); + + if (string.IsNullOrEmpty(name)) + throw new ArgumentNullException("name"); + + if (string.IsNullOrEmpty(domain)) + throw new ArgumentNullException("domain"); + + if (string.IsNullOrEmpty(password)) + throw new ArgumentNullException("password"); + + + // place log record + TaskManager.StartTask("ORGANIZATION", "IMPORT_USER"); + TaskManager.ItemId = itemId; + TaskManager.Write("Organization ID :" + itemId); + TaskManager.Write("account :" + accountName); + TaskManager.Write("name :" + name); + TaskManager.Write("domain :" + domain); + + int userId = -1; + + try + { + accountName = accountName.Trim(); + displayName = displayName.Trim(); + name = name.Trim(); + domain = domain.Trim(); + + // e-mail + string email = name + "@" + domain; + + if (EmailAddressExists(email)) + return BusinessErrorCodes.ERROR_EXCHANGE_EMAIL_EXISTS; + + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return -1; + + // check package + int packageCheck = SecurityContext.CheckPackage(org.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) return packageCheck; + + int errorCode; + if (!CheckUserQuota(org.Id, out errorCode)) + return errorCode; + + Organizations orgProxy = GetOrganizationProxy(org.ServiceId); + + string upn = string.Format("{0}@{1}", name, domain); + TaskManager.Write("upn :" + upn); + + OrganizationUser retUser = orgProxy.GetUserGeneralSettings(accountName, org.OrganizationId); + + TaskManager.Write("sAMAccountName :" + retUser.DomainUserName); + + userId = AddOrganizationUser(itemId, accountName, displayName, email, retUser.DomainUserName, password, subscriberNumber); + + AddAccountEmailAddress(userId, email); + + } + catch (Exception ex) + { + TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + return userId; } - private static void AddAccountEmailAddress(int accountId, string emailAddress) { @@ -1080,28 +1344,40 @@ namespace WebsitePanel.EnterpriseServer private static string BuildAccountName(string orgId, string name) { - int maxLen = 19 - orgId.Length; - - // try to choose name - int i = 0; - while (true) + string accountName = name = name.Replace(" ", ""); + string CounterStr = "00000"; + int counter = 0; + bool bFound = false; + do { - string num = i > 0 ? i.ToString() : ""; - int len = maxLen - num.Length; + accountName = genSamLogin(name, CounterStr); - if (name.Length > len) - name = name.Substring(0, len); + if (!AccountExists(accountName)) bFound = true; - string accountName = name + num + "_" + orgId; - - // check if already exists - if (!AccountExists(accountName)) - return accountName; - - i++; + CounterStr = counter.ToString("d5"); + counter++; } + while (!bFound); + + return accountName; } + private static string genSamLogin(string login, string strCounter) + { + int maxLogin = 20; + int fullLen = login.Length + strCounter.Length; + if (fullLen <= maxLogin) + return login + strCounter; + else + { + if (login.Length - (fullLen - maxLogin) > 0) + return login.Substring(0, login.Length - (fullLen - maxLogin)) + strCounter; + else return strCounter; // ???? + } + + } + + private static bool AccountExists(string accountName) { return DataProvider.ExchangeAccountExists(accountName); @@ -1180,6 +1456,18 @@ namespace WebsitePanel.EnterpriseServer return account; } + public static OrganizationUser GetAccountByAccountName(int itemId, string AccountName) + { + OrganizationUser account = ObjectUtils.FillObjectFromDataReader( + DataProvider.GetExchangeAccountByAccountName(itemId, AccountName)); + + if (account == null) + return null; + + return account; + } + + private static void DeleteUserFromMetabase(int itemId, int accountId) { // try to get organization @@ -1217,11 +1505,16 @@ namespace WebsitePanel.EnterpriseServer string accountName = GetAccountName(account.AccountName); - OrganizationUser retUser = orgProxy.GeUserGeneralSettings(accountName, org.OrganizationId); + OrganizationUser retUser = orgProxy.GetUserGeneralSettings(accountName, org.OrganizationId); retUser.AccountId = accountId; retUser.AccountName = account.AccountName; retUser.PrimaryEmailAddress = account.PrimaryEmailAddress; retUser.AccountType = account.AccountType; + retUser.CrmUserId = CRMController.GetCrmUserId(accountId); + retUser.IsOCSUser = DataProvider.CheckOCSUserExists(accountId); + retUser.IsLyncUser = DataProvider.CheckLyncUserExists(accountId); + retUser.IsBlackBerryUser = BlackBerryController.CheckBlackBerryUserExists(accountId); + retUser.SubscriberNumber = account.SubscriberNumber; return retUser; } @@ -1240,7 +1533,7 @@ namespace WebsitePanel.EnterpriseServer string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, - string webPage, string notes, string externalEmail) + string webPage, string notes, string externalEmail, string subscriberNumber) { // check account @@ -1253,6 +1546,10 @@ namespace WebsitePanel.EnterpriseServer try { + displayName = displayName.Trim(); + firstName = firstName.Trim(); + lastName = lastName.Trim(); + // load organization Organization org = GetOrganization(itemId); if (org == null) @@ -1303,6 +1600,7 @@ namespace WebsitePanel.EnterpriseServer // update account account.DisplayName = displayName; + account.SubscriberNumber = subscriberNumber; //account. if (!String.IsNullOrEmpty(password)) @@ -1329,7 +1627,8 @@ namespace WebsitePanel.EnterpriseServer { DataProvider.UpdateExchangeAccount(account.AccountId, account.AccountName, account.AccountType, account.DisplayName, account.PrimaryEmailAddress, account.MailEnabledPublicFolder, - account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword); + account.MailboxManagerActions.ToString(), account.SamAccountName, account.AccountPassword, account.MailboxPlanId, + (string.IsNullOrEmpty(account.SubscriberNumber) ? null : account.SubscriberNumber.Trim())); } @@ -1377,11 +1676,58 @@ namespace WebsitePanel.EnterpriseServer } #endregion - return ObjectUtils.CreateListFromDataReader( - DataProvider.SearchOrganizationAccounts(SecurityContext.User.UserId, itemId, - filterColumn, filterValue, sortColumn, includeMailboxes)); + List Tmpaccounts = ObjectUtils.CreateListFromDataReader( + DataProvider.SearchOrganizationAccounts(SecurityContext.User.UserId, itemId, + filterColumn, filterValue, sortColumn, includeMailboxes)); + + List Accounts = new List(); + + foreach (OrganizationUser user in Tmpaccounts.ToArray()) + { + Accounts.Add(GetUserGeneralSettings(itemId, user.AccountId)); + } + + return Accounts; } + public static int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName) + { + // place log record + TaskManager.StartTask("ORGANIZATION", "GET_ACCOUNT_BYUPN"); + TaskManager.ItemId = itemId; + + int accounId = -1; + + try + { + // load organization + Organization org = GetOrganization(itemId); + if (org == null) + return 0; + + // get samaccountName + //Organizations orgProxy = GetOrganizationProxy(org.ServiceId); + //string accountName = orgProxy.GetSamAccountNameByUserPrincipalName(org.OrganizationId, userPrincipalName); + + // load account + OrganizationUser account = GetAccountByAccountName(itemId, userPrincipalName); + + if (account != null) + accounId = account.AccountId; + + return accounId; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + #endregion public static List GetOrganizationDomains(int itemId) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/ReportController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/ReportController.cs index 6f65f2f3..3692a9c6 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/ReportController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/HostedSolution/ReportController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Log/AuditLog.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Log/AuditLog.cs index 95abb0d5..ec012ecf 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Log/AuditLog.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Log/AuditLog.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/MailServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/MailServerController.cs index fe7c9ec0..c4914931 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/MailServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/MailServerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/QuotaLimit.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/QuotaLimit.cs index e3fd313c..2348cca7 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/QuotaLimit.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/MailServers/QuotaLimit.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/OperatingSystems/OperatingSystemController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/OperatingSystems/OperatingSystemController.cs index 2aa65c13..db431763 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/OperatingSystems/OperatingSystemController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/OperatingSystems/OperatingSystemController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -39,6 +39,7 @@ using WebsitePanel.Server; using WebsitePanel.Providers; using WebsitePanel.Providers.OS; using OS = WebsitePanel.Providers.OS; +using System.Collections; namespace WebsitePanel.EnterpriseServer { @@ -406,6 +407,67 @@ namespace WebsitePanel.EnterpriseServer } #endregion + #region Web Platform Installer + + public static void InitWPIFeeds(int serverId, string feedUrls) + { + GetServerService(serverId).InitWPIFeeds(feedUrls); + } + + public static WPITab[] GetWPITabs(int serverId) + { + return GetServerService(serverId).GetWPITabs(); + } + + public static WPIKeyword[] GetWPIKeywords(int serverId) + { + return GetServerService(serverId).GetWPIKeywords(); + } + + public static WPIProduct[] GetWPIProducts(int serverId, string tabId, string keywordId) + { + return GetServerService(serverId).GetWPIProducts(tabId, keywordId); + } + + public static WPIProduct[] GetWPIProductsFiltered(int serverId, string keywordId) + { + return GetServerService(serverId).GetWPIProductsFiltered(keywordId); + } + + + + public static WPIProduct[] GetWPIProductsWithDependencies(int serverId, string[] products) + { + return GetServerService(serverId).GetWPIProductsWithDependencies(products); + } + public static void InstallWPIProducts(int serverId, string[] products) + { + GetServerService(serverId).InstallWPIProducts(products); + } + + public static void CancelInstallWPIProducts(int serverId) + { + GetServerService(serverId).CancelInstallWPIProducts(); + } + + public static string GetWPIStatus(int serverId) + { + return GetServerService(serverId).GetWPIStatus(); + } + + public static string WpiGetLogFileDirectory(int serverId) + { + return GetServerService(serverId).WpiGetLogFileDirectory(); + } + + public static SettingPair[] WpiGetLogsInDirectory(int serverId, string Path) + { + return GetServerService(serverId).WpiGetLogsInDirectory(Path); + } + + + #endregion + #region Event Viewer public static string[] GetLogNames(int serverId) { @@ -684,6 +746,7 @@ namespace WebsitePanel.EnterpriseServer return 0; } + #endregion } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageAsyncWorker.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageAsyncWorker.cs index a1137b04..b1946073 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageAsyncWorker.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageAsyncWorker.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageController.cs index b69898c7..a80b8388 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/PackageController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -399,7 +399,7 @@ namespace WebsitePanel.EnterpriseServer // check account result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive - | DemandAccount.IsReseller); + | DemandAccount.IsResellerCSR); if (result.Result < 0) return result; // check if domain exists @@ -460,7 +460,7 @@ namespace WebsitePanel.EnterpriseServer domain.PackageId = packageId; domain.DomainName = domainName; domain.HostingAllowed = false; - domainId = ServerController.AddDomain(domain, createInstantAlias); + domainId = ServerController.AddDomain(domain, createInstantAlias, true); if (domainId < 0) { result.Result = domainId; @@ -652,7 +652,7 @@ namespace WebsitePanel.EnterpriseServer { // check account result.Result = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive - | DemandAccount.IsReseller); + | DemandAccount.IsResellerCSR); if (result.Result < 0) return result; int packageId = -1; @@ -820,7 +820,7 @@ namespace WebsitePanel.EnterpriseServer { // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive - | DemandAccount.IsReseller); + | DemandAccount.IsResellerCSR); if (accountCheck < 0) return accountCheck; List packages = new List(); @@ -1521,19 +1521,6 @@ namespace WebsitePanel.EnterpriseServer } } - // Exchange Hosted Edition - else if (String.Compare(PackageSettings.EXCHANGE_HOSTED_EDITION, settingsName, true) == 0) - { - // load Exchange service settings - int exchServiceId = GetPackageServiceId(packageId, ResourceGroups.ExchangeHostedEdition); - if (exchServiceId > 0) - { - StringDictionary exchSettings = ServerController.GetServiceSettings(exchServiceId); - settings["temporaryDomain"] = exchSettings["temporaryDomain"]; - settings["ecpURL"] = exchSettings["ecpURL"]; - } - } - // VPS else if (String.Compare(PackageSettings.VIRTUAL_PRIVATE_SERVERS, settingsName, true) == 0) { @@ -1875,6 +1862,7 @@ namespace WebsitePanel.EnterpriseServer SetSqlServerExternalAddress(packageId, items, ResourceGroups.MsSql2000); SetSqlServerExternalAddress(packageId, items, ResourceGroups.MsSql2005); SetSqlServerExternalAddress(packageId, items, ResourceGroups.MsSql2008); + SetSqlServerExternalAddress(packageId, items, ResourceGroups.MsSql2012); SetSqlServerExternalAddress(packageId, items, ResourceGroups.MySql4); SetSqlServerExternalAddress(packageId, items, ResourceGroups.MySql5); @@ -1964,6 +1952,21 @@ namespace WebsitePanel.EnterpriseServer } items["Plans"] = plans; + //Add ons + Hashtable addOns = new Hashtable(); + int i = 0; + foreach (PackageInfo package in packages) + { + List lstAddOns = ObjectUtils.CreateListFromDataSet(GetPackageAddons(package.PackageId)); + foreach (PackageAddonInfo addOn in lstAddOns) + { + addOns.Add(i, addOn); + i++; + } + + } + items["Addons"] = addOns; + // package contexts Hashtable cntxs = new Hashtable(); foreach (PackageInfo package in packages) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/ServiceItemsPaged.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/ServiceItemsPaged.cs index 6ac91078..a2defdfc 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/ServiceItemsPaged.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Packages/ServiceItemsPaged.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupAsyncWorker.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupAsyncWorker.cs index b22759b4..b9b6dd6f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupAsyncWorker.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupAsyncWorker.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupController.cs index 01878b17..8d5d0c8c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/BackupController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/IBackupController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/IBackupController.cs index bc6b5a7c..186090f7 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/IBackupController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/IBackupController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/IImportController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/IImportController.cs index 59a5f683..4c290c3e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/IImportController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/IImportController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportAsyncWorker.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportAsyncWorker.cs index 18f33df7..9840cc7b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportAsyncWorker.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportAsyncWorker.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportController.cs index 3cf0dffd..13d53b8a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Provisioning/ImportController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ActivatePaidInvoicesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ActivatePaidInvoicesTask.cs index f9060c8d..2563a082 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ActivatePaidInvoicesTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ActivatePaidInvoicesTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupDatabaseTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupDatabaseTask.cs index 2d969107..fd545c4e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupDatabaseTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupDatabaseTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupTask.cs index f1113ada..8d04180d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/BackupTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculateExchangeDiskspaceTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculateExchangeDiskspaceTask.cs index 71507b38..1a8909a9 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculateExchangeDiskspaceTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculateExchangeDiskspaceTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesBandwidthTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesBandwidthTask.cs index a713459f..ccb91d16 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesBandwidthTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesBandwidthTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesDiskspaceTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesDiskspaceTask.cs index 6290abb6..7a744cf9 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesDiskspaceTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CalculatePackagesDiskspaceTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CancelOverdueInvoicesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CancelOverdueInvoicesTask.cs index b4dfbc38..fa917f83 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CancelOverdueInvoicesTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CancelOverdueInvoicesTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CheckWebSiteTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CheckWebSiteTask.cs index c8961590..fcd83826 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CheckWebSiteTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/CheckWebSiteTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/FTPFilesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/FTPFilesTask.cs index 4e287710..b069aa07 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/FTPFilesTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/FTPFilesTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/GenerateInvoicesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/GenerateInvoicesTask.cs index 88f4e890..f0ba1a82 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/GenerateInvoicesTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/GenerateInvoicesTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/HostedSolutionReport.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/HostedSolutionReport.cs index c17345e2..10322c79 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/HostedSolutionReport.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/HostedSolutionReport.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/NotifyOverusedDatabasesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/NotifyOverusedDatabasesTask.cs index 569d7fe1..5aae6dff 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/NotifyOverusedDatabasesTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/NotifyOverusedDatabasesTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunPaymentQueueTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunPaymentQueueTask.cs index b547d60d..ab969bc9 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunPaymentQueueTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunPaymentQueueTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunSystemCommandTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunSystemCommandTask.cs index 29e4f7ff..3dba9938 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunSystemCommandTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/RunSystemCommandTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SendMailNotificationTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SendMailNotificationTask.cs index 47db2f73..57e722ea 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SendMailNotificationTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SendMailNotificationTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverdueInvoicesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverdueInvoicesTask.cs index 9e22a3c1..d97d238a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverdueInvoicesTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverdueInvoicesTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverusedPackagesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverusedPackagesTask.cs index 9b4fe20e..5fa58ce9 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverusedPackagesTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/SuspendOverusedPackagesTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ZipFilesTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ZipFilesTask.cs index 5090f12f..5f93c1ac 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ZipFilesTask.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SchedulerTasks/ZipFilesTask.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/Scheduler.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/Scheduler.cs index dd7e6fbd..9da7a64b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/Scheduler.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/Scheduler.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerController.cs index 4c16359f..748f97cd 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerJob.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerJob.cs index f44adbb2..301fa943 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerJob.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Scheduling/SchedulerJob.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs index 385cb747..05eb7a72 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Servers/ServerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -122,20 +122,20 @@ namespace WebsitePanel.EnterpriseServer try { // TO-DO: Check connectivity - return 0; + return 0; } catch (WebException ex) { HttpWebResponse response = (HttpWebResponse)ex.Response; - if (response != null && response.StatusCode == HttpStatusCode.NotFound) + if (response != null && response.StatusCode == HttpStatusCode.NotFound) return BusinessErrorCodes.ERROR_ADD_SERVER_NOT_FOUND; - else if (response != null && response.StatusCode == HttpStatusCode.BadRequest) + else if (response != null && response.StatusCode == HttpStatusCode.BadRequest) return BusinessErrorCodes.ERROR_ADD_SERVER_BAD_REQUEST; - else if (response != null && response.StatusCode == HttpStatusCode.InternalServerError) + else if (response != null && response.StatusCode == HttpStatusCode.InternalServerError) return BusinessErrorCodes.ERROR_ADD_SERVER_INTERNAL_SERVER_ERROR; - else if (response != null && response.StatusCode == HttpStatusCode.ServiceUnavailable) + else if (response != null && response.StatusCode == HttpStatusCode.ServiceUnavailable) return BusinessErrorCodes.ERROR_ADD_SERVER_SERVICE_UNAVAILABLE; - else if (response != null && response.StatusCode == HttpStatusCode.Unauthorized) + else if (response != null && response.StatusCode == HttpStatusCode.Unauthorized) return BusinessErrorCodes.ERROR_ADD_SERVER_UNAUTHORIZED; if (ex.Message.Contains("The remote name could not be resolved") || ex.Message.Contains("Unable to connect")) { @@ -155,7 +155,7 @@ namespace WebsitePanel.EnterpriseServer { TaskManager.WriteError("General Server Error"); TaskManager.WriteError(ex); - return BusinessErrorCodes.ERROR_ADD_SERVER_APPLICATION_ERROR; + return BusinessErrorCodes.ERROR_ADD_SERVER_APPLICATION_ERROR; } } finally @@ -220,7 +220,7 @@ namespace WebsitePanel.EnterpriseServer throw new ApplicationException("Could not find services. General error was occued.", ex); } } - + public static int AddServer(ServerInfo server, bool autoDiscovery) { // check account @@ -243,8 +243,8 @@ namespace WebsitePanel.EnterpriseServer } TaskManager.StartTask("SERVER", "ADD", server.ServerName); - - int serverId = DataProvider.AddServer(server.ServerName, server.ServerUrl, + + int serverId = DataProvider.AddServer(server.ServerName, server.ServerUrl, CryptoUtils.Encrypt(server.Password), server.Comments, server.VirtualServer, server.InstantDomainAlias, server.PrimaryGroupId, server.ADEnabled, server.ADRootDomain, server.ADUsername, CryptoUtils.Encrypt(server.ADPassword), server.ADAuthenticationType); @@ -261,7 +261,7 @@ namespace WebsitePanel.EnterpriseServer TaskManager.WriteError(ex); } } - + TaskManager.ItemId = serverId; TaskManager.CompleteTask(); @@ -294,7 +294,7 @@ namespace WebsitePanel.EnterpriseServer return availResult; } - DataProvider.UpdateServer(server.ServerId, server.ServerName, server.ServerUrl, + DataProvider.UpdateServer(server.ServerId, server.ServerName, server.ServerUrl, CryptoUtils.Encrypt(server.Password), server.Comments, server.InstantDomainAlias, server.PrimaryGroupId, server.ADEnabled, server.ADRootDomain, server.ADUsername, CryptoUtils.Encrypt(server.ADPassword), server.ADAuthenticationType); @@ -322,7 +322,7 @@ namespace WebsitePanel.EnterpriseServer server.Password = password; // update server - DataProvider.UpdateServer(server.ServerId, server.ServerName, server.ServerUrl, + DataProvider.UpdateServer(server.ServerId, server.ServerName, server.ServerUrl, CryptoUtils.Encrypt(server.Password), server.Comments, server.InstantDomainAlias, server.PrimaryGroupId, server.ADEnabled, server.ADRootDomain, server.ADUsername, CryptoUtils.Encrypt(server.ADPassword), server.ADAuthenticationType); @@ -350,7 +350,7 @@ namespace WebsitePanel.EnterpriseServer server.ADPassword = adPassword; // update server - DataProvider.UpdateServer(server.ServerId, server.ServerName, server.ServerUrl, + DataProvider.UpdateServer(server.ServerId, server.ServerName, server.ServerUrl, CryptoUtils.Encrypt(server.Password), server.Comments, server.InstantDomainAlias, server.PrimaryGroupId, server.ADEnabled, server.ADRootDomain, server.ADUsername, CryptoUtils.Encrypt(server.ADPassword), server.ADAuthenticationType); @@ -636,12 +636,12 @@ namespace WebsitePanel.EnterpriseServer | DemandAccount.IsActive); if (accountCheck < 0) return accountCheck; - // load original service - ServiceInfo origService = GetServiceInfo(service.ServiceId); + // load original service + ServiceInfo origService = GetServiceInfo(service.ServiceId); TaskManager.StartTask("SERVER", "UPDATE_SERVICE"); - TaskManager.ItemId = origService.ServerId; - TaskManager.ItemName = GetServerByIdInternal(origService.ServerId).ServerName; + TaskManager.ItemId = origService.ServerId; + TaskManager.ItemName = GetServerByIdInternal(origService.ServerId).ServerName; TaskManager.WriteParameter("New service name", service.ServiceName); DataProvider.UpdateService(service.ServiceId, service.ServiceName, @@ -839,7 +839,7 @@ namespace WebsitePanel.EnterpriseServer public static BoolResult IsInstalled(int serverId, int providerId) { BoolResult res = TaskManager.StartResultTask("AUTO_DISCOVERY", "IS_INSTALLED"); - + try { ProviderInfo provider = GetProvider(providerId); @@ -848,22 +848,22 @@ namespace WebsitePanel.EnterpriseServer TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_GET_PROVIDER_INFO); return res; } - + AutoDiscovery.AutoDiscovery ad = new AutoDiscovery.AutoDiscovery(); ServiceProviderProxy.ServerInit(ad, serverId); - - res = ad.IsInstalled(provider.ProviderType); + + res = ad.IsInstalled(provider.ProviderType); } - catch(Exception ex) + catch (Exception ex) { TaskManager.CompleteResultTask(res, ErrorCodes.CANNOT_CHECK_IF_PROVIDER_SOFTWARE_INSTALLED, ex); - + } TaskManager.CompleteResultTask(); return res; } - + public static string GetServerVersion(int serverId) { AutoDiscovery.AutoDiscovery ad = new AutoDiscovery.AutoDiscovery(); @@ -871,7 +871,7 @@ namespace WebsitePanel.EnterpriseServer return ad.GetServerVersion(); } - + #endregion #region IP Addresses @@ -1400,18 +1400,18 @@ namespace WebsitePanel.EnterpriseServer private static string GetIPAddressesQuotaByResourceGroup(string groupName) { - if (String.Compare(groupName, ResourceGroups.VPS, true) == 0) - { - return Quotas.VPS_EXTERNAL_IP_ADDRESSES_NUMBER; - } - else if (String.Compare(groupName, ResourceGroups.VPSForPC, true) == 0) - { - return Quotas.VPSForPC_EXTERNAL_IP_ADDRESSES_NUMBER; - } - else - { - return Quotas.WEB_IP_ADDRESSES; - } + if (String.Compare(groupName, ResourceGroups.VPS, true) == 0) + { + return Quotas.VPS_EXTERNAL_IP_ADDRESSES_NUMBER; + } + else if (String.Compare(groupName, ResourceGroups.VPSForPC, true) == 0) + { + return Quotas.VPSForPC_EXTERNAL_IP_ADDRESSES_NUMBER; + } + else + { + return Quotas.WEB_IP_ADDRESSES; + } } #endregion @@ -1521,7 +1521,8 @@ namespace WebsitePanel.EnterpriseServer TaskManager.WriteParameter("Data", record.RecordData); DataProvider.AddDnsRecord(SecurityContext.User.UserId, record.ServiceId, record.ServerId, record.PackageId, - record.RecordType, record.RecordName, record.RecordData, record.MxPriority, record.IpAddressId); + record.RecordType, record.RecordName, record.RecordData, record.MxPriority, + record.SrvPriority, record.SrvWeight, record.SrvPort, record.IpAddressId); TaskManager.CompleteTask(); @@ -1540,7 +1541,8 @@ namespace WebsitePanel.EnterpriseServer TaskManager.WriteParameter("Data", record.RecordData); DataProvider.UpdateDnsRecord(SecurityContext.User.UserId, record.RecordId, - record.RecordType, record.RecordName, record.RecordData, record.MxPriority, record.IpAddressId); + record.RecordType, record.RecordName, record.RecordData, record.MxPriority, + record.SrvPriority, record.SrvWeight, record.SrvPort, record.IpAddressId); TaskManager.CompleteTask(); @@ -1571,7 +1573,7 @@ namespace WebsitePanel.EnterpriseServer #region Domains public static int CheckDomain(string domainName) { - int checkDomainResult = DataProvider.CheckDomain(-10, domainName); + int checkDomainResult = DataProvider.CheckDomain(-10, domainName, false); if (checkDomainResult == -1) return BusinessErrorCodes.ERROR_DOMAIN_ALREADY_EXISTS; @@ -1677,8 +1679,7 @@ namespace WebsitePanel.EnterpriseServer } public static int AddDomainWithProvisioning(int packageId, string domainName, DomainType domainType, - bool createWebSite, int pointWebSiteId, int pointMailDomainId, - bool createDnsZone, bool createInstantAlias, bool allowSubDomains) + bool createWebSite, int pointWebSiteId, int pointMailDomainId, bool createDnsZone, bool createInstantAlias, bool allowSubDomains) { // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); @@ -1687,7 +1688,7 @@ namespace WebsitePanel.EnterpriseServer // check package int packageCheck = SecurityContext.CheckPackage(packageId, DemandPackage.IsActive); if (packageCheck < 0) return packageCheck; - + // set flags bool isSubDomain = (domainType == DomainType.SubDomain || domainType == DomainType.ProviderSubDomain); bool isDomainPointer = (domainType == DomainType.DomainPointer); @@ -1748,10 +1749,10 @@ namespace WebsitePanel.EnterpriseServer public static int AddDomain(DomainInfo domain) { - return AddDomain(domain, false); + return AddDomain(domain, false, false); } - public static int AddDomain(DomainInfo domain, bool createInstantAlias) + public static int AddDomain(DomainInfo domain, bool createInstantAlias, bool createZone) { // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); @@ -1762,7 +1763,7 @@ namespace WebsitePanel.EnterpriseServer if (packageCheck < 0) return packageCheck; // add main domain - int domainId = AddDomainInternal(domain.PackageId, domain.DomainName, true, + int domainId = AddDomainInternal(domain.PackageId, domain.DomainName, createZone, domain.IsSubDomain, false, domain.IsDomainPointer, false); if (domainId < 0) @@ -1805,7 +1806,7 @@ namespace WebsitePanel.EnterpriseServer } // check if the domain already exists - int checkResult = DataProvider.CheckDomain(packageId, domainName); + int checkResult = DataProvider.CheckDomain(packageId, domainName, isDomainPointer); if (checkResult < 0) { @@ -1816,15 +1817,18 @@ namespace WebsitePanel.EnterpriseServer else return checkResult; } - - if (domainName.ToLower().StartsWith("www.")) - return BusinessErrorCodes.ERROR_DOMAIN_STARTS_WWW; + /* + if (domainName.ToLower().StartsWith("www.")) + return BusinessErrorCodes.ERROR_DOMAIN_STARTS_WWW; + */ // place log record TaskManager.StartTask("DOMAIN", "ADD", domainName); TaskManager.PackageId = packageId; TaskManager.TaskParameters["CreateZone"] = createDnsZone; + + // create DNS zone int zoneItemId = 0; if (createDnsZone) @@ -1895,60 +1899,60 @@ namespace WebsitePanel.EnterpriseServer } } - public static int DetachDomain(int domainId) - { - // check account - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsAdmin); - if (accountCheck < 0) return accountCheck; + public static int DetachDomain(int domainId) + { + // check account + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsAdmin); + if (accountCheck < 0) return accountCheck; - // load domain - DomainInfo domain = GetDomain(domainId); + // load domain + DomainInfo domain = GetDomain(domainId); - // place log record - TaskManager.StartTask("DOMAIN", "DETACH", domain.DomainName); - TaskManager.ItemId = domain.DomainId; + // place log record + TaskManager.StartTask("DOMAIN", "DETACH", domain.DomainName); + TaskManager.ItemId = domain.DomainId; - try - { - // check if domain can be deleted - if (domain.WebSiteId > 0) - { - TaskManager.WriteError("Domain points to the existing web site"); - return BusinessErrorCodes.ERROR_DOMAIN_POINTS_TO_WEB_SITE; - } + try + { + // check if domain can be deleted + if (domain.WebSiteId > 0) + { + TaskManager.WriteError("Domain points to the existing web site"); + return BusinessErrorCodes.ERROR_DOMAIN_POINTS_TO_WEB_SITE; + } - if (domain.MailDomainId > 0) - { - TaskManager.WriteError("Domain points to the existing mail domain"); - return BusinessErrorCodes.ERROR_DOMAIN_POINTS_TO_MAIL_DOMAIN; - } + if (domain.MailDomainId > 0) + { + TaskManager.WriteError("Domain points to the existing mail domain"); + return BusinessErrorCodes.ERROR_DOMAIN_POINTS_TO_MAIL_DOMAIN; + } if (DataProvider.ExchangeOrganizationDomainExists(domain.DomainId)) { TaskManager.WriteError("Domain points to the existing organization domain"); return BusinessErrorCodes.ERROR_ORGANIZATION_DOMAIN_IS_IN_USE; } - + // remove DNS zone meta-item if required - if (domain.ZoneItemId > 0) - { - PackageController.DeletePackageItem(domain.ZoneItemId); - } + if (domain.ZoneItemId > 0) + { + PackageController.DeletePackageItem(domain.ZoneItemId); + } - // delete domain - DataProvider.DeleteDomain(SecurityContext.User.UserId, domainId); + // delete domain + DataProvider.DeleteDomain(SecurityContext.User.UserId, domainId); - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } public static int DeleteDomain(int domainId) { @@ -1991,9 +1995,9 @@ namespace WebsitePanel.EnterpriseServer if (res < 0) return res; } - - // delete zone if required - DnsServerController.DeleteZone(domain.ZoneItemId); + + // delete zone if required + DnsServerController.DeleteZone(domain.ZoneItemId); // delete domain DataProvider.DeleteDomain(SecurityContext.User.UserId, domainId); @@ -2096,7 +2100,7 @@ namespace WebsitePanel.EnterpriseServer } // add web site DNS records - int res = AddWebSiteZoneRecords(domainId); + int res = AddWebSiteZoneRecords("", domainId); if (res < 0) return res; @@ -2112,7 +2116,7 @@ namespace WebsitePanel.EnterpriseServer } } - private static int AddWebSiteZoneRecords(int domainId) + private static int AddWebSiteZoneRecords(string hostName, int domainId) { // load domain DomainInfo domain = GetDomainItem(domainId); @@ -2126,7 +2130,7 @@ namespace WebsitePanel.EnterpriseServer return res; } - public static int CreateDomainInstantAlias(int domainId) + public static int CreateDomainInstantAlias(string hostName, int domainId) { // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo); @@ -2166,14 +2170,15 @@ namespace WebsitePanel.EnterpriseServer if (webRes < 0) return webRes; } - - // add mail domain pointer - if (domain.MailDomainId > 0 && instantAlias.MailDomainId == 0) - { - int mailRes = MailServerController.AddMailDomainPointer(domain.MailDomainId, instantAliasId); - if (mailRes < 0) - return mailRes; - } + /* + // add mail domain pointer + if (domain.MailDomainId > 0 && instantAlias.MailDomainId == 0) + { + int mailRes = MailServerController.AddMailDomainPointer(domain.MailDomainId, instantAliasId); + if (mailRes < 0) + return mailRes; + } + */ return 0; } @@ -2214,14 +2219,15 @@ namespace WebsitePanel.EnterpriseServer if (webRes < 0) return webRes; } - - // remove from mail domain pointers - if (instantAlias.MailDomainId > 0) - { - int mailRes = MailServerController.DeleteMailDomainPointer(instantAlias.MailDomainId, instantAlias.DomainId); - if (mailRes < 0) - return mailRes; - } + /* + // remove from mail domain pointers + if (instantAlias.MailDomainId > 0) + { + int mailRes = MailServerController.DeleteMailDomainPointer(instantAlias.MailDomainId, instantAlias.DomainId); + if (mailRes < 0) + return mailRes; + } + */ // delete instant alias int res = DeleteDomain(instantAlias.DomainId); @@ -2272,12 +2278,15 @@ namespace WebsitePanel.EnterpriseServer dt.Columns.Add("RecordName", typeof(string)); dt.Columns.Add("RecordData", typeof(string)); dt.Columns.Add("MxPriority", typeof(int)); + dt.Columns.Add("SrvPriority", typeof(int)); + dt.Columns.Add("SrvWeight", typeof(int)); + dt.Columns.Add("SrvPort", typeof(int)); // add rows DnsRecord[] records = GetDnsZoneRecords(domainId); foreach (DnsRecord record in records) { - dt.Rows.Add(record.RecordType, record.RecordName, record.RecordData, record.MxPriority); + dt.Rows.Add(record.RecordType, record.RecordName, record.RecordData, record.MxPriority, record.SrvPriority, record.SrvWeight, record.SrvPort); } return ds; @@ -2299,7 +2308,7 @@ namespace WebsitePanel.EnterpriseServer } public static int AddDnsZoneRecord(int domainId, string recordName, DnsRecordType recordType, - string recordData, int mxPriority) + string recordData, int mxPriority, int srvPriority, int srvWeight, int srvPort) { // check account int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); @@ -2315,7 +2324,7 @@ namespace WebsitePanel.EnterpriseServer // get DNS service DnsZone zoneItem = (DnsZone)PackageController.GetPackageItem(domain.ZoneItemId); - if(zoneItem == null) + if (zoneItem == null) return 0; // place log record @@ -2337,6 +2346,9 @@ namespace WebsitePanel.EnterpriseServer record.RecordName = recordName; record.RecordData = recordData; record.MxPriority = mxPriority; + record.SrvPriority = srvPriority; + record.SrvWeight = srvWeight; + record.SrvPort = srvPort; dns.AddZoneRecord(zoneItem.Name, record); return 0; @@ -2353,7 +2365,7 @@ namespace WebsitePanel.EnterpriseServer public static int UpdateDnsZoneRecord(int domainId, string originalRecordName, string originalRecordData, - string recordName, DnsRecordType recordType, string recordData, int mxPriority) + string recordName, DnsRecordType recordType, string recordData, int mxPriority, int srvPriority, int srvWeight, int srvPortNumber) { // place log record DomainInfo domain = GetDomain(domainId); @@ -2367,7 +2379,7 @@ namespace WebsitePanel.EnterpriseServer DeleteDnsZoneRecord(domainId, originalRecordName, recordType, originalRecordData); // add new record - AddDnsZoneRecord(domainId, recordName, recordType, recordData, mxPriority); + AddDnsZoneRecord(domainId, recordName, recordType, recordData, mxPriority, srvPriority, srvWeight, srvPortNumber); return 0; } @@ -2410,7 +2422,7 @@ namespace WebsitePanel.EnterpriseServer DNSServer dns = new DNSServer(); ServiceProviderProxy.Init(dns, zoneItem.ServiceId); - DnsRecord record = GetDnsZoneRecord(domainId, recordName, recordType, recordData); + DnsRecord record = GetDnsZoneRecord(domainId, recordName, recordType, recordData); dns.DeleteZoneRecord(zoneItem.Name, record); return 0; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/HostedSharePointServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/HostedSharePointServerController.cs index 7cbc727d..00fa5a28 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/HostedSharePointServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/HostedSharePointServerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -40,26 +40,26 @@ using WebsitePanel.Providers.SharePoint; namespace WebsitePanel.EnterpriseServer.Code.SharePoint { - /// - /// Exposes handful API on hosted SharePoint site collections management. - /// - public class HostedSharePointServerController : IImportController, IBackupController - { - private const int FILE_BUFFER_LENGTH = 5000000; // ~5MB + /// + /// Exposes handful API on hosted SharePoint site collections management. + /// + public class HostedSharePointServerController : IImportController, IBackupController + { + private const int FILE_BUFFER_LENGTH = 5000000; // ~5MB - /// - /// Gets site collections in raw form. - /// - /// Package to which desired site collections belong. - /// Organization to which desired site collections belong. - /// Filter column name. - /// Filter value. - /// Sort column name. - /// Row index to start from. - /// Maximum number of rows to retrieve. - /// Site collections that match. - public static SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) - { + /// + /// Gets site collections in raw form. + /// + /// Package to which desired site collections belong. + /// Organization to which desired site collections belong. + /// Filter column name. + /// Filter value. + /// Sort column name. + /// Row index to start from. + /// Maximum number of rows to retrieve. + /// Site collections that match. + public static SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { if (IsDemoMode) { SharePointSiteCollectionListPaged demoResult = new SharePointSiteCollectionListPaged(); @@ -68,35 +68,35 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint return demoResult; } - SharePointSiteCollectionListPaged paged = new SharePointSiteCollectionListPaged(); - DataSet result = PackageController.GetRawPackageItemsPaged(packageId, typeof(SharePointSiteCollection), - true, filterColumn, filterValue, sortColumn, startRow, Int32.MaxValue); - List items = PackageController.CreateServiceItemsList(result, 1).ConvertAll(delegate(ServiceProviderItem item) { return (SharePointSiteCollection)item; }); + SharePointSiteCollectionListPaged paged = new SharePointSiteCollectionListPaged(); + DataSet result = PackageController.GetRawPackageItemsPaged(packageId, typeof(SharePointSiteCollection), + true, filterColumn, filterValue, sortColumn, startRow, Int32.MaxValue); + List items = PackageController.CreateServiceItemsList(result, 1).ConvertAll(delegate(ServiceProviderItem item) { return (SharePointSiteCollection)item; }); - if (organizationId > 0) - { - items = items.FindAll(delegate(SharePointSiteCollection siteCollection) { return siteCollection.OrganizationId == organizationId; }); - } - paged.TotalRowCount = items.Count; + if (organizationId > 0) + { + items = items.FindAll(delegate(SharePointSiteCollection siteCollection) { return siteCollection.OrganizationId == organizationId; }); + } + paged.TotalRowCount = items.Count; - if (items.Count > maximumRows) - { - items.RemoveRange(maximumRows, items.Count - maximumRows); - } + if (items.Count > maximumRows) + { + items.RemoveRange(maximumRows, items.Count - maximumRows); + } - paged.SiteCollections = items; + paged.SiteCollections = items; - return paged; - } + return paged; + } public static List GetSiteCollections(int organizationId) { Organization org = OrganizationController.GetOrganization(organizationId); - - List items = PackageController.GetPackageItemsByType(org.PackageId, typeof(SharePointSiteCollection), false); + + List items = PackageController.GetPackageItemsByType(org.PackageId, typeof(SharePointSiteCollection), false); items.ConvertAll(delegate(ServiceProviderItem item) { return (SharePointSiteCollection)item; }); List ret = new List(); - foreach(ServiceProviderItem item in items) + foreach (ServiceProviderItem item in items) { SharePointSiteCollection siteCollection = item as SharePointSiteCollection; if (siteCollection != null && siteCollection.OrganizationId == organizationId) @@ -104,54 +104,54 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint ret.Add(siteCollection); } } - - return ret; + + return ret; } - /// - /// Gets list of supported languages by this installation of SharePoint. - /// - /// List of supported languages - public static int[] GetSupportedLanguages(int packageId) - { + /// + /// Gets list of supported languages by this installation of SharePoint. + /// + /// List of supported languages + public static int[] GetSupportedLanguages(int packageId) + { if (IsDemoMode) { - return new int[] {1033}; + return new int[] { 1033 }; } - // Log operation. - TaskManager.StartTask("HOSTEDSHAREPOINT", "GET_LANGUAGES"); + // Log operation. + TaskManager.StartTask("HOSTEDSHAREPOINT", "GET_LANGUAGES"); - int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedSharePoint); - if (serviceId == 0) - { - return new int[]{}; - } + int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedSharePoint); + if (serviceId == 0) + { + return new int[] { }; + } - try - { - // Create site collection on server. - HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(serviceId); - return hostedSharePointServer.GetSupportedLanguages(); - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + try + { + // Create site collection on server. + HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(serviceId); + return hostedSharePointServer.GetSupportedLanguages(); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } - /// - /// Gets list of SharePoint site collections that belong to the package. - /// - /// Package that owns site collections. - /// A value which shows whether nested spaces must be searched as well. - /// List of found site collections. - public static List GetSiteCollections(int packageId, bool recursive) - { + /// + /// Gets list of SharePoint site collections that belong to the package. + /// + /// Package that owns site collections. + /// A value which shows whether nested spaces must be searched as well. + /// List of found site collections. + public static List GetSiteCollections(int packageId, bool recursive) + { if (IsDemoMode) { List demoResult = new List(); @@ -183,592 +183,626 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint } - List items = PackageController.GetPackageItemsByType(packageId, typeof(SharePointSiteCollection), recursive); - return items.ConvertAll(delegate(ServiceProviderItem item) { return (SharePointSiteCollection)item; }); - } + List items = PackageController.GetPackageItemsByType(packageId, typeof(SharePointSiteCollection), recursive); + return items.ConvertAll(delegate(ServiceProviderItem item) { return (SharePointSiteCollection)item; }); + } - /// - /// Gets SharePoint site collection with given id. - /// - /// Site collection id within metabase. - /// Site collection or null in case no such item exist. - public static SharePointSiteCollection GetSiteCollection(int itemId) - { + /// + /// Gets SharePoint site collection with given id. + /// + /// Site collection id within metabase. + /// Site collection or null in case no such item exist. + public static SharePointSiteCollection GetSiteCollection(int itemId) + { if (IsDemoMode) { - return GetSiteCollections(1, false)[itemId-1]; + return GetSiteCollections(1, false)[itemId - 1]; } - SharePointSiteCollection item = PackageController.GetPackageItem(itemId) as SharePointSiteCollection; - return item; - } + SharePointSiteCollection item = PackageController.GetPackageItem(itemId) as SharePointSiteCollection; + return item; + } - /// - /// Adds SharePoint site collection. - /// - /// Site collection description. - /// Created site collection id within metabase. - public static int AddSiteCollection(SharePointSiteCollection item) - { - string domainName = item.Name; - // Check account. - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) - { - return accountCheck; - } + /// + /// Adds SharePoint site collection. + /// + /// Site collection description. + /// Created site collection id within metabase. + public static int AddSiteCollection(SharePointSiteCollection item) + { - // Check package. - int packageCheck = SecurityContext.CheckPackage(item.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) - { - return packageCheck; - } + // Check account. + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) + { + return accountCheck; + } - // Check quota. - OrganizationStatistics orgStats = OrganizationController.GetOrganizationStatistics(item.OrganizationId); - //QuotaValueInfo quota = PackageController.GetPackageQuota(item.PackageId, Quotas.HOSTED_SHAREPOINT_SITES); + // Check package. + int packageCheck = SecurityContext.CheckPackage(item.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) + { + return packageCheck; + } - if (orgStats.AllocatedSharePointSiteCollections > -1 - && orgStats.CreatedSharePointSiteCollections >= orgStats.AllocatedSharePointSiteCollections) - { - return BusinessErrorCodes.ERROR_SHAREPOINT_RESOURCE_QUOTA_LIMIT; - } + // Check quota. + OrganizationStatistics orgStats = OrganizationController.GetOrganizationStatistics(item.OrganizationId); + //QuotaValueInfo quota = PackageController.GetPackageQuota(item.PackageId, Quotas.HOSTED_SHAREPOINT_SITES); - // Check if stats resource is available - int serviceId = PackageController.GetPackageServiceId(item.PackageId, ResourceGroups.HostedSharePoint); - if (serviceId == 0) - { - return BusinessErrorCodes.ERROR_SHAREPOINT_RESOURCE_UNAVAILABLE; - } - StringDictionary hostedSharePointSettings = ServerController.GetServiceSettings(serviceId); - Uri rootWebApplicationUri = new Uri(hostedSharePointSettings["RootWebApplicationUri"]); - item.Name = String.Format("{0}://{1}", rootWebApplicationUri.Scheme, item.Name); - if (rootWebApplicationUri.Port > 0 && rootWebApplicationUri.Port != 80 && rootWebApplicationUri.Port != 443) - { - item.PhysicalAddress = String.Format("{0}:{1}", item.Name, rootWebApplicationUri.Port); - } - else - { - item.PhysicalAddress = item.Name; - } + if (orgStats.AllocatedSharePointSiteCollections > -1 + && orgStats.CreatedSharePointSiteCollections >= orgStats.AllocatedSharePointSiteCollections) + { + return BusinessErrorCodes.ERROR_SHAREPOINT_RESOURCE_QUOTA_LIMIT; + } - Organization org = OrganizationController.GetOrganization(item.OrganizationId); + // Check if stats resource is available + int serviceId = PackageController.GetPackageServiceId(item.PackageId, ResourceGroups.HostedSharePoint); + if (serviceId == 0) + { + return BusinessErrorCodes.ERROR_SHAREPOINT_RESOURCE_UNAVAILABLE; + } + + StringDictionary hostedSharePointSettings = ServerController.GetServiceSettings(serviceId); + QuotaValueInfo quota = PackageController.GetPackageQuota(item.PackageId, Quotas.HOSTED_SHAREPOINT_USESHAREDSSL); + Uri rootWebApplicationUri = new Uri(hostedSharePointSettings["RootWebApplicationUri"]); + Organization org = OrganizationController.GetOrganization(item.OrganizationId); + string siteName = item.Name; + + if (quota.QuotaAllocatedValue == 1) + { + string sslRoot = hostedSharePointSettings["SharedSSLRoot"]; + + + string defaultDomain = org.DefaultDomain; + string hostNameBase = string.Empty; + + string[] tmp = defaultDomain.Split('.'); + if (tmp.Length == 2) + { + hostNameBase = tmp[0]; + } + else + { + if (tmp.Length > 2) + { + hostNameBase = tmp[0] + tmp[1]; + } + } + + int counter = 0; + item.Name = String.Format("{0}://{1}", rootWebApplicationUri.Scheme, hostNameBase + "-" + counter.ToString() + "." + sslRoot); + siteName = String.Format("{0}", hostNameBase + "-" + counter.ToString() + "." + sslRoot); + + while (DataProvider.CheckServiceItemExists(serviceId, item.Name, "WebsitePanel.Providers.SharePoint.SharePointSiteCollection, WebsitePanel.Providers.Base")) + { + counter++; + item.Name = String.Format("{0}://{1}", rootWebApplicationUri.Scheme, hostNameBase + "-" + counter.ToString() + "." + sslRoot); + siteName = String.Format("{0}", hostNameBase + "-" + counter.ToString() + "." + sslRoot); + } + } + else + item.Name = String.Format("{0}://{1}", rootWebApplicationUri.Scheme, item.Name); + + if (rootWebApplicationUri.Port > 0 && rootWebApplicationUri.Port != 80 && rootWebApplicationUri.Port != 443) + { + item.PhysicalAddress = String.Format("{0}:{1}", item.Name, rootWebApplicationUri.Port); + } + else + { + item.PhysicalAddress = item.Name; + } + + if (Utils.ParseBool(hostedSharePointSettings["LocalHostFile"], false)) + { + item.RootWebApplicationInteralIpAddress = hostedSharePointSettings["RootWebApplicationInteralIpAddress"]; + item.RootWebApplicationFQDN = item.Name.Replace(rootWebApplicationUri.Scheme + "://", ""); + } item.MaxSiteStorage = RecalculateMaxSize(org.MaxSharePointStorage, (int)item.MaxSiteStorage); - item.WarningStorage = item.MaxSiteStorage == -1 ? -1 : Math.Min((int)item.WarningStorage, item.MaxSiteStorage) ; - - + item.WarningStorage = item.MaxSiteStorage == -1 ? -1 : Math.Min((int)item.WarningStorage, item.MaxSiteStorage); + + // Check package item with given name already exists. - if (PackageController.GetPackageItemByName(item.PackageId, item.Name, typeof(SharePointSiteCollection)) != null) - { - return BusinessErrorCodes.ERROR_SHAREPOINT_PACKAGE_ITEM_EXISTS; - } - - // Log operation. - TaskManager.StartTask("HOSTEDSHAREPOINT", "ADD_SITE_COLLECTION", item.Name); + if (PackageController.GetPackageItemByName(item.PackageId, item.Name, typeof(SharePointSiteCollection)) != null) + { + return BusinessErrorCodes.ERROR_SHAREPOINT_PACKAGE_ITEM_EXISTS; + } + + // Log operation. + TaskManager.StartTask("HOSTEDSHAREPOINT", "ADD_SITE_COLLECTION", item.Name); + + try + { + // Create site collection on server. + HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(serviceId); - try - { - // Create site collection on server. - HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(serviceId); - hostedSharePointServer.CreateSiteCollection(item); - // Make record in metabase. - item.ServiceId = serviceId; - int itemId = PackageController.AddPackageItem(item); - int dnsServiceId = PackageController.GetPackageServiceId(item.PackageId, ResourceGroups.Dns); - if (dnsServiceId > 0) - { - DomainInfo domain = ServerController.GetDomain(domainName); - if (domain != null) - { - string website = domain.WebSiteName; - - if (!String.IsNullOrEmpty(domain.WebSiteName)) + // Make record in metabase. + item.ServiceId = serviceId; + int itemId = PackageController.AddPackageItem(item); + + hostedSharePointServer.SetPeoplePickerOu(item.Name, org.DistinguishedName); + + int dnsServiceId = PackageController.GetPackageServiceId(item.PackageId, ResourceGroups.Dns); + if (dnsServiceId > 0) + { + string[] tmpStr = siteName.Split('.'); + string hostName = tmpStr[0]; + string domainName = siteName.Substring(hostName.Length + 1, siteName.Length - (hostName.Length + 1)); + + DomainInfo domain = ServerController.GetDomain(domainName); + if (domain != null) + { + string website = siteName; + + DnsRecord[] records = ServerController.GetDnsZoneRecords(domain.DomainId); + foreach (DnsRecord record in records) { - DnsRecord[] records = ServerController.GetDnsZoneRecords(domain.DomainId); - foreach (DnsRecord record in records) + if (record.RecordType.Equals(DnsRecordType.A) && (record.RecordName == hostName)) { - if (record.RecordType.Equals(DnsRecordType.A) && String.IsNullOrEmpty(record.RecordName)) - { - ServerController.DeleteDnsZoneRecord(domain.DomainId, String.Empty, DnsRecordType.A, record.RecordData); - break; - } - } - - } - ServerController.AddDnsZoneRecord(domain.DomainId, String.Empty, DnsRecordType.A, hostedSharePointSettings["RootWebApplicationIpAddress"], 0); - } - } - - TaskManager.ItemId = itemId; - return itemId; - } - catch(Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } - - /// - /// Deletes SharePoint site collection with given id. - /// - /// Site collection id within metabase. - /// ? - public static int DeleteSiteCollection(int itemId) - { - // Check account. - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) - { - return accountCheck; - } - - // Load original meta item - SharePointSiteCollection origItem = (SharePointSiteCollection) PackageController.GetPackageItem(itemId); - if (origItem == null) - { - return BusinessErrorCodes.ERROR_SHAREPOINT_PACKAGE_ITEM_NOT_FOUND; - } - - // Get service settings. - StringDictionary hostedSharePointSettings = ServerController.GetServiceSettings(origItem.ServiceId); - Uri rootWebApplicationUri = new Uri(hostedSharePointSettings["RootWebApplicationUri"]); - string domainName = origItem.Name.Replace(String.Format("{0}://", rootWebApplicationUri.Scheme), String.Empty); - - // Log operation. - TaskManager.StartTask("HOSTEDSHAREPOINT", "DELETE_SITE", origItem.Name); - TaskManager.ItemId = itemId; - - try - { - // Delete site collection on server. - HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(origItem.ServiceId); - hostedSharePointServer.DeleteSiteCollection(origItem.Url); - // Delete record in metabase. - PackageController.DeletePackageItem(origItem.Id); - - int dnsServiceId = PackageController.GetPackageServiceId(origItem.PackageId, ResourceGroups.Dns); - if (dnsServiceId > 0) - { - DomainInfo domain = ServerController.GetDomain(domainName); - if (domain != null) - { - ServerController.DeleteDnsZoneRecord(domain.DomainId, String.Empty, DnsRecordType.A, hostedSharePointSettings["RootWebApplicationIpAddress"]); - ServerController.DeleteDnsZoneRecord(domain.DomainId, "www", DnsRecordType.A, hostedSharePointSettings["RootWebApplicationIpAddress"]); - - if (!String.IsNullOrEmpty(domain.WebSiteName)) - { - DnsRecord[] records = ServerController.GetDnsZoneRecords(domain.DomainId); - foreach (DnsRecord record in records) - { - if (record.RecordType.Equals(DnsRecordType.A) && record.RecordName.Equals("www", StringComparison.CurrentCultureIgnoreCase)) - { - ServerController.AddDnsZoneRecord(domain.DomainId, String.Empty, DnsRecordType.A, - record.RecordData, 0); - break; - } + ServerController.DeleteDnsZoneRecord(domain.DomainId, hostName, DnsRecordType.A, record.RecordData); + break; } } - } - } + ServerController.AddDnsZoneRecord(domain.DomainId, hostName, DnsRecordType.A, hostedSharePointSettings["RootWebApplicationIpAddress"], 0, 0, 0, 0); + } + } + TaskManager.ItemId = itemId; + return itemId; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + /// + /// Deletes SharePoint site collection with given id. + /// + /// Site collection id within metabase. + /// ? + public static int DeleteSiteCollection(int itemId) + { + // Check account. + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) + { + return accountCheck; + } - /// - /// Deletes SharePoint site collections which belong to organization. - /// - /// Site collection id within metabase. - public static void DeleteSiteCollections(int organizationId) - { - Organization org = OrganizationController.GetOrganization(organizationId); - SharePointSiteCollectionListPaged existentSiteCollections = GetSiteCollectionsPaged(org.PackageId, org.Id, String.Empty, String.Empty, String.Empty, 0, Int32.MaxValue); - foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections) - { - DeleteSiteCollection(existentSiteCollection.Id); - } - } + // Load original meta item + SharePointSiteCollection origItem = (SharePointSiteCollection)PackageController.GetPackageItem(itemId); + if (origItem == null) + { + return BusinessErrorCodes.ERROR_SHAREPOINT_PACKAGE_ITEM_NOT_FOUND; + } - /// - /// Backups SharePoint site collection. - /// - /// Site collection id within metabase. - /// Backed up site collection file name. - /// A value which shows whether back up must be archived. - /// A value which shows whether created back up must be downloaded. - /// Local folder to store downloaded backup. - /// Created backup file name. - public static string BackupSiteCollection(int itemId, string fileName, bool zipBackup, bool download, string folderName) - { - // Check account. - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) - { - return null; - } + // Get service settings. + StringDictionary hostedSharePointSettings = ServerController.GetServiceSettings(origItem.ServiceId); + Uri rootWebApplicationUri = new Uri(hostedSharePointSettings["RootWebApplicationUri"]); + string siteName = origItem.Name.Replace(String.Format("{0}://", rootWebApplicationUri.Scheme), String.Empty); - // Load original meta item - SharePointSiteCollection origItem = (SharePointSiteCollection)PackageController.GetPackageItem(itemId); - if (origItem == null) - { - return null; - } + // Log operation. + TaskManager.StartTask("HOSTEDSHAREPOINT", "DELETE_SITE", origItem.Name); + TaskManager.ItemId = itemId; - // Log operation. - TaskManager.StartTask("HOSTEDSHAREPOINT", "BACKUP_SITE_COLLECTION", origItem.Name); - TaskManager.ItemId = itemId; + try + { + // Delete site collection on server. + HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(origItem.ServiceId); + hostedSharePointServer.DeleteSiteCollection(origItem); + // Delete record in metabase. + PackageController.DeletePackageItem(origItem.Id); - try - { - // Create site collection on server. - HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(origItem.ServiceId); - string backFile = hostedSharePointServer.BackupSiteCollection(origItem.Name, fileName, zipBackup); + int dnsServiceId = PackageController.GetPackageServiceId(origItem.PackageId, ResourceGroups.Dns); + if (dnsServiceId > 0) + { + string[] tmpStr = siteName.Split('.'); + string hostName = tmpStr[0]; + string domainName = siteName.Substring(hostName.Length + 1, siteName.Length - (hostName.Length + 1)); - if (!download) - { - // Copy backup files to space folder. - string relFolderName = FilesController.CorrectRelativePath(folderName); - if (!relFolderName.EndsWith("\\")) - { - relFolderName = relFolderName + "\\"; - } + DomainInfo domain = ServerController.GetDomain(domainName); + if (domain != null) + { + ServerController.DeleteDnsZoneRecord(domain.DomainId, hostName, DnsRecordType.A, hostedSharePointSettings["RootWebApplicationIpAddress"]); + } + } - // Create backup folder if not exists - if (!FilesController.DirectoryExists(origItem.PackageId, relFolderName)) - { - FilesController.CreateFolder(origItem.PackageId, relFolderName); - } + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } - string packageFile = relFolderName + Path.GetFileName(backFile); + /// + /// Deletes SharePoint site collections which belong to organization. + /// + /// Site collection id within metabase. + public static void DeleteSiteCollections(int organizationId) + { + Organization org = OrganizationController.GetOrganization(organizationId); + SharePointSiteCollectionListPaged existentSiteCollections = GetSiteCollectionsPaged(org.PackageId, org.Id, String.Empty, String.Empty, String.Empty, 0, Int32.MaxValue); + foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections) + { + DeleteSiteCollection(existentSiteCollection.Id); + } + } - // Delete destination file if exists - if (FilesController.FileExists(origItem.PackageId, packageFile)) - { - FilesController.DeleteFiles(origItem.PackageId, new string[] { packageFile }); - } + /// + /// Backups SharePoint site collection. + /// + /// Site collection id within metabase. + /// Backed up site collection file name. + /// A value which shows whether back up must be archived. + /// A value which shows whether created back up must be downloaded. + /// Local folder to store downloaded backup. + /// Created backup file name. + public static string BackupSiteCollection(int itemId, string fileName, bool zipBackup, bool download, string folderName) + { + // Check account. + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) + { + return null; + } - byte[] buffer = null; + // Load original meta item + SharePointSiteCollection origItem = (SharePointSiteCollection)PackageController.GetPackageItem(itemId); + if (origItem == null) + { + return null; + } - int offset = 0; - do - { - // Read remote content. - buffer = hostedSharePointServer.GetTempFileBinaryChunk(backFile, offset, FILE_BUFFER_LENGTH); + // Log operation. + TaskManager.StartTask("HOSTEDSHAREPOINT", "BACKUP_SITE_COLLECTION", origItem.Name); + TaskManager.ItemId = itemId; - // Write remote content. - FilesController.AppendFileBinaryChunk(origItem.PackageId, packageFile, buffer); + try + { + // Create site collection on server. + HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(origItem.ServiceId); + string backFile = hostedSharePointServer.BackupSiteCollection(origItem.Name, fileName, zipBackup); - offset += FILE_BUFFER_LENGTH; - } - while (buffer.Length == FILE_BUFFER_LENGTH); - } + if (!download) + { + // Copy backup files to space folder. + string relFolderName = FilesController.CorrectRelativePath(folderName); + if (!relFolderName.EndsWith("\\")) + { + relFolderName = relFolderName + "\\"; + } - return backFile; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + // Create backup folder if not exists + if (!FilesController.DirectoryExists(origItem.PackageId, relFolderName)) + { + FilesController.CreateFolder(origItem.PackageId, relFolderName); + } - /// - /// Restores SharePoint site collection. - /// - /// Site collection id within metabase. - /// - /// - /// - public static int RestoreSiteCollection(int itemId, string uploadedFile, string packageFile) - { - // Check account. - int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); - if (accountCheck < 0) - { - return accountCheck; - } + string packageFile = relFolderName + Path.GetFileName(backFile); - // Load original meta item. - SharePointSiteCollection origItem = (SharePointSiteCollection)PackageController.GetPackageItem(itemId); - if (origItem == null) - { - return BusinessErrorCodes.ERROR_SHAREPOINT_PACKAGE_ITEM_NOT_FOUND; - } + // Delete destination file if exists + if (FilesController.FileExists(origItem.PackageId, packageFile)) + { + FilesController.DeleteFiles(origItem.PackageId, new string[] { packageFile }); + } - // Check package. - int packageCheck = SecurityContext.CheckPackage(origItem.PackageId, DemandPackage.IsActive); - if (packageCheck < 0) - { - return packageCheck; - } + byte[] buffer = null; - // Log operation. - TaskManager.StartTask("HOSTEDSHAREPOINT", "BACKUP_SITE_COLLECTION", origItem.Name); - TaskManager.ItemId = itemId; + int offset = 0; + do + { + // Read remote content. + buffer = hostedSharePointServer.GetTempFileBinaryChunk(backFile, offset, FILE_BUFFER_LENGTH); - try - { - // Create site collection on server. - HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(origItem.ServiceId); + // Write remote content. + FilesController.AppendFileBinaryChunk(origItem.PackageId, packageFile, buffer); - string backupFile = null; - if (!String.IsNullOrEmpty(packageFile)) - { - // Copy package files to the remote SharePoint Server. - string path = null; - byte[] buffer = null; + offset += FILE_BUFFER_LENGTH; + } + while (buffer.Length == FILE_BUFFER_LENGTH); + } - int offset = 0; - do - { - // Read package file. - buffer = FilesController.GetFileBinaryChunk(origItem.PackageId, packageFile, offset, FILE_BUFFER_LENGTH); + return backFile; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } - // Write remote backup file - string tempPath = hostedSharePointServer.AppendTempFileBinaryChunk(Path.GetFileName(packageFile), path, buffer); - if (path == null) - { - path = tempPath; - backupFile = path; - } + /// + /// Restores SharePoint site collection. + /// + /// Site collection id within metabase. + /// + /// + /// + public static int RestoreSiteCollection(int itemId, string uploadedFile, string packageFile) + { + // Check account. + int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsActive); + if (accountCheck < 0) + { + return accountCheck; + } - offset += FILE_BUFFER_LENGTH; - } - while (buffer.Length == FILE_BUFFER_LENGTH); - } - else if (!String.IsNullOrEmpty(uploadedFile)) - { - // Upladed files. - backupFile = uploadedFile; - } + // Load original meta item. + SharePointSiteCollection origItem = (SharePointSiteCollection)PackageController.GetPackageItem(itemId); + if (origItem == null) + { + return BusinessErrorCodes.ERROR_SHAREPOINT_PACKAGE_ITEM_NOT_FOUND; + } - // Restore. - if (!String.IsNullOrEmpty(backupFile)) - { - hostedSharePointServer.RestoreSiteCollection(origItem, backupFile); - } + // Check package. + int packageCheck = SecurityContext.CheckPackage(origItem.PackageId, DemandPackage.IsActive); + if (packageCheck < 0) + { + return packageCheck; + } - return 0; - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + // Log operation. + TaskManager.StartTask("HOSTEDSHAREPOINT", "BACKUP_SITE_COLLECTION", origItem.Name); + TaskManager.ItemId = itemId; - /// - /// Gets binary data chunk of specified size from specified offset. - /// - /// Item id to obtain realted service id. - /// Path to file to get bunary data chunk from. - /// Offset from which to start data reading. - /// Binary data chunk length. - /// Binary data chunk read from file. - public static byte[] GetBackupBinaryChunk(int itemId, string path, int offset, int length) - { - // Load original meta item. - SharePointSiteCollection item = (SharePointSiteCollection)PackageController.GetPackageItem(itemId); - if (item == null) - { - return null; - } + try + { + // Create site collection on server. + HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(origItem.ServiceId); - HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(item.ServiceId); - return hostedSharePointServer.GetTempFileBinaryChunk(path, offset, length); - } + string backupFile = null; + if (!String.IsNullOrEmpty(packageFile)) + { + // Copy package files to the remote SharePoint Server. + string path = null; + byte[] buffer = null; - /// - /// Appends supplied binary data chunk to file. - /// - /// Item id to obtain realted service id. - /// Non existent file name to append to. - /// Full path to existent file to append to. - /// Binary data chunk to append to. - /// Path to file that was appended with chunk. - public static string AppendBackupBinaryChunk(int itemId, string fileName, string path, byte[] chunk) - { - // Load original meta item. - SharePointSiteCollection item = (SharePointSiteCollection)PackageController.GetPackageItem(itemId); - if (item == null) - { - return null; - } + int offset = 0; + do + { + // Read package file. + buffer = FilesController.GetFileBinaryChunk(origItem.PackageId, packageFile, offset, FILE_BUFFER_LENGTH); - HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(item.ServiceId); - return hostedSharePointServer.AppendTempFileBinaryChunk(fileName, path, chunk); - } + // Write remote backup file + string tempPath = hostedSharePointServer.AppendTempFileBinaryChunk(Path.GetFileName(packageFile), path, buffer); + if (path == null) + { + path = tempPath; + backupFile = path; + } + + offset += FILE_BUFFER_LENGTH; + } + while (buffer.Length == FILE_BUFFER_LENGTH); + } + else if (!String.IsNullOrEmpty(uploadedFile)) + { + // Upladed files. + backupFile = uploadedFile; + } + + // Restore. + if (!String.IsNullOrEmpty(backupFile)) + { + hostedSharePointServer.RestoreSiteCollection(origItem, backupFile); + } + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + + /// + /// Gets binary data chunk of specified size from specified offset. + /// + /// Item id to obtain realted service id. + /// Path to file to get bunary data chunk from. + /// Offset from which to start data reading. + /// Binary data chunk length. + /// Binary data chunk read from file. + public static byte[] GetBackupBinaryChunk(int itemId, string path, int offset, int length) + { + // Load original meta item. + SharePointSiteCollection item = (SharePointSiteCollection)PackageController.GetPackageItem(itemId); + if (item == null) + { + return null; + } + + HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(item.ServiceId); + return hostedSharePointServer.GetTempFileBinaryChunk(path, offset, length); + } + + /// + /// Appends supplied binary data chunk to file. + /// + /// Item id to obtain realted service id. + /// Non existent file name to append to. + /// Full path to existent file to append to. + /// Binary data chunk to append to. + /// Path to file that was appended with chunk. + public static string AppendBackupBinaryChunk(int itemId, string fileName, string path, byte[] chunk) + { + // Load original meta item. + SharePointSiteCollection item = (SharePointSiteCollection)PackageController.GetPackageItem(itemId); + if (item == null) + { + return null; + } + + HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(item.ServiceId); + return hostedSharePointServer.AppendTempFileBinaryChunk(fileName, path, chunk); + } + + /// + /// Initializes a new hosted SharePoint server proxy. + /// + /// Hosted SharePoint service id. + /// Hosted SharePoint server proxy. + private static HostedSharePointServer GetHostedSharePointServer(int serviceId) + { - /// - /// Initializes a new hosted SharePoint server proxy. - /// - /// Hosted SharePoint service id. - /// Hosted SharePoint server proxy. - private static HostedSharePointServer GetHostedSharePointServer(int serviceId) - { - HostedSharePointServer sps = new HostedSharePointServer(); - ServiceProviderProxy.Init(sps, serviceId); - return sps; - } + ServiceProviderProxy.Init(sps, serviceId); + return sps; + } - /// - /// Gets list of importable items. - /// - /// Package that owns importable items. - /// Item type id. - /// Item type. - /// Item resource group. - /// List of importable item names. - public List GetImportableItems(int packageId, int itemTypeId, Type itemType, ResourceGroupInfo group) - { - List items = new List(); + /// + /// Gets list of importable items. + /// + /// Package that owns importable items. + /// Item type id. + /// Item type. + /// Item resource group. + /// List of importable item names. + public List GetImportableItems(int packageId, int itemTypeId, Type itemType, ResourceGroupInfo group) + { + List items = new List(); - // Get service id - int serviceId = PackageController.GetPackageServiceId(packageId, group.GroupName); - if (serviceId == 0) - { - return items; - } + // Get service id + int serviceId = PackageController.GetPackageServiceId(packageId, group.GroupName); + if (serviceId == 0) + { + return items; + } - HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(serviceId); - if (itemType == typeof(SharePointSiteCollection)) - { - foreach (SharePointSiteCollection siteCollection in hostedSharePointServer.GetSiteCollections()) - { - items.Add(siteCollection.Url); - } - } + HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(serviceId); + if (itemType == typeof(SharePointSiteCollection)) + { + foreach (SharePointSiteCollection siteCollection in hostedSharePointServer.GetSiteCollections()) + { + items.Add(siteCollection.Url); + } + } - return items; - } + return items; + } - /// - /// Imports selected item into metabase. - /// - /// Package to which items must be imported. - /// Item type id. - /// Item type. - /// Item resource group. - /// Item name to import. - public void ImportItem(int packageId, int itemTypeId, Type itemType, ResourceGroupInfo group, string itemName) - { - // Get service id - int serviceId = PackageController.GetPackageServiceId(packageId, group.GroupName); - if (serviceId == 0) - { - return; - } + /// + /// Imports selected item into metabase. + /// + /// Package to which items must be imported. + /// Item type id. + /// Item type. + /// Item resource group. + /// Item name to import. + public void ImportItem(int packageId, int itemTypeId, Type itemType, ResourceGroupInfo group, string itemName) + { + // Get service id + int serviceId = PackageController.GetPackageServiceId(packageId, group.GroupName); + if (serviceId == 0) + { + return; + } - HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(serviceId); - if (itemType == typeof(SharePointSiteCollection)) - { - SharePointSiteCollection siteCollection = hostedSharePointServer.GetSiteCollection(itemName); - PackageController.AddPackageItem(siteCollection); - } - } + HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(serviceId); + if (itemType == typeof(SharePointSiteCollection)) + { + SharePointSiteCollection siteCollection = hostedSharePointServer.GetSiteCollection(itemName); + PackageController.AddPackageItem(siteCollection); + } + } - /// - /// Backups service item by serializing it into supplied writer. - /// - /// Temporary directory path. - /// Xml wirter used to store backuped service provider items. - /// Service provider item to be backed up.. - /// Service provider resource group. - /// Resulting code. - public int BackupItem(string tempFolder, XmlWriter writer, ServiceProviderItem item, ResourceGroupInfo group) - { - SharePointSiteCollection siteCollection = item as SharePointSiteCollection; - if (siteCollection != null) - { - HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(siteCollection.ServiceId); - SharePointSiteCollection loadedSiteCollection = hostedSharePointServer.GetSiteCollection(siteCollection.Url); - // Update item - siteCollection.Url = loadedSiteCollection.Url; - siteCollection.OwnerLogin = loadedSiteCollection.OwnerLogin; - siteCollection.OwnerName = loadedSiteCollection.OwnerName; - siteCollection.OwnerEmail = loadedSiteCollection.OwnerEmail; - siteCollection.LocaleId = loadedSiteCollection.LocaleId; - siteCollection.Title = loadedSiteCollection.Title; - siteCollection.Description = loadedSiteCollection.Description; - // Serialize it. - XmlSerializer serializer = new XmlSerializer(typeof(SharePointSiteCollection)); - serializer.Serialize(writer, siteCollection); + /// + /// Backups service item by serializing it into supplied writer. + /// + /// Temporary directory path. + /// Xml wirter used to store backuped service provider items. + /// Service provider item to be backed up.. + /// Service provider resource group. + /// Resulting code. + public int BackupItem(string tempFolder, XmlWriter writer, ServiceProviderItem item, ResourceGroupInfo group) + { + SharePointSiteCollection siteCollection = item as SharePointSiteCollection; + if (siteCollection != null) + { + HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(siteCollection.ServiceId); + SharePointSiteCollection loadedSiteCollection = hostedSharePointServer.GetSiteCollection(siteCollection.Url); + // Update item + siteCollection.Url = loadedSiteCollection.Url; + siteCollection.OwnerLogin = loadedSiteCollection.OwnerLogin; + siteCollection.OwnerName = loadedSiteCollection.OwnerName; + siteCollection.OwnerEmail = loadedSiteCollection.OwnerEmail; + siteCollection.LocaleId = loadedSiteCollection.LocaleId; + siteCollection.Title = loadedSiteCollection.Title; + siteCollection.Description = loadedSiteCollection.Description; + // Serialize it. + XmlSerializer serializer = new XmlSerializer(typeof(SharePointSiteCollection)); + serializer.Serialize(writer, siteCollection); - } - return 0; - } + } + return 0; + } - /// - /// Restore backed up previously service provider item. - /// - /// Temporary directory path. - /// Serialized service provider item. - /// Service provider item id. - /// Service provider item type. - /// Service provider item name. - /// Service provider item package. - /// Service provider item service id. - /// Service provider item resource group. - /// Resulting code. - public int RestoreItem(string tempFolder, XmlNode itemNode, int itemId, Type itemType, string itemName, int packageId, int serviceId, ResourceGroupInfo group) - { - if (itemType == typeof(SharePointSiteCollection)) - { - HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(serviceId); - // Deserialize item. - XmlSerializer serializer = new XmlSerializer(typeof(SharePointSiteCollection)); - SharePointSiteCollection siteCollection = (SharePointSiteCollection)serializer.Deserialize(new XmlNodeReader(itemNode.SelectSingleNode("SharePointSiteCollection"))); - siteCollection.PackageId = packageId; - siteCollection.ServiceId = serviceId; + /// + /// Restore backed up previously service provider item. + /// + /// Temporary directory path. + /// Serialized service provider item. + /// Service provider item id. + /// Service provider item type. + /// Service provider item name. + /// Service provider item package. + /// Service provider item service id. + /// Service provider item resource group. + /// Resulting code. + public int RestoreItem(string tempFolder, XmlNode itemNode, int itemId, Type itemType, string itemName, int packageId, int serviceId, ResourceGroupInfo group) + { + if (itemType == typeof(SharePointSiteCollection)) + { + HostedSharePointServer hostedSharePointServer = GetHostedSharePointServer(serviceId); + // Deserialize item. + XmlSerializer serializer = new XmlSerializer(typeof(SharePointSiteCollection)); + SharePointSiteCollection siteCollection = (SharePointSiteCollection)serializer.Deserialize(new XmlNodeReader(itemNode.SelectSingleNode("SharePointSiteCollection"))); + siteCollection.PackageId = packageId; + siteCollection.ServiceId = serviceId; - // Create site collection if needed. - if (hostedSharePointServer.GetSiteCollection(siteCollection.Url) == null) - { - hostedSharePointServer.CreateSiteCollection(siteCollection); - } + // Create site collection if needed. + if (hostedSharePointServer.GetSiteCollection(siteCollection.Url) == null) + { + hostedSharePointServer.CreateSiteCollection(siteCollection); + } + + // Add metabase record if needed. + SharePointSiteCollection metaSiteCollection = (SharePointSiteCollection)PackageController.GetPackageItemByName(packageId, itemName, typeof(SharePointSiteCollection)); + if (metaSiteCollection == null) + { + PackageController.AddPackageItem(siteCollection); + } + } + + return 0; + } - // Add metabase record if needed. - SharePointSiteCollection metaSiteCollection = (SharePointSiteCollection)PackageController.GetPackageItemByName(packageId, itemName, typeof(SharePointSiteCollection)); - if (metaSiteCollection == null) - { - PackageController.AddPackageItem(siteCollection); - } - } - return 0; - } - - private static int GetHostedSharePointServiceId(int packageId) { return PackageController.GetPackageServiceId(packageId, ResourceGroups.HostedSharePoint); } - + private static List GetOrganizationSharePointSiteCollections(int orgId) { Organization org = OrganizationController.GetOrganization(orgId); @@ -776,18 +810,18 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint SharePointSiteCollectionListPaged siteCollections = GetSiteCollectionsPaged(org.PackageId, org.Id, String.Empty, String.Empty, String.Empty, 0, Int32.MaxValue); return siteCollections.SiteCollections; } - + private static int RecalculateStorageMaxSize(int size, int packageId) - { + { PackageContext cntx = PackageController.GetPackageContext(packageId); - QuotaValueInfo quota = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_STORAGE_SIZE]; + QuotaValueInfo quota = cntx.Quotas[Quotas.HOSTED_SHAREPOINT_STORAGE_SIZE]; if (quota.QuotaAllocatedValue == -1) { if (size == -1)//Unlimited return -1; else - return size; + return size; } else { @@ -795,7 +829,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint return quota.QuotaAllocatedValue; return Math.Min(size, quota.QuotaAllocatedValue); - } + } } private static int RecalculateMaxSize(int parentSize, int realSize) @@ -815,8 +849,8 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint return Math.Min(parentSize, realSize); } - - + + public static int SetStorageSettings(int itemId, int maxStorage, int warningStorage, bool applyToSiteCollections) { // check account @@ -831,15 +865,15 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint { Organization org = (Organization)PackageController.GetPackageItem(itemId); if (org == null) - return 0; + return 0; // set limits int realMaxSizeValue = RecalculateStorageMaxSize(maxStorage, org.PackageId); org.MaxSharePointStorage = realMaxSizeValue; - org.WarningSharePointStorage = realMaxSizeValue == -1 ? -1 : Math.Min(warningStorage, realMaxSizeValue); - + org.WarningSharePointStorage = realMaxSizeValue == -1 ? -1 : Math.Min(warningStorage, realMaxSizeValue); + // save organization UpdateOrganization(org); @@ -851,9 +885,9 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint List currentOrgSiteCollection = GetOrganizationSharePointSiteCollections(org.Id); - - - foreach( SharePointSiteCollection siteCollection in currentOrgSiteCollection) + + + foreach (SharePointSiteCollection siteCollection in currentOrgSiteCollection) { try { @@ -861,17 +895,17 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint sc.MaxSiteStorage = realMaxSizeValue; sc.WarningStorage = realMaxSizeValue == -1 ? -1 : warningStorage; PackageController.UpdatePackageItem(sc); - + hostedSharePointServer.UpdateQuotas(siteCollection.PhysicalAddress, realMaxSizeValue, warningStorage); } - catch(Exception ex) + catch (Exception ex) { TaskManager.WriteError(ex); } - } + } } - + return 0; } catch (Exception ex) @@ -894,14 +928,14 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint { errorCode = accountCheck; return null; - } + } // place log record TaskManager.StartTask("HOSTED_SHAREPOINT", "CALCULATE_DISK_SPACE"); TaskManager.ItemId = itemId; try { - Organization org = (Organization) PackageController.GetPackageItem(itemId); + Organization org = (Organization)PackageController.GetPackageItem(itemId); if (org == null) return null; @@ -917,7 +951,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint { urls.Add(siteCollection.PhysicalAddress); } - if (urls.Count > 0) + if (urls.Count > 0) retDiskSpace = hostedSharePointServer.CalculateSiteCollectionsDiskSpace(urls.ToArray()); else { @@ -927,7 +961,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint retDiskSpace[0].Url = string.Empty; } } - catch(Exception ex) + catch (Exception ex) { throw TaskManager.WriteError(ex); } @@ -935,10 +969,10 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint { TaskManager.CompleteTask(); } - return retDiskSpace; + return retDiskSpace; } - private static void UpdateOrganization(Organization organization) + private static void UpdateOrganization(Organization organization) { PackageController.UpdatePackageItem(organization); } @@ -949,7 +983,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint TaskManager.StartTask("HOSTED_SHAREPOINT", "UPDATE_QUOTA"); try { - Organization org = (Organization) PackageController.GetPackageItem(itemId); + Organization org = (Organization)PackageController.GetPackageItem(itemId); if (org == null) return; @@ -960,7 +994,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint SharePointSiteCollection sc = GetSiteCollection(siteCollectionId); int maxSize = RecalculateMaxSize(org.MaxSharePointStorage, maxStorage); - int warningSize = warningStorage; + int warningSize = warningStorage; sc.MaxSiteStorage = maxSize; @@ -970,7 +1004,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint hostedSharePointServer.UpdateQuotas(sc.PhysicalAddress, maxSize, warningStorage); } - catch(Exception ex) + catch (Exception ex) { throw TaskManager.WriteError(ex); } @@ -989,5 +1023,5 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint return (SecurityContext.CheckAccount(DemandAccount.NotDemo) < 0); } } - } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/SharePointServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/SharePointServerController.cs index fa340fc2..5e3692dd 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/SharePointServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/SharePoint/SharePointServerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/StatisticsServers/StatisticsServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/StatisticsServers/StatisticsServerController.cs index 39765105..1f060c99 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/StatisticsServers/StatisticsServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/StatisticsServers/StatisticsServerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/System/SystemController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/System/SystemController.cs index 9f0a425b..322e30d6 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/System/SystemController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/System/SystemController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/SendEmailNotification.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/SendEmailNotification.cs index daca3f97..67d246b2 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/SendEmailNotification.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/SendEmailNotification.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskEventHandler.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskEventHandler.cs index 43dc9f82..87c6943d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskEventHandler.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskEventHandler.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskManager.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskManager.cs index a72245fd..e482544d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Tasks/TaskManager.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserAsyncWorker.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserAsyncWorker.cs index dbaa3274..d5a66597 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserAsyncWorker.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserAsyncWorker.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserController.cs index 9b3e86b8..8ca4b341 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Users/UserController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -49,56 +49,92 @@ namespace WebsitePanel.EnterpriseServer return (user != null); } - public static int AuthenticateUser(string username, string password, string ip) - { - // start task - TaskManager.StartTask("USER", "AUTHENTICATE", username); - TaskManager.WriteParameter("IP", ip); + public static int AuthenticateUser(string username, string password, string ip) + { + // start task + TaskManager.StartTask("USER", "AUTHENTICATE", username); + TaskManager.WriteParameter("IP", ip); - try - { - // try to get user from database - UserInfo user = GetUserInternally(username); + try + { + // try to get user from database + UserInfo user = GetUserInternally(username); - // check if the user exists - if (user == null) - { - TaskManager.WriteWarning("Wrong username"); - return BusinessErrorCodes.ERROR_USER_WRONG_USERNAME; - } + // check if the user exists + if (user == null) + { + TaskManager.WriteWarning("Wrong username"); + return BusinessErrorCodes.ERROR_USER_WRONG_USERNAME; + } - // compare user passwords - if (user.Password != password) - { - TaskManager.WriteWarning("Wrong password"); - return BusinessErrorCodes.ERROR_USER_WRONG_PASSWORD; - } + // check if the user is disabled + if (user.LoginStatus == UserLoginStatus.Disabled) + { + TaskManager.WriteWarning("User disabled"); + return BusinessErrorCodes.ERROR_USER_ACCOUNT_DISABLED; + } - // check status - if (user.Status == UserStatus.Cancelled) - { - TaskManager.WriteWarning("Account cancelled"); - return BusinessErrorCodes.ERROR_USER_ACCOUNT_CANCELLED; - } + // check if the user is locked out + if (user.LoginStatus == UserLoginStatus.LockedOut) + { + TaskManager.WriteWarning("User locked out"); + return BusinessErrorCodes.ERROR_USER_ACCOUNT_LOCKEDOUT; + } - if (user.Status == UserStatus.Pending) - { - TaskManager.WriteWarning("Account pending"); - return BusinessErrorCodes.ERROR_USER_ACCOUNT_PENDING; - } + //Get the password policy + UserSettings userSettings = UserController.GetUserSettings(user.UserId, UserSettings.WEBSITEPANEL_POLICY); + int lockOut = -1; - return 0; + if (!string.IsNullOrEmpty(userSettings["PasswordPolicy"])) + { + string passwordPolicy = userSettings["PasswordPolicy"]; + try + { + // parse settings + string[] parts = passwordPolicy.Split(';'); + lockOut = Convert.ToInt32(parts[7]); + } + catch { /* skip */ } + } - } - catch (Exception ex) - { - throw TaskManager.WriteError(ex); - } - finally - { - TaskManager.CompleteTask(); - } - } + + // compare user passwords + if (user.Password != password) + { + if (lockOut >= 0) + DataProvider.UpdateUserFailedLoginAttempt(user.UserId, lockOut, false); + + TaskManager.WriteWarning("Wrong password"); + return BusinessErrorCodes.ERROR_USER_WRONG_PASSWORD; + } + else + DataProvider.UpdateUserFailedLoginAttempt(user.UserId, lockOut, true); + + // check status + if (user.Status == UserStatus.Cancelled) + { + TaskManager.WriteWarning("Account cancelled"); + return BusinessErrorCodes.ERROR_USER_ACCOUNT_CANCELLED; + } + + if (user.Status == UserStatus.Pending) + { + TaskManager.WriteWarning("Account pending"); + return BusinessErrorCodes.ERROR_USER_ACCOUNT_PENDING; + } + + return 0; + + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } public static UserInfo GetUserByUsernamePassword(string username, string password, string ip) { @@ -382,6 +418,7 @@ namespace WebsitePanel.EnterpriseServer user.OwnerId, user.RoleId, user.StatusId, + user.LoginStatusId, user.IsDemo, user.IsPeer, user.Comments, @@ -525,6 +562,7 @@ namespace WebsitePanel.EnterpriseServer user.UserId, user.RoleId, user.StatusId, + user.LoginStatusId, user.IsDemo, user.IsPeer, user.Comments, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/CreateServerAsyncWorker.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/CreateServerAsyncWorker.cs index f0d8d6da..41109b1d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/CreateServerAsyncWorker.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/CreateServerAsyncWorker.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/VirtualizationServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/VirtualizationServerController.cs index 4268e160..cf48a5e5 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/VirtualizationServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Virtualization/VirtualizationServerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/CreateServerAsyncWorkerForPrivateCloud.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/CreateServerAsyncWorkerForPrivateCloud.cs index 6c2f3d28..ddd2778b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/CreateServerAsyncWorkerForPrivateCloud.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/CreateServerAsyncWorkerForPrivateCloud.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/VirtualizationServerControllerForPrivateCloud.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/VirtualizationServerControllerForPrivateCloud.cs index 0742287c..5b71992e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/VirtualizationServerControllerForPrivateCloud.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/VirtualizationForPrivateCloud/VirtualizationServerControllerForPrivateCloud.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebAppGallery/WebAppGalleryController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebAppGallery/WebAppGalleryController.cs index 49a4338d..a2a0fd24 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebAppGallery/WebAppGalleryController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebAppGallery/WebAppGalleryController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -62,6 +62,88 @@ namespace WebsitePanel.EnterpriseServer public const string GET_GALLERY_CATEGORIES_TASK = "GET_GALLERY_CATEGORIES_TASK"; #endregion + private static string[] getFeedsFromSettings(int packageId) + { + int serviceId = PackageController.GetPackageServiceId(packageId, ResourceGroups.Web); + + return getFeedsFromSettingsByServiceId(serviceId); + + } + + private static string[] getFeedsFromSettingsByServiceId(int serviceId) + { + StringDictionary serviceSettings = ServerController.GetServiceSettings(serviceId); + + List arFeeds = new List(); + + if (Utils.ParseBool(serviceSettings["FeedEnableMicrosoft"], true)) + { + arFeeds.Add("https://www.microsoft.com/web/webpi/3.0/WebProductList.xml"); + } + + if (Utils.ParseBool(serviceSettings["FeedEnableHelicon"], true)) + { + arFeeds.Add("http://www.helicontech.com/zoo/feed/wsp"); + } + + string additionalFeeds = serviceSettings["FeedUrls"]; + if (!string.IsNullOrEmpty(additionalFeeds)) + { + arFeeds.AddRange(additionalFeeds.Split(';')); + } + + return arFeeds.ToArray(); + } + public static void InitFeedsByServiceId(int UserId, int serviceId) + { + string[] feeds = getFeedsFromSettingsByServiceId(serviceId); + + WebServer webServer = WebServerController.GetWebServer(serviceId); + webServer.InitFeeds(UserId, feeds); + } + + + + public static void InitFeeds(int UserId, int packageId) + { + string[] feeds = getFeedsFromSettings(packageId); + + // Set feeds + WebServer webServer = GetAssociatedWebServer(packageId); + webServer.InitFeeds(UserId, feeds); + + } + + public static void SetResourceLanguage(int packageId, string resourceLanguage) + { + GetAssociatedWebServer(packageId).SetResourceLanguage(SecurityContext.User.UserId,resourceLanguage); + } + + + public static GalleryLanguagesResult GetGalleryLanguages(int packageId) + { + GalleryLanguagesResult result; + + try + { + WebServer webServer = GetAssociatedWebServer(packageId); + result = webServer.GetGalleryLanguages(SecurityContext.User.UserId); + + if (!result.IsSuccess) + return Error(result, GalleryErrors.GetLanguagesError); + } + catch (Exception ex) + { + return Error(GalleryErrors.GetLanguagesError, ex.Message); + } + finally + { + } + // + return result; + + } + public static GalleryCategoriesResult GetGalleryCategories(int packageId) { GalleryCategoriesResult result; @@ -77,7 +159,7 @@ namespace WebsitePanel.EnterpriseServer return Error(GalleryErrors.MsDeployIsNotInstalled); // get categories - result = webServer.GetGalleryCategories(); + result = webServer.GetGalleryCategories(SecurityContext.User.UserId); if (!result.IsSuccess) return Error(result, GalleryErrors.GetCategoriesError); @@ -114,7 +196,7 @@ namespace WebsitePanel.EnterpriseServer return Error(GalleryErrors.MsDeployIsNotInstalled); // get applications - result = webServer.GetGalleryApplications(String.Empty); + result = webServer.GetGalleryApplications(SecurityContext.User.UserId,String.Empty); if (!result.IsSuccess) return Error(result, GalleryErrors.GetApplicationsError); @@ -132,7 +214,7 @@ namespace WebsitePanel.EnterpriseServer return result; } - public static GalleryApplicationsResult GetGalleryApplications(int packageId, string categoryId) + public static GalleryApplicationsResult GetGalleryApplications(int packageId, string categoryId) { GalleryApplicationsResult result; // @@ -146,7 +228,7 @@ namespace WebsitePanel.EnterpriseServer return Error(GalleryErrors.MsDeployIsNotInstalled); // get applications - result = webServer.GetGalleryApplications(categoryId); + result = webServer.GetGalleryApplications(SecurityContext.User.UserId,categoryId); if (!result.IsSuccess) return Error(result, GalleryErrors.GetApplicationsError); @@ -169,10 +251,11 @@ namespace WebsitePanel.EnterpriseServer //{ // appsFilter.AddRange(SupportedAppDependencies.PHP_SCRIPTING); //} - //// if either MSSQL 2000, 2005 or 2008 enabled in the hosting plan + //// if either MSSQL 2000, 2005, 2008 or 2012 enabled in the hosting plan //if (context.Groups.ContainsKey(ResourceGroups.MsSql2000) || // context.Groups.ContainsKey(ResourceGroups.MsSql2005) || - // context.Groups.ContainsKey(ResourceGroups.MsSql2008)) + // context.Groups.ContainsKey(ResourceGroups.MsSql2008) || + // context.Groups.ContainsKey(ResourceGroups.MsSql2012)) //{ // appsFilter.AddRange(SupportedAppDependencies.MSSQL_DATABASE); //} @@ -188,20 +271,8 @@ namespace WebsitePanel.EnterpriseServer // || MatchMenaltoGalleryApp(x, appsFilter.ToArray()))); { - int userId = SecurityContext.User.UserId; - // - SecurityContext.SetThreadSupervisorPrincipal(); - // - string[] filteredApps = GetServiceAppsCatalogFilter(packageId); - // - if (filteredApps != null) - { - result.Value = new List(Array.FindAll(result.Value.ToArray(), - x => !Array.Exists(filteredApps, - z => z.Equals(x.Id, StringComparison.InvariantCultureIgnoreCase)))); - } - // - SecurityContext.SetThreadPrincipal(userId); + FilterResultApplications(packageId, result); + } } catch (Exception ex) @@ -217,6 +288,61 @@ namespace WebsitePanel.EnterpriseServer return result; } + private static void FilterResultApplications(int packageId, GalleryApplicationsResult result) + { + int userId = SecurityContext.User.UserId; + // + SecurityContext.SetThreadSupervisorPrincipal(); + // + string[] filteredApps = GetServiceAppsCatalogFilter(packageId); + // + if (filteredApps != null) + { + result.Value = new List(Array.FindAll(result.Value.ToArray(), + x => !Array.Exists(filteredApps, + z => z.Equals(x.Id, StringComparison.InvariantCultureIgnoreCase)))); + } + // + SecurityContext.SetThreadPrincipal(userId); + } + + public static GalleryApplicationsResult GetGalleryApplicationsFiltered(int packageId, string pattern) + { + GalleryApplicationsResult result; + // + try + { + TaskManager.StartTask(TASK_MANAGER_SOURCE, GET_GALLERY_APPS_TASK); + + // check if WAG is installed + WebServer webServer = GetAssociatedWebServer(packageId); + if (!webServer.IsMsDeployInstalled()) + return Error(GalleryErrors.MsDeployIsNotInstalled); + + // get applications + result = webServer.GetGalleryApplicationsFiltered(SecurityContext.User.UserId,pattern); + + FilterResultApplications(packageId, result); + + if (!result.IsSuccess) + return Error(result, GalleryErrors.GetApplicationsError); + + } + catch (Exception ex) + { + TaskManager.WriteError(ex); + return Error(GalleryErrors.GeneralError, ex.Message); + } + finally + { + TaskManager.CompleteTask(); + } + // + return result; + + } + + internal static bool MatchParticularAppDependency(Dependency dependency, string[] dependencyIds) { List nested = null; @@ -310,7 +436,7 @@ namespace WebsitePanel.EnterpriseServer return Error(GalleryErrors.MsDeployIsNotInstalled); // get application details - result = webServer.GetGalleryApplication(applicationId); + result = webServer.GetGalleryApplication(SecurityContext.User.UserId,applicationId); if (!result.IsSuccess) return Error(result, GalleryErrors.GetApplicationError); @@ -342,6 +468,7 @@ namespace WebsitePanel.EnterpriseServer !(context.Groups.ContainsKey(ResourceGroups.MsSql2000) || context.Groups.ContainsKey(ResourceGroups.MsSql2005) || context.Groups.ContainsKey(ResourceGroups.MsSql2008) + || context.Groups.ContainsKey(ResourceGroups.MsSql2012) || context.Groups.ContainsKey(ResourceGroups.MySql4) || context.Groups.ContainsKey(ResourceGroups.MySql5))) result.ErrorCodes.Add(GalleryErrors.DatabaseRequired); @@ -350,7 +477,8 @@ namespace WebsitePanel.EnterpriseServer else if ((app.WellKnownDependencies & GalleryApplicationWellKnownDependency.SQL) == GalleryApplicationWellKnownDependency.SQL && !(context.Groups.ContainsKey(ResourceGroups.MsSql2000) || context.Groups.ContainsKey(ResourceGroups.MsSql2005) - || context.Groups.ContainsKey(ResourceGroups.MsSql2008))) + || context.Groups.ContainsKey(ResourceGroups.MsSql2008) + || context.Groups.ContainsKey(ResourceGroups.MsSql2012))) result.ErrorCodes.Add(GalleryErrors.SQLRequired); // MySQL @@ -393,7 +521,7 @@ namespace WebsitePanel.EnterpriseServer return Error(GalleryErrors.MsDeployIsNotInstalled); // get parameters - result = webServer.GetGalleryApplicationParameters(webAppId); + result = webServer.GetGalleryApplicationParameters(SecurityContext.User.UserId,webAppId); if (!result.IsSuccess) return Error(result, GalleryErrors.GetApplicationParametersError); @@ -411,9 +539,10 @@ namespace WebsitePanel.EnterpriseServer return result; } - public static StringResultObject Install(int packageId, string webAppId, string siteName, string virtualDir, List parameters) + public static StringResultObject Install(int packageId, string webAppId, string siteName, string virtualDir, List parameters, string languageId ) { StringResultObject result = new StringResultObject(); + int originalUserId = SecurityContext.User.UserId; try { @@ -452,7 +581,7 @@ namespace WebsitePanel.EnterpriseServer return Error(GalleryErrors.WebSiteNotFound, siteName); // get application pack details - GalleryApplicationResult app = webServer.GetGalleryApplication(webAppId); + GalleryApplicationResult app = webServer.GetGalleryApplication(SecurityContext.User.UserId,webAppId); if (!app.IsSuccess) return Error(app, GalleryErrors.GeneralError); if (app.Value == null) @@ -640,7 +769,7 @@ namespace WebsitePanel.EnterpriseServer } // install application - result = webServer.InstallGalleryApplication(webAppId, parameters.ToArray()); + result = webServer.InstallGalleryApplication(originalUserId, webAppId, parameters.ToArray(), languageId); #region Rollback in case of failure // Rollback - remove resources have been created previously @@ -662,12 +791,25 @@ namespace WebsitePanel.EnterpriseServer #region Update Web Application settings WebVirtualDirectory iisApp = null; - if(String.IsNullOrEmpty(virtualDir)) - // load web site - iisApp = WebServerController.GetWebSite(packageId, siteName); - else - // load virtual directory - iisApp = WebServerController.GetVirtualDirectory(webSite.Id, virtualDir); + if (String.IsNullOrEmpty(virtualDir)) + // load web site + iisApp = WebServerController.GetWebSite(packageId, siteName); + else + { + try + { + // load virtual directory + iisApp = WebServerController.GetVirtualDirectory(webSite.Id, virtualDir); + } + catch (Exception ex) + { + throw new Exception( + string.Format( + "{0} on WebServerController.GetVirtualDirectory(\"{1}\", \"{2}\")", + ex.GetType(), webSite.Id, virtualDir), + ex); + } + } // put correct extensions if ((app.Value.WellKnownDependencies & GalleryApplicationWellKnownDependency.AspNet20) == GalleryApplicationWellKnownDependency.AspNet20) @@ -711,7 +853,10 @@ namespace WebsitePanel.EnterpriseServer TaskManager.WriteError(ex); // exit with error code - return Error(GalleryErrors.GeneralError); + //return Error(GalleryErrors.GeneralError); + + result.AddError(GalleryErrors.GeneralError, ex); + return result; } finally { @@ -743,11 +888,11 @@ namespace WebsitePanel.EnterpriseServer if (!webServer.IsMsDeployInstalled()) return Error(GalleryErrors.MsDeployIsNotInstalled); // - GalleryWebAppStatus appStatus = webServer.GetGalleryApplicationStatus(webAppId); + GalleryWebAppStatus appStatus = webServer.GetGalleryApplicationStatus(SecurityContext.User.UserId,webAppId); // if (appStatus == GalleryWebAppStatus.NotDownloaded) { - GalleryApplicationResult appResult = webServer.GetGalleryApplication(webAppId); + GalleryApplicationResult appResult = webServer.GetGalleryApplication(SecurityContext.User.UserId,webAppId); // Start app download in new thread WebAppGalleryAsyncWorker async = new WebAppGalleryAsyncWorker(); async.GalleryApp = appResult.Value; @@ -894,7 +1039,7 @@ namespace WebsitePanel.EnterpriseServer // TaskManager.Write("Application package download has been started"); // - GalleryWebAppStatus appStatus = webServer.DownloadGalleryApplication(WebAppId); + GalleryWebAppStatus appStatus = webServer.DownloadGalleryApplication(SecurityContext.User.UserId,WebAppId); // if (appStatus == GalleryWebAppStatus.Failed) { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs index 28089a6e..db512686 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/WebServers/WebServerController.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -404,6 +404,13 @@ namespace WebsitePanel.EnterpriseServer if (!String.IsNullOrEmpty(pageName) && pageContent != null) { + + if (Utils.ParseBool(webPolicy["EnableParkingPageTokens"], false)) + { + pageContent = pageContent.Replace("[DOMAIN_NAME]", site.Name); + pageContent = pageContent.Replace("[SITE_IP]", site.SiteIPAddress); + + } string path = Path.Combine( FilesController.GetVirtualPackagePath(packageId, site.ContentPath), pageName); @@ -2708,6 +2715,12 @@ namespace WebsitePanel.EnterpriseServer // WebServer server = GetWebServer(item.ServiceId); + StringDictionary webSettings = ServerController.GetServiceSettings(item.ServiceId); + if (webSettings["WmSvc.NETBIOS"] != null) + { + accountName = webSettings["WmSvc.NETBIOS"].ToString() + "\\" + accountName; + } + // if (server.CheckWebManagementAccountExists(accountName)) { diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/UserCreationWizard.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/UserCreationWizard.cs index 281df7eb..1ba6e220 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/UserCreationWizard.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/UserCreationWizard.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -173,7 +173,7 @@ namespace WebsitePanel.EnterpriseServer domain.PackageId = createdPackageId; domain.DomainName = domainName; domain.HostingAllowed = false; - domainId = ServerController.AddDomain(domain, !tempDomain); + domainId = ServerController.AddDomain(domain, false, !tempDomain); if (domainId < 0) { // rollback wizard diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/WebApplicationsInstaller.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/WebApplicationsInstaller.cs index e1d529bb..8ae1f11b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/WebApplicationsInstaller.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Code/Wizards/WebApplicationsInstaller.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Default.aspx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Default.aspx.cs index 3066b471..6b51871f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Default.aspx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Default.aspx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Global.asax.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Global.asax.cs index 620849c1..a1dc2caa 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Global.asax.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Global.asax.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config index 3af7ac75..1b72c6ba 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/Web.config @@ -5,11 +5,11 @@ - + - + diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WebsitePanel.EnterpriseServer.csproj b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WebsitePanel.EnterpriseServer.csproj index 929eac01..cb74773e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WebsitePanel.EnterpriseServer.csproj +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/WebsitePanel.EnterpriseServer.csproj @@ -68,16 +68,17 @@ - + False ..\..\Bin\WebsitePanel.Providers.Base.dll - + False ..\..\Bin\WebsitePanel.Server.Client.dll + @@ -89,7 +90,6 @@ - @@ -131,6 +131,8 @@ + + @@ -164,7 +166,6 @@ - @@ -237,6 +238,10 @@ + + esLync.asmx + Component + esVirtualizationServerForPrivateCloud.asmx Component @@ -292,10 +297,6 @@ esDatabaseServers.asmx Component - - esExchangeHostedEdition.asmx - Component - esExchangeServer.asmx Component @@ -425,7 +426,7 @@ False False - 9002 + 9005 / diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/ecServiceHandler.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/ecServiceHandler.asmx.cs index 0bcd0cb0..febe6363 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/ecServiceHandler.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/ecServiceHandler.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/ecStorefront.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/ecStorefront.asmx.cs index fa23e268..31ea9192 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/ecStorefront.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/ecStorefront.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/ecStorehouse.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/ecStorehouse.asmx.cs index df5bf38f..f480ccd3 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/ecStorehouse.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/ecStorehouse.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esApplicationsInstaller.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esApplicationsInstaller.asmx.cs index 7196185e..c352facb 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esApplicationsInstaller.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esApplicationsInstaller.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esAuditLog.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esAuditLog.asmx.cs index 7363d48a..cef43a9b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esAuditLog.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esAuditLog.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esAuthentication.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esAuthentication.asmx.cs index 6ef3c50d..6f6cfeac 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esAuthentication.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esAuthentication.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esBackup.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esBackup.asmx.cs index f217d350..373f0aeb 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esBackup.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esBackup.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esBlackBerry.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esBlackBerry.asmx.cs index ea7e638e..7c2ec0f2 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esBlackBerry.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esBlackBerry.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esCRM.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esCRM.asmx.cs index 19d052d9..ecce8519 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esCRM.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esCRM.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esComments.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esComments.asmx.cs index bb547500..a490a039 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esComments.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esComments.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esDatabaseServers.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esDatabaseServers.asmx.cs index 16333b8b..261497a1 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esDatabaseServers.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esDatabaseServers.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeHostedEdition.asmx b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeHostedEdition.asmx deleted file mode 100644 index e6c85aa8..00000000 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeHostedEdition.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="C#" CodeBehind="esExchangeHostedEdition.asmx.cs" Class="WebsitePanel.EnterpriseServer.esExchangeHostedEdition" %> diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeHostedEdition.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeHostedEdition.asmx.cs deleted file mode 100644 index 300f93b9..00000000 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeHostedEdition.asmx.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Web; -using System.Web.Services; -using Microsoft.Web.Services3; -using System.ComponentModel; -using WebsitePanel.Providers.ExchangeHostedEdition; -using WebsitePanel.Providers.Common; -using WebsitePanel.Providers.ResultObjects; - -namespace WebsitePanel.EnterpriseServer -{ - /// - /// Summary description for esExchangeHostedEdition - /// - [WebService(Namespace = "http://smbsaas/websitepanel/enterpriseserver")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [Policy("ServerPolicy")] - [ToolboxItem(false)] - public class esExchangeHostedEdition : WebService - { - [WebMethod] - public List GetOrganizations(int packageId) - { - return ExchangeHostedEditionController.GetOrganizations(packageId); - } - - [WebMethod] - public IntResult CreateExchangeOrganization(int packageId, string organizationId, - string domain, string adminName, string adminEmail, string adminPassword) - { - return ExchangeHostedEditionController.CreateOrganization(packageId, organizationId, domain, adminName, adminEmail, adminPassword); - } - - [WebMethod] - public ExchangeOrganization GetExchangeOrganizationDetails(int itemId) - { - return ExchangeHostedEditionController.GetOrganizationDetails(itemId); - } - - [WebMethod] - public List GetExchangeOrganizationDomains(int itemId) - { - return ExchangeHostedEditionController.GetOrganizationDomains(itemId); - } - - [WebMethod] - public string GetExchangeOrganizationSummary(int itemId) - { - return ExchangeHostedEditionController.GetExchangeOrganizationSummary(itemId); - } - - [WebMethod] - public ResultObject SendExchangeOrganizationSummary(int itemId, string toEmail) - { - return ExchangeHostedEditionController.SendExchangeOrganizationSummary(itemId, toEmail); - } - - [WebMethod] - public ResultObject AddExchangeOrganizationDomain(int itemId, string domain) - { - return ExchangeHostedEditionController.AddOrganizationDomain(itemId, domain); - } - - [WebMethod] - public ResultObject DeleteExchangeOrganizationDomain(int itemId, string domain) - { - return ExchangeHostedEditionController.DeleteOrganizationDomain(itemId, domain); - } - - [WebMethod] - public ResultObject UpdateExchangeOrganizationQuotas(int itemId, int mailboxesNumber, int contactsNumber, int distributionListsNumber) - { - return ExchangeHostedEditionController.UpdateOrganizationQuotas(itemId, mailboxesNumber, contactsNumber, distributionListsNumber); - } - - [WebMethod] - public ResultObject UpdateExchangeOrganizationCatchAllAddress(int itemId, string catchAllEmail) - { - return ExchangeHostedEditionController.UpdateOrganizationCatchAllAddress(itemId, catchAllEmail); - } - - [WebMethod] - public ResultObject UpdateExchangeOrganizationServicePlan(int itemId, int newServiceId) - { - return ExchangeHostedEditionController.UpdateOrganizationServicePlan(itemId, newServiceId); - } - - [WebMethod] - public ResultObject DeleteExchangeOrganization(int itemId) - { - return ExchangeHostedEditionController.DeleteOrganization(itemId); - } - } -} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs index 87c498bb..d3da1430 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esExchangeServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -46,80 +46,81 @@ namespace WebsitePanel.EnterpriseServer [ToolboxItem(false)] public class esExchangeServer : WebService { - #region Organizations - [WebMethod] - public DataSet GetRawExchangeOrganizationsPaged(int packageId, bool recursive, - string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) - { - return ExchangeServerController.GetRawExchangeOrganizationsPaged(packageId, recursive, - filterColumn, filterValue, sortColumn, startRow, maximumRows); - } + #region Organizations + [WebMethod] + public DataSet GetRawExchangeOrganizationsPaged(int packageId, bool recursive, + string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { + return ExchangeServerController.GetRawExchangeOrganizationsPaged(packageId, recursive, + filterColumn, filterValue, sortColumn, startRow, maximumRows); + } - [WebMethod] - public OrganizationsPaged GetExchangeOrganizationsPaged(int packageId, bool recursive, - string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) - { - return ExchangeServerController.GetExchangeOrganizationsPaged(packageId, recursive, - filterColumn, filterValue, sortColumn, startRow, maximumRows); - } + [WebMethod] + public OrganizationsPaged GetExchangeOrganizationsPaged(int packageId, bool recursive, + string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + { + return ExchangeServerController.GetExchangeOrganizationsPaged(packageId, recursive, + filterColumn, filterValue, sortColumn, startRow, maximumRows); + } - [WebMethod] - public List GetExchangeOrganizations(int packageId, bool recursive) - { - return ExchangeServerController.GetExchangeOrganizations(packageId, recursive); - } + [WebMethod] + public List GetExchangeOrganizations(int packageId, bool recursive) + { + return ExchangeServerController.GetExchangeOrganizations(packageId, recursive); + } - [WebMethod] - public Organization GetOrganization(int itemId) - { - return ExchangeServerController.GetOrganization(itemId); - } + [WebMethod] + public Organization GetOrganization(int itemId) + { + return ExchangeServerController.GetOrganization(itemId); + } - [WebMethod] - public OrganizationStatistics GetOrganizationStatistics(int itemId) - { - return ExchangeServerController.GetOrganizationStatistics(itemId); - } + [WebMethod] + public OrganizationStatistics GetOrganizationStatistics(int itemId) + { + return ExchangeServerController.GetOrganizationStatistics(itemId); + } - - [WebMethod] - public int DeleteOrganization(int itemId) - { - return ExchangeServerController.DeleteOrganization(itemId); - } - [WebMethod] - public Organization GetOrganizationStorageLimits(int itemId) - { - return ExchangeServerController.GetOrganizationStorageLimits(itemId); - } + [WebMethod] + public int DeleteOrganization(int itemId) + { + return ExchangeServerController.DeleteOrganization(itemId); + } - [WebMethod] - public int SetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB, - int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes) - { - return ExchangeServerController.SetOrganizationStorageLimits(itemId, issueWarningKB, prohibitSendKB, - prohibitSendReceiveKB, keepDeletedItemsDays, applyToMailboxes); - } + [WebMethod] + public Organization GetOrganizationStorageLimits(int itemId) + { + return ExchangeServerController.GetOrganizationStorageLimits(itemId); + } - [WebMethod] - public ExchangeItemStatistics[] GetMailboxesStatistics(int itemId) - { - return ExchangeServerController.GetMailboxesStatistics(itemId); - } + [WebMethod] + public int SetOrganizationStorageLimits(int itemId, int issueWarningKB, int prohibitSendKB, + int prohibitSendReceiveKB, int keepDeletedItemsDays, bool applyToMailboxes) + { + return ExchangeServerController.SetOrganizationStorageLimits(itemId, issueWarningKB, prohibitSendKB, + prohibitSendReceiveKB, keepDeletedItemsDays, applyToMailboxes); + } - [WebMethod] - public ExchangeItemStatistics[] GetPublicFoldersStatistics(int itemId) - { - return ExchangeServerController.GetPublicFoldersStatistics(itemId); - } + [WebMethod] + public ExchangeItemStatistics[] GetMailboxesStatistics(int itemId) + { + return ExchangeServerController.GetMailboxesStatistics(itemId); + } - [WebMethod] - public int CalculateOrganizationDiskspace(int itemId) - { - return ExchangeServerController.CalculateOrganizationDiskspace(itemId); - } + [WebMethod] + public ExchangeMailboxStatistics GetMailboxStatistics(int itemId, int accountId) + { + return ExchangeServerController.GetMailboxStatistics(itemId, accountId); + } + + + [WebMethod] + public int CalculateOrganizationDiskspace(int itemId) + { + return ExchangeServerController.CalculateOrganizationDiskspace(itemId); + } [WebMethod] public ExchangeActiveSyncPolicy GetActiveSyncPolicy(int itemId) @@ -139,14 +140,14 @@ namespace WebsitePanel.EnterpriseServer passwordRecoveryEnabled, deviceEncryptionEnabled, allowSimplePassword, maxPasswordFailedAttempts, minPasswordLength, inactivityLockMin, passwordExpirationDays, passwordHistory, refreshInteval); } - #endregion + #endregion - #region Domains - [WebMethod] + #region Domains + [WebMethod] public int AddAuthoritativeDomain(int itemId, int domainId) - { + { return ExchangeServerController.AddAuthoritativeDomain(itemId, domainId); - } + } [WebMethod] public int DeleteAuthoritativeDomain(int itemId, int domainId) @@ -155,42 +156,50 @@ namespace WebsitePanel.EnterpriseServer } - #endregion + #endregion - #region Accounts - [WebMethod] - public ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes, - string filterColumn, string filterValue, string sortColumn, - int startRow, int maximumRows) - { + #region Accounts + [WebMethod] + public ExchangeAccountsPaged GetAccountsPaged(int itemId, string accountTypes, + string filterColumn, string filterValue, string sortColumn, + int startRow, int maximumRows) + { return ExchangeServerController.GetAccountsPaged(itemId, accountTypes, - filterColumn, filterValue, sortColumn, - startRow, maximumRows); - } + filterColumn, filterValue, sortColumn, + startRow, maximumRows); + } - [WebMethod] - public List GetAccounts(int itemId, ExchangeAccountType accountType) - { - return ExchangeServerController.GetAccounts(itemId, accountType); - } + [WebMethod] + public List GetAccounts(int itemId, ExchangeAccountType accountType) + { + return ExchangeServerController.GetAccounts(itemId, accountType); + } - [WebMethod] - public List SearchAccounts(int itemId, - bool includeMailboxes, bool includeContacts, bool includeDistributionLists, + + [WebMethod] + public List GetExchangeAccountByMailboxPlanId(int itemId, int mailboxPlanId) + { + return ExchangeServerController.GetExchangeAccountByMailboxPlanId(itemId, mailboxPlanId); + } + + + [WebMethod] + public List SearchAccounts(int itemId, + bool includeMailboxes, bool includeContacts, bool includeDistributionLists, bool includeRooms, bool includeEquipment, - string filterColumn, string filterValue, string sortColumn) - { - return ExchangeServerController.SearchAccounts(itemId, - includeMailboxes, includeContacts, includeDistributionLists, + string filterColumn, string filterValue, string sortColumn) + { + return ExchangeServerController.SearchAccounts(itemId, + includeMailboxes, includeContacts, includeDistributionLists, includeRooms, includeEquipment, - filterColumn, filterValue, sortColumn); - } + filterColumn, filterValue, sortColumn); + } - [WebMethod] - public ExchangeAccount GetAccount(int itemId, int accountId) - { - return ExchangeServerController.GetAccount(itemId, accountId); - } + [WebMethod] + public ExchangeAccount GetAccount(int itemId, int accountId) + { + return ExchangeServerController.GetAccount(itemId, accountId); + } [WebMethod] public ExchangeAccount SearchAccount(ExchangeAccountType accountType, string primaryEmailAddress) @@ -204,21 +213,21 @@ namespace WebsitePanel.EnterpriseServer return ExchangeServerController.CheckAccountCredentials(itemId, email, password); } - #endregion + #endregion - #region Mailboxes - [WebMethod] - public int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, - string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress) - { - return ExchangeServerController.CreateMailbox(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress); - } + #region Mailboxes + [WebMethod] + public int CreateMailbox(int itemId, int accountId, ExchangeAccountType accountType, string accountName, string displayName, + string name, string domain, string password, bool sendSetupInstructions, string setupInstructionMailAddress, int mailboxPlanId, string subscriberNumber) + { + return ExchangeServerController.CreateMailbox(itemId, accountId, accountType, accountName, displayName, name, domain, password, sendSetupInstructions, setupInstructionMailAddress, mailboxPlanId, subscriberNumber); + } - [WebMethod] - public int DeleteMailbox(int itemId, int accountId) - { - return ExchangeServerController.DeleteMailbox(itemId, accountId); - } + [WebMethod] + public int DeleteMailbox(int itemId, int accountId) + { + return ExchangeServerController.DeleteMailbox(itemId, accountId); + } [WebMethod] public int DisableMailbox(int itemId, int accountId) @@ -227,87 +236,66 @@ namespace WebsitePanel.EnterpriseServer } - [WebMethod] - public ExchangeMailbox GetMailboxGeneralSettings(int itemId, int accountId) - { - return ExchangeServerController.GetMailboxGeneralSettings(itemId, accountId); - } + [WebMethod] + public ExchangeMailbox GetMailboxGeneralSettings(int itemId, int accountId) + { + return ExchangeServerController.GetMailboxGeneralSettings(itemId, accountId); + } - [WebMethod] - public int SetMailboxGeneralSettings(int itemId, int accountId, string displayName, - string password, bool hideAddressBook, bool disabled, string firstName, string initials, - string lastName, string address, string city, string state, string zip, string country, - string jobTitle, string company, string department, string office, string managerAccountName, - string businessPhone, string fax, string homePhone, string mobilePhone, string pager, - string webPage, string notes) - { - return ExchangeServerController.SetMailboxGeneralSettings(itemId, accountId, displayName, - password, hideAddressBook, disabled, firstName, initials, - lastName, address, city, state, zip, country, - jobTitle, company, department, office, managerAccountName, - businessPhone, fax, homePhone, mobilePhone, pager, - webPage, notes); - } + [WebMethod] + public int SetMailboxGeneralSettings(int itemId, int accountId, bool hideAddressBook, bool disabled) + { + return ExchangeServerController.SetMailboxGeneralSettings(itemId, accountId, hideAddressBook, disabled); + } - [WebMethod] - public ExchangeEmailAddress[] GetMailboxEmailAddresses(int itemId, int accountId) - { - return ExchangeServerController.GetMailboxEmailAddresses(itemId, accountId); - } + [WebMethod] + public ExchangeEmailAddress[] GetMailboxEmailAddresses(int itemId, int accountId) + { + return ExchangeServerController.GetMailboxEmailAddresses(itemId, accountId); + } - [WebMethod] - public int AddMailboxEmailAddress(int itemId, int accountId, string emailAddress) - { - return ExchangeServerController.AddMailboxEmailAddress(itemId, accountId, emailAddress); - } + [WebMethod] + public int AddMailboxEmailAddress(int itemId, int accountId, string emailAddress) + { + return ExchangeServerController.AddMailboxEmailAddress(itemId, accountId, emailAddress); + } - [WebMethod] - public int SetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress) - { - return ExchangeServerController.SetMailboxPrimaryEmailAddress(itemId, accountId, emailAddress); - } + [WebMethod] + public int SetMailboxPrimaryEmailAddress(int itemId, int accountId, string emailAddress) + { + return ExchangeServerController.SetMailboxPrimaryEmailAddress(itemId, accountId, emailAddress); + } - [WebMethod] - public int DeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses) - { - return ExchangeServerController.DeleteMailboxEmailAddresses(itemId, accountId, emailAddresses); - } + [WebMethod] + public int DeleteMailboxEmailAddresses(int itemId, int accountId, string[] emailAddresses) + { + return ExchangeServerController.DeleteMailboxEmailAddresses(itemId, accountId, emailAddresses); + } - [WebMethod] - public ExchangeMailbox GetMailboxMailFlowSettings(int itemId, int accountId) - { - return ExchangeServerController.GetMailboxMailFlowSettings(itemId, accountId); - } + [WebMethod] + public ExchangeMailbox GetMailboxMailFlowSettings(int itemId, int accountId) + { + return ExchangeServerController.GetMailboxMailFlowSettings(itemId, accountId); + } - [WebMethod] - public int SetMailboxMailFlowSettings(int itemId, int accountId, - bool enableForwarding, string forwardingAccountName, bool forwardToBoth, - string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, - int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, + [WebMethod] + public int SetMailboxMailFlowSettings(int itemId, int accountId, + bool enableForwarding, string forwardingAccountName, bool forwardToBoth, + string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { - return ExchangeServerController.SetMailboxMailFlowSettings(itemId, accountId, - enableForwarding, forwardingAccountName, forwardToBoth, - sendOnBehalfAccounts, acceptAccounts, rejectAccounts, - maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, - requireSenderAuthentication); - } + { + return ExchangeServerController.SetMailboxMailFlowSettings(itemId, accountId, + enableForwarding, forwardingAccountName, forwardToBoth, + sendOnBehalfAccounts, acceptAccounts, rejectAccounts, + requireSenderAuthentication); + } - [WebMethod] - public ExchangeMailbox GetMailboxAdvancedSettings(int itemId, int accountId) - { - return ExchangeServerController.GetMailboxAdvancedSettings(itemId, accountId); - } - [WebMethod] - public int SetMailboxAdvancedSettings(int itemId, int accountId, bool enablePOP, - bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, - int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) - { - return ExchangeServerController.SetMailboxAdvancedSettings(itemId, accountId, enablePOP, - enableIMAP, enableOWA, enableMAPI, enableActiveSync, - issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays); - } + [WebMethod] + public int SetExchangeMailboxPlan(int itemId, int accountId, int mailboxPlanId) + { + return ExchangeServerController.SetExchangeMailboxPlan(itemId, accountId, mailboxPlanId); + } [WebMethod] public string GetMailboxSetupInstructions(int itemId, int accountId, bool pmm, bool emailMode, bool signup) @@ -327,137 +315,137 @@ namespace WebsitePanel.EnterpriseServer return ExchangeServerController.SetMailboxManagerSettings(itemId, accountId, pmmAllowed, action); } - [WebMethod] + [WebMethod] public ExchangeMailbox GetMailboxPermissions(int itemId, int accountId) { - return ExchangeServerController.GetMailboxPermissions(itemId, accountId); + return ExchangeServerController.GetMailboxPermissions(itemId, accountId); } [WebMethod] public int SetMailboxPermissions(int itemId, int accountId, string[] sendAsaccounts, string[] fullAccessAcounts) { - return ExchangeServerController.SetMailboxPermissions(itemId, accountId, sendAsaccounts, fullAccessAcounts); + return ExchangeServerController.SetMailboxPermissions(itemId, accountId, sendAsaccounts, fullAccessAcounts); } - - - #endregion - #region Contacts - [WebMethod] - public int CreateContact(int itemId, string displayName, string email) - { - return ExchangeServerController.CreateContact(itemId, displayName, email); - } - [WebMethod] - public int DeleteContact(int itemId, int accountId) - { - return ExchangeServerController.DeleteContact(itemId, accountId); - } + #endregion - [WebMethod] - public ExchangeContact GetContactGeneralSettings(int itemId, int accountId) - { - return ExchangeServerController.GetContactGeneralSettings(itemId, accountId); - } + #region Contacts + [WebMethod] + public int CreateContact(int itemId, string displayName, string email) + { + return ExchangeServerController.CreateContact(itemId, displayName, email); + } - [WebMethod] - public int SetContactGeneralSettings(int itemId, int accountId, string displayName, string emailAddress, - bool hideAddressBook, string firstName, string initials, - string lastName, string address, string city, string state, string zip, string country, - string jobTitle, string company, string department, string office, string managerAccountName, - string businessPhone, string fax, string homePhone, string mobilePhone, string pager, + [WebMethod] + public int DeleteContact(int itemId, int accountId) + { + return ExchangeServerController.DeleteContact(itemId, accountId); + } + + [WebMethod] + public ExchangeContact GetContactGeneralSettings(int itemId, int accountId) + { + return ExchangeServerController.GetContactGeneralSettings(itemId, accountId); + } + + [WebMethod] + public int SetContactGeneralSettings(int itemId, int accountId, string displayName, string emailAddress, + bool hideAddressBook, string firstName, string initials, + string lastName, string address, string city, string state, string zip, string country, + string jobTitle, string company, string department, string office, string managerAccountName, + string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes, int useMapiRichTextFormat) - { - return ExchangeServerController.SetContactGeneralSettings(itemId, accountId, displayName, emailAddress, - hideAddressBook, firstName, initials, - lastName, address, city, state, zip, country, - jobTitle, company, department, office, managerAccountName, - businessPhone, fax, homePhone, mobilePhone, pager, - webPage, notes, useMapiRichTextFormat); - } + { + return ExchangeServerController.SetContactGeneralSettings(itemId, accountId, displayName, emailAddress, + hideAddressBook, firstName, initials, + lastName, address, city, state, zip, country, + jobTitle, company, department, office, managerAccountName, + businessPhone, fax, homePhone, mobilePhone, pager, + webPage, notes, useMapiRichTextFormat); + } - [WebMethod] - public ExchangeContact GetContactMailFlowSettings(int itemId, int accountId) - { - return ExchangeServerController.GetContactMailFlowSettings(itemId, accountId); - } + [WebMethod] + public ExchangeContact GetContactMailFlowSettings(int itemId, int accountId) + { + return ExchangeServerController.GetContactMailFlowSettings(itemId, accountId); + } - [WebMethod] - public int SetContactMailFlowSettings(int itemId, int accountId, - string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { - return ExchangeServerController.SetContactMailFlowSettings(itemId, accountId, - acceptAccounts, rejectAccounts, requireSenderAuthentication); - } - #endregion + [WebMethod] + public int SetContactMailFlowSettings(int itemId, int accountId, + string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { + return ExchangeServerController.SetContactMailFlowSettings(itemId, accountId, + acceptAccounts, rejectAccounts, requireSenderAuthentication); + } + #endregion - #region Distribution Lists - [WebMethod] - public int CreateDistributionList(int itemId, string displayName, string name, string domain, int managerId) - { - return ExchangeServerController.CreateDistributionList(itemId, displayName, name, domain, managerId); - } + #region Distribution Lists + [WebMethod] + public int CreateDistributionList(int itemId, string displayName, string name, string domain, int managerId) + { + return ExchangeServerController.CreateDistributionList(itemId, displayName, name, domain, managerId); + } - [WebMethod] - public int DeleteDistributionList(int itemId, int accountId) - { - return ExchangeServerController.DeleteDistributionList(itemId, accountId); - } + [WebMethod] + public int DeleteDistributionList(int itemId, int accountId) + { + return ExchangeServerController.DeleteDistributionList(itemId, accountId); + } - [WebMethod] - public ExchangeDistributionList GetDistributionListGeneralSettings(int itemId, int accountId) - { - return ExchangeServerController.GetDistributionListGeneralSettings(itemId, accountId); - } + [WebMethod] + public ExchangeDistributionList GetDistributionListGeneralSettings(int itemId, int accountId) + { + return ExchangeServerController.GetDistributionListGeneralSettings(itemId, accountId); + } - [WebMethod] - public int SetDistributionListGeneralSettings(int itemId, int accountId, string displayName, - bool hideAddressBook, string managerAccount, string[] memberAccounts, - string notes) - { - return ExchangeServerController.SetDistributionListGeneralSettings(itemId, accountId, displayName, - hideAddressBook, managerAccount, memberAccounts, - notes); - } + [WebMethod] + public int SetDistributionListGeneralSettings(int itemId, int accountId, string displayName, + bool hideAddressBook, string managerAccount, string[] memberAccounts, + string notes) + { + return ExchangeServerController.SetDistributionListGeneralSettings(itemId, accountId, displayName, + hideAddressBook, managerAccount, memberAccounts, + notes); + } - [WebMethod] - public ExchangeDistributionList GetDistributionListMailFlowSettings(int itemId, int accountId) - { - return ExchangeServerController.GetDistributionListMailFlowSettings(itemId, accountId); - } + [WebMethod] + public ExchangeDistributionList GetDistributionListMailFlowSettings(int itemId, int accountId) + { + return ExchangeServerController.GetDistributionListMailFlowSettings(itemId, accountId); + } - [WebMethod] - public int SetDistributionListMailFlowSettings(int itemId, int accountId, - string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { - return ExchangeServerController.SetDistributionListMailFlowSettings(itemId, accountId, - acceptAccounts, rejectAccounts, requireSenderAuthentication); - } + [WebMethod] + public int SetDistributionListMailFlowSettings(int itemId, int accountId, + string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { + return ExchangeServerController.SetDistributionListMailFlowSettings(itemId, accountId, + acceptAccounts, rejectAccounts, requireSenderAuthentication); + } - [WebMethod] - public ExchangeEmailAddress[] GetDistributionListEmailAddresses(int itemId, int accountId) - { - return ExchangeServerController.GetDistributionListEmailAddresses(itemId, accountId); - } + [WebMethod] + public ExchangeEmailAddress[] GetDistributionListEmailAddresses(int itemId, int accountId) + { + return ExchangeServerController.GetDistributionListEmailAddresses(itemId, accountId); + } - [WebMethod] - public int AddDistributionListEmailAddress(int itemId, int accountId, string emailAddress) - { - return ExchangeServerController.AddDistributionListEmailAddress(itemId, accountId, emailAddress); - } + [WebMethod] + public int AddDistributionListEmailAddress(int itemId, int accountId, string emailAddress) + { + return ExchangeServerController.AddDistributionListEmailAddress(itemId, accountId, emailAddress); + } - [WebMethod] - public int SetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress) - { - return ExchangeServerController.SetDistributionListPrimaryEmailAddress(itemId, accountId, emailAddress); - } + [WebMethod] + public int SetDistributionListPrimaryEmailAddress(int itemId, int accountId, string emailAddress) + { + return ExchangeServerController.SetDistributionListPrimaryEmailAddress(itemId, accountId, emailAddress); + } - [WebMethod] - public int DeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses) - { - return ExchangeServerController.DeleteDistributionListEmailAddresses(itemId, accountId, emailAddresses); - } + [WebMethod] + public int DeleteDistributionListEmailAddresses(int itemId, int accountId, string[] emailAddresses) + { + return ExchangeServerController.DeleteDistributionListEmailAddresses(itemId, accountId, emailAddresses); + } [WebMethod] public ResultObject SetDistributionListPermissions(int itemId, int accountId, string[] sendAsAccounts, string[] sendOnBehalfAccounts) @@ -470,9 +458,77 @@ namespace WebsitePanel.EnterpriseServer { return ExchangeServerController.GetDistributionListPermissions(itemId, accountId); } - + #endregion + #region MobileDevice + + [WebMethod] + public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) + { + return ExchangeServerController.GetMobileDevices(itemId, accountId); + } + + [WebMethod] + public ExchangeMobileDevice GetMobileDevice(int itemId, string deviceId) + { + return ExchangeServerController.GetMobileDevice(itemId, deviceId); + } + + [WebMethod] + public void WipeDataFromDevice(int itemId, string deviceId) + { + ExchangeServerController.WipeDataFromDevice(itemId, deviceId); + } + + [WebMethod] + public void CancelRemoteWipeRequest(int itemId, string deviceId) + { + ExchangeServerController.CancelRemoteWipeRequest(itemId, deviceId); + } + + [WebMethod] + public void RemoveDevice(int itemId, string deviceId) + { + ExchangeServerController.RemoveDevice(itemId, deviceId); + } + + #endregion + + #region MailboxPlans + [WebMethod] + public List GetExchangeMailboxPlans(int itemId) + { + return ExchangeServerController.GetExchangeMailboxPlans(itemId); + } + + [WebMethod] + public ExchangeMailboxPlan GetExchangeMailboxPlan(int itemId, int mailboxPlanId) + { + return ExchangeServerController.GetExchangeMailboxPlan(itemId, mailboxPlanId); + } + + [WebMethod] + public int AddExchangeMailboxPlan(int itemId, ExchangeMailboxPlan mailboxPlan) + { + return ExchangeServerController.AddExchangeMailboxPlan(itemId, mailboxPlan); + } + + [WebMethod] + public int DeleteExchangeMailboxPlan(int itemId, int mailboxPlanId) + { + return ExchangeServerController.DeleteExchangeMailboxPlan(itemId, mailboxPlanId); + } + + [WebMethod] + public void SetOrganizationDefaultExchangeMailboxPlan(int itemId, int mailboxPlanId) + { + ExchangeServerController.SetOrganizationDefaultExchangeMailboxPlan(itemId, mailboxPlanId); + } + + #endregion + + #region Public Folders [WebMethod] public int CreatePublicFolder(int itemId, string parentFolder, string folderName, @@ -515,10 +571,10 @@ namespace WebsitePanel.EnterpriseServer [WebMethod] public int SetPublicFolderGeneralSettings(int itemId, int accountId, string newName, - bool hideAddressBook, string[] authorAccounts) + bool hideAddressBook, ExchangeAccount[] accounts) { return ExchangeServerController.SetPublicFolderGeneralSettings(itemId, accountId, newName, - hideAddressBook, authorAccounts); + hideAddressBook, accounts); } [WebMethod] @@ -560,39 +616,7 @@ namespace WebsitePanel.EnterpriseServer } #endregion - #region MobileDevice - [WebMethod] - public ExchangeMobileDevice[] GetMobileDevices(int itemId, int accountId) - { - return ExchangeServerController.GetMobileDevices(itemId, accountId); - } - - [WebMethod] - public ExchangeMobileDevice GetMobileDevice(int itemId, string deviceId) - { - return ExchangeServerController.GetMobileDevice(itemId, deviceId); - } - - [WebMethod] - public void WipeDataFromDevice(int itemId, string deviceId) - { - ExchangeServerController.WipeDataFromDevice(itemId, deviceId); - } - - [WebMethod] - public void CancelRemoteWipeRequest(int itemId, string deviceId) - { - ExchangeServerController.CancelRemoteWipeRequest(itemId, deviceId); - } - - [WebMethod] - public void RemoveDevice(int itemId, string deviceId) - { - ExchangeServerController.RemoveDevice(itemId, deviceId); - } - - #endregion } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esFiles.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esFiles.asmx.cs index 4f034d73..15a64d0d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esFiles.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esFiles.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esFtpServers.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esFtpServers.asmx.cs index 9c6ee3b2..b32e8b77 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esFtpServers.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esFtpServers.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHostedSharePointServers.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHostedSharePointServers.asmx.cs index 6b05ad14..a9197072 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHostedSharePointServers.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHostedSharePointServers.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esImport.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esImport.asmx.cs index 8224b560..401515e4 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esImport.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esImport.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx new file mode 100644 index 00000000..a481f74b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="esLync.asmx.cs" Class="WebsitePanel.EnterpriseServer.esLync" %> diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx.cs new file mode 100644 index 00000000..bf9df2da --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esLync.asmx.cs @@ -0,0 +1,141 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System.Web.Services; +using WebsitePanel.EnterpriseServer.Code.HostedSolution; +using WebsitePanel.Providers.Common; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers.ResultObjects; +using System.Collections.Generic; + +namespace WebsitePanel.EnterpriseServer +{ + /// + /// Summary description for esLync + /// + [WebService(Namespace = "http://tempuri.org/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [System.ComponentModel.ToolboxItem(false)] + public class esLync : WebService + { + + [WebMethod] + public LyncUserResult CreateLyncUser(int itemId, int accountId, int lyncUserPlanId) + { + return LyncController.CreateLyncUser(itemId, accountId, lyncUserPlanId); + } + + [WebMethod] + public ResultObject DeleteLyncUser(int itemId, int accountId) + { + return LyncController.DeleteLyncUser(itemId, accountId); + } + + [WebMethod] + public LyncUsersPagedResult GetLyncUsersPaged(int itemId, string sortColumn, string sortDirection, int startRow, int maximumRows) + { + return LyncController.GetLyncUsers(itemId, sortColumn, sortDirection, startRow, maximumRows); + } + + [WebMethod] + public List GetLyncUsersByPlanId(int itemId, int planId) + { + return LyncController.GetLyncUsersByPlanId(itemId, planId); + } + + [WebMethod] + public IntResult GetLyncUserCount(int itemId) + { + return LyncController.GetLyncUsersCount(itemId); + } + + + #region Lync User Plans + [WebMethod] + public List GetLyncUserPlans(int itemId) + { + return LyncController.GetLyncUserPlans(itemId); + } + + [WebMethod] + public LyncUserPlan GetLyncUserPlan(int itemId, int lyncUserPlanId) + { + return LyncController.GetLyncUserPlan(itemId, lyncUserPlanId); + } + + [WebMethod] + public int AddLyncUserPlan(int itemId, LyncUserPlan lyncUserPlan) + { + return LyncController.AddLyncUserPlan(itemId, lyncUserPlan); + } + + [WebMethod] + public int DeleteLyncUserPlan(int itemId, int lyncUserPlanId) + { + return LyncController.DeleteLyncUserPlan(itemId, lyncUserPlanId); + } + + [WebMethod] + public int SetOrganizationDefaultLyncUserPlan(int itemId, int lyncUserPlanId) + { + return LyncController.SetOrganizationDefaultLyncUserPlan(itemId, lyncUserPlanId); + } + + [WebMethod] + public LyncUser GetLyncUserGeneralSettings(int itemId, int accountId) + { + return LyncController.GetLyncUserGeneralSettings(itemId, accountId); + } + + [WebMethod] + public LyncUserResult SetUserLyncPlan(int itemId, int accountId, int lyncUserPlanId) + { + return LyncController.SetUserLyncPlan(itemId, accountId, lyncUserPlanId); + } + + [WebMethod] + public LyncFederationDomain[] GetFederationDomains(int itemId) + { + return LyncController.GetFederationDomains(itemId); + } + + [WebMethod] + public LyncUserResult AddFederationDomain(int itemId, string domainName, string proxyFqdn) + { + return LyncController.AddFederationDomain(itemId, domainName, proxyFqdn); + } + + [WebMethod] + public LyncUserResult RemoveFederationDomain(int itemId, string domainName) + { + return LyncController.RemoveFederationDomain(itemId, domainName); + } + + #endregion + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esMailServers.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esMailServers.asmx.cs index bcd19b82..a44ab405 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esMailServers.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esMailServers.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOCS.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOCS.asmx.cs index cd54ddb9..ad1cb1c5 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOCS.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOCS.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOperatingSystems.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOperatingSystems.asmx.cs index fe5a0cb6..e8b01891 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOperatingSystems.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOperatingSystems.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs index edc37abf..9bccc46a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs @@ -46,10 +46,10 @@ namespace WebsitePanel.EnterpriseServer #region Organizations [WebMethod] - public int CreateOrganization(int packageId, string organizationID, string organizationName) + public int CreateOrganization(int packageId, string organizationID, string organizationName) { return OrganizationController.CreateOrganization(packageId, organizationID, organizationName); - + } [WebMethod] @@ -60,7 +60,7 @@ namespace WebsitePanel.EnterpriseServer filterColumn, filterValue, sortColumn, startRow, maximumRows); } - + [WebMethod] public List GetOrganizations(int packageId, bool recursive) { @@ -72,13 +72,13 @@ namespace WebsitePanel.EnterpriseServer { return OrganizationController.GetOrganizationUserSummuryLetter(itemId, accountId, pmm, emailMode, signup); } - + [WebMethod] public int SendOrganizationUserSummuryLetter(int itemId, int accountId, bool signup, string to, string cc) { return OrganizationController.SendSummaryLetter(itemId, accountId, signup, to, cc); } - + [WebMethod] public int DeleteOrganization(int itemId) { @@ -97,6 +97,13 @@ namespace WebsitePanel.EnterpriseServer return OrganizationController.GetOrganization(itemId); } + [WebMethod] + public int GetAccountIdByUserPrincipalName(int itemId, string userPrincipalName) + { + return OrganizationController.GetAccountIdByUserPrincipalName(itemId, userPrincipalName); + } + + #endregion @@ -107,13 +114,13 @@ namespace WebsitePanel.EnterpriseServer { return OrganizationController.AddOrganizationDomain(itemId, domainName); } - + [WebMethod] public List GetOrganizationDomains(int itemId) { return OrganizationController.GetOrganizationDomains(itemId); } - + [WebMethod] public int DeleteOrganizationDomain(int itemId, int domainId) { @@ -132,15 +139,22 @@ namespace WebsitePanel.EnterpriseServer #region Users [WebMethod] - public int CreateUser(int itemId, string displayName, string name, string domain, string password, bool sendNotification, string to) + public int CreateUser(int itemId, string displayName, string name, string domain, string password, string subscriberNumber, bool sendNotification, string to) { string accountName; - return OrganizationController.CreateUser(itemId, displayName, name, domain, password, true, sendNotification, to, out accountName); + return OrganizationController.CreateUser(itemId, displayName, name, domain, password, subscriberNumber, true, sendNotification, to, out accountName); } + [WebMethod] + public int ImportUser(int itemId, string accountName, string displayName, string name, string domain, string password, string subscriberNumber) + { + return OrganizationController.ImportUser(itemId, accountName, displayName, name, domain, password, subscriberNumber); + } + + [WebMethod] public OrganizationUsersPaged GetOrganizationUsersPaged(int itemId, string filterColumn, string filterValue, string sortColumn, - int startRow, int maximumRows) + int startRow, int maximumRows) { return OrganizationController.GetOrganizationUsersPaged(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows); } @@ -157,30 +171,30 @@ namespace WebsitePanel.EnterpriseServer string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, - string webPage, string notes, string externalEmail) + string webPage, string notes, string externalEmail, string subscriberNumber) { return OrganizationController.SetUserGeneralSettings(itemId, accountId, displayName, password, hideAddressBook, disabled, locked, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, - webPage, notes, externalEmail); + webPage, notes, externalEmail, subscriberNumber); } [WebMethod] - public List SearchAccounts(int itemId, + public List SearchAccounts(int itemId, string filterColumn, string filterValue, string sortColumn, bool includeMailboxes) { return OrganizationController.SearchAccounts(itemId, filterColumn, filterValue, sortColumn, includeMailboxes); } - + [WebMethod] public int DeleteUser(int itemId, int accountId) { - return OrganizationController.DeleteUser(itemId, accountId); + return OrganizationController.DeleteUser(itemId, accountId); } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esPackages.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esPackages.asmx.cs index 2242fbf9..52db718e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esPackages.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esPackages.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esScheduler.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esScheduler.asmx.cs index 97f85503..94dc6555 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esScheduler.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esScheduler.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esServers.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esServers.asmx.cs index 3a59c4fd..05f403ee 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esServers.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esServers.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -41,6 +41,7 @@ using Microsoft.Web.Services3; using WebsitePanel.Providers.DNS; using WebsitePanel.Server; using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Providers; namespace WebsitePanel.EnterpriseServer { @@ -249,7 +250,7 @@ namespace WebsitePanel.EnterpriseServer { return ServerController.GetProviderServiceQuota(providerId); } - + #endregion #region Providers @@ -301,7 +302,7 @@ namespace WebsitePanel.EnterpriseServer { return ServerController.IsInstalled(serverId, providerId); } - + [WebMethod] public string GetServerVersion(int serverId) { @@ -568,11 +569,11 @@ namespace WebsitePanel.EnterpriseServer return ServerController.DeleteDomain(domainId); } - [WebMethod] - public int DetachDomain(int domainId) - { - return ServerController.DetachDomain(domainId); - } + [WebMethod] + public int DetachDomain(int domainId) + { + return ServerController.DetachDomain(domainId); + } [WebMethod] public int EnableDomainDns(int domainId) @@ -587,9 +588,9 @@ namespace WebsitePanel.EnterpriseServer } [WebMethod] - public int CreateDomainInstantAlias(int domainId) + public int CreateDomainInstantAlias(string hostName, int domainId) { - return ServerController.CreateDomainInstantAlias(domainId); + return ServerController.CreateDomainInstantAlias(hostName, domainId); } [WebMethod] @@ -614,18 +615,18 @@ namespace WebsitePanel.EnterpriseServer [WebMethod] public int AddDnsZoneRecord(int domainId, string recordName, DnsRecordType recordType, - string recordData, int mxPriority) + string recordData, int mxPriority, int srvPriority, int srvWeight, int srvPortNumber) { - return ServerController.AddDnsZoneRecord(domainId, recordName, recordType, recordData, mxPriority); + return ServerController.AddDnsZoneRecord(domainId, recordName, recordType, recordData, mxPriority, srvPriority, srvWeight, srvPortNumber); } [WebMethod] public int UpdateDnsZoneRecord(int domainId, string originalRecordName, string originalRecordData, - string recordName, DnsRecordType recordType, string recordData, int mxPriority) + string recordName, DnsRecordType recordType, string recordData, int mxPriority, int srvPriority, int srvWeight, int srvPortNumber) { return ServerController.UpdateDnsZoneRecord(domainId, originalRecordName, originalRecordData, - recordName, recordType, recordData, mxPriority); + recordName, recordType, recordData, mxPriority, srvPriority, srvWeight, srvPortNumber); } [WebMethod] @@ -663,6 +664,108 @@ namespace WebsitePanel.EnterpriseServer } #endregion + + #region Web Platform Installer + + [WebMethod] + public void InitWPIFeeds(int serverId) + { + var wpiSettings = SystemController.GetSystemSettings(SystemSettings.WPI_SETTINGS); + + + List arFeeds = new List(); + + if (Utils.ParseBool(wpiSettings["FeedEnableMicrosoft"] ,true)) + { + arFeeds.Add( "https://www.microsoft.com/web/webpi/3.0/WebProductList.xml" ); + } + + if (Utils.ParseBool(wpiSettings["FeedEnableHelicon"] ,true)) + { + arFeeds.Add( "http://www.helicontech.com/zoo/feed/wsp" ); + } + + string additionalFeeds = wpiSettings["FeedUrls"]; + if (!string.IsNullOrEmpty(additionalFeeds)) + { + arFeeds.AddRange(additionalFeeds.Split(';')); + } + + OperatingSystemController.InitWPIFeeds(serverId, string.Join(";", arFeeds)); + + } + + [WebMethod] + public WPITab[] GetWPITabs(int serverId) + { + InitWPIFeeds(serverId); + return OperatingSystemController.GetWPITabs(serverId); + } + + [WebMethod] + public WPIKeyword[] GetWPIKeywords(int serverId) + { + InitWPIFeeds(serverId); + return OperatingSystemController.GetWPIKeywords(serverId); + } + + [WebMethod] + public WPIProduct[] GetWPIProducts(int serverId, string tabId, string keywordId) + { + InitWPIFeeds(serverId); + return OperatingSystemController.GetWPIProducts(serverId, tabId, keywordId); + } + + [WebMethod] + public WPIProduct[] GetWPIProductsFiltered(int serverId, string keywordId) + { + InitWPIFeeds(serverId); + return OperatingSystemController.GetWPIProductsFiltered(serverId, keywordId); + } + + + [WebMethod] + public WPIProduct[] GetWPIProductsWithDependencies(int serverId, string[] products) + { + InitWPIFeeds(serverId); + return OperatingSystemController.GetWPIProductsWithDependencies(serverId, products); + } + + [WebMethod] + public void InstallWPIProducts(int serverId, string[] products) + { + InitWPIFeeds(serverId); + OperatingSystemController.InstallWPIProducts(serverId, products); + } + + [WebMethod] + public void CancelInstallWPIProducts(int serviceId) + { + OperatingSystemController.CancelInstallWPIProducts(serviceId); + } + + + [WebMethod] + public string GetWPIStatus(int serverId) + { + return OperatingSystemController.GetWPIStatus(serverId); + } + + [WebMethod] + public string WpiGetLogFileDirectory(int serverId) + { + return OperatingSystemController.WpiGetLogFileDirectory(serverId); + } + + [WebMethod] + public SettingPair[] WpiGetLogsInDirectory(int serverId, string Path) + { + return OperatingSystemController.WpiGetLogsInDirectory(serverId, Path); + } + #endregion + + + #region Windows Services [WebMethod] public WindowsService[] GetWindowsServices(int serverId) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esSharePointServers.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esSharePointServers.asmx.cs index de64760a..ae58608b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esSharePointServers.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esSharePointServers.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esStatisticsServers.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esStatisticsServers.asmx.cs index 84b1c5fc..02a9fc00 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esStatisticsServers.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esStatisticsServers.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esSystem.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esSystem.asmx.cs index 2aae243d..b67ed081 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esSystem.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esSystem.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esTasks.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esTasks.asmx.cs index 9f5713e2..e139e1cf 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esTasks.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esTasks.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esUsers.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esUsers.asmx.cs index 992b66a1..61099749 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esUsers.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esUsers.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esVirtualizationServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esVirtualizationServer.asmx.cs index d1368078..f7270356 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esVirtualizationServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esVirtualizationServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esVirtualizationServerForPrivateCloud.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esVirtualizationServerForPrivateCloud.asmx.cs index 563ff3bd..5f0ee84c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esVirtualizationServerForPrivateCloud.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esVirtualizationServerForPrivateCloud.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esWebApplicationGallery.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esWebApplicationGallery.asmx.cs index 97c09a84..1c412911 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esWebApplicationGallery.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esWebApplicationGallery.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -43,45 +43,81 @@ namespace WebsitePanel.EnterpriseServer [System.ComponentModel.ToolboxItem(false)] public class esWebApplicationGallery : System.Web.Services.WebService { + [WebMethod] + public void InitFeeds(int packageId) + { + WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId); + } + + [WebMethod] + public void SetResourceLanguage(int packageId, string resourceLanguage) + { + WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId); + WebAppGalleryController.SetResourceLanguage(packageId, resourceLanguage); + } + + + [WebMethod] + public GalleryLanguagesResult GetGalleryLanguages(int packageId) + { + WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId); + return WebAppGalleryController.GetGalleryLanguages(packageId); + } + + [WebMethod] public GalleryApplicationsResult GetGalleryApplicationsByServiceId(int serviceId) { + WebAppGalleryController.InitFeedsByServiceId(SecurityContext.User.UserId, serviceId); return WebAppGalleryController.GetGalleryApplicationsByServiceId(serviceId); } [WebMethod] public GalleryApplicationsResult GetGalleryApplications(int packageId, string categoryId) { - return WebAppGalleryController.GetGalleryApplications(packageId, categoryId); + WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId); + return WebAppGalleryController.GetGalleryApplications(packageId, categoryId); + } + + [WebMethod] + public GalleryApplicationsResult GetGalleryApplicationsFiltered(int packageId, string pattern) + { + WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId); + return WebAppGalleryController.GetGalleryApplicationsFiltered(packageId, pattern); } [WebMethod] public GalleryCategoriesResult GetGalleryCategories(int packageId) { + WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId); return WebAppGalleryController.GetGalleryCategories(packageId); } [WebMethod] public GalleryApplicationResult GetGalleryApplicationDetails(int packageId, string applicationId) { + WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId); return WebAppGalleryController.GetGalleryApplicationDetails(packageId, applicationId); } [WebMethod] public DeploymentParametersResult GetGalleryApplicationParams(int packageId, string applicationId) { + WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId); return WebAppGalleryController.GetGalleryApplicationParams(packageId, applicationId); } [WebMethod] - public StringResultObject Install(int packageId, string webAppId, string siteName, string virtualDir, List parameters) + public StringResultObject Install(int packageId, string webAppId, string siteName, string virtualDir, List parameters, string languageId) { - return WebAppGalleryController.Install(packageId, webAppId, siteName, virtualDir, parameters); + WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId); + return WebAppGalleryController.Install(packageId, webAppId, siteName, virtualDir, parameters, languageId); } [WebMethod(Description="Returns Web Application Gallery application status, such as Downloaded, Downloading, Failed or NotDownloaded. Throws an ApplicationException if WAG module is not available on the target server.")] public GalleryWebAppStatus GetGalleryApplicationStatus(int packageId, string webAppId) { + WebAppGalleryController.InitFeeds(SecurityContext.User.UserId, packageId); return WebAppGalleryController.GetGalleryApplicationStatus(packageId, webAppId); } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esWebServers.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esWebServers.asmx.cs index 70ddeb35..1a3ab82b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esWebServers.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esWebServers.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Gateways.2Checkout/TCOProvider.cs b/WebsitePanel/Sources/WebsitePanel.Gateways.2Checkout/TCOProvider.cs index b6f2552e..04d8ef3d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Gateways.2Checkout/TCOProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Gateways.2Checkout/TCOProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Gateways.AuthorizeNet/AIMResponse.cs b/WebsitePanel/Sources/WebsitePanel.Gateways.AuthorizeNet/AIMResponse.cs index a25d491d..aa4812dd 100644 --- a/WebsitePanel/Sources/WebsitePanel.Gateways.AuthorizeNet/AIMResponse.cs +++ b/WebsitePanel/Sources/WebsitePanel.Gateways.AuthorizeNet/AIMResponse.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Gateways.AuthorizeNet/AuthorizeNetKeys.cs b/WebsitePanel/Sources/WebsitePanel.Gateways.AuthorizeNet/AuthorizeNetKeys.cs index 651a61ac..817b8f39 100644 --- a/WebsitePanel/Sources/WebsitePanel.Gateways.AuthorizeNet/AuthorizeNetKeys.cs +++ b/WebsitePanel/Sources/WebsitePanel.Gateways.AuthorizeNet/AuthorizeNetKeys.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Gateways.AuthorizeNet/AuthorizeNetProvider.cs b/WebsitePanel/Sources/WebsitePanel.Gateways.AuthorizeNet/AuthorizeNetProvider.cs index 24bbbc6c..73cdfc91 100644 --- a/WebsitePanel/Sources/WebsitePanel.Gateways.AuthorizeNet/AuthorizeNetProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Gateways.AuthorizeNet/AuthorizeNetProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Gateways.OfflinePayment/OfflinePayment.cs b/WebsitePanel/Sources/WebsitePanel.Gateways.OfflinePayment/OfflinePayment.cs index 1f19e89c..500766bf 100644 --- a/WebsitePanel/Sources/WebsitePanel.Gateways.OfflinePayment/OfflinePayment.cs +++ b/WebsitePanel/Sources/WebsitePanel.Gateways.OfflinePayment/OfflinePayment.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Gateways.PayPal/PayPalKeys.cs b/WebsitePanel/Sources/WebsitePanel.Gateways.PayPal/PayPalKeys.cs index 01ce942c..e9fd4753 100644 --- a/WebsitePanel/Sources/WebsitePanel.Gateways.PayPal/PayPalKeys.cs +++ b/WebsitePanel/Sources/WebsitePanel.Gateways.PayPal/PayPalKeys.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Gateways.PayPal/PayPalProProvider.cs b/WebsitePanel/Sources/WebsitePanel.Gateways.PayPal/PayPalProProvider.cs index 0830e790..58de354b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Gateways.PayPal/PayPalProProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Gateways.PayPal/PayPalProProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Gateways.PayPal/Reference.cs b/WebsitePanel/Sources/WebsitePanel.Gateways.PayPal/Reference.cs index 8c5b77e7..f75c0971 100644 --- a/WebsitePanel/Sources/WebsitePanel.Gateways.PayPal/Reference.cs +++ b/WebsitePanel/Sources/WebsitePanel.Gateways.PayPal/Reference.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Gateways.PayPalStandard/PayPalStandardProvider.cs b/WebsitePanel/Sources/WebsitePanel.Gateways.PayPalStandard/PayPalStandardProvider.cs index 5f7d0cce..85308e0f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Gateways.PayPalStandard/PayPalStandardProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Gateways.PayPalStandard/PayPalStandardProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Products.DomainName/DomainName.cs b/WebsitePanel/Sources/WebsitePanel.Products.DomainName/DomainName.cs index e7638660..0c93625f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Products.DomainName/DomainName.cs +++ b/WebsitePanel/Sources/WebsitePanel.Products.DomainName/DomainName.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Products.HostingAddon/HostingAddon.cs b/WebsitePanel/Sources/WebsitePanel.Products.HostingAddon/HostingAddon.cs index 8cc9f8e9..526d7fb5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Products.HostingAddon/HostingAddon.cs +++ b/WebsitePanel/Sources/WebsitePanel.Products.HostingAddon/HostingAddon.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Products.HostingPlan/HostingPlan.cs b/WebsitePanel/Sources/WebsitePanel.Products.HostingPlan/HostingPlan.cs index 02dc4f56..1f53e0f5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Products.HostingPlan/HostingPlan.cs +++ b/WebsitePanel/Sources/WebsitePanel.Products.HostingPlan/HostingPlan.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs index 49f0826f..56a981d0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -62,6 +62,8 @@ namespace WebsitePanel.Providers.Common public const string EnterpriseServer = "EnterpriseServer"; + public const string EnterpriseServerFQDN = "EnterpriseServerFQDN"; + public const string AdministrationToolService = "AdministrationToolService"; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/DailyStatistics.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/DailyStatistics.cs index 7cdcc3af..e93ebc2f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/DailyStatistics.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/DailyStatistics.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ErrorCodes.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ErrorCodes.cs index ebf0468b..75b4a34c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ErrorCodes.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ErrorCodes.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/HostingServiceProviderBase.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/HostingServiceProviderBase.cs index dd8e1ac0..2b72fd3d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/HostingServiceProviderBase.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/HostingServiceProviderBase.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/HostingServiceProviderWebService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/HostingServiceProviderWebService.cs index 1f648e23..37cbb9d4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/HostingServiceProviderWebService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/HostingServiceProviderWebService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/IHostingServiceProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/IHostingServiceProvider.cs index a1e2d04b..f05dcc0a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/IHostingServiceProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/IHostingServiceProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/NtfsPermission.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/NtfsPermission.cs index e2c56ae4..7c43a7b5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/NtfsPermission.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/NtfsPermission.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/PersistentAttribute.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/PersistentAttribute.cs index 1ab5de99..75b25048 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/PersistentAttribute.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/PersistentAttribute.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/RemoteServerSettings.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/RemoteServerSettings.cs index 90b98fb6..f39cedf6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/RemoteServerSettings.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/RemoteServerSettings.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServerBinding.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServerBinding.cs index 4f024527..5ff6f05e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServerBinding.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServerBinding.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServerState.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServerState.cs index ca04b871..6af5d979 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServerState.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServerState.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItem.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItem.cs index fe7a6108..9f7bd6e5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItem.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItem.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItemBandwidth.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItemBandwidth.cs index a653cc1d..63a029e3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItemBandwidth.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItemBandwidth.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItemDiskSpace.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItemDiskSpace.cs index 8306162e..64f7d892 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItemDiskSpace.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItemDiskSpace.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItemType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItemType.cs index 352e4ea1..8bdec479 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItemType.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderItemType.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderSettings.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderSettings.cs index 07303ffe..320874a0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderSettings.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderSettings.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderSettingsSoapHeader.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderSettingsSoapHeader.cs index beae47e3..73438b9b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderSettingsSoapHeader.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/ServiceProviderSettingsSoapHeader.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/SettingPair.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/SettingPair.cs index cb9aa303..51aa9e72 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/SettingPair.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/SettingPair.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/SoapServiceProviderItem.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/SoapServiceProviderItem.cs index 7b175fce..ea18c453 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/SoapServiceProviderItem.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/SoapServiceProviderItem.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/WPIEntries.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/WPIEntries.cs new file mode 100644 index 00000000..a61106c7 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/WPIEntries.cs @@ -0,0 +1,214 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace WebsitePanel.Server +{ + public class WPIProduct + { + private string productId; + private string logo; + private string summary; + private string title; + private string link; + private string version; + private string eulaUrl; + private string downloadedLocation; + private string longDescription; + private bool isInstalled; + private int fileSize; + private DateTime published; + private string author; + private string authorUri; + + public WPIProduct() + { + } + + public string Logo + { + get { return this.logo; } + set { this.logo = value; } + } + + public string ProductId + { + get { return this.productId; } + set { this.productId = value; } + } + + + public string Summary + { + get { return this.summary; } + set { this.summary = value; } + } + + public string Title + { + get { return this.title; } + set { this.title = value; } + } + + public string Link + { + get { return this.link; } + set { this.link = value; } + } + + public bool IsInstalled + { + get { return this.isInstalled; } + set { this.isInstalled = value; } + } + + public string Version + { + get { return this.version; } + set { this.version = value; } + } + + public string EulaUrl + { + get { return this.eulaUrl; } + set { this.eulaUrl = value; } + } + + public string DownloadedLocation + { + get { return this.downloadedLocation; } + set { this.downloadedLocation = value; } + } + + public int FileSize + { + get { return this.fileSize; } + set { this.fileSize = value; } + } + + public string LongDescription + { + get { return this.longDescription; } + set { this.longDescription = value; } + } + + public DateTime Published + { + get { return this.published; } + set { this.published = value; } + } + + public string Author + { + get { return author; } + set { author = value; } + } + + public string AuthorUri + { + get { return authorUri; } + set { authorUri = value; } + } + } + + public class WPITab + { + private string description; + private bool fromCustomFeed; + private string id; + private string name; + + public WPITab() + { + + } + + public WPITab(string id, string name) + { + this.id = id; + this.name = name; + } + + public string Description + { + get { return this.description; } + set { this.description = value; } + } + + public bool FromCustomFeed + { + get { return this.fromCustomFeed; } + set { this.fromCustomFeed = value; } + } + + public string Id + { + get { return this.id; } + set { this.id = value; } + } + + public string Name + { + get { return this.name; } + set { this.name = value; } + } + } + + public class WPIKeyword + { + private string id; + private string text; + + public WPIKeyword() + { + + } + + public WPIKeyword(string id, string text) + { + this.id = id; + this.text = text; + } + + public string Id + { + get { return this.id; } + set { this.id = value; } + } + + public string Text + { + get { return this.text; } + set { this.text = value; } + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/WindowsServerEntities.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/WindowsServerEntities.cs index fde29e1f..eb293de1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/WindowsServerEntities.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/WindowsServerEntities.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsRecord.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsRecord.cs index a99890b5..ec61181d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsRecord.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsRecord.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -39,6 +39,10 @@ namespace WebsitePanel.Providers.DNS private string recordData; private int mxPriority; private string recordText; + private int srvPriority; + private int srvWeight; + private int srvPort; + public string RecordName { @@ -69,5 +73,25 @@ namespace WebsitePanel.Providers.DNS get { return this.recordText; } set { this.recordText = value; } } + + + public int SrvPriority + { + get { return this.srvPriority; } + set { this.srvPriority = value; } + } + + public int SrvWeight + { + get { return this.srvWeight; } + set { this.srvWeight = value; } + } + + public int SrvPort + { + get { return this.srvPort; } + set { this.srvPort = value; } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsRecordType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsRecordType.cs index ac0f25c4..722c7b83 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsRecordType.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsRecordType.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -40,6 +40,8 @@ namespace WebsitePanel.Providers.DNS CNAME, SOA, TXT, + SRV, Other } } + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsSOARecord.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsSOARecord.cs index 11a57b49..8bc26f78 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsSOARecord.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsSOARecord.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsZone.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsZone.cs index d1b4d7a2..de4dda1a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsZone.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/DnsZone.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/IDnsServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/IDnsServer.cs index 06698be7..d7ba3a20 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/IDnsServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/IDnsServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/SecondaryDnsZone.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/SecondaryDnsZone.cs index 5808a9cc..77658116 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/SecondaryDnsZone.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/DNS/SecondaryDnsZone.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Database/IDatabaseServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Database/IDatabaseServer.cs index 1cc3f8d2..ae952582 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Database/IDatabaseServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Database/IDatabaseServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Database/SqlDatabase.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Database/SqlDatabase.cs index 0dfc8909..1d7ce043 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Database/SqlDatabase.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Database/SqlDatabase.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Database/SqlUser.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Database/SqlUser.cs index f5af1ca1..2f4cd2d1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Database/SqlUser.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Database/SqlUser.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ExchangeHostedEdition/ExchangeOrganization.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ExchangeHostedEdition/ExchangeOrganization.cs deleted file mode 100644 index 71a6d441..00000000 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ExchangeHostedEdition/ExchangeOrganization.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace WebsitePanel.Providers.ExchangeHostedEdition -{ - public class ExchangeOrganization : ServiceProviderItem - { - // basic props - public string ExchangeControlPanelUrl { get; set; } - public string DistinguishedName { get; set; } - public string ServicePlan { get; set; } - public string ProgramId { get; set; } - public string OfferId { get; set; } - public string AdministratorName { get; set; } - public string AdministratorEmail { get; set; } - - // domains - public ExchangeOrganizationDomain[] Domains { get; set; } - - // this is real usage - public int MailboxCount { get; set; } - public int ContactCount { get; set; } - public int DistributionListCount { get; set; } - - // these quotas are set in Exchange for the organization - public int MailboxCountQuota { get; set; } - public int ContactCountQuota { get; set; } - public int DistributionListCountQuota { get; set; } - - // these quotas are set in the hosting plan + add-ons - public int MaxDomainsCountQuota { get; set; } - public int MaxMailboxCountQuota { get; set; } - public int MaxContactCountQuota { get; set; } - public int MaxDistributionListCountQuota { get; set; } - - // summary information - public string SummaryInformation { get; set; } - - [Persistent] - public string CatchAllAddress { get; set; } - } -} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ExchangeHostedEdition/ExchangeOrganizationDomain.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ExchangeHostedEdition/ExchangeOrganizationDomain.cs deleted file mode 100644 index 26cd4090..00000000 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ExchangeHostedEdition/ExchangeOrganizationDomain.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace WebsitePanel.Providers.ExchangeHostedEdition -{ - public class ExchangeOrganizationDomain - { - public string Identity { get; set; } - public string Name { get; set; } - public bool IsDefault { get; set; } - public bool IsTemp { get; set; } - } -} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ExchangeHostedEdition/IExchangeHostedEdition.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ExchangeHostedEdition/IExchangeHostedEdition.cs deleted file mode 100644 index cc119413..00000000 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ExchangeHostedEdition/IExchangeHostedEdition.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace WebsitePanel.Providers.ExchangeHostedEdition -{ - public interface IExchangeHostedEdition - { - void CreateOrganization(string organizationId, string programId, string offerId, - string domain, string adminName, string adminEmail, string adminPassword); - ExchangeOrganization GetOrganizationDetails(string organizationId); - - List GetOrganizationDomains(string organizationId); - void AddOrganizationDomain(string organizationId, string domain); - void DeleteOrganizationDomain(string organizationId, string domain); - - void UpdateOrganizationQuotas(string organizationId, int mailboxesNumber, int contactsNumber, int distributionListsNumber); - void UpdateOrganizationCatchAllAddress(string organizationId, string catchAllEmail); - void UpdateOrganizationServicePlan(string organizationId, string programId, string offerId); - void DeleteOrganization(string organizationId); - } -} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/FTP/FtpAccount.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/FTP/FtpAccount.cs index a167474e..474af4fd 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/FTP/FtpAccount.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/FTP/FtpAccount.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/FTP/FtpSite.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/FTP/FtpSite.cs index d2a18626..136b72e2 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/FTP/FtpSite.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/FTP/FtpSite.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/FTP/IFtpServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/FTP/IFtpServer.cs index 817b4e58..661442f7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/FTP/IFtpServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/FTP/IFtpServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ADAttributes.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ADAttributes.cs index ed8b94e9..9ef289cb 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ADAttributes.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ADAttributes.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs index 69d2d91f..cb38f66d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ActiveDirectoryUtils.cs @@ -39,7 +39,7 @@ namespace WebsitePanel.Providers.HostedSolution { public static DirectoryEntry GetADObject(string path) { - DirectoryEntry de = new DirectoryEntry(path); + DirectoryEntry de = new DirectoryEntry(path); de.RefreshCache(); return de; } @@ -48,16 +48,16 @@ namespace WebsitePanel.Providers.HostedSolution { bool res = false; DirectorySearcher deSearch = new DirectorySearcher - { - Filter = - ("(&(objectClass=user)(samaccountname=" + samAccountName + "))") - }; + { + Filter = + ("(&(objectClass=user)(samaccountname=" + samAccountName + "))") + }; //get the group result SearchResult results = deSearch.FindOne(); DirectoryEntry de = results.GetDirectoryEntry(); PropertyValueCollection props = de.Properties["memberOf"]; - + foreach (string str in props) { if (str.IndexOf(group) != -1) @@ -81,8 +81,8 @@ namespace WebsitePanel.Providers.HostedSolution ou = parent.Children.Add( string.Format("OU={0}", name), - parent.SchemaClassName); - + parent.SchemaClassName); + ret = ou.Path; ou.CommitChanges(); } @@ -100,13 +100,13 @@ namespace WebsitePanel.Providers.HostedSolution public static void DeleteADObject(string path, bool removeChild) { DirectoryEntry entry = GetADObject(path); - + if (removeChild && entry.Children != null) foreach (DirectoryEntry child in entry.Children) { entry.Children.Remove(child); } - + DirectoryEntry parent = entry.Parent; if (parent != null) { @@ -115,7 +115,7 @@ namespace WebsitePanel.Providers.HostedSolution } } - + public static void DeleteADObject(string path) { DirectoryEntry entry = GetADObject(path); @@ -141,21 +141,34 @@ namespace WebsitePanel.Providers.HostedSolution } } else - { + { if (oDE.Properties.Contains(name)) { oDE.Properties[name].Remove(oDE.Properties[name][0]); } - + } } - public static void SetADObjectPropertyValue(DirectoryEntry oDE, string name, object value) + public static void SetADObjectPropertyValue(DirectoryEntry oDE, string name, string value) { PropertyValueCollection collection = oDE.Properties[name]; collection.Value = value; } - + + public static void SetADObjectPropertyValue(DirectoryEntry oDE, string name, Guid value) + { + PropertyValueCollection collection = oDE.Properties[name]; + collection.Value = value.ToByteArray(); + } + + public static void ClearADObjectPropertyValue(DirectoryEntry oDE, string name) + { + PropertyValueCollection collection = oDE.Properties[name]; + collection.Clear(); + } + + public static object GetADObjectProperty(DirectoryEntry entry, string name) { return entry.Properties.Contains(name) ? entry.Properties[name][0] : null; @@ -164,7 +177,7 @@ namespace WebsitePanel.Providers.HostedSolution public static string GetADObjectStringProperty(DirectoryEntry entry, string name) { object ret = GetADObjectProperty(entry, name); - return ret != null ? ret.ToString() : string.Empty; + return ret != null ? ret.ToString() : string.Empty; } public static string ConvertADPathToCanonicalName(string name) @@ -254,29 +267,38 @@ namespace WebsitePanel.Providers.HostedSolution return ret; } + public static string CreateUser(string path, string user, string displayName, string password, bool enabled) { - DirectoryEntry currentADObject = new DirectoryEntry(path); + return CreateUser(path, "", user, displayName, password, enabled); + } - DirectoryEntry newUserObject = currentADObject.Children.Add("CN=" + user, "User"); - - newUserObject.Properties[ADAttributes.SAMAccountName].Add(user); + public static string CreateUser(string path, string upn, string user, string displayName, string password, bool enabled) + { + DirectoryEntry currentADObject = new DirectoryEntry(path); + + string cn = string.Empty; + if (string.IsNullOrEmpty(upn)) cn = user; else cn = upn; + + DirectoryEntry newUserObject = currentADObject.Children.Add("CN=" + cn, "User"); + + newUserObject.Properties[ADAttributes.SAMAccountName].Add(user); SetADObjectProperty(newUserObject, ADAttributes.DisplayName, displayName); newUserObject.CommitChanges(); newUserObject.Invoke(ADAttributes.SetPassword, password); newUserObject.InvokeSet(ADAttributes.AccountDisabled, !enabled); newUserObject.CommitChanges(); - + return newUserObject.Path; } public static void CreateGroup(string path, string group) { - DirectoryEntry currentADObject = new DirectoryEntry(path); + DirectoryEntry currentADObject = new DirectoryEntry(path); DirectoryEntry newGroupObject = currentADObject.Children.Add("CN=" + group, "Group"); - + newGroupObject.Properties[ADAttributes.SAMAccountName].Add(group); newGroupObject.Properties[ADAttributes.GroupType].Add(-2147483640); @@ -320,7 +342,7 @@ namespace WebsitePanel.Providers.HostedSolution if (string.IsNullOrEmpty(primaryDomainController)) { dn = string.Format("LDAP://{0}", dn); - + } else dn = string.Format("LDAP://{0}/{1}", primaryDomainController, dn); @@ -358,7 +380,7 @@ namespace WebsitePanel.Providers.HostedSolution DirectoryEntry ou = GetADObject(ouPath); PropertyValueCollection prop = null; - prop = ou.Properties["uPNSuffixes"]; + prop = ou.Properties["uPNSuffixes"]; if (prop != null) { diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BaseReport.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BaseReport.cs index 40e67d50..32af14a1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BaseReport.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BaseReport.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BaseStatistics.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BaseStatistics.cs index f9b8294b..d91dcb6f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BaseStatistics.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BaseStatistics.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryErrorsCodes.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryErrorsCodes.cs index 77006fc4..b1cc4e27 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryErrorsCodes.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryErrorsCodes.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryStatsItem.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryStatsItem.cs index cbee315c..34a89269 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryStatsItem.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryStatsItem.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryUserDeleteState.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryUserDeleteState.cs index 4d6f1087..c859e0ae 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryUserDeleteState.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryUserDeleteState.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMBaseUnit.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMBaseUnit.cs index cc318069..a1aaa554 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMBaseUnit.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMBaseUnit.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMOrganizationStatistics.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMOrganizationStatistics.cs index 8d5543e5..cabe1bed 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMOrganizationStatistics.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMOrganizationStatistics.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMStatisticsReport.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMStatisticsReport.cs index c981dfe2..ca3112fb 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMStatisticsReport.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMStatisticsReport.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMUserAccessMode.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMUserAccessMode.cs index 418c9aff..70e89217 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMUserAccessMode.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CRMUserAccessMode.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmErrorCodes.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmErrorCodes.cs index aecf20e7..1a03bd13 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmErrorCodes.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmErrorCodes.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmOrganizationRole.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmOrganizationRole.cs index a5624561..6c08804a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmOrganizationRole.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmOrganizationRole.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmOrganizationState.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmOrganizationState.cs index 7714cb1f..57e3f913 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmOrganizationState.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmOrganizationState.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmUser.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmUser.cs index 4fa0924f..55c68ce2 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmUser.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/CrmUser.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/Currency.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/Currency.cs index feab3d17..8a62b052 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/Currency.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/Currency.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/EnterpriseSolutionStatisticsReport.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/EnterpriseSolutionStatisticsReport.cs index db1cea6d..707c0531 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/EnterpriseSolutionStatisticsReport.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/EnterpriseSolutionStatisticsReport.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/Errors.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/Errors.cs index db80d157..8a4868e8 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/Errors.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/Errors.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccount.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccount.cs index 3ee2bcb7..36fbfdde 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccount.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccount.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -32,31 +32,35 @@ using System.Text; namespace WebsitePanel.Providers.HostedSolution { - public class ExchangeAccount - { - int accountId; - int itemId; + public class ExchangeAccount + { + int accountId; + int itemId; int packageId; - ExchangeAccountType accountType; - string accountName; - string displayName; - string primaryEmailAddress; - bool mailEnabledPublicFolder; + string subscriberNumber; + ExchangeAccountType accountType; + string accountName; + string displayName; + string primaryEmailAddress; + bool mailEnabledPublicFolder; MailboxManagerActions mailboxManagerActions; string accountPassword; string samAccountName; + int mailboxPlanId; + string mailboxPlan; + string publicFolderPermission; - public int AccountId - { - get { return this.accountId; } - set { this.accountId = value; } - } + public int AccountId + { + get { return this.accountId; } + set { this.accountId = value; } + } - public int ItemId - { + public int ItemId + { get { return this.itemId; } set { this.itemId = value; } - } + } public int PackageId { @@ -64,17 +68,17 @@ namespace WebsitePanel.Providers.HostedSolution set { this.packageId = value; } } - public ExchangeAccountType AccountType - { - get { return this.accountType; } - set { this.accountType = value; } - } + public ExchangeAccountType AccountType + { + get { return this.accountType; } + set { this.accountType = value; } + } - public string AccountName - { - get { return this.accountName; } - set { this.accountName = value; } - } + public string AccountName + { + get { return this.accountName; } + set { this.accountName = value; } + } public string SamAccountName { @@ -82,23 +86,23 @@ namespace WebsitePanel.Providers.HostedSolution set { this.samAccountName = value; } } - public string DisplayName - { - get { return this.displayName; } - set { this.displayName = value; } - } + public string DisplayName + { + get { return this.displayName; } + set { this.displayName = value; } + } - public string PrimaryEmailAddress - { - get { return this.primaryEmailAddress; } - set { this.primaryEmailAddress = value; } - } + public string PrimaryEmailAddress + { + get { return this.primaryEmailAddress; } + set { this.primaryEmailAddress = value; } + } - public bool MailEnabledPublicFolder - { - get { return this.mailEnabledPublicFolder; } - set { this.mailEnabledPublicFolder = value; } - } + public bool MailEnabledPublicFolder + { + get { return this.mailEnabledPublicFolder; } + set { this.mailEnabledPublicFolder = value; } + } public string AccountPassword { @@ -111,5 +115,32 @@ namespace WebsitePanel.Providers.HostedSolution get { return this.mailboxManagerActions; } set { this.mailboxManagerActions = value; } } - } + + public int MailboxPlanId + { + get { return this.mailboxPlanId; } + set { this.mailboxPlanId = value; } + } + + public string MailboxPlan + { + get { return this.mailboxPlan; } + set { this.mailboxPlan = value; } + } + + + public string SubscriberNumber + { + get { return this.subscriberNumber; } + set { this.subscriberNumber = value; } + } + + public string PublicFolderPermission + { + get { return this.publicFolderPermission; } + set { this.publicFolderPermission = value; } + } + + + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs index 5c692ca7..a72ef690 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountType.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountsPaged.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountsPaged.cs index 8a512af0..e048163f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountsPaged.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeAccountsPaged.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeActiveSyncPolicy.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeActiveSyncPolicy.cs index 4bcc07b6..b0939026 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeActiveSyncPolicy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeActiveSyncPolicy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeContact.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeContact.cs index 9cae778f..689d1558 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeContact.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeContact.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -32,209 +32,219 @@ using System.Text; namespace WebsitePanel.Providers.HostedSolution { - public class ExchangeContact - { - string displayName; - string accountName; - string emailAddress; - bool hideFromAddressBook; + public class ExchangeContact + { + string displayName; + string accountName; + string emailAddress; + bool hideFromAddressBook; - string firstName; - string initials; - string lastName; + string firstName; + string initials; + string lastName; - string jobTitle; - string company; - string department; - string office; - ExchangeAccount managerAccount; + string jobTitle; + string company; + string department; + string office; + ExchangeAccount managerAccount; - string businessPhone; - string fax; - string homePhone; - string mobilePhone; - string pager; - string webPage; + string businessPhone; + string fax; + string homePhone; + string mobilePhone; + string pager; + string webPage; - string address; - string city; - string state; - string zip; - string country; + string address; + string city; + string state; + string zip; + string country; - string notes; - private int useMapiRichTextFormat; - - ExchangeAccount[] acceptAccounts; - ExchangeAccount[] rejectAccounts; - bool requireSenderAuthentication; + string notes; + string sAMAccountName; + private int useMapiRichTextFormat; - public string DisplayName - { - get { return this.displayName; } - set { this.displayName = value; } - } + ExchangeAccount[] acceptAccounts; + ExchangeAccount[] rejectAccounts; + bool requireSenderAuthentication; - public string AccountName - { - get { return this.accountName; } - set { this.accountName = value; } - } + public string DisplayName + { + get { return this.displayName; } + set { this.displayName = value; } + } - public string EmailAddress - { - get { return this.emailAddress; } - set { this.emailAddress = value; } - } + public string AccountName + { + get { return this.accountName; } + set { this.accountName = value; } + } - public bool HideFromAddressBook - { - get { return this.hideFromAddressBook; } - set { this.hideFromAddressBook = value; } - } + public string EmailAddress + { + get { return this.emailAddress; } + set { this.emailAddress = value; } + } - public string FirstName - { - get { return this.firstName; } - set { this.firstName = value; } - } + public bool HideFromAddressBook + { + get { return this.hideFromAddressBook; } + set { this.hideFromAddressBook = value; } + } - public string Initials - { - get { return this.initials; } - set { this.initials = value; } - } + public string FirstName + { + get { return this.firstName; } + set { this.firstName = value; } + } - public string LastName - { - get { return this.lastName; } - set { this.lastName = value; } - } + public string Initials + { + get { return this.initials; } + set { this.initials = value; } + } - public string JobTitle - { - get { return this.jobTitle; } - set { this.jobTitle = value; } - } + public string LastName + { + get { return this.lastName; } + set { this.lastName = value; } + } - public string Company - { - get { return this.company; } - set { this.company = value; } - } + public string JobTitle + { + get { return this.jobTitle; } + set { this.jobTitle = value; } + } - public string Department - { - get { return this.department; } - set { this.department = value; } - } + public string Company + { + get { return this.company; } + set { this.company = value; } + } - public string Office - { - get { return this.office; } - set { this.office = value; } - } + public string Department + { + get { return this.department; } + set { this.department = value; } + } - public ExchangeAccount ManagerAccount - { - get { return this.managerAccount; } - set { this.managerAccount = value; } - } + public string Office + { + get { return this.office; } + set { this.office = value; } + } - public string BusinessPhone - { - get { return this.businessPhone; } - set { this.businessPhone = value; } - } + public ExchangeAccount ManagerAccount + { + get { return this.managerAccount; } + set { this.managerAccount = value; } + } - public string Fax - { - get { return this.fax; } - set { this.fax = value; } - } + public string BusinessPhone + { + get { return this.businessPhone; } + set { this.businessPhone = value; } + } - public string HomePhone - { - get { return this.homePhone; } - set { this.homePhone = value; } - } + public string Fax + { + get { return this.fax; } + set { this.fax = value; } + } - public string MobilePhone - { - get { return this.mobilePhone; } - set { this.mobilePhone = value; } - } + public string HomePhone + { + get { return this.homePhone; } + set { this.homePhone = value; } + } - public string Pager - { - get { return this.pager; } - set { this.pager = value; } - } + public string MobilePhone + { + get { return this.mobilePhone; } + set { this.mobilePhone = value; } + } - public string WebPage - { - get { return this.webPage; } - set { this.webPage = value; } - } + public string Pager + { + get { return this.pager; } + set { this.pager = value; } + } - public string Address - { - get { return this.address; } - set { this.address = value; } - } + public string WebPage + { + get { return this.webPage; } + set { this.webPage = value; } + } - public string City - { - get { return this.city; } - set { this.city = value; } - } + public string Address + { + get { return this.address; } + set { this.address = value; } + } - public string State - { - get { return this.state; } - set { this.state = value; } - } + public string City + { + get { return this.city; } + set { this.city = value; } + } - public string Zip - { - get { return this.zip; } - set { this.zip = value; } - } + public string State + { + get { return this.state; } + set { this.state = value; } + } - public string Country - { - get { return this.country; } - set { this.country = value; } - } + public string Zip + { + get { return this.zip; } + set { this.zip = value; } + } - public string Notes - { - get { return this.notes; } - set { this.notes = value; } - } + public string Country + { + get { return this.country; } + set { this.country = value; } + } - public ExchangeAccount[] AcceptAccounts - { - get { return this.acceptAccounts; } - set { this.acceptAccounts = value; } - } + public string Notes + { + get { return this.notes; } + set { this.notes = value; } + } - public ExchangeAccount[] RejectAccounts - { - get { return this.rejectAccounts; } - set { this.rejectAccounts = value; } - } + public ExchangeAccount[] AcceptAccounts + { + get { return this.acceptAccounts; } + set { this.acceptAccounts = value; } + } - public bool RequireSenderAuthentication - { - get { return requireSenderAuthentication; } - set { requireSenderAuthentication = value; } - } + public ExchangeAccount[] RejectAccounts + { + get { return this.rejectAccounts; } + set { this.rejectAccounts = value; } + } - public int UseMapiRichTextFormat - { + public bool RequireSenderAuthentication + { + get { return requireSenderAuthentication; } + set { requireSenderAuthentication = value; } + } + + public int UseMapiRichTextFormat + { get { return useMapiRichTextFormat; } set { useMapiRichTextFormat = value; } - } - } + } + + public string SAMAccountName + { + get { return sAMAccountName; } + set { sAMAccountName = value; } + } + + + + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDistributionList.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDistributionList.cs index 73a34dc3..6d3c5322 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDistributionList.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDistributionList.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -32,72 +32,79 @@ using System.Text; namespace WebsitePanel.Providers.HostedSolution { - public class ExchangeDistributionList - { - public string DisplayName - { - get; - set; - } + public class ExchangeDistributionList + { + public string DisplayName + { + get; + set; + } - public string AccountName - { - get; - set; - } + public string AccountName + { + get; + set; + } - public bool HideFromAddressBook - { - get; - set; - } + public bool HideFromAddressBook + { + get; + set; + } - public ExchangeAccount[] MembersAccounts - { - get; - set; - } + public ExchangeAccount[] MembersAccounts + { + get; + set; + } - public ExchangeAccount ManagerAccount - { - get; - set; - } + public ExchangeAccount ManagerAccount + { + get; + set; + } - public string Notes - { - get; - set; - } + public string Notes + { + get; + set; + } - public ExchangeAccount[] AcceptAccounts - { - get; - set; - } + public ExchangeAccount[] AcceptAccounts + { + get; + set; + } - public ExchangeAccount[] RejectAccounts - { - get; - set; - } + public ExchangeAccount[] RejectAccounts + { + get; + set; + } - public bool RequireSenderAuthentication - { - get; - set; - } - - public ExchangeAccount[] SendAsAccounts - { - get; - set; - } + public bool RequireSenderAuthentication + { + get; + set; + } - public ExchangeAccount[] SendOnBehalfAccounts - { - get; - set; - } - } + public ExchangeAccount[] SendAsAccounts + { + get; + set; + } + + public ExchangeAccount[] SendOnBehalfAccounts + { + get; + set; + } + + public string SAMAccountName + { + get; + set; + } + + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDomain.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDomain.cs index dd1cf73f..42c88b76 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDomain.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDomain.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDomainName.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDomainName.cs index 2aec1d0b..1bb11078 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDomainName.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeDomainName.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeEmailAddress.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeEmailAddress.cs index 52c1b9ef..0db794cd 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeEmailAddress.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeEmailAddress.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeItemStatistics.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeItemStatistics.cs index 2cee3ded..9db8226e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeItemStatistics.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeItemStatistics.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailbox.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailbox.cs index 268e3107..1b3fe8bf 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailbox.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailbox.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxPlan.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxPlan.cs new file mode 100644 index 00000000..167c5f04 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxPlan.cs @@ -0,0 +1,160 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebsitePanel.Providers.HostedSolution +{ + public class ExchangeMailboxPlan + { + int mailboxPlanId; + string mailboxPlan; + int mailboxSizeMB; + int maxRecipients; + int maxSendMessageSizeKB; + int maxReceiveMessageSizeKB; + + bool enablePOP; + bool enableIMAP; + bool enableOWA; + bool enableMAPI; + bool enableActiveSync; + + int issueWarningPct; + int prohibitSendPct; + int prohibitSendReceivePct; + int keepDeletedItemsDays; + bool isDefault; + bool hideFromAddressBook; + + public int MailboxPlanId + { + get { return this.mailboxPlanId; } + set { this.mailboxPlanId = value; } + } + + public string MailboxPlan + { + get { return this.mailboxPlan; } + set { this.mailboxPlan = value; } + } + + public int MailboxSizeMB + { + get { return this.mailboxSizeMB; } + set { this.mailboxSizeMB = value; } + } + + public bool IsDefault + { + get { return this.isDefault; } + set { this.isDefault = value; } + } + + public int MaxRecipients + { + get { return this.maxRecipients; } + set { this.maxRecipients = value; } + } + + public int MaxSendMessageSizeKB + { + get { return this.maxSendMessageSizeKB; } + set { this.maxSendMessageSizeKB = value; } + } + + public int MaxReceiveMessageSizeKB + { + get { return this.maxReceiveMessageSizeKB; } + set { this.maxReceiveMessageSizeKB = value; } + } + + public bool EnablePOP + { + get { return this.enablePOP; } + set { this.enablePOP = value; } + } + + public bool EnableIMAP + { + get { return this.enableIMAP; } + set { this.enableIMAP = value; } + } + + public bool EnableOWA + { + get { return this.enableOWA; } + set { this.enableOWA = value; } + } + + public bool EnableMAPI + { + get { return this.enableMAPI; } + set { this.enableMAPI = value; } + } + + public bool EnableActiveSync + { + get { return this.enableActiveSync; } + set { this.enableActiveSync = value; } + } + + public int IssueWarningPct + { + get { return this.issueWarningPct; } + set { this.issueWarningPct = value; } + } + + public int ProhibitSendPct + { + get { return this.prohibitSendPct; } + set { this.prohibitSendPct = value; } + } + + public int ProhibitSendReceivePct + { + get { return this.prohibitSendReceivePct; } + set { this.prohibitSendReceivePct = value; } + } + + public int KeepDeletedItemsDays + { + get { return this.keepDeletedItemsDays; } + set { this.keepDeletedItemsDays = value; } + } + + public bool HideFromAddressBook + { + get { return this.hideFromAddressBook; } + set { this.hideFromAddressBook = value; } + } + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxStatistics.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxStatistics.cs index babf59eb..7583893e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxStatistics.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMailboxStatistics.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMobileDevice.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMobileDevice.cs index 34ea6048..ceb52918 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMobileDevice.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeMobileDevice.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeOrganizationStatistics.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeOrganizationStatistics.cs index 3a4b4057..9e36834f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeOrganizationStatistics.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeOrganizationStatistics.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeOrganizationsPaged.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeOrganizationsPaged.cs index 42b43413..ff4f12f9 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeOrganizationsPaged.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeOrganizationsPaged.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangePublicFolder.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangePublicFolder.cs index d1c5a196..8e0b5b50 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangePublicFolder.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangePublicFolder.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -31,12 +31,14 @@ namespace WebsitePanel.Providers.HostedSolution public class ExchangePublicFolder { string name; + string netbios; string displayName; + string sAMAccountName; bool hideFromAddressBook; bool mailEnabled; - ExchangeAccount[] authorsAccounts; - + ExchangeAccount[] accounts; + ExchangeAccount[] acceptAccounts; ExchangeAccount[] rejectAccounts; bool requireSenderAuthentication; @@ -59,12 +61,13 @@ namespace WebsitePanel.Providers.HostedSolution set { this.mailEnabled = value; } } - public WebsitePanel.Providers.HostedSolution.ExchangeAccount[] AuthorsAccounts - { - get { return this.authorsAccounts; } - set { this.authorsAccounts = value; } - } - + + public WebsitePanel.Providers.HostedSolution.ExchangeAccount[] Accounts + { + get { return this.accounts; } + set { this.accounts = value; } + } + public WebsitePanel.Providers.HostedSolution.ExchangeAccount[] AcceptAccounts { get { return this.acceptAccounts; } @@ -88,5 +91,19 @@ namespace WebsitePanel.Providers.HostedSolution get { return requireSenderAuthentication; } set { requireSenderAuthentication = value; } } + + public string SAMAccountName + { + get { return this.sAMAccountName; } + set { this.sAMAccountName = value; } + } + + public string NETBIOS + { + get { return this.netbios; } + set { this.netbios = value; } + } + + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeStatisticsReport.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeStatisticsReport.cs index d7ba4797..7366c029 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeStatisticsReport.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ExchangeStatisticsReport.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IBlackBerry.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IBlackBerry.cs index 97029d73..21c86aa1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IBlackBerry.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IBlackBerry.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ICRM.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ICRM.cs index d079888f..4a02c4ca 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ICRM.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ICRM.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IExchangeServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IExchangeServer.cs index 04ec8aa9..559b9385 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IExchangeServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IExchangeServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -30,70 +30,71 @@ namespace WebsitePanel.Providers.HostedSolution { public interface IExchangeServer { - + bool CheckAccountCredentials(string username, string password); - // Organizations + // Organizations - string CreateMailEnableUser(string upn, string organizationId, string organizationDistinguishedName, ExchangeAccountType accountType, - string mailboxDatabase, string offlineAddressBook, - string accountName, bool enablePOP, bool enableIMAP, - bool enableOWA, bool enableMAPI, bool enableActiveSync, - int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, - int keepDeletedItemsDays); - - Organization ExtendToExchangeOrganization(string organizationId, string securityGroup); - string GetOABVirtualDirectory(); - Organization CreateOrganizationOfflineAddressBook(string organizationId, string securityGroup, string oabVirtualDir); - void UpdateOrganizationOfflineAddressBook(string id); - bool DeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomsAddressList, string offlineAddressBook, string securityGroup); - void SetOrganizationStorageLimits(string organizationDistinguishedName, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays); - ExchangeItemStatistics[] GetMailboxesStatistics(string organizationDistinguishedName); + string CreateMailEnableUser(string upn, string organizationId, string organizationDistinguishedName, ExchangeAccountType accountType, + string mailboxDatabase, string offlineAddressBook, string addressBookPolicy, + string accountName, bool enablePOP, bool enableIMAP, + bool enableOWA, bool enableMAPI, bool enableActiveSync, + int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, + int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool hideFromAddressBook, bool isConsumer); - // Domains + Organization ExtendToExchangeOrganization(string organizationId, string securityGroup, bool IsConsumer); + string GetOABVirtualDirectory(); + Organization CreateOrganizationOfflineAddressBook(string organizationId, string securityGroup, string oabVirtualDir); + Organization CreateOrganizationAddressBookPolicy(string organizationId, string gal, string addressBook, string roomList, string oab); + void UpdateOrganizationOfflineAddressBook(string id); + bool DeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy); + void SetOrganizationStorageLimits(string organizationDistinguishedName, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays); + ExchangeItemStatistics[] GetMailboxesStatistics(string organizationDistinguishedName); + + // Domains void AddAuthoritativeDomain(string domain); void DeleteAuthoritativeDomain(string domain); - string[] GetAuthoritativeDomains(); + string[] GetAuthoritativeDomains(); - // Mailboxes - string CreateMailbox(string organizationId, string organizationDistinguishedName, string mailboxDatabase, string securityGroup, string offlineAddressBook, ExchangeAccountType accountType, string displayName, string accountName, string name, string domain, string password, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, - int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays); - void DeleteMailbox(string accountName); + // Mailboxes + //string CreateMailbox(string organizationId, string organizationDistinguishedName, string mailboxDatabase, string securityGroup, string offlineAddressBook, string addressBookPolicy, ExchangeAccountType accountType, string displayName, string accountName, string name, string domain, string password, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, + // int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB,bool hideFromAddressBook); + void DeleteMailbox(string accountName); void DisableMailbox(string id); - ExchangeMailbox GetMailboxGeneralSettings(string accountName); - void SetMailboxGeneralSettings(string accountName, string displayName, string password, bool hideFromAddressBook, bool disabled, string firstName, string initials, string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes); - ExchangeMailbox GetMailboxMailFlowSettings(string accountName); - void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool requireSenderAuthentication); - ExchangeMailbox GetMailboxAdvancedSettings(string accountName); - void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays); - ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName); - void SetMailboxEmailAddresses(string accountName, string[] emailAddresses); - void SetMailboxPrimaryEmailAddress(string accountName, string emailAddress); - void SetMailboxPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts); - ExchangeMailbox GetMailboxPermissions(string organizationId, string accountName); - ExchangeMailboxStatistics GetMailboxStatistics(string accountName); + ExchangeMailbox GetMailboxGeneralSettings(string accountName); + void SetMailboxGeneralSettings(string accountName, bool hideFromAddressBook, bool disabled); + ExchangeMailbox GetMailboxMailFlowSettings(string accountName); + void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication); + ExchangeMailbox GetMailboxAdvancedSettings(string accountName); + void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB); + ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName); + void SetMailboxEmailAddresses(string accountName, string[] emailAddresses); + void SetMailboxPrimaryEmailAddress(string accountName, string emailAddress); + void SetMailboxPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts); + ExchangeMailbox GetMailboxPermissions(string organizationId, string accountName); + ExchangeMailboxStatistics GetMailboxStatistics(string accountName); - // Contacts - void CreateContact(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain); - void DeleteContact(string accountName); - ExchangeContact GetContactGeneralSettings(string accountName); + // Contacts + void CreateContact(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain); + void DeleteContact(string accountName); + ExchangeContact GetContactGeneralSettings(string accountName); void SetContactGeneralSettings(string accountName, string displayName, string email, bool hideFromAddressBook, string firstName, string initials, string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes, int useMapiRichTextFormat, string defaultDomain); - ExchangeContact GetContactMailFlowSettings(string accountName); - void SetContactMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication); + ExchangeContact GetContactMailFlowSettings(string accountName); + void SetContactMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication); - // Distribution Lists - void CreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy); - void DeleteDistributionList(string accountName); - ExchangeDistributionList GetDistributionListGeneralSettings(string accountName); - void SetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] memebers, string notes); - void AddDistributionListMembers(string accountName, string[] memberAccounts); - void RemoveDistributionListMembers(string accountName, string[] memberAccounts); - ExchangeDistributionList GetDistributionListMailFlowSettings(string accountName); - void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication); - ExchangeEmailAddress[] GetDistributionListEmailAddresses(string accountName); - void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses); - void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress); - ExchangeDistributionList GetDistributionListPermissions(string organizationId, string accountName); - void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts); + // Distribution Lists + void CreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists); + void DeleteDistributionList(string accountName); + ExchangeDistributionList GetDistributionListGeneralSettings(string accountName); + void SetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] memebers, string notes, string[] addressLists); + void AddDistributionListMembers(string accountName, string[] memberAccounts, string[] addressLists); + void RemoveDistributionListMembers(string accountName, string[] memberAccounts, string[] addressLists); + ExchangeDistributionList GetDistributionListMailFlowSettings(string accountName); + void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists); + ExchangeEmailAddress[] GetDistributionListEmailAddresses(string accountName); + void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses, string[] addressLists); + void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress, string[] addressLists); + ExchangeDistributionList GetDistributionListPermissions(string organizationId, string accountName); + void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists); // Public Folders void CreatePublicFolder(string organizationId, string securityGroup, string parentFolder, string folderName, bool mailEnabled, string accountName, string name, string domain); @@ -101,7 +102,7 @@ namespace WebsitePanel.Providers.HostedSolution void EnableMailPublicFolder(string organizationId, string folder, string accountName, string name, string domain); void DisableMailPublicFolder(string folder); ExchangePublicFolder GetPublicFolderGeneralSettings(string folder); - void SetPublicFolderGeneralSettings(string folder, string newFolderName, string[] authorAccounts, bool hideFromAddressBook); + void SetPublicFolderGeneralSettings(string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts ); ExchangePublicFolder GetPublicFolderMailFlowSettings(string folder); void SetPublicFolderMailFlowSettings(string folder, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication); ExchangeEmailAddress[] GetPublicFolderEmailAddresses(string folder); @@ -111,20 +112,20 @@ namespace WebsitePanel.Providers.HostedSolution string[] GetPublicFoldersRecursive(string parent); long GetPublicFolderSize(string folder); - //ActiveSync - void CreateOrganizationActiveSyncPolicy(string organizationId); - ExchangeActiveSyncPolicy GetActiveSyncPolicy(string organizationId); - void SetActiveSyncPolicy(string organizationId, bool allowNonProvisionableDevices, bool attachmentsEnabled, - int maxAttachmentSizeKB, bool uncAccessEnabled, bool wssAccessEnabled, bool devicePasswordEnabled, - bool alphanumericPasswordRequired, bool passwordRecoveryEnabled, bool deviceEncryptionEnabled, - bool allowSimplePassword, int maxPasswordFailedAttempts, int minPasswordLength, int inactivityLockMin, - int passwordExpirationDays, int passwordHistory, int refreshInterval); + //ActiveSync + void CreateOrganizationActiveSyncPolicy(string organizationId); + ExchangeActiveSyncPolicy GetActiveSyncPolicy(string organizationId); + void SetActiveSyncPolicy(string organizationId, bool allowNonProvisionableDevices, bool attachmentsEnabled, + int maxAttachmentSizeKB, bool uncAccessEnabled, bool wssAccessEnabled, bool devicePasswordEnabled, + bool alphanumericPasswordRequired, bool passwordRecoveryEnabled, bool deviceEncryptionEnabled, + bool allowSimplePassword, int maxPasswordFailedAttempts, int minPasswordLength, int inactivityLockMin, + int passwordExpirationDays, int passwordHistory, int refreshInterval); - //Mobile Devices - ExchangeMobileDevice[] GetMobileDevices(string accountName); - ExchangeMobileDevice GetMobileDevice(string id); - void WipeDataFromDevice(string id); - void CancelRemoteWipeRequest(string id); - void RemoveDevice(string id); - } + //Mobile Devices + ExchangeMobileDevice[] GetMobileDevices(string accountName); + ExchangeMobileDevice GetMobileDevice(string id); + void WipeDataFromDevice(string id); + void CancelRemoteWipeRequest(string id); + void RemoveDevice(string id); + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ILyncServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ILyncServer.cs new file mode 100644 index 00000000..ef1047a0 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/ILyncServer.cs @@ -0,0 +1,51 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebsitePanel.Providers.HostedSolution +{ + public interface ILyncServer + { + string CreateOrganization(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice); + bool DeleteOrganization(string organizationId, string sipDomain); + + bool CreateUser(string organizationId, string userUpn, LyncUserPlan plan); + LyncUser GetLyncUserGeneralSettings(string organizationId, string userUpn); + bool SetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan); + bool DeleteUser(string userUpn); + + LyncFederationDomain[] GetFederationDomains(string organizationId); + bool AddFederationDomain(string organizationId, string domainName, string proxyFqdn); + bool RemoveFederationDomain(string organizationId, string domainName); + + void ReloadConfiguration(); + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOCSEdgeServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOCSEdgeServer.cs index 37db4597..b957d29f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOCSEdgeServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOCSEdgeServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOCSServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOCSServer.cs index 179ff4f6..fc3122b2 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOCSServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOCSServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs index 32c92c63..15846f9c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -33,10 +33,10 @@ namespace WebsitePanel.Providers.HostedSolution public interface IOrganization { Organization CreateOrganization(string organizationId); - + void DeleteOrganization(string organizationId); - void CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled); + int CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled); void DeleteUser(string loginName, string organizationId); @@ -49,7 +49,7 @@ namespace WebsitePanel.Providers.HostedSolution string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, - string webPage, string notes, string externalEmail); + string webPage, string notes, string externalEmail); bool OrganizationExists(string organizationId); @@ -58,5 +58,7 @@ namespace WebsitePanel.Providers.HostedSolution void CreateOrganizationDomain(string organizationDistinguishedName, string domain); PasswordPolicyResult GetPasswordPolicy(); + + string GetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName); } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncConstants.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncConstants.cs new file mode 100644 index 00000000..4da82007 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncConstants.cs @@ -0,0 +1,36 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +namespace WebsitePanel.Providers.HostedSolution + { + public class LyncConstants + { + public const string PoolFQDN = "PoolFQDN"; + public const string SimpleUrlRoot = "SimpleUrlRoot"; + } + } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncErrorCodes.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncErrorCodes.cs new file mode 100644 index 00000000..15cfbae8 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncErrorCodes.cs @@ -0,0 +1,74 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +namespace WebsitePanel.Providers.HostedSolution + { + public class LyncErrorCodes + { + public const string CANNOT_CHECK_IF_LYNC_USER_EXISTS = "CANNOT_CHECK_IF_LYNC_USER_EXISTS"; + + public const string USER_IS_ALREADY_LYNC_USER = "USER_IS_ALREADY_LYNC_USER"; + + public const string USER_FIRST_NAME_IS_NOT_SPECIFIED = "USER_FIRST_NAME_IS_NOT_SPECIFIED"; + + public const string USER_LAST_NAME_IS_NOT_SPECIFIED = "USER_LAST_NAME_IS_NOT_SPECIFIED"; + + public const string CANNOT_GET_USER_GENERAL_SETTINGS = "CANNOT_GET_USER_GENERAL_SETTINGS"; + + public const string CANNOT_ADD_LYNC_USER_TO_DATABASE = "CANNOT_ADD_LYNC_USER_TO_DATABASE"; + + public const string GET_LYNC_USER_COUNT = "GET_LYNC_USER_COUNT"; + + public const string GET_LYNC_USERS = "GET_LYNC_USERS"; + + public const string CANNOT_DELETE_LYNC_USER_FROM_METADATA = "CANNOT_DELETE_LYNC_USER_FROM_METADATA"; + + public const string CANNOT_DELETE_LYNC_USER = "CANNOT_DELETE_LYNC_USER"; + + public const string CANNOT_GET_LYNC_PROXY = "CANNOT_GET_LYNC_PROXY"; + + public const string USER_QUOTA_HAS_BEEN_REACHED = "USER_QUOTA_HAS_BEEN_REACHED"; + + public const string CANNOT_CHECK_QUOTA = "CANNOT_CHECK_QUOTA"; + + public const string CANNOT_SET_DEFAULT_SETTINGS = "CANNOT_SET_DEFAULT_SETTINGS"; + + public const string CANNOT_ADD_LYNC_USER = "CANNOT_ADD_LYNC_USER"; + + public const string CANNOT_UPDATE_LYNC_USER = "CANNOT_UPDATE_LYNC_USER"; + + public const string CANNOT_ENABLE_ORG = "CANNOT_ENABLE_ORG"; + + public const string NOT_AUTHORIZED = "NOT_AUTHORIZED"; + + public const string CANNOT_ADD_LYNC_FEDERATIONDOMAIN = "CANNOT_ADD_LYNC_FEDERATIONDOMAIN"; + + public const string CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN = "CANNOT_REMOVE_LYNC_FEDERATIONDOMAIN"; + + } + } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncFederationDomain.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncFederationDomain.cs new file mode 100644 index 00000000..f5ac4498 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncFederationDomain.cs @@ -0,0 +1,66 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebsitePanel.Providers.HostedSolution +{ + public class LyncFederationDomain + { + string domainName; + string comment; + bool markForMonitoring; + string proxyFqdn; + + public string DomainName + { + get { return this.domainName; } + set { this.domainName = value; } + } + + public string Comment + { + get { return this.comment; } + set { this.comment = value; } + } + + public bool MarkForMonitoring + { + get { return this.markForMonitoring; } + set { this.markForMonitoring = value; } + } + + public string ProxyFqdn + { + get { return this.proxyFqdn; } + set { this.proxyFqdn = value; } + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUser.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUser.cs new file mode 100644 index 00000000..1a4dd851 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUser.cs @@ -0,0 +1,45 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebsitePanel.Providers.HostedSolution +{ + public class LyncUser + { + public string PrimaryUri { get; set; } + public string PrimaryEmailAddress { get; set; } + public string DisplayName { get; set; } + public string LineUri { get; set; } + public int AccountID { get; set; } + public int LyncUserPlanId { get; set; } + public string LyncUserPlanName { get; set; } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlan.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlan.cs new file mode 100644 index 00000000..27b236ec --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUserPlan.cs @@ -0,0 +1,112 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebsitePanel.Providers.HostedSolution +{ + public class LyncUserPlan + { + int lyncUserPlanId; + string lyncUserPlanName; + + bool im; + bool federation; + bool conferencing; + bool enterpriseVoice; + bool mobility; + bool mobilityEnableOutsideVoice; + LyncVoicePolicyType voicePolicy; + + bool isDefault; + + public int LyncUserPlanId + { + get { return this.lyncUserPlanId; } + set { this.lyncUserPlanId = value; } + } + + public string LyncUserPlanName + { + get { return this.lyncUserPlanName; } + set { this.lyncUserPlanName = value; } + } + + public bool IM + { + get { return this.im; } + set { this.im = value; } + } + + public bool IsDefault + { + get { return this.isDefault; } + set { this.isDefault = value; } + } + + public bool Federation + { + get { return this.federation; } + set { this.federation = value; } + } + + public bool Conferencing + { + get { return this.conferencing; } + set { this.conferencing = value; } + } + + public bool EnterpriseVoice + { + get { return this.enterpriseVoice; } + set { this.enterpriseVoice = value; } + } + + public bool Mobility + { + get { return this.mobility; } + set { this.mobility = value; } + } + + public bool MobilityEnableOutsideVoice + { + get { return this.mobilityEnableOutsideVoice; } + set { this.mobilityEnableOutsideVoice = value; } + } + + public LyncVoicePolicyType VoicePolicy + { + get { return this.voicePolicy; } + set { this.voicePolicy = value; } + } + + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUsersPaged.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUsersPaged.cs new file mode 100644 index 00000000..6df0867c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncUsersPaged.cs @@ -0,0 +1,50 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +namespace WebsitePanel.Providers.HostedSolution +{ + public class LyncUsersPaged + { + int recordsCount; + LyncUser[] pageUsers; + + public int RecordsCount + { + get { return recordsCount; } + set { recordsCount = value; } + } + + public LyncUser[] PageUsers + { + get { return pageUsers; } + set { pageUsers = value; } + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncVoicePolicyType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncVoicePolicyType.cs new file mode 100644 index 00000000..fc203a67 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/LyncVoicePolicyType.cs @@ -0,0 +1,39 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +namespace WebsitePanel.Providers.HostedSolution +{ + public enum LyncVoicePolicyType + { + None = 0, + Emergency = 1, + National = 2, + Mobile = 3, + International = 4 + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/MailboxManagerActions.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/MailboxManagerActions.cs index e533e217..a47f5691 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/MailboxManagerActions.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/MailboxManagerActions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/MobileDeviceStatus.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/MobileDeviceStatus.cs index 6993b96b..abda5867 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/MobileDeviceStatus.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/MobileDeviceStatus.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSConstants.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSConstants.cs index f3a6ec87..2518f46a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSConstants.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSConstants.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSErrorCodes.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSErrorCodes.cs index 4b84b534..f3467d14 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSErrorCodes.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSErrorCodes.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSUser.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSUser.cs index 69d9c811..13d89fb8 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSUser.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSUser.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSUsersPaged.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSUsersPaged.cs index 8791a0fa..07777b51 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSUsersPaged.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OCSUsersPaged.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/Organization.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/Organization.cs index c320352b..3abfbd7f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/Organization.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/Organization.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -41,12 +41,12 @@ namespace WebsitePanel.Providers.HostedSolution private string addressList; private string roomsAddressList; private string globalAddressList; + private string addressBookPolicy; + private string database; private string securityGroup; + private string lyncTenantId; private int diskSpace; - private int issueWarningKB; - private int prohibitSendKB; - private int prohibitSendReceiveKB; private int keepDeletedItemsDays; @@ -125,7 +125,7 @@ namespace WebsitePanel.Providers.HostedSolution get { return crmCurrency; } set { crmCurrency = value; } } - + [Persistent] public string DistinguishedName { @@ -151,7 +151,7 @@ namespace WebsitePanel.Providers.HostedSolution { return defaultDomain; } - } + } [Persistent] @@ -182,6 +182,13 @@ namespace WebsitePanel.Providers.HostedSolution set { globalAddressList = value; } } + [Persistent] + public string AddressBookPolicy + { + get { return addressBookPolicy; } + set { addressBookPolicy = value; } + } + [Persistent] public string Database { @@ -203,27 +210,6 @@ namespace WebsitePanel.Providers.HostedSolution set { diskSpace = value; } } - [Persistent] - public int IssueWarningKB - { - get { return issueWarningKB; } - set { issueWarningKB = value; } - } - - [Persistent] - public int ProhibitSendKB - { - get { return prohibitSendKB; } - set { prohibitSendKB = value; } - } - - [Persistent] - public int ProhibitSendReceiveKB - { - get { return prohibitSendReceiveKB; } - set { prohibitSendReceiveKB = value; } - } - [Persistent] public int KeepDeletedItemsDays { @@ -233,5 +219,15 @@ namespace WebsitePanel.Providers.HostedSolution [Persistent] public bool IsOCSOrganization { get; set; } + + + [Persistent] + public string LyncTenantId + { + get { return lyncTenantId; } + set { lyncTenantId = value; } + } + + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationDomain.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationDomain.cs index 2db75f8f..19987e69 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationDomain.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationDomain.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationDomainName.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationDomainName.cs index 57943731..68587c08 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationDomainName.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationDomainName.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationPaged.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationPaged.cs index b2f5a0b7..96477c02 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationPaged.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationPaged.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs index afe90a95..50981d9e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatistics.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -173,6 +173,8 @@ namespace WebsitePanel.Providers.HostedSolution public int CreatedOCSUsers { get; set; } public int AllocatedOCSUsers { get; set; } + public int CreatedLyncUsers { get; set; } + public int AllocatedLyncUsers { get; set; } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatisticsReport.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatisticsReport.cs index ee0095ff..3d94d8be 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatisticsReport.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatisticsReport.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatisticsRepotItem.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatisticsRepotItem.cs index dd15193b..d7009b80 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatisticsRepotItem.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationStatisticsRepotItem.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationUser.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationUser.cs index 68fd6aff..d3e2b62c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationUser.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationUser.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -30,15 +30,16 @@ using System; namespace WebsitePanel.Providers.HostedSolution { - - + + public class OrganizationUser { private int accountId; private int itemId; private int packageId; + private string subscriberNumber; - private string primaryEmailAddress; + private string primaryEmailAddress; private string accountPassword; private string samAccountName; private string displayName; @@ -65,18 +66,23 @@ namespace WebsitePanel.Providers.HostedSolution private string domainUserName; private bool disabled; + private bool locked; + private bool isOCSUser; + private bool isBlackBerryUser; + private bool isLyncUser; + ExchangeAccountType accountType; private OrganizationUser manager; private Guid crmUserId; - + public Guid CrmUserId { get { return crmUserId; } set { crmUserId = value; } } - + public string DomainUserName { @@ -98,10 +104,10 @@ namespace WebsitePanel.Providers.HostedSolution public bool Disabled { - get { return disabled;} - set { disabled = value;} + get { return disabled; } + set { disabled = value; } } - + public string FirstName { get { return firstName; } @@ -258,17 +264,48 @@ namespace WebsitePanel.Providers.HostedSolution set { primaryEmailAddress = value; } } - + public string AccountPassword { get { return accountPassword; } set { accountPassword = value; } } - public string ExternalEmail { get; set; } + public string ExternalEmail { get; set; } public string DistinguishedName { get; set; } - public bool Locked { get; set; } + public bool Locked + { + get { return locked; } + set { locked = value; } + } + + public bool IsOCSUser + { + get { return isOCSUser; } + set { isOCSUser = value; } + } + + public bool IsLyncUser + { + get { return isLyncUser; } + set { isLyncUser = value; } + } + + public bool IsBlackBerryUser + { + get { return isBlackBerryUser; } + set { isBlackBerryUser = value; } + } + + public string SubscriberNumber + { + get { return subscriberNumber; } + set { subscriberNumber = value; } + } + + + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationUsersPaged.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationUsersPaged.cs index 4fcc1d9a..5a7d2c28 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationUsersPaged.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationUsersPaged.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/PasswordPolicy.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/PasswordPolicy.cs index 05616341..db8398ce 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/PasswordPolicy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/PasswordPolicy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/SharePointStatistics.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/SharePointStatistics.cs index a7d236d4..e97acc5e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/SharePointStatistics.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/SharePointStatistics.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/SharePointStatisticsReport.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/SharePointStatisticsReport.cs index a1c7879e..ff12c4fb 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/SharePointStatisticsReport.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/SharePointStatisticsReport.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/TransactionAction.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/TransactionAction.cs new file mode 100644 index 00000000..8f1b8c7e --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/TransactionAction.cs @@ -0,0 +1,100 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace WebsitePanel.Providers.HostedSolution +{ + public class TransactionAction + { + private TransactionActionTypes actionType; + + public TransactionActionTypes ActionType + { + get { return actionType; } + set { actionType = value; } + } + + private string id; + + public string Id + { + get { return id; } + set { id = value; } + } + + private string suffix; + + public string Suffix + { + get { return suffix; } + set { suffix = value; } + } + + private string account; + + public string Account + { + get { return account; } + set { account = value; } + + } + + public enum TransactionActionTypes + { + CreateOrganizationUnit, + CreateGlobalAddressList, + CreateAddressList, + CreateAddressBookPolicy, + CreateOfflineAddressBook, + CreateDistributionGroup, + EnableDistributionGroup, + CreateAcceptedDomain, + AddUPNSuffix, + CreateMailbox, + CreateContact, + CreatePublicFolder, + CreateActiveSyncPolicy, + AddMailboxFullAccessPermission, + AddSendAsPermission, + RemoveMailboxFullAccessPermission, + RemoveSendAsPermission, + EnableMailbox, + LyncNewSipDomain, + LyncNewSimpleUrl, + LyncNewUser, + LyncNewConferencingPolicy, + LyncNewExternalAccessPolicy, + LyncNewMobilityPolicy + }; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/IMailServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/IMailServer.cs index 33f01c23..f70fb449 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/IMailServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/IMailServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAccount.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAccount.cs index b143f283..3e1166fb 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAccount.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAccount.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -50,12 +50,8 @@ namespace WebsitePanel.Providers.Mail private bool isDomainAdmin; private bool isDomainAdminEnabled; private bool retainLocalCopy; - private bool signatureEnabled; - private string signatureHTML; - /// - /// - /// + public bool UnlimitedSize { get @@ -184,19 +180,17 @@ namespace WebsitePanel.Providers.Mail #endregion - #region hMail - public bool SignatureEnabled - { - get { return signatureEnabled; } - set { signatureEnabled = value; } - } - - public string SignatureHTML - { - get { return signatureHTML; } - set { signatureHTML = value; } - } + #region hMailServer + public bool SignatureEnabled { get; set; } + public string SignatureHTML { get; set; } + public bool ForwardingEnabled { get; set; } + public long Size { get; set; } + public string LastLogonTime { get; set; } + public long QuotaUsed { get; set; } + public bool ResponderExpires {get;set;} + public string ResponderExpirationDate { get; set; } + #endregion } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAlias.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAlias.cs index a4b55e06..4c78766e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAlias.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAlias.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailDomain.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailDomain.cs index 0c084241..da35240d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailDomain.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailDomain.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailEnums.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailEnums.cs index 715a855c..8013f0d5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailEnums.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailEnums.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailGroup.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailGroup.cs index 7e3e8843..b483c1d9 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailGroup.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailGroup.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailList.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailList.cs index 335f4899..f2437dda 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailList.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailList.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/FileHash.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/FileHash.cs index c6c6195b..c97d8104 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/FileHash.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/FileHash.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/FileSyncAction.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/FileSyncAction.cs index d052dc3a..30323f78 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/FileSyncAction.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/FileSyncAction.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/FolderGraph.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/FolderGraph.cs index 2c364038..440c2a59 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/FolderGraph.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/FolderGraph.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/HomeFolder.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/HomeFolder.cs index 7e095d37..cfdc1c07 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/HomeFolder.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/HomeFolder.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/IOperatingSystem.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/IOperatingSystem.cs index d452e81a..fc9f3076 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/IOperatingSystem.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/IOperatingSystem.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SyncActionType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SyncActionType.cs index d78ec87c..758a3ae1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SyncActionType.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SyncActionType.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemDSN.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemDSN.cs index ef26e849..931e89f0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemDSN.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemDSN.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs index a12b7322..9204535a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemGroup.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemGroup.cs index 9992b4dc..1fcf236b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemGroup.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemGroup.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemUser.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemUser.cs index 9356e186..314b44cc 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemUser.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemUser.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -40,6 +40,8 @@ namespace WebsitePanel.Providers.OS private string fullName; private string description = "WebsitePanel system account"; private string password; + private string msIIS_FTPDir = ""; + private string msIIS_FTPRoot = ""; private bool passwordCantChange; private bool passwordNeverExpires; private bool accountDisabled; @@ -98,5 +100,18 @@ namespace WebsitePanel.Providers.OS get { return memberOf; } set { memberOf = value; } } + + public string MsIIS_FTPDir + { + get { return msIIS_FTPDir; } + set { msIIS_FTPDir = value; } + } + + public string MsIIS_FTPRoot + { + get { return msIIS_FTPRoot; } + set { msIIS_FTPRoot = value; } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/UserPermission.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/UserPermission.cs index bd53650c..cb140e51 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/UserPermission.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/UserPermission.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/BlackBerryUserStatsResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/BlackBerryUserStatsResult.cs index 9b0c18b0..e44e4819 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/BlackBerryUserStatsResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/BlackBerryUserStatsResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/BoolResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/BoolResult.cs index 7a1a513f..42e37005 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/BoolResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/BoolResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/BytesResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/BytesResult.cs index a06bc03b..74631478 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/BytesResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/BytesResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CRMBaseUnitResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CRMBaseUnitResult.cs index 174ac11b..e4eef6a1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CRMBaseUnitResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CRMBaseUnitResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CRMBusinessUnitsResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CRMBusinessUnitsResult.cs index 93aaedfc..4875b57e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CRMBusinessUnitsResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CRMBusinessUnitsResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CrmOrganizationRolesResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CrmOrganizationRolesResult.cs index 61ebba70..57ca93aa 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CrmOrganizationRolesResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CrmOrganizationRolesResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CrmUserResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CrmUserResult.cs index 1e97cd49..fe2a8795 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CrmUserResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CrmUserResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CurrencyCollectionResultObject.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CurrencyCollectionResultObject.cs index 427b34f0..24f90d80 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CurrencyCollectionResultObject.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/CurrencyCollectionResultObject.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/ExchangeDistributionListResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/ExchangeDistributionListResult.cs index 97774e1a..3273cc40 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/ExchangeDistributionListResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/ExchangeDistributionListResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/IntResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/IntResult.cs index a8d3c0d1..1bdf3f7d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/IntResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/IntResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/JobsValue.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/JobsValue.cs index 4b956a15..2bd7e5a7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/JobsValue.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/JobsValue.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/LyncUserResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/LyncUserResult.cs new file mode 100644 index 00000000..bf5e64fd --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/LyncUserResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using WebsitePanel.Providers.HostedSolution; + +namespace WebsitePanel.Providers.ResultObjects +{ + public class LyncUserResult : ValueResultObject + { + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/LyncUsersPagedResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/LyncUsersPagedResult.cs new file mode 100644 index 00000000..169b13cd --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/LyncUsersPagedResult.cs @@ -0,0 +1,36 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using WebsitePanel.Providers.HostedSolution; + +namespace WebsitePanel.Providers.ResultObjects +{ + public class LyncUsersPagedResult : ValueResultObject + { + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OCSUserResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OCSUserResult.cs index e2510f57..9fc75f94 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OCSUserResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OCSUserResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OCSUsersPagedResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OCSUsersPagedResult.cs index a47dfb4d..9cf4c4a6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OCSUsersPagedResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OCSUsersPagedResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OrganizationResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OrganizationResult.cs index 36817704..917f1eff 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OrganizationResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OrganizationResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OrganizationUsersPagedResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OrganizationUsersPagedResult.cs index 4096e4b0..8ce9446c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OrganizationUsersPagedResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/OrganizationUsersPagedResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/PasswordPolicyResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/PasswordPolicyResult.cs index 6c4e798f..4f893320 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/PasswordPolicyResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/PasswordPolicyResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/ResultObject.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/ResultObject.cs index fd37f252..e78c84af 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/ResultObject.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/ResultObject.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -57,7 +57,7 @@ namespace WebsitePanel.Providers.Common public void AddError(string errorCode, Exception ex) { if(ex != null) - errorCode += ":" + ex.Message; + errorCode += ":" + ex.Message + "; " + ex.StackTrace; this.ErrorCodes.Add(errorCode); this.IsSuccess = false; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/StringCollectionResultObject.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/StringCollectionResultObject.cs index 2e0c40c0..57e73fcf 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/StringCollectionResultObject.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/StringCollectionResultObject.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/UserResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/UserResult.cs index 3db136be..9919766a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/UserResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/UserResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/ValueResultObject.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/ValueResultObject.cs index 0229dacf..c354405b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/ValueResultObject.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/ValueResultObject.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/VirtualMachineResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/VirtualMachineResult.cs index 9edf34ab..52a29df4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/VirtualMachineResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/VirtualMachineResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/WebAppGallery.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/WebAppGallery.cs index 0d029ef8..62f7e55f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/WebAppGallery.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/ResultObjects/WebAppGallery.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -47,4 +47,8 @@ namespace WebsitePanel.Providers.ResultObjects public class DeploymentParametersResult : ValueResultObject> { } + + public class GalleryLanguagesResult : ValueResultObject> + { + } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/IHostedSharePointServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/IHostedSharePointServer.cs index b3cb6797..d10f56ca 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/IHostedSharePointServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/IHostedSharePointServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -30,89 +30,91 @@ using System; namespace WebsitePanel.Providers.SharePoint { - /// - /// Exposes functionality for share point server provider hosted in conjunction with organization management provider and - /// exchange server. - /// - public interface IHostedSharePointServer - { - /// - /// When implemented gets root web application uri. - /// - Uri RootWebApplicationUri - { - get; - } + /// + /// Exposes functionality for share point server provider hosted in conjunction with organization management provider and + /// exchange server. + /// + public interface IHostedSharePointServer + { + /// + /// When implemented gets root web application uri. + /// + Uri RootWebApplicationUri + { + get; + } - /// - /// When implemented gets list of supported languages by this installation of SharePoint. - /// - /// List of supported languages - int[] GetSupportedLanguages(); + /// + /// When implemented gets list of supported languages by this installation of SharePoint. + /// + /// List of supported languages + int[] GetSupportedLanguages(); - /// - /// When implemented gets list of SharePoint collections within root web application. - /// - /// List of SharePoint collections within root web application. - SharePointSiteCollection[] GetSiteCollections(); + /// + /// When implemented gets list of SharePoint collections within root web application. + /// + /// List of SharePoint collections within root web application. + SharePointSiteCollection[] GetSiteCollections(); - /// - /// When implemented gets SharePoint collection within root web application with given name. - /// - /// Url that uniquely identifies site collection to be loaded. - /// SharePoint collection within root web application with given name. - SharePointSiteCollection GetSiteCollection(string url); + /// + /// When implemented gets SharePoint collection within root web application with given name. + /// + /// Url that uniquely identifies site collection to be loaded. + /// SharePoint collection within root web application with given name. + SharePointSiteCollection GetSiteCollection(string url); - /// - /// When implemented creates site collection within predefined root web application. - /// - /// Information about site coolection to be created. - void CreateSiteCollection(SharePointSiteCollection siteCollection); - - /// - /// When implemented deletes site collection under given url. - /// - /// Url that uniquely identifies site collection to be deleted. - void DeleteSiteCollection(string url); + /// + /// When implemented creates site collection within predefined root web application. + /// + /// Information about site coolection to be created. + void CreateSiteCollection(SharePointSiteCollection siteCollection); - /// - /// When implemeneted backups site collection under give url. - /// - /// Url that uniquely identifies site collection to be deleted. - /// Resulting backup file name. - /// A value which shows whether created backup must be archived. - /// Created backup full path. - string BackupSiteCollection(string url, string filename, bool zip); + /// + /// When implemented deletes site collection under given url. + /// + /// Url that uniquely identifies site collection to be deleted. + void DeleteSiteCollection(SharePointSiteCollection siteCollection); - /// - /// When implemented restores site collection under given url from backup. - /// - /// Site collection to be restored. - /// Backup file name to restore from. - void RestoreSiteCollection(SharePointSiteCollection siteCollection, string filename); + /// + /// When implemeneted backups site collection under give url. + /// + /// Url that uniquely identifies site collection to be deleted. + /// Resulting backup file name. + /// A value which shows whether created backup must be archived. + /// Created backup full path. + string BackupSiteCollection(string url, string filename, bool zip); + + /// + /// When implemented restores site collection under given url from backup. + /// + /// Site collection to be restored. + /// Backup file name to restore from. + void RestoreSiteCollection(SharePointSiteCollection siteCollection, string filename); + + /// + /// When implemented gets binary data chunk of specified size from specified offset. + /// + /// Path to file to get bunary data chunk from. + /// Offset from which to start data reading. + /// Binary data chunk length. + /// Binary data chunk read from file. + byte[] GetTempFileBinaryChunk(string path, int offset, int length); + + /// + /// When implemented appends supplied binary data chunk to file. + /// + /// Non existent file name to append to. + /// Full path to existent file to append to. + /// Binary data chunk to append to. + /// Path to file that was appended with chunk. + string AppendTempFileBinaryChunk(string fileName, string path, byte[] chunk); - /// - /// When implemented gets binary data chunk of specified size from specified offset. - /// - /// Path to file to get bunary data chunk from. - /// Offset from which to start data reading. - /// Binary data chunk length. - /// Binary data chunk read from file. - byte[] GetTempFileBinaryChunk(string path, int offset, int length); - - /// - /// When implemented appends supplied binary data chunk to file. - /// - /// Non existent file name to append to. - /// Full path to existent file to append to. - /// Binary data chunk to append to. - /// Path to file that was appended with chunk. - string AppendTempFileBinaryChunk(string fileName, string path, byte[] chunk); - void UpdateQuotas(string url, long maxStorage, long warningStorage); - SharePointSiteDiskSpace[] CalculateSiteCollectionsDiskSpace(string[] urls); + SharePointSiteDiskSpace[] CalculateSiteCollectionsDiskSpace(string[] urls); - long GetSiteCollectionSize(string url); - } + long GetSiteCollectionSize(string url); + + void SetPeoplePickerOu(string site, string ou); + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/ISharePointServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/ISharePointServer.cs index b6490044..64027a89 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/ISharePointServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/ISharePointServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSite.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSite.cs index 0a43a8c4..c86fae77 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSite.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSite.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSiteCollection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSiteCollection.cs index b143dba8..120863c3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSiteCollection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSiteCollection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -51,6 +51,9 @@ namespace WebsitePanel.Providers.SharePoint private long diskspace; private long maxSiteStorage; private long warningStorage; + private string rootWebApplicationInteralIpAddress; + private string rootWebApplicationFQDN; + [Persistent] @@ -178,6 +181,39 @@ namespace WebsitePanel.Providers.SharePoint } } + /// + /// Gets or sets the internal ip address + /// + [Persistent] + public string RootWebApplicationInteralIpAddress + { + get + { + return this.rootWebApplicationInteralIpAddress; + } + set + { + this.rootWebApplicationInteralIpAddress = value; + } + } + + /// + /// Gets or sets the internal ip address + /// + [Persistent] + public string RootWebApplicationFQDN + { + get + { + return this.rootWebApplicationFQDN; + } + set + { + this.rootWebApplicationFQDN = value; + } + } + + /// /// Gets or sets locale id of the site collection to be created. /// diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSiteCollectionListPaged.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSiteCollectionListPaged.cs index d78da35b..c7d751cc 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSiteCollectionListPaged.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSiteCollectionListPaged.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSiteDiskSpace.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSiteDiskSpace.cs index a2d68ed2..2494c95f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSiteDiskSpace.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/SharePoint/SharePointSiteDiskSpace.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/IStatisticsServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/IStatisticsServer.cs index 6cea5f82..8282a35c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/IStatisticsServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/IStatisticsServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/StatsServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/StatsServer.cs index b9763a6f..107a58fc 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/StatsServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/StatsServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/StatsSite.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/StatsSite.cs index 69d4689f..4f5d50ba 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/StatsSite.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/StatsSite.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/StatsUser.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/StatsUser.cs index 0aa61487..0b282081 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/StatsUser.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Statistics/StatsUser.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ChangeJobStateReturnCode.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ChangeJobStateReturnCode.cs index e707b5af..8b0d7f66 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ChangeJobStateReturnCode.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ChangeJobStateReturnCode.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJob.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJob.cs index 9f29ff1d..1ae2fd60 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJob.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJob.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJobRequestedState.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJobRequestedState.cs index 6279536f..06ead0a3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJobRequestedState.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJobRequestedState.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJobState.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJobState.cs index c0e8a8ec..e8a94c77 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJobState.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJobState.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/IVirtualizationServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/IVirtualizationServer.cs index 6155e2ad..3a96a3ee 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/IVirtualizationServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/IVirtualizationServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/IVirtualizationServerForPC.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/IVirtualizationServerForPC.cs index e6394687..875f97db 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/IVirtualizationServerForPC.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/IVirtualizationServerForPC.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/JobResult.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/JobResult.cs index ff25b960..b7986e98 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/JobResult.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/JobResult.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/KvpExchangeDataItem.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/KvpExchangeDataItem.cs index c95212b0..01cc7978 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/KvpExchangeDataItem.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/KvpExchangeDataItem.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/LibraryItem.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/LibraryItem.cs index c33eb75f..e162ebde 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/LibraryItem.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/LibraryItem.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/LogicalDisk.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/LogicalDisk.cs index b66f09ff..233b7534 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/LogicalDisk.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/LogicalDisk.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/MountedDiskInfo.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/MountedDiskInfo.cs index 14a27a8f..a97f0460 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/MountedDiskInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/MountedDiskInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/OperationalStatus.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/OperationalStatus.cs index 25dbb78f..dfb47f60 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/OperationalStatus.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/OperationalStatus.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ReturnCode.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ReturnCode.cs index 9f43e4bd..6308b20f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ReturnCode.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ReturnCode.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/SummaryInformationRequest.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/SummaryInformationRequest.cs index 0467f891..3db7fe4d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/SummaryInformationRequest.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/SummaryInformationRequest.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ThumbnailSize.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ThumbnailSize.cs index 02f5a918..23cf37a0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ThumbnailSize.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ThumbnailSize.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualHardDiskInfo.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualHardDiskInfo.cs index ce9f4b38..3243e03e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualHardDiskInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualHardDiskInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualHardDiskType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualHardDiskType.cs index 6c3adaef..19f0955b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualHardDiskType.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualHardDiskType.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachine.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachine.cs index 709651b1..2e59ea73 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachine.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachine.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineNetworkAdapter.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineNetworkAdapter.cs index 92dfedbd..5bf2cb98 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineNetworkAdapter.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineNetworkAdapter.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineProvisioningStatus.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineProvisioningStatus.cs index 7cb64f92..eba776fa 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineProvisioningStatus.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineProvisioningStatus.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineRequestedState.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineRequestedState.cs index eacd384c..126b62eb 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineRequestedState.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineRequestedState.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineSnapshot.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineSnapshot.cs index 09555b34..c38be6d1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineSnapshot.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineSnapshot.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineState.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineState.cs index 3b0614a6..470e2ff9 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineState.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineState.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualSwitch.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualSwitch.cs index d8c78667..5f3494c6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualSwitch.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualSwitch.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/HttpError.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/HttpError.cs index fd25b4d0..e46b2041 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/HttpError.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/HttpError.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/HttpHeader.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/HttpHeader.cs index ed7ec818..1928e574 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/HttpHeader.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/HttpHeader.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/IWebServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/IWebServer.cs index 2c1c87d1..500d303a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/IWebServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/IWebServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -119,14 +119,18 @@ namespace WebsitePanel.Providers.Web // web app gallery + void InitFeeds(int UserId, string[] feeds); + void SetResourceLanguage(int UserId, string resourceLanguage); bool IsMsDeployInstalled(); - GalleryCategoriesResult GetGalleryCategories(); - GalleryApplicationsResult GetGalleryApplications(string categoryId); - GalleryApplicationResult GetGalleryApplication(string id); - GalleryWebAppStatus GetGalleryApplicationStatus(string id); - GalleryWebAppStatus DownloadGalleryApplication(string id); - DeploymentParametersResult GetGalleryApplicationParameters(string id); - StringResultObject InstallGalleryApplication(string id, List updatedValues); + GalleryLanguagesResult GetGalleryLanguages(int UserId); + GalleryCategoriesResult GetGalleryCategories(int UserId); + GalleryApplicationsResult GetGalleryApplications(int UserId, string categoryId); + GalleryApplicationsResult GetGalleryApplicationsFiltered(int UserId, string pattern); + GalleryApplicationResult GetGalleryApplication(int UserId, string id); + GalleryWebAppStatus GetGalleryApplicationStatus(int UserId, string id); + GalleryWebAppStatus DownloadGalleryApplication(int UserId, string id); + DeploymentParametersResult GetGalleryApplicationParameters(int UserId, string id); + StringResultObject InstallGalleryApplication(int UserId, string id, List updatedValues, string languageId); // void GrantWebManagementAccess(string siteId, string accountName, string accountPassword); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/MimeMap.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/MimeMap.cs index 1b16363b..e092a42e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/MimeMap.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/MimeMap.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/SharedSSLFolder.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/SharedSSLFolder.cs index 05dc248e..4501c888 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/SharedSSLFolder.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/SharedSSLFolder.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebFolder.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebFolder.cs index 479f1cdd..4f00aff6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebFolder.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebFolder.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebGroup.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebGroup.cs index 87b1bf10..29dc5e34 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebGroup.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebGroup.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebSite.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebSite.cs index 3560648f..e80b2f1a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebSite.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebSite.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebUser.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebUser.cs index 90b3adbf..50237d18 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebUser.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebUser.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebVirtualDirectory.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebVirtualDirectory.cs index d23a020a..3be281fd 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebVirtualDirectory.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Web/WebVirtualDirectory.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/DeploymentParameter.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/DeploymentParameter.cs index bb8d4836..5306c53d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/DeploymentParameter.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/DeploymentParameter.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -41,37 +41,48 @@ namespace WebsitePanel.Providers.WebAppGallery } [Flags] - public enum DeploymentParameterWellKnownTag + public enum DeploymentParameterWellKnownTag : long { - None = 0, - AppHostConfig = 1, - AppPoolConfig = 2, - Boolean = 4, - ComObject32 = 8, - ComObject64 = 16, - DBAdminPassword = 32, - DBAdminUserName = 64, - DBConnectionString = 128, - DBName = 256, - DBServer = 512, - DBUserName = 1024, - DBUserPassword = 2048, - FlatFile = 4096, - Hidden = 8192, - IisApp = 16384, - MetaKey = 32768, - MySql = 65536, - MySqlConnectionString = 131072, - New = 262144, - RegKey = 524288, - SetAcl = 1048576, - Sql = 2097152, - SqLite = 4194304, - SqlConnectionString = 8388608, - Password = 16777216, - PhysicalPath = 33554432, - VistaDB = 67108864, - Validate = 134217728, + None = 0L, + AppHostConfig = 1L, + AppPoolConfig = 2L, + Boolean = 4L, + ComObject32 = 8L, + ComObject64 = 16L, + DBAdminPassword = 32L, + DBAdminUserName = 64L, + DBConnectionString = 128L, + DBName = 256L, + DBServer = 512L, + DBUserName = 1024L, + DBUserPassword = 2048L, + FlatFile = 4096L, + Hidden = 8192L, + IisApp = 16384L, + MetaKey = 32768L, + MySql = 65536L, + MySqlConnectionString = 131072L, + New = 262144L, + RegKey = 524288L, + SetAcl = 1048576L, + Sql = 2097152L, + SqLite = 4194304L, + SqlConnectionString = 8388608L, + Password = 16777216L, + PhysicalPath = 33554432L, + VistaDB = 67108864L, + Validate = 134217728L, + SqLiteConnectionString = 268435456L, + SqlCE = 536870912L, + NoStore = 1073741824L, + AppURL = 2147483648L, + NoProtocol = 4294967296L, + DBUserConnectionString = 8589934592L, + DBAdminConnectionString = 17179869184L, + WebPIApplicationID = 34359738368L, + Ignore = 68719476736L, + AutoGenerated = 137438953472L, + SingleLineConnectionString = 274877906944L, } [Serializable] diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/GalleryApplication.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/GalleryApplication.cs index 535c0a7b..882b4c2e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/GalleryApplication.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/GalleryApplication.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -203,7 +203,7 @@ namespace WebsitePanel.Providers.WebAppGallery } } - [XmlIgnore] + [XmlIgnore] public string Size { get @@ -217,6 +217,10 @@ namespace WebsitePanel.Providers.WebAppGallery } } + [XmlElement(ElementName = "installerFileSize", Namespace = "http://www.w3.org/2005/Atom")] + public int InstallerFileSize { get; set; } + + public string AuthorName { get { return Author.Name; } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/GalleryCategory.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/GalleryCategory.cs index e0c8858d..5134430e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/GalleryCategory.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/GalleryCategory.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/GalleryErrors.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/GalleryErrors.cs index 8f7c5eea..44f14937 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/GalleryErrors.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebAppGallery/GalleryErrors.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -53,6 +53,9 @@ namespace WebsitePanel.Providers.WebAppGallery public const string MsDeployIsNotInstalled = "MsDeployIsNotInstalled"; public const string GeneralError = "GeneralError"; // + exception message + // Languages + public const string GetLanguagesError = "GetLanguagesError"; + // Categories public const string GetCategoriesError = "GetCategoriesError"; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj index df882803..c14f4912 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj @@ -74,14 +74,22 @@ - - - + + + + + + + + + + + @@ -119,6 +127,8 @@ + + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.Bind/IscBind.cs b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.Bind/IscBind.cs index d1e3c52b..cd8b14f8 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.Bind/IscBind.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.Bind/IscBind.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.MsDNS/MsDNS.cs b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.MsDNS/MsDNS.cs index f890916d..a89b73c2 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.MsDNS/MsDNS.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.MsDNS/MsDNS.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -80,52 +80,52 @@ namespace WebsitePanel.Providers.DNS #region Zones - /// - /// Supports managed resources disposal - /// - /// + /// + /// Supports managed resources disposal + /// + /// public virtual string[] GetZones() { List zones = new List(); - using (ManagementObjectCollection objZones = wmi.GetClass("MicrosoftDNS_Zone").GetInstances()) - { - foreach (ManagementObject objZone in objZones) using(objZone) - { - if ((uint)objZone.Properties["ZoneType"].Value == 1) - zones.Add((string)objZone.Properties["Name"].Value); - } - } + using (ManagementObjectCollection objZones = wmi.GetClass("MicrosoftDNS_Zone").GetInstances()) + { + foreach (ManagementObject objZone in objZones) using (objZone) + { + if ((uint)objZone.Properties["ZoneType"].Value == 1) + zones.Add((string)objZone.Properties["Name"].Value); + } + } return zones.ToArray(); } - /// - /// - /// - /// - /// - /// Supports managed resources disposal + /// + /// + /// + /// + /// + /// Supports managed resources disposal public virtual bool ZoneExists(string zoneName) { - using (RegistryKey root = Registry.LocalMachine) - { - using (RegistryKey rk = root.OpenSubKey("Software\\Microsoft\\Windows NT\\CurrentVersion\\DNS Server\\Zones\\" + zoneName)) - { - return (rk != null); - } - } + using (RegistryKey root = Registry.LocalMachine) + { + using (RegistryKey rk = root.OpenSubKey("Software\\Microsoft\\Windows NT\\CurrentVersion\\DNS Server\\Zones\\" + zoneName)) + { + return (rk != null); + } + } } - /// - /// Supports managed resources disposal - /// - /// - /// - + /// + /// Supports managed resources disposal + /// + /// + /// + public virtual DnsRecord[] GetZoneRecords(string zoneName) { - //using (ManagementObjectCollection rrs = wmi.ExecuteQuery( - // String.Format("SELECT * FROM MicrosoftDNS_ResourceRecord WHERE DomainName='{0}'", zoneName))) + //using (ManagementObjectCollection rrs = wmi.ExecuteQuery( + // String.Format("SELECT * FROM MicrosoftDNS_ResourceRecord WHERE DomainName='{0}'", zoneName))) //ManagementObjectCollection rrs = GetWmiObjects("MicrosoftDNS_ResourceRecord", "DomainName='{0}'",zoneName); ManagementObjectCollection rrsA = wmi.GetWmiObjects("MicrosoftDNS_AType", "DomainName='{0}'", zoneName); @@ -138,6 +138,14 @@ namespace WebsitePanel.Providers.DNS ManagementObjectCollection rrsTXT = wmi.GetWmiObjects("MicrosoftDNS_TXTType", "DomainName='{0}'", zoneName); + ManagementObjectCollection rrsSRV = wmi.GetWmiObjects("MicrosoftDNS_SRVType", "DomainName='{0}'", zoneName); + + ManagementObjectCollection rrsSRV_tcp = wmi.GetWmiObjects("MicrosoftDNS_SRVType", "DomainName='_tcp.{0}'", zoneName); + + ManagementObjectCollection rrsSRV_udp = wmi.GetWmiObjects("MicrosoftDNS_SRVType", "DomainName='_udp.{0}'", zoneName); + + ManagementObjectCollection rrsSRV_tls = wmi.GetWmiObjects("MicrosoftDNS_SRVType", "DomainName='_tls.{0}'", zoneName); + List records = new List(); DnsRecord record = new DnsRecord(); @@ -188,11 +196,61 @@ namespace WebsitePanel.Providers.DNS records.Add(record); } + foreach (ManagementObject rr in rrsSRV) + { + record = new DnsRecord(); + record.RecordType = DnsRecordType.SRV; + record.RecordName = CorrectHost(zoneName, (string)rr.Properties["OwnerName"].Value); + record.SrvPriority = Convert.ToInt32(rr.Properties["Priority"].Value); + record.SrvWeight = Convert.ToInt32(rr.Properties["Weight"].Value); + record.SrvPort = Convert.ToInt32(rr.Properties["Port"].Value); + record.RecordData = RemoveTrailingDot((string)rr.Properties["SRVDomainName"].Value); + records.Add(record); + } + + foreach (ManagementObject rr in rrsSRV_tcp) + { + record = new DnsRecord(); + record.RecordType = DnsRecordType.SRV; + record.RecordName = CorrectHost(zoneName, (string)rr.Properties["OwnerName"].Value); + record.SrvPriority = Convert.ToInt32(rr.Properties["Priority"].Value); + record.SrvWeight = Convert.ToInt32(rr.Properties["Weight"].Value); + record.SrvPort = Convert.ToInt32(rr.Properties["Port"].Value); + record.RecordData = RemoveTrailingDot((string)rr.Properties["SRVDomainName"].Value); + records.Add(record); + } + + foreach (ManagementObject rr in rrsSRV_udp) + { + record = new DnsRecord(); + record.RecordType = DnsRecordType.SRV; + record.RecordName = CorrectHost(zoneName, (string)rr.Properties["OwnerName"].Value); + record.SrvPriority = Convert.ToInt32(rr.Properties["Priority"].Value); + record.SrvWeight = Convert.ToInt32(rr.Properties["Weight"].Value); + record.SrvPort = Convert.ToInt32(rr.Properties["Port"].Value); + record.RecordData = RemoveTrailingDot((string)rr.Properties["SRVDomainName"].Value); + records.Add(record); + } + + foreach (ManagementObject rr in rrsSRV_tls) + { + record = new DnsRecord(); + record.RecordType = DnsRecordType.SRV; + record.RecordName = CorrectHost(zoneName, (string)rr.Properties["OwnerName"].Value); + record.SrvPriority = Convert.ToInt32(rr.Properties["Priority"].Value); + record.SrvWeight = Convert.ToInt32(rr.Properties["Weight"].Value); + record.SrvPort = Convert.ToInt32(rr.Properties["Port"].Value); + record.RecordData = RemoveTrailingDot((string)rr.Properties["SRVDomainName"].Value); + records.Add(record); + } + + + + return records.ToArray(); - } - + private string RemoveTrailingDot(string str) { return (str.EndsWith(".")) ? str.Substring(0, str.Length - 1) : str; @@ -209,21 +267,21 @@ namespace WebsitePanel.Providers.DNS private ManagementObject GetZone(string zoneName) { ManagementObject objZone = null; - + try { - + objZone = wmi.GetObject(String.Format( "MicrosoftDNS_Zone.ContainerName='{0}',DnsServerName='{1}',Name='{2}'", zoneName, System.Net.Dns.GetHostEntry("LocalHost").HostName, zoneName)); objZone.Get(); - + /* objZone = wmi.GetWmiObject("MicrosoftDNS_Zone", "ContainerName = '{0}' AND DnsServerName = '{1}' AND Name = '{2}'", new object[] { zoneName, System.Net.Dns.GetHostEntry("LocalHost").HostName, zoneName }); */ } - catch(Exception ex) + catch (Exception ex) { objZone = null; Log.WriteError("Could not get DNS Zone", ex); @@ -232,12 +290,12 @@ namespace WebsitePanel.Providers.DNS return objZone; } - /// - /// - /// - /// - /// - /// Supports managed resources disposal + /// + /// + /// + /// + /// + /// Supports managed resources disposal public virtual void AddPrimaryZone(string zoneName, string[] secondaryServers) { // check if zone exists @@ -245,144 +303,144 @@ namespace WebsitePanel.Providers.DNS return; // create a zone - using (ManagementClass clsZone = wmi.GetClass("MicrosoftDNS_Zone")) - { - using (ManagementBaseObject inParams = clsZone.GetMethodParameters("CreateZone")) - { - inParams["ZoneName"] = zoneName; - inParams["ZoneType"] = 0; // primary zone + using (ManagementClass clsZone = wmi.GetClass("MicrosoftDNS_Zone")) + { + using (ManagementBaseObject inParams = clsZone.GetMethodParameters("CreateZone")) + { + inParams["ZoneName"] = zoneName; + inParams["ZoneType"] = 0; // primary zone - // create zones in AD if required - if (AdMode) - inParams["DsIntegrated"] = true; + // create zones in AD if required + if (AdMode) + inParams["DsIntegrated"] = true; - using (ManagementBaseObject outParams = clsZone.InvokeMethod("CreateZone", inParams, null)) - { - // update created zone - using (ManagementObject objZone = wmi.GetObject(String.Format( - "MicrosoftDNS_Zone.ContainerName='{0}',DnsServerName='{1}',Name='{2}'", - zoneName, System.Net.Dns.GetHostEntry("LocalHost").HostName, zoneName))) - { - try - { - // invoke ResetSecondaries method - using (ManagementBaseObject inParams2 = objZone.GetMethodParameters("ResetSecondaries")) - { - inParams2["SecondaryServers"] = new string[] { }; - inParams2["NotifyServers"] = new string[] { }; + using (ManagementBaseObject outParams = clsZone.InvokeMethod("CreateZone", inParams, null)) + { + // update created zone + using (ManagementObject objZone = wmi.GetObject(String.Format( + "MicrosoftDNS_Zone.ContainerName='{0}',DnsServerName='{1}',Name='{2}'", + zoneName, System.Net.Dns.GetHostEntry("LocalHost").HostName, zoneName))) + { + try + { + // invoke ResetSecondaries method + using (ManagementBaseObject inParams2 = objZone.GetMethodParameters("ResetSecondaries")) + { + inParams2["SecondaryServers"] = new string[] { }; + inParams2["NotifyServers"] = new string[] { }; - if (secondaryServers == null || secondaryServers.Length == 0) - { - // transfers are not allowed - inParams2["SecureSecondaries"] = 3; - inParams2["Notify"] = 0; - } - else if (secondaryServers.Length == 1 && - secondaryServers[0] == "*") - { - // allowed transfer from all servers - inParams2["SecureSecondaries"] = 0; - inParams2["Notify"] = 1; - } - else - { - // allowed transfer from specified servers - inParams2["SecureSecondaries"] = 2; - inParams2["SecondaryServers"] = secondaryServers; - inParams2["NotifyServers"] = secondaryServers; - inParams2["Notify"] = 2; - } + if (secondaryServers == null || secondaryServers.Length == 0) + { + // transfers are not allowed + inParams2["SecureSecondaries"] = 3; + inParams2["Notify"] = 0; + } + else if (secondaryServers.Length == 1 && + secondaryServers[0] == "*") + { + // allowed transfer from all servers + inParams2["SecureSecondaries"] = 0; + inParams2["Notify"] = 1; + } + else + { + // allowed transfer from specified servers + inParams2["SecureSecondaries"] = 2; + inParams2["SecondaryServers"] = secondaryServers; + inParams2["NotifyServers"] = secondaryServers; + inParams2["Notify"] = 2; + } - objZone.InvokeMethod("ResetSecondaries", inParams2, null); - } - } - catch - { - Log.WriteWarning("Error resetting/notifying secondary name servers"); - } - } - } - } - } + objZone.InvokeMethod("ResetSecondaries", inParams2, null); + } + } + catch + { + Log.WriteWarning("Error resetting/notifying secondary name servers"); + } + } + } + } + } // delete orphan NS records DeleteOrphanNsRecords(zoneName); } - /// - /// Supports managed resources disposal - /// - /// - /// + /// + /// Supports managed resources disposal + /// + /// + /// public virtual void AddSecondaryZone(string zoneName, string[] masterServers) { // check if zone exists - using (ManagementObject objSecondary = GetZone(zoneName)) - { - if (objSecondary != null) - return; - } + using (ManagementObject objSecondary = GetZone(zoneName)) + { + if (objSecondary != null) + return; + } // create a zone - using (ManagementClass clsZone = wmi.GetClass("MicrosoftDNS_Zone")) - { - using (ManagementBaseObject inParams = clsZone.GetMethodParameters("CreateZone")) - { - inParams["ZoneName"] = zoneName; - inParams["ZoneType"] = 1; // secondary zone - inParams["IpAddr"] = masterServers; - inParams["DataFileName"] = zoneName + ".dns"; + using (ManagementClass clsZone = wmi.GetClass("MicrosoftDNS_Zone")) + { + using (ManagementBaseObject inParams = clsZone.GetMethodParameters("CreateZone")) + { + inParams["ZoneName"] = zoneName; + inParams["ZoneType"] = 1; // secondary zone + inParams["IpAddr"] = masterServers; + inParams["DataFileName"] = zoneName + ".dns"; - // create zones in AD if required - inParams["DsIntegrated"] = AdMode; + // create zones in AD if required + inParams["DsIntegrated"] = AdMode; - using (ManagementBaseObject outParams = clsZone.InvokeMethod("CreateZone", inParams, null)) - { - try - { - // update created zone - /*ManagementObject objZone = wmi.GetObject(String.Format( - "MicrosoftDNS_Zone.ContainerName='{0}',DnsServerName='{1}',Name='{2}'", - zoneName, System.Net.Dns.GetHostEntry("LocalHost").HostName, zoneName)); + using (ManagementBaseObject outParams = clsZone.InvokeMethod("CreateZone", inParams, null)) + { + try + { + // update created zone + /*ManagementObject objZone = wmi.GetObject(String.Format( + "MicrosoftDNS_Zone.ContainerName='{0}',DnsServerName='{1}',Name='{2}'", + zoneName, System.Net.Dns.GetHostEntry("LocalHost").HostName, zoneName)); - objZone.InvokeMethod("ForceRefresh", null);*/ - using (ManagementObject objZone = (ManagementObject)outParams["RR"]) - { - objZone.InvokeMethod("ReloadZone", null); - } - } - catch (Exception ex) - { - Log.WriteWarning("Error ReloadZone for secondary zone '{0}': {1}", zoneName, ex.Message); - } - } - } - } + objZone.InvokeMethod("ForceRefresh", null);*/ + using (ManagementObject objZone = (ManagementObject)outParams["RR"]) + { + objZone.InvokeMethod("ReloadZone", null); + } + } + catch (Exception ex) + { + Log.WriteWarning("Error ReloadZone for secondary zone '{0}': {1}", zoneName, ex.Message); + } + } + } + } // delete orphan NS records DeleteOrphanNsRecords(zoneName); } - /// - /// Supports managed resources disposal - /// - /// - + /// + /// Supports managed resources disposal + /// + /// + public virtual void DeleteZone(string zoneName) { - try - { + try + { using (ManagementObject objZone = GetZone(zoneName)) { if (objZone != null) objZone.Delete(); } - } - catch (Exception ex) - { - Log.WriteError(ex); - } + } + catch (Exception ex) + { + Log.WriteError(ex); + } } - + public virtual void AddZoneRecord(string zoneName, DnsRecord record) { @@ -398,6 +456,9 @@ namespace WebsitePanel.Providers.DNS AddNsRecord(zoneName, record.RecordName, record.RecordData); else if (record.RecordType == DnsRecordType.TXT) AddTxtRecord(zoneName, record.RecordName, record.RecordData); + else if (record.RecordType == DnsRecordType.SRV) + AddSrvRecord(zoneName, record.RecordName, record.SrvPriority, record.SrvWeight, record.SrvPort, record.RecordData); + } catch (Exception ex) { @@ -428,6 +489,9 @@ namespace WebsitePanel.Providers.DNS DeleteNsRecord(zoneName, record.RecordName, record.RecordData); else if (record.RecordType == DnsRecordType.TXT) DeleteTxtRecord(zoneName, record.RecordName, record.RecordData); + else if (record.RecordType == DnsRecordType.SRV) + DeleteSrvRecord(zoneName, record.RecordName, record.RecordData); + } catch (Exception ex) { @@ -477,12 +541,12 @@ namespace WebsitePanel.Providers.DNS UpdateSoaRecord(zoneName); } - /// - /// Supports managed resources disposal - /// - /// + /// + /// Supports managed resources disposal + /// + /// private void DeleteSoaRecord(string zoneName) - { + { string query = String.Format("SELECT * FROM MicrosoftDNS_SOAType " + "WHERE OwnerName = '{0}'", zoneName); @@ -491,7 +555,7 @@ namespace WebsitePanel.Providers.DNS foreach (ManagementObject objRR in objRRs) using (objRR) objRR.Delete(); } - } + } private string GetSoaRecordText(string host, string primaryNsServer, string primaryPerson) @@ -500,11 +564,11 @@ namespace WebsitePanel.Providers.DNS primaryNsServer, primaryPerson); } - /// - /// Supports managed resources disposal - /// - /// - + /// + /// Supports managed resources disposal + /// + /// + private void UpdateSoaRecord(string zoneName) { // get existing SOA record in order to read serial number @@ -514,52 +578,52 @@ namespace WebsitePanel.Providers.DNS //ManagementObject obj = GetWmiObject("MicrosoftDNS_Zone", "ContainerName = '{0}'", zoneName); //ManagementObject objSoa = GetRelatedWmiObject(obj, "MicrosoftDNS_SOAType"); - - + + ManagementObject objSoa = wmi.GetWmiObject("MicrosoftDNS_SOAType", "ContainerName = '{0}'", RemoveTrailingDot(zoneName)); - + if (objSoa != null) + { + if (objSoa.Properties["OwnerName"].Value.Equals(zoneName)) { - if (objSoa.Properties["OwnerName"].Value.Equals(zoneName)) + string primaryServer = (string)objSoa.Properties["PrimaryServer"].Value; + string responsibleParty = (string)objSoa.Properties["ResponsibleParty"].Value; + UInt32 serialNumber = (UInt32)objSoa.Properties["SerialNumber"].Value; + + // update record's serial number + string sn = serialNumber.ToString(); + string todayDate = DateTime.Now.ToString("yyyyMMdd"); + if (sn.Length < 10 || !sn.StartsWith(todayDate)) { - string primaryServer = (string) objSoa.Properties["PrimaryServer"].Value; - string responsibleParty = (string) objSoa.Properties["ResponsibleParty"].Value; - UInt32 serialNumber = (UInt32) objSoa.Properties["SerialNumber"].Value; - - // update record's serial number - string sn = serialNumber.ToString(); - string todayDate = DateTime.Now.ToString("yyyyMMdd"); - if (sn.Length < 10 || !sn.StartsWith(todayDate)) - { - // build a new serial number - sn = todayDate + "01"; - serialNumber = UInt32.Parse(sn); - } - else - { - // just increment serial number - serialNumber += 1; - } - - // update SOA record - using (ManagementBaseObject methodParams = objSoa.GetMethodParameters("Modify")) - { - methodParams["ResponsibleParty"] = responsibleParty; - methodParams["PrimaryServer"] = primaryServer; - methodParams["SerialNumber"] = serialNumber; - - methodParams["ExpireLimit"] = ExpireLimit; - methodParams["MinimumTTL"] = MinimumTTL; - methodParams["TTL"] = MinimumTTL; - methodParams["RefreshInterval"] = RefreshInterval; - methodParams["RetryDelay"] = RetryDelay; - - ManagementBaseObject outParams = objSoa.InvokeMethod("Modify", methodParams, null); - } - // - objSoa.Dispose(); + // build a new serial number + sn = todayDate + "01"; + serialNumber = UInt32.Parse(sn); } - + else + { + // just increment serial number + serialNumber += 1; + } + + // update SOA record + using (ManagementBaseObject methodParams = objSoa.GetMethodParameters("Modify")) + { + methodParams["ResponsibleParty"] = responsibleParty; + methodParams["PrimaryServer"] = primaryServer; + methodParams["SerialNumber"] = serialNumber; + + methodParams["ExpireLimit"] = ExpireLimit; + methodParams["MinimumTTL"] = MinimumTTL; + methodParams["TTL"] = MinimumTTL; + methodParams["RefreshInterval"] = RefreshInterval; + methodParams["RetryDelay"] = RetryDelay; + + ManagementBaseObject outParams = objSoa.InvokeMethod("Modify", methodParams, null); + } + // + objSoa.Dispose(); + } + } } catch (Exception ex) @@ -567,23 +631,23 @@ namespace WebsitePanel.Providers.DNS Log.WriteError(ex); } } - + #endregion #region A Record - /// - /// - /// - /// - /// - /// + /// + /// + /// + /// + /// + /// /// Supports managed resources disposal private void AddARecord(string zoneName, string host, string ip) { // add record - using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_AType")) - { - clsRR.InvokeMethod("CreateInstanceFromPropertyData", new object[] { + using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_AType")) + { + clsRR.InvokeMethod("CreateInstanceFromPropertyData", new object[] { GetDnsServerName(), zoneName, CorrectHostName(zoneName, host), @@ -591,19 +655,19 @@ namespace WebsitePanel.Providers.DNS MinimumTTL, ip }); - } + } // update SOA record - if (bulkRecords) return; - UpdateSoaRecord(zoneName); + if (bulkRecords) return; + UpdateSoaRecord(zoneName); } - /// - /// Supports managed resources disposal - /// - /// - /// - /// + /// + /// Supports managed resources disposal + /// + /// + /// + /// private void DeleteARecord(string zoneName, string host, string ip) { string query = String.Format("SELECT * FROM MicrosoftDNS_AType " + @@ -613,32 +677,32 @@ namespace WebsitePanel.Providers.DNS if (ip != null) query += String.Format(" AND RecordData = '{0}'", ip); - using (ManagementObjectCollection objRRs = wmi.ExecuteQuery(query)) - { - foreach (ManagementObject objRR in objRRs) using(objRR) - objRR.Delete(); - } - - // update SOA record + using (ManagementObjectCollection objRRs = wmi.ExecuteQuery(query)) + { + foreach (ManagementObject objRR in objRRs) using (objRR) + objRR.Delete(); + } + + // update SOA record UpdateSoaRecord(zoneName); - + } #endregion #region CNAME Record - /// - /// - /// - /// - /// - /// + /// + /// + /// + /// + /// + /// /// Supports managed resources disposal private void AddCNameRecord(string zoneName, string alias, string targetHost) { // add record - using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_CNAMEType")) - { - clsRR.InvokeMethod("CreateInstanceFromPropertyData", new object[] { + using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_CNAMEType")) + { + clsRR.InvokeMethod("CreateInstanceFromPropertyData", new object[] { GetDnsServerName(), zoneName, CorrectHostName(zoneName, alias), @@ -646,19 +710,19 @@ namespace WebsitePanel.Providers.DNS MinimumTTL, targetHost }); - } + } // update SOA record - if (bulkRecords) return; - UpdateSoaRecord(zoneName); + if (bulkRecords) return; + UpdateSoaRecord(zoneName); } - /// - /// Supports managed resources disposal - /// - /// - /// - /// + /// + /// Supports managed resources disposal + /// + /// + /// + /// private void DeleteCNameRecord(string zoneName, string alias, string targetHost) { string query = String.Format("SELECT * FROM MicrosoftDNS_CNAMEType " + @@ -668,11 +732,11 @@ namespace WebsitePanel.Providers.DNS if (targetHost != null) query += String.Format(" AND RecordData='{0}.'", targetHost); - using (ManagementObjectCollection objRRs = wmi.ExecuteQuery(query)) - { - foreach (ManagementObject objRR in objRRs) using(objRR) - objRR.Delete(); - } + using (ManagementObjectCollection objRRs = wmi.ExecuteQuery(query)) + { + foreach (ManagementObject objRR in objRRs) using (objRR) + objRR.Delete(); + } // update SOA record UpdateSoaRecord(zoneName); @@ -680,20 +744,20 @@ namespace WebsitePanel.Providers.DNS #endregion #region MX Record - /// - /// - /// - /// - /// - /// - /// + /// + /// + /// + /// + /// + /// + /// /// Supports managed resources disposal private void AddMXRecord(string zoneName, string host, string mailServer, int mailServerPriority) { - // add record - using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_MXType")) - { - clsRR.InvokeMethod("CreateInstanceFromPropertyData", new object[] { + // add record + using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_MXType")) + { + clsRR.InvokeMethod("CreateInstanceFromPropertyData", new object[] { GetDnsServerName(), zoneName, CorrectHostName(zoneName, host), @@ -702,19 +766,19 @@ namespace WebsitePanel.Providers.DNS mailServerPriority, mailServer }); - } + } // update SOA record - if (bulkRecords) return; - UpdateSoaRecord(zoneName); + if (bulkRecords) return; + UpdateSoaRecord(zoneName); } - /// - /// Supports managed resources disposal - /// - /// - /// - /// + /// + /// Supports managed resources disposal + /// + /// + /// + /// private void DeleteMXRecord(string zoneName, string host, string mailServer) { string query = String.Format("SELECT * FROM MicrosoftDNS_MXType " + @@ -724,11 +788,11 @@ namespace WebsitePanel.Providers.DNS if (mailServer != null) query += String.Format(" AND MailExchange = '{0}.'", CorrectHostName(zoneName, mailServer)); - using (ManagementObjectCollection objRRs = wmi.ExecuteQuery(query)) - { - foreach (ManagementObject objRR in objRRs) using(objRR) - objRR.Delete(); - } + using (ManagementObjectCollection objRRs = wmi.ExecuteQuery(query)) + { + foreach (ManagementObject objRR in objRRs) using (objRR) + objRR.Delete(); + } // update SOA record UpdateSoaRecord(zoneName); @@ -736,19 +800,19 @@ namespace WebsitePanel.Providers.DNS #endregion #region NS Record - /// - /// - /// - /// - /// - /// + /// + /// + /// + /// + /// + /// /// Supports managed resources disposal private void AddNsRecord(string zoneName, string host, string nameServer) { - // add record - using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_NSType")) - { - clsRR.InvokeMethod("CreateInstanceFromPropertyData", new object[] { + // add record + using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_NSType")) + { + clsRR.InvokeMethod("CreateInstanceFromPropertyData", new object[] { GetDnsServerName(), zoneName, CorrectHostName(zoneName, host), @@ -756,18 +820,18 @@ namespace WebsitePanel.Providers.DNS MinimumTTL, nameServer }); - } + } // update SOA record - if (bulkRecords) return; - UpdateSoaRecord(zoneName); + if (bulkRecords) return; + UpdateSoaRecord(zoneName); } - /// - /// Supports managed resources disposal - /// - /// - /// - /// + /// + /// Supports managed resources disposal + /// + /// + /// + /// private void DeleteNsRecord(string zoneName, string host, string nameServer) { string query = String.Format("SELECT * FROM MicrosoftDNS_NSType " + @@ -777,51 +841,51 @@ namespace WebsitePanel.Providers.DNS if (nameServer != null) query += String.Format(" AND NSHost = '{0}.'", nameServer); - using (ManagementObjectCollection objRRs = wmi.ExecuteQuery(query)) - { - foreach (ManagementObject objRR in objRRs) using(objRR) - objRR.Delete(); - } + using (ManagementObjectCollection objRRs = wmi.ExecuteQuery(query)) + { + foreach (ManagementObject objRR in objRRs) using (objRR) + objRR.Delete(); + } // update SOA record UpdateSoaRecord(zoneName); } - /// - /// Supports managed resources disposal - /// - /// + /// + /// Supports managed resources disposal + /// + /// private void DeleteOrphanNsRecords(string zoneName) { string machineName = System.Net.Dns.GetHostEntry("LocalHost").HostName.ToLower(); string computerName = Environment.MachineName.ToLower(); - using (ManagementObjectCollection objRRs = wmi.ExecuteQuery( - String.Format("SELECT * FROM MicrosoftDNS_NSType WHERE DomainName = '{0}'", zoneName))) - { - foreach (ManagementObject objRR in objRRs) - using(objRR) - { - string ns = ((string)objRR.Properties["NSHost"].Value).ToLower(); - if (ns.StartsWith(machineName) || ns.StartsWith(computerName)) - objRR.Delete(); - } - } + using (ManagementObjectCollection objRRs = wmi.ExecuteQuery( + String.Format("SELECT * FROM MicrosoftDNS_NSType WHERE DomainName = '{0}'", zoneName))) + { + foreach (ManagementObject objRR in objRRs) + using (objRR) + { + string ns = ((string)objRR.Properties["NSHost"].Value).ToLower(); + if (ns.StartsWith(machineName) || ns.StartsWith(computerName)) + objRR.Delete(); + } + } } #endregion #region TXT Record - /// - /// Supports managed resources disposal - /// - /// - /// - /// + /// + /// Supports managed resources disposal + /// + /// + /// + /// private void AddTxtRecord(string zoneName, string host, string text) { - using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_TXTType")) - { - clsRR.InvokeMethod("CreateInstanceFromPropertyData", new object[] { + using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_TXTType")) + { + clsRR.InvokeMethod("CreateInstanceFromPropertyData", new object[] { GetDnsServerName(), zoneName, CorrectHostName(zoneName, host), @@ -829,19 +893,19 @@ namespace WebsitePanel.Providers.DNS MinimumTTL, System.Text.RegularExpressions.Regex.Replace(text, @"""|\\", "") }); - } + } // update SOA record - if (bulkRecords) return; - UpdateSoaRecord(zoneName); + if (bulkRecords) return; + UpdateSoaRecord(zoneName); } - /// - /// Supports managed resources disposal - /// - /// - /// - /// + /// + /// Supports managed resources disposal + /// + /// + /// + /// private void DeleteTxtRecord(string zoneName, string host, string text) { string query = String.Format("SELECT * FROM MicrosoftDNS_TXTType " + @@ -851,13 +915,85 @@ namespace WebsitePanel.Providers.DNS if (text != null) query += String.Format(" AND RecordData = '\"{0}\"'", System.Text.RegularExpressions.Regex.Replace(text, @"""|\\", "")); - using (ManagementObjectCollection objRRs = wmi.ExecuteQuery(query)) - { - foreach (ManagementObject objRR in objRRs) using(objRR) - { - objRR.Delete(); - } - } + using (ManagementObjectCollection objRRs = wmi.ExecuteQuery(query)) + { + foreach (ManagementObject objRR in objRRs) using (objRR) + { + objRR.Delete(); + } + } + + // update SOA record + UpdateSoaRecord(zoneName); + } + #endregion + + #region SRV Record + /// + /// + /// + /// + /// + /// + /// + /// Supports managed resources disposal + private void AddSrvRecord(string zoneName, string host, int priority, int weight, int port, string domainName) + { + // add record + using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_SRVType")) + { + + clsRR.InvokeMethod("CreateInstanceFromPropertyData", new object[] { + GetDnsServerName(), + zoneName, + CorrectHostName(zoneName, host), + 1, + MinimumTTL, + priority, + weight, + port, + domainName + }); + } + + // update SOA record + if (bulkRecords) return; + UpdateSoaRecord(zoneName); + } + + /// + /// Supports managed resources disposal + /// + /// + /// + /// + private void DeleteSrvRecord(string zoneName, string host, string domainName) + { + + string query = string.Empty; + if ((host.Contains("._tcp")) | (host.Contains("._udp")) | (host.Contains("._tls"))) + { + query = String.Format("SELECT * FROM MicrosoftDNS_SRVType " + + "WHERE ContainerName = '{0}' AND OwnerName ='{1}.{0}'", + zoneName, CorrectHostName(zoneName, host)); + } + else + { + query = String.Format("SELECT * FROM MicrosoftDNS_SRVType " + + "WHERE ContainerName = '{0}' AND OwnerName ='{1}'", + zoneName, CorrectHostName(zoneName, host)); + } + + + + if (domainName != null) + query += String.Format(" AND SRVDomainName = '{0}.'", domainName); + + using (ManagementObjectCollection objRRs = wmi.ExecuteQuery(query)) + { + foreach (ManagementObject objRR in objRRs) using (objRR) + objRR.Delete(); + } // update SOA record UpdateSoaRecord(zoneName); @@ -865,36 +1001,36 @@ namespace WebsitePanel.Providers.DNS #endregion #region private helper methods - /// - /// Supports managed resources disposal - /// - /// - private string GetDnsServerName() - { - using (ManagementObject objServer = wmi.GetObject("MicrosoftDNS_Server.Name=\".\"")) - { - return (string)objServer.Properties["Name"].Value; - } - } + /// + /// Supports managed resources disposal + /// + /// + private string GetDnsServerName() + { + using (ManagementObject objServer = wmi.GetObject("MicrosoftDNS_Server.Name=\".\"")) + { + return (string)objServer.Properties["Name"].Value; + } + } - /// - /// Supports managed resources disposal - /// - /// - /// - /// - private string AddDnsRecord(string zoneName, string recordText) + /// + /// Supports managed resources disposal + /// + /// + /// + /// + private string AddDnsRecord(string zoneName, string recordText) { // get the name of the server string serverName = GetDnsServerName(); // add record - using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_ResourceRecord")) - { - object[] prms = new object[] { serverName, zoneName, recordText, null }; - clsRR.InvokeMethod("CreateInstanceFromTextRepresentation", prms); - return (string)prms[3]; - } + using (ManagementClass clsRR = wmi.GetClass("MicrosoftDNS_ResourceRecord")) + { + object[] prms = new object[] { serverName, zoneName, recordText, null }; + clsRR.InvokeMethod("CreateInstanceFromTextRepresentation", prms); + return (string)prms[3]; + } } private string CorrectHostName(string zoneName, string host) @@ -937,30 +1073,30 @@ namespace WebsitePanel.Providers.DNS } } - /// - /// Supports managed resources disposal - /// - /// + /// + /// Supports managed resources disposal + /// + /// protected bool IsDNSInstalled() { - using (RegistryKey root = Registry.LocalMachine) - { - using (RegistryKey key = root.OpenSubKey("SYSTEM\\CurrentControlSet\\Services\\DNS")) - { - bool res = key != null; - if (key != null) - key.Close(); + using (RegistryKey root = Registry.LocalMachine) + { + using (RegistryKey key = root.OpenSubKey("SYSTEM\\CurrentControlSet\\Services\\DNS")) + { + bool res = key != null; + if (key != null) + key.Close(); - return res; - } - } + return res; + } + } } public override bool IsInstalled() { return IsDNSInstalled(); } - + #endregion } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.Nettica/Nettica.cs b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.Nettica/Nettica.cs index d6c96da9..2ba41bf0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.Nettica/Nettica.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.Nettica/Nettica.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.Nettica/NetticaProxy.cs b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.Nettica/NetticaProxy.cs index 124d88bf..98d98717 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.Nettica/NetticaProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.Nettica/NetticaProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.PowerDNS/PowerDNS.cs b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.PowerDNS/PowerDNS.cs index 16825627..8f1e419d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.PowerDNS/PowerDNS.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.PowerDNS/PowerDNS.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.SimpleDNS/SimpleDNS.cs b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.SimpleDNS/SimpleDNS.cs index 4dee686b..6778f83f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.SimpleDNS/SimpleDNS.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.SimpleDNS/SimpleDNS.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.SimpleDNS50/SimpleDNS5.cs b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.SimpleDNS50/SimpleDNS5.cs index 17e3bfe3..a921c7da 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.DNS.SimpleDNS50/SimpleDNS5.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.DNS.SimpleDNS50/SimpleDNS5.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer.cs index ec306a23..d7aca68c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -148,24 +148,30 @@ namespace WebsitePanel.Providers.Database Log.WriteInfo("Connector location is either null or empty"); return null; } - // - string assemblyFile = String.Empty; - // Versions 5.x.x compatibility - if (connectorVersion.StartsWith("5.")) - assemblyFile = Path.Combine(connectorLocation, @"Binaries\.NET 2.0\" + args.Name.Split(',')[0] + ".dll"); - // Newest versions compatibility - else - assemblyFile = Path.Combine(connectorLocation, @"Assemblies\" + args.Name.Split(',')[0] + ".dll"); - // - Log.WriteInfo(assemblyFile); - // - if (!File.Exists(assemblyFile)) - { - Log.WriteInfo("Connector assembly could not be found or does not exist"); - return null; - } - // - return Assembly.LoadFrom(assemblyFile); + + string assemblyFile = args.Name.Split(',')[0] + ".dll"; + + // 1st location + string assemblyPath = Path.Combine(connectorLocation, @"Binaries\.NET 2.0\" + assemblyFile); + if (!File.Exists(assemblyPath)) + { + // 2nd location + assemblyPath = Path.Combine(connectorLocation, @"Assemblies\" + assemblyFile); + + if (!File.Exists(assemblyPath)) + { + // 3rd location + assemblyPath = Path.Combine(connectorLocation, @"Assemblies\v2.0" + assemblyFile); + + if (!File.Exists(assemblyPath)) + { + Log.WriteInfo("Connector assembly could not be found or does not exist"); + return null; // sorry, cannot find + } + } + } + + return Assembly.LoadFrom(assemblyPath); } #endregion @@ -762,7 +768,15 @@ namespace WebsitePanel.Providers.Database DataView dvProcesses = new DataView(dtProcesses); foreach (DataRowView rowSid in dvProcesses) { - ExecuteNonQuery(String.Format("KILL {0}", rowSid["Id"])); + string cmdText = String.Format("KILL {0}", rowSid["Id"]); + try + { + ExecuteNonQuery(cmdText); + } + catch(Exception ex) + { + Log.WriteError("Cannot drop MySQL connection: " + cmdText, ex); + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer50.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer50.cs index 45d8b442..aa93de85 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer50.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer50.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer51.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer51.cs index 65df8cc9..00a4fd18 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer51.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer51.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer55.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer55.cs index 277cb676..8b0e740f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer55.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Database.MySQL/MySqlServer55.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer.cs index d568cdf0..a1e8b47e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer2005.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer2005.cs index 8ddfbf67..a73d92de 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer2005.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer2005.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer2008.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer2008.cs index 508a3557..275ceb27 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer2008.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer2008.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer2012.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer2012.cs new file mode 100644 index 00000000..f9930f20 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/MsSqlServer2012.cs @@ -0,0 +1,47 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; + +namespace WebsitePanel.Providers.Database +{ + public class MsSqlServer2012 : MsSqlServer2005 + { + public override bool IsInstalled() + { + return CheckVersion("11."); + } + + public override void TruncateDatabase(string databaseName) + { + SqlDatabase database = GetDatabase(databaseName); + ExecuteNonQuery(String.Format(@"USE [{0}];DBCC SHRINKFILE ('{1}', 1);", + databaseName, database.LogName)); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/WebsitePanel.Providers.Database.SqlServer.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/WebsitePanel.Providers.Database.SqlServer.csproj index 59740a36..2e00638b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/WebsitePanel.Providers.Database.SqlServer.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Database.SqlServer/WebsitePanel.Providers.Database.SqlServer.csproj @@ -65,6 +65,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.ExchangeHostedEdition/Exchange2010SP1.cs b/WebsitePanel/Sources/WebsitePanel.Providers.ExchangeHostedEdition/Exchange2010SP1.cs deleted file mode 100644 index 74a99b17..00000000 --- a/WebsitePanel/Sources/WebsitePanel.Providers.ExchangeHostedEdition/Exchange2010SP1.cs +++ /dev/null @@ -1,710 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using WebsitePanel.Providers.ExchangeHostedEdition; -using System.Management.Automation.Runspaces; -using System.Management.Automation; -using Microsoft.Win32; -using System.Collections.ObjectModel; -using WebsitePanel.Providers.Utils; -using System.Security; -using System.Reflection; -using System.IO; -using Microsoft.Exchange.Data; - -namespace WebsitePanel.Providers.ExchangeHostedEdition -{ - public class Exchange2010SP1 : HostingServiceProviderBase, IExchangeHostedEdition - { - #region Constants - private const string ExchangeSnapInName = "Microsoft.Exchange.Management.PowerShell.E2010"; - private const string ExchangeRegistryPath = "SOFTWARE\\Microsoft\\ExchangeServer\\v14\\Setup"; - private const string OrganizationDefaultLocation = "en-us"; - private const string OrganizationManagementGroup = "Organization Management"; - private const string RecipientQuotaPolicyIdentity = "Recipient Quota Policy"; - #endregion - - #region Static constructor - static Exchange2010SP1() - { - AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(ResolveExchangeAssembly); - } - #endregion - - public void CreateOrganization(string organizationId, string programId, string offerId, string domain, - string adminName, string adminEmail, string adminPassword) - { - ExchangeLog.LogStart("CreateOrganization"); - ExchangeLog.DebugInfo("organizationId: {0}", organizationId); - ExchangeLog.DebugInfo("programId: {0}", programId); - ExchangeLog.DebugInfo("offerId: {0}", offerId); - ExchangeLog.DebugInfo("domain: {0}", domain); - ExchangeLog.DebugInfo("adminEmail: {0}", adminEmail); - - bool organizationCreated = false; - Runspace runSpace = null; - try - { - runSpace = OpenRunspace(); - - #region Create new organization - ExchangeLog.LogStart("New-Organization"); - - Command cmd = new Command("New-Organization"); - cmd.Parameters.Add("Name", organizationId); - cmd.Parameters.Add("ProgramId", programId); - cmd.Parameters.Add("OfferId", offerId); - cmd.Parameters.Add("DomainName", domain); - cmd.Parameters.Add("Location", OrganizationDefaultLocation); - - // run command and get DN of created organization - Collection result = ExecuteShellCommand(runSpace, cmd); - string organizationDN = GetResultObjectDN(result); - ExchangeLog.LogInfo("Organization DN: {0}", organizationDN); - ExchangeLog.LogEnd("New-Organization"); - organizationCreated = true; - #endregion - - #region Create administrator mailbox - ExchangeLog.LogStart("New-Mailbox"); - - SecureString secureAdminPassword = SecurityUtils.ConvertToSecureString(adminPassword); - cmd = new Command("New-Mailbox"); - cmd.Parameters.Add("Organization", organizationId); - cmd.Parameters.Add("Name", adminName); - cmd.Parameters.Add("UserPrincipalName", adminEmail); - cmd.Parameters.Add("Password", secureAdminPassword); - - // run command and get DN of created mailbox - result = ExecuteShellCommand(runSpace, cmd); - string adminDN = GetResultObjectDN(result); - ExchangeLog.LogInfo("Administrator account DN: {0}", adminDN); - ExchangeLog.LogEnd("New-Mailbox"); - #endregion - - #region Add admin account to "Organization Management" group - ExchangeLog.LogStart("Add-RoleGroupMember"); - - cmd = new Command("Add-RoleGroupMember"); - cmd.Parameters.Add("Identity", GetOrganizationManagementGroupDN(organizationDN)); - cmd.Parameters.Add("Member", adminDN); - cmd.Parameters.Add("BypassSecurityGroupManagerCheck", true); - - // run command - ExecuteShellCommand(runSpace, cmd); - ExchangeLog.LogEnd("Add-RoleGroupMember"); - #endregion - - } - catch(Exception ex) - { - // delete organization if it was created - if (organizationCreated) - DeleteOrganizationInternal(runSpace, organizationId); - - throw ex; - } - finally - { - CloseRunspace(runSpace); - } - ExchangeLog.LogEnd("CreateOrganization"); - } - - public List GetOrganizationDomains(string organizationId) - { - // get accepted domains - ExchangeLog.LogStart("GetOrganizationDomains"); - ExchangeLog.DebugInfo("organizationId: {0}", organizationId); - - Runspace runSpace = null; - try - { - runSpace = OpenRunspace(); - - // get the list of org domains - return GetOrganizationDomains(runSpace, organizationId); - } - finally - { - CloseRunspace(runSpace); - } - } - - private List GetOrganizationDomains(Runspace runSpace, string organizationId) - { - ExchangeLog.LogStart("Get-AcceptedDomain"); - - Command cmd = new Command("Get-AcceptedDomain"); - cmd.Parameters.Add("Organization", organizationId); - - // run command - Collection result = ExecuteShellCommand(runSpace, cmd); - - List domains = new List(); - foreach (PSObject objDomain in result) - { - ExchangeOrganizationDomain domain = new ExchangeOrganizationDomain(); - domain.Identity = ObjToString(GetPSObjectProperty(objDomain, "Identity")); - domain.Name = (string)GetPSObjectProperty(objDomain, "Name"); - domain.IsDefault = (bool)GetPSObjectProperty(objDomain, "Default"); - domains.Add(domain); - } - - ExchangeLog.LogEnd("Get-AcceptedDomain"); - return domains; - } - - public void AddOrganizationDomain(string organizationId, string domain) - { - // add accepted domain - ExchangeLog.LogStart("AddOrganizationDomain"); - ExchangeLog.DebugInfo("organizationId: {0}", organizationId); - ExchangeLog.DebugInfo("domain: {0}", domain); - - Runspace runSpace = null; - try - { - runSpace = OpenRunspace(); - - ExchangeLog.LogStart("New-AcceptedDomain"); - - Command cmd = new Command("New-AcceptedDomain"); - cmd.Parameters.Add("Organization", organizationId); - cmd.Parameters.Add("Name", domain); - cmd.Parameters.Add("DomainName", domain); - - // run command - ExecuteShellCommand(runSpace, cmd); - ExchangeLog.LogEnd("New-AcceptedDomain"); - } - finally - { - CloseRunspace(runSpace); - } - - // add domain to catch-alls configuration file - AddCatchAllOrganizationDomain(organizationId, domain); - - ExchangeLog.LogEnd("AddOrganizationDomain"); - } - - public void DeleteOrganizationDomain(string organizationId, string domain) - { - // remove accepted domain - ExchangeLog.LogStart("DeleteOrganizationDomain"); - ExchangeLog.DebugInfo("organizationId: {0}", organizationId); - ExchangeLog.DebugInfo("domain: {0}", domain); - - Runspace runSpace = null; - try - { - runSpace = OpenRunspace(); - - ExchangeLog.LogStart("Remove-AcceptedDomain"); - - Command cmd = new Command("Remove-AcceptedDomain"); - cmd.Parameters.Add("Identity", String.Format("{0}\\{1}", organizationId, domain)); - cmd.Parameters.Add("Confirm", false); - - // run command - ExecuteShellCommand(runSpace, cmd); - ExchangeLog.LogEnd("Remove-AcceptedDomain"); - } - finally - { - CloseRunspace(runSpace); - } - - // remove domain from catch-alls configuration file - RemoveCatchAllOrganizationDomain(organizationId, domain); - - ExchangeLog.LogEnd("DeleteOrganizationDomain"); - } - - public ExchangeOrganization GetOrganizationDetails(string organizationId) - { - // get organization details - ExchangeLog.LogStart("GetOrganizationDetails"); - ExchangeLog.DebugInfo("organizationId: {0}", organizationId); - - Runspace runSpace = null; - try - { - runSpace = OpenRunspace(); - - // create organization details object - ExchangeOrganization org = new ExchangeOrganization { Name = organizationId }; - - #region Get organization details - Collection result = GetOrganizationDetailsInternal(runSpace, organizationId); - if (result.Count == 0) - { - ExchangeLog.LogWarning("Organization '{0}' was not found", organizationId); - return null; - } - - PSObject objOrg = result[0]; - org.DistinguishedName = (string)GetPSObjectProperty(objOrg, "DistinguishedName"); - org.ServicePlan = (string)GetPSObjectProperty(objOrg, "ServicePlan"); - org.ProgramId = (string)GetPSObjectProperty(objOrg, "ProgramID"); - org.OfferId = (string)GetPSObjectProperty(objOrg, "OfferID"); - #endregion - - #region Get organization quotas - ExchangeLog.LogStart("Get-RecipientEnforcementProvisioningPolicy"); - - Command cmd = new Command("Get-RecipientEnforcementProvisioningPolicy"); - cmd.Parameters.Add("Identity", String.Format("{0}\\{1}", organizationId, RecipientQuotaPolicyIdentity)); - - // run command - result = ExecuteShellCommand(runSpace, cmd); - if (result.Count == 0) - throw new NullReferenceException(String.Format("Recipient quota policy for organization '{0}' was not found", organizationId)); - - PSObject objQuota = result[0]; - //ExchangeLog.LogInfo(GetPSObjectProperty(objQuota, "MailboxCountQuota").GetType().ToString()); - org.MailboxCountQuota = ConvertUnlimitedToInt32((Unlimited)GetPSObjectProperty(objQuota, "MailboxCountQuota")); - org.ContactCountQuota = ConvertUnlimitedToInt32((Unlimited)GetPSObjectProperty(objQuota, "ContactCountQuota")); - org.DistributionListCountQuota = ConvertUnlimitedToInt32((Unlimited)GetPSObjectProperty(objQuota, "DistributionListCountQuota")); - - ExchangeLog.LogEnd("Get-RecipientEnforcementProvisioningPolicy"); - #endregion - - #region Get organization statistics - - // mailboxes - ExchangeLog.LogStart("Get-Mailbox"); - cmd = new Command("Get-Mailbox"); - cmd.Parameters.Add("Organization", organizationId); - org.MailboxCount = ExecuteShellCommand(runSpace, cmd).Count; - - // remove system "DiscoverySearchMailbox" from statistics - //if (org.MailboxCount > 0) - // org.MailboxCount -= 1; - - ExchangeLog.LogEnd("Get-Mailbox"); - - // contacts - ExchangeLog.LogStart("Get-Contact"); - cmd = new Command("Get-Contact"); - cmd.Parameters.Add("Organization", organizationId); - org.ContactCount = ExecuteShellCommand(runSpace, cmd).Count; - ExchangeLog.LogEnd("Get-Contact"); - - // distribution lists - ExchangeLog.LogStart("Get-DistributionGroup"); - cmd = new Command("Get-DistributionGroup"); - cmd.Parameters.Add("Organization", organizationId); - org.DistributionListCount = ExecuteShellCommand(runSpace, cmd).Count; - ExchangeLog.LogEnd("Get-DistributionGroup"); - #endregion - - #region Get domains - org.Domains = GetOrganizationDomains(runSpace, organizationId).ToArray(); - #endregion - - #region Administrator e-mail - ExchangeLog.LogStart("Get-RoleGroupMember"); - cmd = new Command("Get-RoleGroupMember"); - cmd.Parameters.Add("Identity", GetOrganizationManagementGroupDN(org.DistinguishedName)); - result = ExecuteShellCommand(runSpace, cmd); - - if (result.Count > 0) - { - org.AdministratorName = (string)GetPSObjectProperty(result[0], "Name"); - SmtpAddress adminEmail = (SmtpAddress)GetPSObjectProperty(result[0], "PrimarySmtpAddress"); - org.AdministratorEmail = (adminEmail != null) ? adminEmail.ToString() : null; - } - ExchangeLog.LogEnd("Get-RoleGroupMember"); - #endregion - - ExchangeLog.LogEnd("GetOrganizationDetails"); - return org; - } - finally - { - CloseRunspace(runSpace); - } - } - - public void UpdateOrganizationQuotas(string organizationId, int mailboxesNumber, int contactsNumber, int distributionListsNumber) - { - // update quotas - ExchangeLog.LogStart("UpdateOrganizationQuotas"); - ExchangeLog.DebugInfo("organizationId: {0}", organizationId); - ExchangeLog.DebugInfo("mailboxesNumber: {0}", mailboxesNumber); - ExchangeLog.DebugInfo("contactsNumber: {0}", contactsNumber); - ExchangeLog.DebugInfo("distributionListsNumber: {0}", distributionListsNumber); - - Runspace runSpace = null; - try - { - runSpace = OpenRunspace(); - - ExchangeLog.LogStart("Set-RecipientEnforcementProvisioningPolicy"); - - Command cmd = new Command("Set-RecipientEnforcementProvisioningPolicy"); - cmd.Parameters.Add("Identity", String.Format("{0}\\{1}", organizationId, RecipientQuotaPolicyIdentity)); - cmd.Parameters.Add("MailboxCountQuota", ConvertInt32ToUnlimited(mailboxesNumber)); - cmd.Parameters.Add("ContactCountQuota", ConvertInt32ToUnlimited(contactsNumber)); - cmd.Parameters.Add("DistributionListCountQuota", ConvertInt32ToUnlimited(distributionListsNumber)); - - // run command - ExecuteShellCommand(runSpace, cmd); - ExchangeLog.LogEnd("Set-RecipientEnforcementProvisioningPolicy"); - } - finally - { - CloseRunspace(runSpace); - } - ExchangeLog.LogEnd("UpdateOrganizationQuotas"); - } - - public void UpdateOrganizationCatchAllAddress(string organizationId, string catchAllEmail) - { - // update catch-all address - SetCatchAllAddress(organizationId, catchAllEmail); - } - - public void UpdateOrganizationServicePlan(string organizationId, string programId, string offerId) - { - // update service plan - ExchangeLog.LogStart("UpdateOrganizationServicePlan"); - ExchangeLog.DebugInfo("organizationId: {0}", organizationId); - ExchangeLog.DebugInfo("programId: {0}", programId); - ExchangeLog.DebugInfo("offerId: {0}", offerId); - - Runspace runSpace = null; - try - { - runSpace = OpenRunspace(); - - ExchangeLog.LogStart("Update-ServicePlan"); - - Command cmd = new Command("Update-ServicePlan"); - cmd.Parameters.Add("Identity", organizationId); - cmd.Parameters.Add("ProgramID", programId); - cmd.Parameters.Add("OfferID", offerId); - - // run command - ExecuteShellCommand(runSpace, cmd); - ExchangeLog.LogEnd("Update-ServicePlan"); - } - finally - { - CloseRunspace(runSpace); - } - ExchangeLog.LogEnd("UpdateOrganizationServicePlan"); - } - - public void DeleteOrganization(string organizationId) - { - ExchangeLog.LogStart("DeleteOrganization"); - ExchangeLog.DebugInfo("organizationId: {0}", organizationId); - - Runspace runSpace = null; - try - { - runSpace = OpenRunspace(); - - // delete - DeleteOrganizationInternal(runSpace, organizationId); - } - finally - { - CloseRunspace(runSpace); - } - - // remove all organization domains from catch-alls configuration file - RemoveCatchAllOrganization(organizationId); - - ExchangeLog.LogEnd("DeleteOrganization"); - } - - private void DeleteOrganizationInternal(Runspace runSpace, string organizationId) - { - // get organization mailboxes - Command cmd = new Command("Get-Mailbox"); - cmd.Parameters.Add("Organization", organizationId); - Collection result = ExecuteShellCommand(runSpace, cmd); - - // delete organization mailboxes - foreach (PSObject objMailbox in result) - { - string mailboxDN = (string)GetPSObjectProperty(objMailbox, "DistinguishedName"); - ExchangeLog.LogInfo("Deleting mailbox: {0}", mailboxDN); - - cmd = new Command("Remove-Mailbox"); - cmd.Parameters.Add("Identity", mailboxDN); - cmd.Parameters.Add("Confirm", false); - ExecuteShellCommand(runSpace, cmd); - } - - // delete organization - ExchangeLog.LogStart("Remove-Organization"); - cmd = new Command("Remove-Organization"); - cmd.Parameters.Add("Identity", organizationId); - cmd.Parameters.Add("Confirm", false); - ExecuteShellCommand(runSpace, cmd); - ExchangeLog.LogEnd("Remove-Organization"); - } - - #region Catch-All methods - private void SetCatchAllAddress(string organizationId, string catchAllEmail) - { - // remove catch all - if (String.IsNullOrEmpty(catchAllEmail)) - RemoveCatchAllOrganization(organizationId); - - // get all organization domains - - // setup catch-all for organization domains - } - - private void AddCatchAllOrganizationDomain(string organizationId, string domain) - { - - } - - private void RemoveCatchAllOrganizationDomain(string organizationId, string domain) - { - - } - - private void RemoveCatchAllOrganization(string organizationId) - { - - } - #endregion - - #region Private helpers - private Collection GetOrganizationDetailsInternal(Runspace runSpace, string organizationId) - { - Command cmd = new Command("Get-Organization"); - cmd.Parameters.Add("Identity", organizationId); - return ExecuteShellCommand(runSpace, cmd); - } - - private string GetOrganizationManagementGroupDN(string organizationDN) - { - return String.Format("CN={0},{1}", OrganizationManagementGroup, organizationDN); - } - #endregion - - #region ServiceProvider methods - public override bool IsInstalled() - { - int value = 0; - RegistryKey root = Registry.LocalMachine; - RegistryKey rk = root.OpenSubKey(ExchangeRegistryPath); - if (rk != null) - { - value = (int)rk.GetValue("MsiProductMajor", null); - rk.Close(); - } - return value == 14; - } - #endregion - - #region PowerShell integration - private static RunspaceConfiguration runspaceConfiguration = null; - private static string ExchangePath = null; - - internal static string GetExchangePath() - { - if (string.IsNullOrEmpty(ExchangePath)) - { - RegistryKey root = Registry.LocalMachine; - RegistryKey rk = root.OpenSubKey(ExchangeRegistryPath); - if (rk != null) - { - string value = (string)rk.GetValue("MsiInstallPath", null); - rk.Close(); - if (!string.IsNullOrEmpty(value)) - ExchangePath = Path.Combine(value, "bin"); - } - } - return ExchangePath; - } - - private static Assembly ResolveExchangeAssembly(object p, ResolveEventArgs args) - { - //Add path for the Exchange 2010 DLLs - if (args.Name.Contains("Microsoft.Exchange")) - { - string exchangePath = GetExchangePath(); - if (string.IsNullOrEmpty(exchangePath)) - return null; - - string path = Path.Combine(exchangePath, args.Name.Split(',')[0] + ".dll"); - if (!File.Exists(path)) - return null; - - ExchangeLog.DebugInfo("Resolved assembly: {0}", path); - return Assembly.LoadFrom(path); - } - else - { - return null; - } - } - - internal virtual Runspace OpenRunspace() - { - ExchangeLog.LogStart("OpenRunspace"); - - if (runspaceConfiguration == null) - { - runspaceConfiguration = RunspaceConfiguration.Create(); - PSSnapInException exception = null; - - PSSnapInInfo info = runspaceConfiguration.AddPSSnapIn(ExchangeSnapInName, out exception); - - if (exception != null) - { - ExchangeLog.LogWarning("SnapIn error", exception); - } - } - Runspace runSpace = RunspaceFactory.CreateRunspace(runspaceConfiguration); - //AdminSessionADSettings adSettings = SetADSettings(); - runSpace.Open(); - //runSpace.SessionStateProxy.SetVariable("AdminSessionADSettings", adSettings); - runSpace.SessionStateProxy.SetVariable("ConfirmPreference", "none"); - ExchangeLog.LogEnd("OpenRunspace"); - return runSpace; - } - - internal void CloseRunspace(Runspace runspace) - { - try - { - if (runspace != null && runspace.RunspaceStateInfo.State == RunspaceState.Opened) - { - runspace.Close(); - } - } - catch (Exception ex) - { - ExchangeLog.LogError("Runspace error", ex); - } - } - - internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd) - { - object[] errors; - return ExecuteShellCommand(runSpace, cmd, out errors); - } - - internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd, out object[] errors) - { - ExchangeLog.LogStart("ExecuteShellCommand"); - List errorList = new List(); - - ExchangeLog.DebugCommand(cmd); - Collection results = null; - // Create a pipeline - Pipeline pipeLine = runSpace.CreatePipeline(); - using (pipeLine) - { - // Add the command - pipeLine.Commands.Add(cmd); - // Execute the pipeline and save the objects returned. - results = pipeLine.Invoke(); - - // Log out any errors in the pipeline execution - // NOTE: These errors are NOT thrown as exceptions! - // Be sure to check this to ensure that no errors - // happened while executing the command. - if (pipeLine.Error != null && pipeLine.Error.Count > 0) - { - foreach (object item in pipeLine.Error.ReadToEnd()) - { - errorList.Add(item); - string errorMessage = string.Format("Invoke error: {0}", item.ToString()); - ExchangeLog.LogWarning(errorMessage); - } - - throw new Exception(errorList[0].ToString()); - } - } - pipeLine = null; - errors = errorList.ToArray(); - ExchangeLog.LogEnd("ExecuteShellCommand"); - return results; - } - - /// - /// Returns the distinguished name of the object from the shell execution result - /// - /// - /// - internal string GetResultObjectDN(Collection result) - { - ExchangeLog.LogStart("GetResultObjectDN"); - if (result == null) - throw new ArgumentNullException("result", "Execution result is not specified"); - - if (result.Count < 1) - throw new ArgumentException("Execution result does not contain any object"); - - if (result.Count > 1) - throw new ArgumentException("Execution result contains more than one object"); - - PSMemberInfo info = result[0].Members["DistinguishedName"]; - if (info == null) - throw new ArgumentException("Execution result does not contain DistinguishedName property", "result"); - - string ret = info.Value.ToString(); - ExchangeLog.LogEnd("GetResultObjectDN"); - return ret; - } - - internal object GetPSObjectProperty(PSObject obj, string name) - { - PSMemberInfo info = obj.Members[name]; - if (info == null) - throw new ArgumentException(String.Format("PSObject does not contain '{0}' property", name), "obj"); - - return info.Value; - } - #endregion - - #region Convert Utils - internal int ConvertUnlimitedToInt32(Unlimited value) - { - int ret = 0; - if (value.IsUnlimited) - { - ret = -1; - } - else - { - ret = value.Value; - } - return ret; - } - - internal Unlimited ConvertInt32ToUnlimited(int value) - { - if (value == -1) - return Unlimited.UnlimitedValue; - else - { - Unlimited ret = new Unlimited(); - ret.Value = value; - return ret; - } - } - - internal string ObjToString(object obj) - { - string ret = null; - if (obj != null) - ret = obj.ToString(); - return ret; - } - #endregion - } -} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.ExchangeHostedEdition/ExchangeLog.cs b/WebsitePanel/Sources/WebsitePanel.Providers.ExchangeHostedEdition/ExchangeLog.cs deleted file mode 100644 index 3c32c596..00000000 --- a/WebsitePanel/Sources/WebsitePanel.Providers.ExchangeHostedEdition/ExchangeLog.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using WebsitePanel.Server.Utils; -using System.Management.Automation.Runspaces; - -namespace WebsitePanel.Providers.ExchangeHostedEdition -{ - /// - /// Exchange Log Helper Methods - /// - internal class ExchangeLog - { - internal static string LogPrefix = "Exchange"; - - internal static void LogStart(string message, params object[] args) - { - string text = String.Format(message, args); - Log.WriteStart("{0} {1}", LogPrefix, text); - } - - internal static void LogEnd(string message, params object[] args) - { - string text = String.Format(message, args); - Log.WriteEnd("{0} {1}", LogPrefix, text); - } - - internal static void LogInfo(string message, params object[] args) - { - string text = String.Format(message, args); - Log.WriteInfo("{0} {1}", LogPrefix, text); - } - - internal static void LogWarning(string message, params object[] args) - { - string text = String.Format(message, args); - Log.WriteWarning("{0} {1}", LogPrefix, text); - } - - internal static void LogError(Exception ex) - { - Log.WriteError(LogPrefix, ex); - } - - internal static void LogError(string message, Exception ex) - { - string text = String.Format("{0} {1}", LogPrefix, message); - Log.WriteError(text, ex); - } - - internal static void DebugInfo(string message, params object[] args) - { -#if DEBUG - string text = String.Format(message, args); - Log.WriteInfo("{0} {1}", LogPrefix, text); -#endif - } - - internal static void DebugCommand(Command cmd) - { -#if DEBUG - StringBuilder sb = new StringBuilder(cmd.CommandText); - foreach (CommandParameter parameter in cmd.Parameters) - { - string formatString = " -{0} {1}"; - if (parameter.Value is string) - formatString = " -{0} '{1}'"; - else if (parameter.Value is bool) - formatString = " -{0} ${1}"; - sb.AppendFormat(formatString, parameter.Name, parameter.Value); - } - Log.WriteInfo("{0} {1}", LogPrefix, sb.ToString()); -#endif - } - } -} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.ExchangeHostedEdition/Properties/AssemblyInfo.cs b/WebsitePanel/Sources/WebsitePanel.Providers.ExchangeHostedEdition/Properties/AssemblyInfo.cs deleted file mode 100644 index ca7b252f..00000000 --- a/WebsitePanel/Sources/WebsitePanel.Providers.ExchangeHostedEdition/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("WebsitePanel.Providers.ExchangeHostedEdition")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyProduct("WebsitePanel.Providers.ExchangeHostedEdition")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("1344cb8c-f4fa-485c-9fb3-93dd1db4f128")] \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.FileZilla/FileZilla.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.FileZilla/FileZilla.cs index 3ab8e6dc..7b6c5f9e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.FileZilla/FileZilla.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.FileZilla/FileZilla.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.Gene6/Gene6FTP.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.Gene6/Gene6FTP.cs index 7bee1650..29c7fe5a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.Gene6/Gene6FTP.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.Gene6/Gene6FTP.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -52,6 +52,11 @@ namespace WebsitePanel.Providers.FTP { get { return FileUtils.EvaluateSystemVariables(ProviderSettings["InstallFolder"]); } } + + protected string LogsFolder + { + get { return FileUtils.EvaluateSystemVariables(ProviderSettings["LogsFolder"]); } + } #endregion #region Sites @@ -589,7 +594,13 @@ TransferLimitType=never"); private string GetLogsPath() { - return GetInstallFolder() + "Log"; + if (String.IsNullOrEmpty(LogsFolder)) + return GetInstallFolder() + "Log"; + else + { + string folder = LogsFolder.Replace("/", "\\"); + return folder.TrimEnd('\\'); + } } private void WriteTextFile(string path, string content) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs60/MsFTP.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs60/MsFTP.cs index 37b3cc31..fed92cbf 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs60/MsFTP.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs60/MsFTP.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationGlobals.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationGlobals.cs index e6e2b8d7..113f9232 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationGlobals.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationGlobals.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationRule.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationRule.cs index 571f7636..ecfa0a20 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationRule.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationRule.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationRuleAccessType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationRuleAccessType.cs index 88adda4e..3a53b967 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationRuleAccessType.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationRuleAccessType.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationRuleCollection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationRuleCollection.cs index 15e6da12..deb90991 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationRuleCollection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationRuleCollection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationSection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationSection.cs index 2e20c699..a5709595 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationSection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Authorization/AuthorizationSection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ActiveDirectoryElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ActiveDirectoryElement.cs index 78879482..90819e5f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ActiveDirectoryElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ActiveDirectoryElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/AnonymousAuthenticationElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/AnonymousAuthenticationElement.cs index 53df3a47..d5e1b0a4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/AnonymousAuthenticationElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/AnonymousAuthenticationElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/AuthenticationElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/AuthenticationElement.cs index cc0b219b..0ae4f691 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/AuthenticationElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/AuthenticationElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/BasicAuthenticationElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/BasicAuthenticationElement.cs index f19ec061..a57cc37c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/BasicAuthenticationElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/BasicAuthenticationElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ConnectionsElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ConnectionsElement.cs index 770f6bac..520797c5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ConnectionsElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ConnectionsElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ControlChannelPolicy.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ControlChannelPolicy.cs index a7a26f00..74e48372 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ControlChannelPolicy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ControlChannelPolicy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/CustomAuthenticationElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/CustomAuthenticationElement.cs index ab525407..51a7ef55 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/CustomAuthenticationElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/CustomAuthenticationElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/CustomAuthenticationProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/CustomAuthenticationProvider.cs index c2485d47..af094a14 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/CustomAuthenticationProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/CustomAuthenticationProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/CustomAuthenticationProviderCollection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/CustomAuthenticationProviderCollection.cs index f0524297..006259a0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/CustomAuthenticationProviderCollection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/CustomAuthenticationProviderCollection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/DataChannelPolicy.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/DataChannelPolicy.cs index bf9d7daf..0782df63 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/DataChannelPolicy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/DataChannelPolicy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/DataChannelSecurityElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/DataChannelSecurityElement.cs index bfc327f4..65857722 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/DataChannelSecurityElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/DataChannelSecurityElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/DirectoryBrowseElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/DirectoryBrowseElement.cs index de1184e4..d0302658 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/DirectoryBrowseElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/DirectoryBrowseElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FileHandlingElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FileHandlingElement.cs index 47036f5e..734780f7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FileHandlingElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FileHandlingElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FirewallElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FirewallElement.cs index 3ce8b45c..b42a8d5d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FirewallElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FirewallElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FtpLogExtFileFlags.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FtpLogExtFileFlags.cs index bf9ff97c..56919662 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FtpLogExtFileFlags.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FtpLogExtFileFlags.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FtpProtocolElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FtpProtocolElement.cs index 4e6b629a..f3458b3e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FtpProtocolElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FtpProtocolElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FtpSite.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FtpSite.cs index d0bdc921..69a98acc 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FtpSite.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/FtpSite.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/LogFileElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/LogFileElement.cs index 7733f537..f0c4b675 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/LogFileElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/LogFileElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/LoggingElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/LoggingElement.cs index cb06d8af..2bc2fd0c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/LoggingElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/LoggingElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/MessagesElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/MessagesElement.cs index 98ab13c0..de25b7d5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/MessagesElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/MessagesElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/Mode.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/Mode.cs index 7c945920..2b2536d4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/Mode.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/Mode.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/PermissionsFlags.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/PermissionsFlags.cs index d833f359..e579300c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/PermissionsFlags.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/PermissionsFlags.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ProviderCollection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ProviderCollection.cs index 079657b5..996157e1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ProviderCollection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ProviderCollection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ProviderElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ProviderElement.cs index ceeca5a0..5098645a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ProviderElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ProviderElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SecurityElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SecurityElement.cs index fb8448f8..7c40a2cc 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SecurityElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SecurityElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SelectiveLogging.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SelectiveLogging.cs index bcf92c26..d83f2000 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SelectiveLogging.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SelectiveLogging.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SessionCollection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SessionCollection.cs index 36113bd1..72f0f5b0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SessionCollection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SessionCollection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SessionElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SessionElement.cs index d1790b1c..1a4931da 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SessionElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SessionElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ShowFlags.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ShowFlags.cs index 4a1e0184..5c8bfaf8 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ShowFlags.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ShowFlags.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SiteState.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SiteState.cs index 9f74cf06..0eda2680 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SiteState.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SiteState.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SslClientCertificatesElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SslClientCertificatesElement.cs index 6e5607df..ae762b20 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SslClientCertificatesElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SslClientCertificatesElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SslElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SslElement.cs index b783d6a3..daecbf80 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SslElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/SslElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/UserIsolationElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/UserIsolationElement.cs index cb2f3d5d..2fcb6b05 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/UserIsolationElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/UserIsolationElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ValidationFlags.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ValidationFlags.cs index 1b9a84d1..486aa096 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ValidationFlags.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/Configuration/ValidationFlags.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/FtpHelper.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/FtpHelper.cs index 46a7019c..12a453e4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/FtpHelper.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/FtpHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/FtpSiteGlobals.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/FtpSiteGlobals.cs index b47cdc61..e59215c7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/FtpSiteGlobals.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/FtpSiteGlobals.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/MsFTP.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/MsFTP.cs index e494a3e8..9a614110 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/MsFTP.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/MsFTP.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/SitesHelper.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/SitesHelper.cs index c7ce1624..a5c932a5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/SitesHelper.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/SitesHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/SitesModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/SitesModuleService.cs index 0d0096b0..7fe1a8e3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/SitesModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.IIs70/SitesModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.ServU/ServU.cs b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.ServU/ServU.cs index 2f2ccb2a..dc85e8f3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.FTP.ServU/ServU.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.FTP.ServU/ServU.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs index 33a122f6..13e5f563 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -72,11 +72,12 @@ namespace WebsitePanel.Providers.HostedSolution return res; } - string arguments = string.Format("-username {0} -password {1} -add -u {2} -b {3}", + string arguments = string.Format("-username {0} -password {1} -add -u {2} -b {3} -n {4}", User, Password, primaryEmailAddress, - EnterpriseServer); + EnterpriseServer, + EnterpriseServerFQDN); try { @@ -119,13 +120,14 @@ namespace WebsitePanel.Providers.HostedSolution return res; } - string arguments = string.Format(" -username {0} -password {1} -change -u {2} -b {3} -w {4} -wt {5}", + string arguments = string.Format(" -username {0} -password {1} -change -u {2} -b {3} -w {4} -wt {5} -n {6}", User, Password, primaryEmailAddress, EnterpriseServer, password, - time); + time, + EnterpriseServerFQDN); try { @@ -163,11 +165,12 @@ namespace WebsitePanel.Providers.HostedSolution return res; } - string arguments = string.Format("-username {0} -password {1} -change -u {2} -b {3} -cw", + string arguments = string.Format("-username {0} -password {1} -change -u {2} -b {3} -cw -n {4}", User, Password, primaryEmailAddress, - EnterpriseServer); + EnterpriseServer, + EnterpriseServerFQDN); try { @@ -214,11 +217,12 @@ namespace WebsitePanel.Providers.HostedSolution return res; } - string arguments = string.Format("-username {0} -password {1} -change -u {2} -b {3} -wrandom", + string arguments = string.Format("-username {0} -password {1} -change -u {2} -b {3} -wrandom -n {4}", User, Password, primaryEmailAddress, - EnterpriseServer); + EnterpriseServer, + EnterpriseServerFQDN); try { @@ -256,11 +260,12 @@ namespace WebsitePanel.Providers.HostedSolution return res; } - string arguments = string.Format("-username {0} -password {1} -kill_handheld -u {2} -b {3}", + string arguments = string.Format("-username {0} -password {1} -kill_handheld -u {2} -b {3} -n {4}", User, Password, primaryEmailAddress, - EnterpriseServer); + EnterpriseServer, + EnterpriseServerFQDN); try @@ -346,11 +351,12 @@ namespace WebsitePanel.Providers.HostedSolution return res; } - string arguments = string.Format(" -username {0} -password {1} -stats -u {2} -b {3}", + string arguments = string.Format(" -username {0} -password {1} -stats -u {2} -b {3} -n {4}", User, Password, primaryEmailAddress, - EnterpriseServer); + EnterpriseServer, + EnterpriseServerFQDN); string output; string error; @@ -421,11 +427,12 @@ namespace WebsitePanel.Providers.HostedSolution return res; } - string arguments = string.Format("-username {0} -password {1} -delete -u {2} -b {3}", + string arguments = string.Format("-username {0} -password {1} -delete -u {2} -b {3} -n {4}", User, Password, primaryEmailAddress, - EnterpriseServer); + EnterpriseServer, + EnterpriseServerFQDN); try { diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs index 8a5c24be..a1ea4d5f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -74,7 +74,16 @@ namespace WebsitePanel.Providers.HostedSolution return ProviderSettings[Constants.EnterpriseServer]; } } - + + public string EnterpriseServerFQDN + { + get + { + return ProviderSettings[Constants.EnterpriseServerFQDN]; + } + } + + public ResultObject CreateBlackBerryUser(string primaryEmailAddress) { return CreateBlackBerryUserInternal(primaryEmailAddress); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/CRMProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/CRMProvider.cs index c265eeee..9f00bc92 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/CRMProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/CRMProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/CRMProxy.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/CRMProxy.cs index 0dedf0f8..e2799391 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/CRMProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/CRMProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs index dce5efc9..598a133f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2007.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -28,6 +28,7 @@ using System; using System.IO; +using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; @@ -67,7 +68,6 @@ namespace WebsitePanel.Providers.HostedSolution #region Constants private const string CONFIG_CLEAR_QUERYBASEDN = "WebsitePanel.Exchange.ClearQueryBaseDN"; - private const string CONFIG_ENABLESP2ABP = "WebsitePanel.Exchange.enableSP2abp"; #endregion #region Properties @@ -87,7 +87,12 @@ namespace WebsitePanel.Providers.HostedSolution get { return ProviderSettings["MailboxDatabase"]; } } - internal int KeepDeletedItemsDays + internal bool PublicFolderDistributionEnabled + { + get { return ProviderSettings.GetBool("PublicFolderDistributionEnabled"); } + } + + internal int KeepDeletedItemsDays { get { return Int32.Parse(ProviderSettings["KeepDeletedItemsDays"]); } } @@ -152,10 +157,10 @@ namespace WebsitePanel.Providers.HostedSolution /// /// /// - public Organization ExtendToExchangeOrganization(string organizationId, string securityGroup) - { - return ExtendToExchangeOrganizationInternal(organizationId, securityGroup); - } + public Organization ExtendToExchangeOrganization(string organizationId, string securityGroup, bool IsConsumer) + { + return ExtendToExchangeOrganizationInternal(organizationId, securityGroup, IsConsumer); + } /// /// Creates organization OAB on the Client Access Server @@ -183,13 +188,18 @@ namespace WebsitePanel.Providers.HostedSolution return GetOABVirtualDirectoryInternal(); } - public bool DeleteOrganization(string organizationId, string distinguishedName, - string globalAddressList, string addressList, string roomsAddressList, string offlineAddressBook, - string securityGroup) - { - return DeleteOrganizationInternal(organizationId, distinguishedName, globalAddressList, - addressList, roomsAddressList, offlineAddressBook, securityGroup); - } + public Organization CreateOrganizationAddressBookPolicy(string organizationId, string gal, string addressBook, string roomList, string oab) + { + return CreateOrganizationAddressBookPolicyInternal(organizationId, gal, addressBook, roomList, oab); + } + + public bool DeleteOrganization(string organizationId, string distinguishedName, + string globalAddressList, string addressList, string roomList, string offlineAddressBook, + string securityGroup, string addressBookPolicy) + { + return DeleteOrganizationInternal(organizationId, distinguishedName, globalAddressList, + addressList, roomList, offlineAddressBook, securityGroup, addressBookPolicy); + } public void SetOrganizationStorageLimits(string organizationDistinguishedName, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) @@ -234,7 +244,7 @@ namespace WebsitePanel.Providers.HostedSolution SetMailboxPermissionsInternal(organizationId, accountName, sendAsAccounts, fullAccessAccounts); } - +/* public string CreateMailbox(string organizationId, string organizationDistinguishedName, string mailboxDatabase, string securityGroup, string offlineAddressBook, ExchangeAccountType accountType, string displayName, @@ -247,7 +257,7 @@ namespace WebsitePanel.Providers.HostedSolution enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays); } - +*/ public void DeleteMailbox(string accountName) { DeleteMailboxInternal(accountName); @@ -258,17 +268,9 @@ namespace WebsitePanel.Providers.HostedSolution return GetMailboxGeneralSettingsInternal(accountName); } - public void SetMailboxGeneralSettings(string accountName, string displayName, string password, - bool hideFromAddressBook, bool disabled, string firstName, string initials, string lastName, - string address, string city, string state, string zip, string country, string jobTitle, - string company, string department, string office, string managerAccountName, - string businessPhone, string fax, string homePhone, string mobilePhone, string pager, - string webPage, string notes) + public void SetMailboxGeneralSettings(string accountName, bool hideFromAddressBook, bool disabled) { - SetMailboxGeneralSettingsInternal(accountName, displayName, password, hideFromAddressBook, - disabled, firstName, initials, lastName, address, city, state, zip, country, jobTitle, - company, department, office, managerAccountName, businessPhone, fax, homePhone, - mobilePhone, pager, webPage, notes); + SetMailboxGeneralSettingsInternal(accountName, hideFromAddressBook, disabled); } public ExchangeMailbox GetMailboxMailFlowSettings(string accountName) @@ -276,29 +278,28 @@ namespace WebsitePanel.Providers.HostedSolution return GetMailboxMailFlowSettingsInternal(accountName); } - public void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, - string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, - string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, - int maxReceiveMessageSizeKB, bool requireSenderAuthentication) - { - SetMailboxMailFlowSettingsInternal(accountName, enableForwarding, forwardingAccountName, - forwardToBoth, sendOnBehalfAccounts, acceptAccounts, rejectAccounts, maxRecipients, - maxSendMessageSizeKB, maxReceiveMessageSizeKB, requireSenderAuthentication); - } + public void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, + string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, + string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { + SetMailboxMailFlowSettingsInternal(accountName, enableForwarding, forwardingAccountName, + forwardToBoth, sendOnBehalfAccounts, acceptAccounts, rejectAccounts, requireSenderAuthentication); + } public ExchangeMailbox GetMailboxAdvancedSettings(string accountName) { return GetMailboxAdvancedSettingsInternal(accountName); } - public void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, - bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, - int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) - { - SetMailboxAdvancedSettingsInternal(organizationId, accountName, enablePOP, enableIMAP, enableOWA, - enableMAPI, enableActiveSync, issueWarningKB, - prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays); - } + public void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, + bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, + int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB) + { + SetMailboxAdvancedSettingsInternal(organizationId, accountName, enablePOP, enableIMAP, enableOWA, + enableMAPI, enableActiveSync, issueWarningKB, + prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB); + } public ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName) { @@ -363,12 +364,12 @@ namespace WebsitePanel.Providers.HostedSolution #endregion #region Distribution lists - public void CreateDistributionList(string organizationId, string organizationDistinguishedName, - string displayName, string accountName, string name, string domain, string managedBy) - { - CreateDistributionListInternal(organizationId, organizationDistinguishedName, displayName, - accountName, name, domain, managedBy); - } + public void CreateDistributionList(string organizationId, string organizationDistinguishedName, + string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists) + { + CreateDistributionListInternal(organizationId, organizationDistinguishedName, displayName, + accountName, name, domain, managedBy, addressLists); + } public void DeleteDistributionList(string accountName) { @@ -380,58 +381,59 @@ namespace WebsitePanel.Providers.HostedSolution return GetDistributionListGeneralSettingsInternal(accountName); } - public void SetDistributionListGeneralSettings(string accountName, string displayName, - bool hideFromAddressBook, string managedBy, string[] members, string notes) - { - SetDistributionListGeneralSettingsInternal(accountName, displayName, hideFromAddressBook, - managedBy, members, notes); - } + public void SetDistributionListGeneralSettings(string accountName, string displayName, + bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists) + { + SetDistributionListGeneralSettingsInternal(accountName, displayName, hideFromAddressBook, + managedBy, members, notes, addressLists); + } - public void AddDistributionListMembers(string accountName, string[] memberAccounts) - { - AddDistributionListMembersInternal(accountName, memberAccounts); - } + public void AddDistributionListMembers(string accountName, string[] memberAccounts, string[] addressLists) + { + AddDistributionListMembersInternal(accountName, memberAccounts, addressLists); + } - public void RemoveDistributionListMembers(string accountName, string[] memberAccounts) - { - RemoveDistributionListMembersInternal(accountName, memberAccounts); - } + + public void RemoveDistributionListMembers(string accountName, string[] memberAccounts, string[] addressLists) + { + RemoveDistributionListMembersInternal(accountName, memberAccounts, addressLists); + } public ExchangeDistributionList GetDistributionListMailFlowSettings(string accountName) { return GetDistributionListMailFlowSettingsInternal(accountName); } - public void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, - string[] rejectAccounts, bool requireSenderAuthentication) - { - SetDistributionListMailFlowSettingsInternal(accountName, acceptAccounts, rejectAccounts, requireSenderAuthentication); - } + public void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, + string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists) + { + SetDistributionListMailFlowSettingsInternal(accountName, acceptAccounts, rejectAccounts, requireSenderAuthentication, addressLists); + } public ExchangeEmailAddress[] GetDistributionListEmailAddresses(string accountName) { return GetDistributionListEmailAddressesInternal(accountName); } - public void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses) - { - SetDistributionListEmailAddressesInternal(accountName, emailAddresses); - } + public void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses, string[] addressLists) + { + SetDistributionListEmailAddressesInternal(accountName, emailAddresses, addressLists); + } - public void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress) - { - SetDistributionListPrimaryEmailAddressInternal(accountName, emailAddress); - } + public void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress, string[] addressLists) + { + SetDistributionListPrimaryEmailAddressInternal(accountName, emailAddress, addressLists); + } public ExchangeDistributionList GetDistributionListPermissions(string organizationId, string accountName) { return GetDistributionListPermissionsInternal(organizationId, accountName, null); } - public void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts) - { - SetDistributionListPermissionsInternal(organizationId, accountName, sendAsAccounts, sendOnBehalfAccounts); - } + public void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists) + { + SetDistributionListPermissionsInternal(organizationId, accountName, sendAsAccounts, sendOnBehalfAccounts, addressLists); + } #endregion #region Public folders @@ -455,10 +457,10 @@ namespace WebsitePanel.Providers.HostedSolution public void DisableMailbox(string id) { - DisableMailboxIntenal(id); + DisableMailboxInternal(id); } - private void DisableMailboxIntenal(string id) + internal virtual void DisableMailboxInternal(string id) { ExchangeLog.LogStart("DisableMailboxIntenal"); Runspace runSpace = null; @@ -489,9 +491,9 @@ namespace WebsitePanel.Providers.HostedSolution } public void SetPublicFolderGeneralSettings(string folder, string newFolderName, - string[] authorAccounts, bool hideFromAddressBook) + bool hideFromAddressBook, ExchangeAccount[] accounts) { - SetPublicFolderGeneralSettingsInternal(folder, newFolderName, authorAccounts, hideFromAddressBook); + SetPublicFolderGeneralSettingsInternal(folder, newFolderName, hideFromAddressBook, accounts); } public ExchangePublicFolder GetPublicFolderMailFlowSettings(string folder) { @@ -617,9 +619,9 @@ namespace WebsitePanel.Providers.HostedSolution if (item is Organization) { Organization org = item as Organization; - DeleteOrganization(org.OrganizationId, org.DistinguishedName, org.GlobalAddressList, - org.AddressList, org.RoomsAddressList, org.OfflineAddressBook, org.SecurityGroup); - } + DeleteOrganization(org.OrganizationId, org.DistinguishedName, org.GlobalAddressList, + org.AddressList, org.RoomsAddressList, org.OfflineAddressBook, org.SecurityGroup, org.AddressBookPolicy); + } else if (item is ExchangeDomain) { DeleteAcceptedDomain(item.Name); @@ -706,9 +708,9 @@ namespace WebsitePanel.Providers.HostedSolution /// /// /// - private Organization ExtendToExchangeOrganizationInternal(string organizationId, string securityGroup) - { - ExchangeLog.LogStart("CreateOrganizationInternal"); + internal virtual Organization ExtendToExchangeOrganizationInternal(string organizationId, string securityGroup, bool IsConsumer) + { + ExchangeLog.LogStart("CreateOrganizationInternal"); ExchangeLog.DebugInfo(" Organization Id: {0}", organizationId); ExchangeTransaction transaction = StartTransaction(); @@ -724,7 +726,7 @@ namespace WebsitePanel.Providers.HostedSolution //Create mail enabled organization security group EnableMailSecurityDistributionGroup(runSpace, securityGroup, organizationId); transaction.RegisterMailEnabledDistributionGroup(securityGroup); - UpdateSecurityDistributionGroup(runSpace, securityGroup, organizationId); + UpdateSecurityDistributionGroup(runSpace, securityGroup, organizationId, IsConsumer); //create GAL string galId = CreateGlobalAddressList(runSpace, organizationId); @@ -742,7 +744,7 @@ namespace WebsitePanel.Providers.HostedSolution string ralId = CreateRoomsAddressList(runSpace, organizationId); transaction.RegisterNewRoomsAddressList(ralId); ExchangeLog.LogInfo(" Rooms Address List: {0}", ralId); - UpdateRoomsAddressList(runSpace, ralId, securityGroupPath); + UpdateAddressList(runSpace, ralId, securityGroupPath); //create ActiveSync policy string asId = CreateActiveSyncPolicy(runSpace, organizationId); @@ -847,20 +849,6 @@ namespace WebsitePanel.Providers.HostedSolution transaction.RegisterNewOfflineAddressBook(oabId); UpdateOfflineAddressBook(runSpace, oabId, securityGroupId); info.OfflineAddressBook = oabId; - - //create ABP - - bool enableSP2abp = false; - if (ConfigurationManager.AppSettings[CONFIG_ENABLESP2ABP] != null) - enableSP2abp = Boolean.Parse(ConfigurationManager.AppSettings[CONFIG_ENABLESP2ABP]); - Version exchangeVersion = GetExchangeVersion(); - - if (enableSP2abp && (exchangeVersion >= new Version(14, 2))) - { - string abpId = CreateAddressPolicy(runSpace, organizationId); - transaction.RegisterNewAddressPolicy(abpId); - ExchangeLog.LogInfo(" Address Policy: {0}", abpId); - } } catch (Exception ex) { @@ -908,11 +896,17 @@ namespace WebsitePanel.Providers.HostedSolution } ExchangeLog.LogEnd("UpdateOrganizationOfflineAddressBookInternal"); } + + internal virtual Organization CreateOrganizationAddressBookPolicyInternal(string organizationId, string gal, string addressBook, string roomList, string oab) + { + Organization info = new Organization(); + return info; + } - private bool DeleteOrganizationInternal(string organizationId, string distinguishedName, - string globalAddressList, string addressList, string roomsAddressList, string offlineAddressBook, string securityGroup) - { + internal virtual bool DeleteOrganizationInternal(string organizationId, string distinguishedName, + string globalAddressList, string addressList, string roomsAddressList, string offlineAddressBook, string securityGroup, string addressBookPolicy) + { ExchangeLog.LogStart("DeleteOrganizationInternal"); bool ret = true; @@ -944,30 +938,6 @@ namespace WebsitePanel.Providers.HostedSolution if (!DeleteOrganizationPublicFolders(runSpace, organizationId)) ret = false; - //delete ABP - - bool enableSP2abp = false; - if (ConfigurationManager.AppSettings[CONFIG_ENABLESP2ABP] != null) - enableSP2abp = Boolean.Parse(ConfigurationManager.AppSettings[CONFIG_ENABLESP2ABP]); - Version exchangeVersion = GetExchangeVersion(); - - if (enableSP2abp && (exchangeVersion >= new Version(14, 2))) - { - - - string adpstring = GetAddressPolicyName(organizationId); - - try - { - if (!string.IsNullOrEmpty(adpstring)) - DeleteAddressPolicy(runSpace, adpstring); - } - catch (Exception ex) - { - ret = false; - ExchangeLog.LogError("Could not delete Address Policy " + globalAddressList, ex); - } - } //delete OAB try @@ -997,7 +967,7 @@ namespace WebsitePanel.Providers.HostedSolution try { if (!string.IsNullOrEmpty(roomsAddressList)) - DeleteRoomsAddressList(runSpace, roomsAddressList); + DeleteAddressList(runSpace, roomsAddressList); } catch (Exception ex) { @@ -1101,7 +1071,7 @@ namespace WebsitePanel.Providers.HostedSolution return ret; } - private bool DeleteOrganizationMailboxes(Runspace runSpace, string ou) + internal bool DeleteOrganizationMailboxes(Runspace runSpace, string ou) { ExchangeLog.LogStart("DeleteOrganizationMailboxes"); bool ret = true; @@ -1131,7 +1101,7 @@ namespace WebsitePanel.Providers.HostedSolution return ret; } - private bool DeleteOrganizationContacts(Runspace runSpace, string ou) + internal bool DeleteOrganizationContacts(Runspace runSpace, string ou) { ExchangeLog.LogStart("DeleteOrganizationContacts"); bool ret = true; @@ -1161,7 +1131,7 @@ namespace WebsitePanel.Providers.HostedSolution return ret; } - private bool DeleteOrganizationDistributionLists(Runspace runSpace, string ou) + internal bool DeleteOrganizationDistributionLists(Runspace runSpace, string ou) { ExchangeLog.LogStart("DeleteOrganizationDistributionLists"); bool ret = true; @@ -1392,7 +1362,7 @@ namespace WebsitePanel.Providers.HostedSolution return size; } - private long CalculatePublicFolderDiskSpace(Runspace runSpace, string folder) + internal virtual long CalculatePublicFolderDiskSpace(Runspace runSpace, string folder) { ExchangeLog.LogStart("CalculatePublicFolderDiskSpace"); ExchangeLog.DebugInfo("Folder: {0}", folder); @@ -1649,7 +1619,7 @@ namespace WebsitePanel.Providers.HostedSolution } - private void RemoveMailboxAccessPermission(Runspace runSpace, string accountName, string account, string accessRights) + internal void RemoveMailboxAccessPermission(Runspace runSpace, string accountName, string account, string accessRights) { ExchangeLog.LogStart("RemoveMailboxFullAccessPermission"); @@ -1779,167 +1749,165 @@ namespace WebsitePanel.Providers.HostedSolution public string CreateMailEnableUser(string upn, string organizationId, string organizationDistinguishedName, ExchangeAccountType accountType, - string mailboxDatabase, string offlineAddressBook, + string mailboxDatabase, string offlineAddressBook,string addressBookPolicy, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, - int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) + int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, + int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool hideFromAddressBook, bool IsConsumer) { return CreateMailEnableUserInternal(upn, organizationId, organizationDistinguishedName, accountType, - mailboxDatabase, offlineAddressBook, + mailboxDatabase, offlineAddressBook,addressBookPolicy, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, - keepDeletedItemsDays); + keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, hideFromAddressBook, IsConsumer); } - private string CreateMailEnableUserInternal(string upn, string organizationId, string organizationDistinguishedName, ExchangeAccountType accountType, - string mailboxDatabase, string offlineAddressBook, - string accountName, bool enablePOP, bool enableIMAP, - bool enableOWA, bool enableMAPI, bool enableActiveSync, - int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) - { + internal virtual string CreateMailEnableUserInternal(string upn, string organizationId, string organizationDistinguishedName, ExchangeAccountType accountType, + string mailboxDatabase, string offlineAddressBook, string addressBookPolicy, + string accountName, bool enablePOP, bool enableIMAP, + bool enableOWA, bool enableMAPI, bool enableActiveSync, + int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, + int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool hideFromAddressBook, bool IsConsumer) + { - ExchangeLog.LogStart("CreateMailEnableUserInternal"); - ExchangeLog.DebugInfo("Organization Id: {0}", organizationId); + ExchangeLog.LogStart("CreateMailEnableUserInternal"); + ExchangeLog.DebugInfo("Organization Id: {0}", organizationId); - string ret = null; - ExchangeTransaction transaction = StartTransaction(); - Runspace runSpace = null; + string ret = null; + ExchangeTransaction transaction = StartTransaction(); + Runspace runSpace = null; - int attempts = 0; - string id = null; + int attempts = 0; + string id = null; Version exchangeVersion = GetExchangeVersion(); + + try + { + runSpace = OpenRunspace(); + Command cmd = null; + Collection result = null; + //try to enable mail user for 10 times + while (true) + { + try + { - try - { - runSpace = OpenRunspace(); - Command cmd = null; - Collection result = null; - - //try to enable mail user for 10 times - while (true) - { - try - { - //create mailbox - cmd = new Command("Enable-Mailbox"); - cmd.Parameters.Add("Identity", upn); - cmd.Parameters.Add("Alias", accountName); + //create mailbox + cmd = new Command("Enable-Mailbox"); + cmd.Parameters.Add("Identity", upn); + cmd.Parameters.Add("Alias", accountName); if (!(mailboxDatabase == "*" && exchangeVersion >= new Version(14, 0))) cmd.Parameters.Add("Database", mailboxDatabase); - if (accountType == ExchangeAccountType.Equipment) - cmd.Parameters.Add("Equipment"); - else if (accountType == ExchangeAccountType.Room) - cmd.Parameters.Add("Room"); + if (accountType == ExchangeAccountType.Equipment) + cmd.Parameters.Add("Equipment"); + else if (accountType == ExchangeAccountType.Room) + cmd.Parameters.Add("Room"); - result = ExecuteShellCommand(runSpace, cmd); + result = ExecuteShellCommand(runSpace, cmd); - id = CheckResultObjectDN(result); - } - catch (Exception ex) - { - ExchangeLog.LogError(ex); - } - if (id != null) - break; + id = CheckResultObjectDN(result); + } + catch (Exception ex) + { + ExchangeLog.LogError(ex); + } + if (id != null) + break; - if (attempts > 9) - throw new Exception( - string.Format("Could not enable mail user '{0}' ", accountName)); + if (attempts > 9) + throw new Exception( + string.Format("Could not enable mail user '{0}' ", accountName)); - attempts++; - ExchangeLog.LogWarning("Attempt #{0} to enable mail user failed!", attempts); - // wait 5 sec - System.Threading.Thread.Sleep(5000); - } + attempts++; + ExchangeLog.LogWarning("Attempt #{0} to enable mail user failed!", attempts); + // wait 5 sec + System.Threading.Thread.Sleep(5000); + } - //transaction.RegisterNewMailbox(id); + //transaction.RegisterNewMailbox(id); - string windowsEmailAddress = ObjToString(GetPSObjectProperty(result[0], "WindowsEmailAddress")); - string adpstring = GetAddressPolicyName(organizationId); + string windowsEmailAddress = ObjToString(GetPSObjectProperty(result[0], "WindowsEmailAddress")); - //update mailbox - cmd = new Command("Set-Mailbox"); - cmd.Parameters.Add("Identity", id); - cmd.Parameters.Add("OfflineAddressBook", offlineAddressBook); - cmd.Parameters.Add("EmailAddressPolicyEnabled", false); - cmd.Parameters.Add("CustomAttribute1", organizationId); - cmd.Parameters.Add("CustomAttribute3", windowsEmailAddress); - cmd.Parameters.Add("PrimarySmtpAddress", upn); - cmd.Parameters.Add("WindowsEmailAddress", upn); - - bool enableSP2abp = false; - if (ConfigurationManager.AppSettings[CONFIG_ENABLESP2ABP] != null) - enableSP2abp = Boolean.Parse(ConfigurationManager.AppSettings[CONFIG_ENABLESP2ABP]); - if (enableSP2abp && (exchangeVersion >= new Version(14, 2))) - cmd.Parameters.Add("AddressBookPolicy", adpstring); + //update mailbox + cmd = new Command("Set-Mailbox"); + cmd.Parameters.Add("Identity", id); + cmd.Parameters.Add("OfflineAddressBook", offlineAddressBook); + cmd.Parameters.Add("EmailAddressPolicyEnabled", false); + cmd.Parameters.Add("CustomAttribute1", organizationId); + cmd.Parameters.Add("CustomAttribute3", windowsEmailAddress); + cmd.Parameters.Add("PrimarySmtpAddress", upn); + cmd.Parameters.Add("WindowsEmailAddress", upn); - cmd.Parameters.Add("UseDatabaseQuotaDefaults", new bool?(false)); - cmd.Parameters.Add("UseDatabaseRetentionDefaults", false); - cmd.Parameters.Add("IssueWarningQuota", ConvertKBToUnlimited(issueWarningKB)); - cmd.Parameters.Add("ProhibitSendQuota", ConvertKBToUnlimited(prohibitSendKB)); - cmd.Parameters.Add("ProhibitSendReceiveQuota", ConvertKBToUnlimited(prohibitSendReceiveKB)); - cmd.Parameters.Add("RetainDeletedItemsFor", ConvertDaysToEnhancedTimeSpan(keepDeletedItemsDays)); - ExecuteShellCommand(runSpace, cmd); + cmd.Parameters.Add("UseDatabaseQuotaDefaults", new bool?(false)); + cmd.Parameters.Add("UseDatabaseRetentionDefaults", false); + cmd.Parameters.Add("IssueWarningQuota", ConvertKBToUnlimited(issueWarningKB)); + cmd.Parameters.Add("ProhibitSendQuota", ConvertKBToUnlimited(prohibitSendKB)); + cmd.Parameters.Add("ProhibitSendReceiveQuota", ConvertKBToUnlimited(prohibitSendReceiveKB)); + cmd.Parameters.Add("RetainDeletedItemsFor", ConvertDaysToEnhancedTimeSpan(keepDeletedItemsDays)); + cmd.Parameters.Add("RecipientLimits", ConvertInt32ToUnlimited(maxRecipients)); + cmd.Parameters.Add("MaxSendSize", ConvertKBToUnlimited(maxSendMessageSizeKB)); + cmd.Parameters.Add("MaxReceiveSize", ConvertKBToUnlimited(maxReceiveMessageSizeKB)); + cmd.Parameters.Add("HiddenFromAddressListsEnabled", hideFromAddressBook); + ExecuteShellCommand(runSpace, cmd); + //update AD object + string globalAddressListName = this.GetGlobalAddressListName(organizationId); + string globalAddressListDN = this.GetGlobalAddressListDN(runSpace, globalAddressListName); + string path = AddADPrefix(id); + DirectoryEntry mailbox = GetADObject(path); + // check if msExchQueryBaseDN must be cleared for Exchange 2010 SP1 + bool clearQueryBaseDN = false; + if (ConfigurationManager.AppSettings[CONFIG_CLEAR_QUERYBASEDN] != null) + clearQueryBaseDN = Boolean.Parse(ConfigurationManager.AppSettings[CONFIG_CLEAR_QUERYBASEDN]); - //update AD object - string globalAddressListName = this.GetGlobalAddressListName(organizationId); - string globalAddressListDN = this.GetGlobalAddressListDN(runSpace, globalAddressListName); - string path = AddADPrefix(id); - DirectoryEntry mailbox = GetADObject(path); + if (!(clearQueryBaseDN && (exchangeVersion >= new Version(14, 1)))) + SetADObjectPropertyValue(mailbox, "msExchQueryBaseDN", globalAddressListDN); - // check if msExchQueryBaseDN must be cleared for Exchange 2010 SP1 - bool clearQueryBaseDN = false; - if (ConfigurationManager.AppSettings[CONFIG_CLEAR_QUERYBASEDN] != null) - clearQueryBaseDN = Boolean.Parse(ConfigurationManager.AppSettings[CONFIG_CLEAR_QUERYBASEDN]); + //SetADObjectPropertyValue(mailbox, "msExchUseOAB", offlineAddressBook); + mailbox.CommitChanges(); + mailbox.Close(); - if (!(clearQueryBaseDN && (exchangeVersion >= new Version(14, 1)))) - SetADObjectPropertyValue(mailbox, "msExchQueryBaseDN", globalAddressListDN); + //Client Access + cmd = new Command("Set-CASMailbox"); + cmd.Parameters.Add("Identity", id); + cmd.Parameters.Add("ActiveSyncEnabled", enableActiveSync); + if (enableActiveSync) + { + cmd.Parameters.Add("ActiveSyncMailboxPolicy", organizationId); + } + cmd.Parameters.Add("OWAEnabled", enableOWA); + cmd.Parameters.Add("MAPIEnabled", enableMAPI); + cmd.Parameters.Add("PopEnabled", enablePOP); + cmd.Parameters.Add("ImapEnabled", enableIMAP); + ExecuteShellCommand(runSpace, cmd); - //SetADObjectPropertyValue(mailbox, "msExchUseOAB", offlineAddressBook); - mailbox.CommitChanges(); - mailbox.Close(); + //calendar settings + if (accountType == ExchangeAccountType.Equipment || accountType == ExchangeAccountType.Room) + { + //SetCalendarSettings(runSpace, id); + } - //Client Access - cmd = new Command("Set-CASMailbox"); - cmd.Parameters.Add("Identity", id); - cmd.Parameters.Add("ActiveSyncEnabled", enableActiveSync); - if (enableActiveSync) - { - cmd.Parameters.Add("ActiveSyncMailboxPolicy", organizationId); - } - cmd.Parameters.Add("OWAEnabled", enableOWA); - cmd.Parameters.Add("MAPIEnabled", enableMAPI); - cmd.Parameters.Add("PopEnabled", enablePOP); - cmd.Parameters.Add("ImapEnabled", enableIMAP); - ExecuteShellCommand(runSpace, cmd); - - //calendar settings - if (accountType == ExchangeAccountType.Equipment || accountType == ExchangeAccountType.Room) - { - SetCalendarSettings(runSpace, id); - } - - ret = string.Format("{0}\\{1}", GetNETBIOSDomainName(), accountName); - ExchangeLog.LogEnd("CreateMailEnableUserInternal"); - return ret; - } - catch (Exception ex) - { - ExchangeLog.LogError("CreateMailEnableUserInternal", ex); - RollbackTransaction(transaction); - throw; - } - finally - { - CloseRunspace(runSpace); - } - } + ret = string.Format("{0}\\{1}", GetNETBIOSDomainName(), accountName); + ExchangeLog.LogEnd("CreateMailEnableUserInternal"); + return ret; + } + catch (Exception ex) + { + ExchangeLog.LogError("CreateMailEnableUserInternal", ex); + RollbackTransaction(transaction); + throw; + } + finally + { + CloseRunspace(runSpace); + } + } + /* private string CreateMailboxInternal(string organizationId, string organizationDistinguishedName, string mailboxDatabase, string securityGroup, string offlineAddressBook, ExchangeAccountType accountType, string displayName, @@ -2074,7 +2042,7 @@ namespace WebsitePanel.Providers.HostedSolution CloseRunspace(runSpace); } } - +*/ internal virtual void SetCalendarSettings(Runspace runspace, string id) { ExchangeLog.LogStart("SetCalendarSettings"); @@ -2085,7 +2053,7 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("SetCalendarSettings"); } - private void DeleteMailboxInternal(string accountName) + internal virtual void DeleteMailboxInternal(string accountName) { ExchangeLog.LogStart("DeleteMailboxInternal"); ExchangeLog.DebugInfo("Account Name: {0}", accountName); @@ -2105,7 +2073,7 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("DeleteMailboxInternal"); } - private void RemoveMailbox(Runspace runSpace, string id) + internal void RemoveMailbox(Runspace runSpace, string id) { ExchangeLog.LogStart("RemoveMailbox"); Command cmd = new Command("Remove-Mailbox"); @@ -2116,6 +2084,16 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("RemoveMailbox"); } + private void DisableMailbox(Runspace runSpace, string id) + { + ExchangeLog.LogStart("DisableMailbox"); + Command cmd = new Command("Disable-Mailbox"); + cmd.Parameters.Add("Identity", id); + cmd.Parameters.Add("Confirm", false); + ExecuteShellCommand(runSpace, cmd); + ExchangeLog.LogEnd("DisableMailbox"); + } + private string GetMailboxCommonName(Runspace runSpace, string accountName) { ExchangeLog.LogStart("GetMailboxCommonName"); @@ -2212,71 +2190,39 @@ namespace WebsitePanel.Providers.HostedSolution } - private void SetMailboxGeneralSettingsInternal(string accountName, string displayName, string password, - bool hideFromAddressBook, bool disabled, string firstName, string initials, string lastName, - string address, string city, string state, string zip, string country, string jobTitle, - string company, string department, string office, string managerAccountName, string businessPhone, - string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes) - { - ExchangeLog.LogStart("SetMailboxGeneralSettingsInternal"); - ExchangeLog.DebugInfo("Account: {0}", accountName); + private void SetMailboxGeneralSettingsInternal(string accountName, bool hideFromAddressBook, bool disabled) + { + ExchangeLog.LogStart("SetMailboxGeneralSettingsInternal"); + ExchangeLog.DebugInfo("Account: {0}", accountName); - Runspace runSpace = null; - try - { - runSpace = OpenRunspace(); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); - Collection result = GetMailboxObject(runSpace, accountName); - PSObject mailbox = result[0]; + Collection result = GetMailboxObject(runSpace, accountName); + PSObject mailbox = result[0]; - string id = GetResultObjectDN(result); - string path = AddADPrefix(id); - DirectoryEntry entry = GetADObject(path); - entry.InvokeSet("AccountDisabled", disabled); - if (!string.IsNullOrEmpty(password)) - entry.Invoke("SetPassword", password); - entry.CommitChanges(); + string id = GetResultObjectDN(result); + string path = AddADPrefix(id); + DirectoryEntry entry = GetADObject(path); + entry.InvokeSet("AccountDisabled", disabled); + entry.CommitChanges(); - Command cmd = new Command("Set-Mailbox"); - cmd.Parameters.Add("Identity", accountName); - cmd.Parameters.Add("DisplayName", displayName); - cmd.Parameters.Add("HiddenFromAddressListsEnabled", hideFromAddressBook); - cmd.Parameters.Add("CustomAttribute2", (disabled ? "disabled" : null)); - ExecuteShellCommand(runSpace, cmd); + Command cmd = new Command("Set-Mailbox"); + cmd.Parameters.Add("Identity", accountName); + cmd.Parameters.Add("HiddenFromAddressListsEnabled", hideFromAddressBook); + cmd.Parameters.Add("CustomAttribute2", (disabled ? "disabled" : null)); + ExecuteShellCommand(runSpace, cmd); - cmd = new Command("Set-User"); - cmd.Parameters.Add("Identity", accountName); - cmd.Parameters.Add("FirstName", firstName); - cmd.Parameters.Add("Initials", initials); - cmd.Parameters.Add("LastName", lastName); - cmd.Parameters.Add("StreetAddress", address); - cmd.Parameters.Add("City", city); - cmd.Parameters.Add("StateOrProvince", state); - cmd.Parameters.Add("PostalCode", zip); - cmd.Parameters.Add("CountryOrRegion", ParseCountryInfo(country)); - cmd.Parameters.Add("Title", jobTitle); - cmd.Parameters.Add("Company", company); - cmd.Parameters.Add("Department", department); - cmd.Parameters.Add("Office", office); - cmd.Parameters.Add("Manager", managerAccountName); - cmd.Parameters.Add("Phone", businessPhone); - cmd.Parameters.Add("Fax", fax); - cmd.Parameters.Add("HomePhone", homePhone); - cmd.Parameters.Add("MobilePhone", mobilePhone); - cmd.Parameters.Add("Pager", pager); - cmd.Parameters.Add("WebPage", webPage); - cmd.Parameters.Add("Notes", notes); + } + finally + { - ExecuteShellCommand(runSpace, cmd); - - } - finally - { - - CloseRunspace(runSpace); - } - ExchangeLog.LogEnd("SetMailboxGeneralSettingsInternal"); - } + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("SetMailboxGeneralSettingsInternal"); + } private void ChangeMailboxState(string id, bool enabled) { @@ -2334,62 +2280,58 @@ namespace WebsitePanel.Providers.HostedSolution return info; } - private void SetMailboxMailFlowSettingsInternal(string accountName, bool enableForwarding, - string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, - string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, - int maxReceiveMessageSizeKB, bool requireSenderAuthentication) - { - ExchangeLog.LogStart("SetMailboxMailFlowSettingsInternal"); - ExchangeLog.DebugInfo("Account: {0}", accountName); + private void SetMailboxMailFlowSettingsInternal(string accountName, bool enableForwarding, + string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, + string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { + ExchangeLog.LogStart("SetMailboxMailFlowSettingsInternal"); + ExchangeLog.DebugInfo("Account: {0}", accountName); - Runspace runSpace = null; - try - { - runSpace = OpenRunspace(); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); - Command cmd = new Command("Set-Mailbox"); - cmd.Parameters.Add("Identity", accountName); + Command cmd = new Command("Set-Mailbox"); + cmd.Parameters.Add("Identity", accountName); - if (enableForwarding) - { - cmd.Parameters.Add("ForwardingAddress", forwardingAccountName); - cmd.Parameters.Add("DeliverToMailboxAndForward", forwardToBoth); - } - else - { - cmd.Parameters.Add("ForwardingAddress", null); - cmd.Parameters.Add("DeliverToMailboxAndForward", false); - } + if (enableForwarding) + { + cmd.Parameters.Add("ForwardingAddress", forwardingAccountName); + cmd.Parameters.Add("DeliverToMailboxAndForward", forwardToBoth); + } + else + { + cmd.Parameters.Add("ForwardingAddress", null); + cmd.Parameters.Add("DeliverToMailboxAndForward", false); + } - cmd.Parameters.Add("GrantSendOnBehalfTo", SetSendOnBehalfAccounts(runSpace, sendOnBehalfAccounts)); + cmd.Parameters.Add("GrantSendOnBehalfTo", SetSendOnBehalfAccounts(runSpace, sendOnBehalfAccounts)); - MultiValuedProperty ids = null; - MultiValuedProperty dlIds = null; + MultiValuedProperty ids = null; + MultiValuedProperty dlIds = null; - SetAccountIds(runSpace, acceptAccounts, out ids, out dlIds); - cmd.Parameters.Add("AcceptMessagesOnlyFrom", ids); - cmd.Parameters.Add("AcceptMessagesOnlyFromDLMembers", dlIds); + SetAccountIds(runSpace, acceptAccounts, out ids, out dlIds); + cmd.Parameters.Add("AcceptMessagesOnlyFrom", ids); + cmd.Parameters.Add("AcceptMessagesOnlyFromDLMembers", dlIds); - SetAccountIds(runSpace, rejectAccounts, out ids, out dlIds); - cmd.Parameters.Add("RejectMessagesFrom", ids); - cmd.Parameters.Add("RejectMessagesFromDLMembers", dlIds); + SetAccountIds(runSpace, rejectAccounts, out ids, out dlIds); + cmd.Parameters.Add("RejectMessagesFrom", ids); + cmd.Parameters.Add("RejectMessagesFromDLMembers", dlIds); - cmd.Parameters.Add("RecipientLimits", ConvertInt32ToUnlimited(maxRecipients)); - cmd.Parameters.Add("MaxSendSize", ConvertKBToUnlimited(maxSendMessageSizeKB)); - cmd.Parameters.Add("MaxReceiveSize", ConvertKBToUnlimited(maxReceiveMessageSizeKB)); - cmd.Parameters.Add("RequireSenderAuthenticationEnabled", requireSenderAuthentication); + cmd.Parameters.Add("RequireSenderAuthenticationEnabled", requireSenderAuthentication); - ExecuteShellCommand(runSpace, cmd); + ExecuteShellCommand(runSpace, cmd); - } - finally - { + } + finally + { - CloseRunspace(runSpace); - } - ExchangeLog.LogEnd("SetMailboxMailFlowSettingsInternal"); - } + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("SetMailboxMailFlowSettingsInternal"); + } private ExchangeMailbox GetMailboxAdvancedSettingsInternal(string accountName) { @@ -2464,48 +2406,52 @@ namespace WebsitePanel.Providers.HostedSolution return info; } - private void SetMailboxAdvancedSettingsInternal(string organizationId, string accountName, bool enablePOP, bool enableIMAP, - bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, - int prohibitSendReceiveKB, int keepDeletedItemsDays) - { - ExchangeLog.LogStart("SetMailboxAdvancedSettingsInternal"); - ExchangeLog.DebugInfo("Account: {0}", accountName); + private void SetMailboxAdvancedSettingsInternal(string organizationId, string accountName, bool enablePOP, bool enableIMAP, + bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, + int prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB) + { + ExchangeLog.LogStart("SetMailboxAdvancedSettingsInternal"); + ExchangeLog.DebugInfo("Account: {0}", accountName); - Runspace runSpace = null; - try - { - runSpace = OpenRunspace(); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); - Command cmd = new Command("Set-Mailbox"); - cmd.Parameters.Add("Identity", accountName); - cmd.Parameters.Add("IssueWarningQuota", ConvertKBToUnlimited(issueWarningKB)); - cmd.Parameters.Add("ProhibitSendQuota", ConvertKBToUnlimited(prohibitSendKB)); - cmd.Parameters.Add("ProhibitSendReceiveQuota", ConvertKBToUnlimited(prohibitSendReceiveKB)); - cmd.Parameters.Add("RetainDeletedItemsFor", ConvertDaysToEnhancedTimeSpan(keepDeletedItemsDays)); - ExecuteShellCommand(runSpace, cmd); + Command cmd = new Command("Set-Mailbox"); + cmd.Parameters.Add("Identity", accountName); + cmd.Parameters.Add("IssueWarningQuota", ConvertKBToUnlimited(issueWarningKB)); + cmd.Parameters.Add("ProhibitSendQuota", ConvertKBToUnlimited(prohibitSendKB)); + cmd.Parameters.Add("ProhibitSendReceiveQuota", ConvertKBToUnlimited(prohibitSendReceiveKB)); + cmd.Parameters.Add("RetainDeletedItemsFor", ConvertDaysToEnhancedTimeSpan(keepDeletedItemsDays)); + cmd.Parameters.Add("RecipientLimits", ConvertInt32ToUnlimited(maxRecipients)); + cmd.Parameters.Add("MaxSendSize", ConvertKBToUnlimited(maxSendMessageSizeKB)); + cmd.Parameters.Add("MaxReceiveSize", ConvertKBToUnlimited(maxReceiveMessageSizeKB)); + ExecuteShellCommand(runSpace, cmd); - //Client Access - cmd = new Command("Set-CASMailbox"); - cmd.Parameters.Add("Identity", accountName); - cmd.Parameters.Add("ActiveSyncEnabled", enableActiveSync); - if (enableActiveSync) - { - cmd.Parameters.Add("ActiveSyncMailboxPolicy", organizationId); - } - cmd.Parameters.Add("OWAEnabled", enableOWA); - cmd.Parameters.Add("MAPIEnabled", enableMAPI); - cmd.Parameters.Add("PopEnabled", enablePOP); - cmd.Parameters.Add("ImapEnabled", enableIMAP); - ExecuteShellCommand(runSpace, cmd); - } - finally - { + //Client Access + cmd = new Command("Set-CASMailbox"); + cmd.Parameters.Add("Identity", accountName); + cmd.Parameters.Add("ActiveSyncEnabled", enableActiveSync); + if (enableActiveSync) + { + cmd.Parameters.Add("ActiveSyncMailboxPolicy", organizationId); + } + cmd.Parameters.Add("OWAEnabled", enableOWA); + cmd.Parameters.Add("MAPIEnabled", enableMAPI); + cmd.Parameters.Add("PopEnabled", enablePOP); + cmd.Parameters.Add("ImapEnabled", enableIMAP); + ExecuteShellCommand(runSpace, cmd); + } + finally + { - CloseRunspace(runSpace); - } - ExchangeLog.LogEnd("SetMailboxAdvancedSettingsInternal"); - } + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("SetMailboxAdvancedSettingsInternal"); + } private ExchangeEmailAddress[] GetMailboxEmailAddressesInternal(string accountName) { @@ -3068,6 +3014,7 @@ namespace WebsitePanel.Providers.HostedSolution info.WebPage = (string)GetPSObjectProperty(user, "WebPage"); info.Notes = (string)GetPSObjectProperty(user, "Notes"); + info.SAMAccountName = string.Format("{0}\\{1}", GetNETBIOSDomainName(), (string)GetPSObjectProperty(user, "Name")); } finally @@ -3267,7 +3214,7 @@ namespace WebsitePanel.Providers.HostedSolution return id; } - private string EnableMailSecurityDistributionGroup(Runspace runSpace, string distName, string groupName) + internal string EnableMailSecurityDistributionGroup(Runspace runSpace, string distName, string groupName) { ExchangeLog.LogStart("EnableMailSecurityDistributionGroup"); ExchangeLog.DebugInfo("Group Distinguished Name: {0}", distName); @@ -3312,7 +3259,7 @@ namespace WebsitePanel.Providers.HostedSolution return securityGroupId; } - private void DisableMailSecurityDistributionGroup(Runspace runSpace, string id) + internal void DisableMailSecurityDistributionGroup(Runspace runSpace, string id) { ExchangeLog.LogStart("DisableMailSecurityDistributionGroup"); ExchangeLog.DebugInfo("Group Id: {0}", id); @@ -3324,7 +3271,7 @@ namespace WebsitePanel.Providers.HostedSolution } - private void UpdateSecurityDistributionGroup(Runspace runSpace, string id, string groupName) + internal void UpdateSecurityDistributionGroup(Runspace runSpace, string id, string groupName, bool isConsumer) { ExchangeLog.LogStart("UpdateSecurityDistributionGroup"); @@ -3332,21 +3279,22 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("Identity", id); cmd.Parameters.Add("EmailAddressPolicyEnabled", false); cmd.Parameters.Add("CustomAttribute1", groupName); - cmd.Parameters.Add("HiddenFromAddressListsEnabled", true); + cmd.Parameters.Add("HiddenFromAddressListsEnabled", !isConsumer); ExecuteShellCommand(runSpace, cmd); ExchangeLog.LogEnd("UpdateSecurityDistributionGroup"); } - private void CreateDistributionListInternal( - string organizationId, - string organizationDistinguishedName, - string displayName, - string accountName, - string name, - string domain, - string managedBy) - { + private void CreateDistributionListInternal( + string organizationId, + string organizationDistinguishedName, + string displayName, + string accountName, + string name, + string domain, + string managedBy, + string[] addressLists) + { ExchangeLog.LogStart("CreateDistributionListInternal"); ExchangeLog.DebugInfo("Organization Id: {0}", organizationId); ExchangeLog.DebugInfo("Name: {0}", name); @@ -3395,6 +3343,11 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("WindowsEmailAddress", email); cmd.Parameters.Add("RequireSenderAuthenticationEnabled", false); ExecuteShellCommand(runSpace, cmd); + + //fix showInAddressBook Attribute + if (addressLists.Length > 0) + FixShowInAddressBook(runSpace, email, addressLists); + } catch (Exception ex) { @@ -3410,6 +3363,23 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("CreateDistributionListInternal"); } + private void FixShowInAddressBook(Runspace runSpace, string accountName, string[] addressLists) + { + Command cmd = new Command("Get-DistributionGroup"); + cmd.Parameters.Add("Identity", accountName); + + Collection result = ExecuteShellCommand(runSpace, cmd); + string id = GetResultObjectDN(result); + + DirectoryEntry dlDEEntry = GetADObject(AddADPrefix(id)); + dlDEEntry.Properties["showInAddressBook"].Clear(); + foreach (string addressList in addressLists) + { + dlDEEntry.Properties["showInAddressBook"].Add(addressList); + } + dlDEEntry.CommitChanges(); + } + private void DeleteDistributionListInternal(string accountName) { ExchangeLog.LogStart("DeleteDistributionListInternal"); @@ -3450,27 +3420,29 @@ namespace WebsitePanel.Providers.HostedSolution Runspace runSpace = null; try { - runSpace = OpenRunspace(); + runSpace = OpenRunspace(); - Command cmd = new Command("Get-DistributionGroup"); - cmd.Parameters.Add("Identity", accountName); - Collection result = ExecuteShellCommand(runSpace, cmd); - PSObject distributionGroup = result[0]; + Command cmd = new Command("Get-DistributionGroup"); + cmd.Parameters.Add("Identity", accountName); + Collection result = ExecuteShellCommand(runSpace, cmd); + PSObject distributionGroup = result[0]; - info.DisplayName = (string)GetPSObjectProperty(distributionGroup, "DisplayName"); - info.HideFromAddressBook = - (bool)GetPSObjectProperty(distributionGroup, "HiddenFromAddressListsEnabled"); + info.DisplayName = (string)GetPSObjectProperty(distributionGroup, "DisplayName"); + info.HideFromAddressBook = + (bool)GetPSObjectProperty(distributionGroup, "HiddenFromAddressListsEnabled"); - cmd = new Command("Get-Group"); - cmd.Parameters.Add("Identity", accountName); - result = ExecuteShellCommand(runSpace, cmd); - PSObject group = result[0]; + info.SAMAccountName = string.Format("{0}\\{1}", GetNETBIOSDomainName(), (string)GetPSObjectProperty(distributionGroup, "SamAccountName")); - info.ManagerAccount = GetGroupManagerAccount(runSpace, group); - info.MembersAccounts = GetGroupMembers(runSpace, accountName); - info.Notes = (string)GetPSObjectProperty(group, "Notes"); - } + cmd = new Command("Get-Group"); + cmd.Parameters.Add("Identity", accountName); + result = ExecuteShellCommand(runSpace, cmd); + PSObject group = result[0]; + + info.ManagerAccount = GetGroupManagerAccount(runSpace, group); + info.MembersAccounts = GetGroupMembers(runSpace, accountName); + info.Notes = (string)GetPSObjectProperty(group, "Notes"); + } finally { @@ -3490,9 +3462,9 @@ namespace WebsitePanel.Providers.HostedSolution return ObjToString(GetPSObjectProperty(group, "ManagedBy")); } - private void SetDistributionListGeneralSettingsInternal(string accountName, string displayName, - bool hideFromAddressBook, string managedBy, string[] memberAccounts, string notes) - { + private void SetDistributionListGeneralSettingsInternal(string accountName, string displayName, + bool hideFromAddressBook, string managedBy, string[] memberAccounts, string notes, string[] addressLists) + { ExchangeLog.LogStart("SetDistributionListGeneralSettingsInternal"); ExchangeLog.DebugInfo("Account: {0}", accountName); @@ -3561,6 +3533,10 @@ namespace WebsitePanel.Providers.HostedSolution { AddADPermission(runSpace, accountName, managedBy, "WriteProperty", null, "Member"); } + + if (addressLists.Length > 0) + FixShowInAddressBook(runSpace, accountName, addressLists); + } finally { @@ -3605,7 +3581,7 @@ namespace WebsitePanel.Providers.HostedSolution } - private void AddDistributionListMembersInternal(string accountName, string[] memberAccounts) + private void AddDistributionListMembersInternal(string accountName, string[] memberAccounts, string[] addressLists) { ExchangeLog.LogStart("AddDistributionListMembersInternal"); ExchangeLog.DebugInfo("Account: {0}", accountName); @@ -3624,8 +3600,13 @@ namespace WebsitePanel.Providers.HostedSolution cmd = new Command("Add-DistributionGroupMember"); cmd.Parameters.Add("Identity", accountName); cmd.Parameters.Add("Member", member); + cmd.Parameters.Add("BypassSecurityGroupManagerCheck", true); ExecuteShellCommand(runSpace, cmd); } + + if (addressLists.Length > 0) + FixShowInAddressBook(runSpace, accountName, addressLists); + } finally { @@ -3636,7 +3617,7 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("AddDistributionListMembersInternal"); } - private void RemoveDistributionListMembersInternal(string accountName, string[] memberAccounts) + private void RemoveDistributionListMembersInternal(string accountName, string[] memberAccounts, string[] addressLists) { ExchangeLog.LogStart("RemoveDistributionListMembersInternal"); ExchangeLog.DebugInfo("Account: {0}", accountName); @@ -3658,6 +3639,10 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("Confirm", false); ExecuteShellCommand(runSpace, cmd); } + + if (addressLists.Length > 0) + FixShowInAddressBook(runSpace, accountName, addressLists); + } finally { @@ -3698,9 +3683,9 @@ namespace WebsitePanel.Providers.HostedSolution return info; } - private void SetDistributionListMailFlowSettingsInternal(string accountName, - string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { + private void SetDistributionListMailFlowSettingsInternal(string accountName, + string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists) + { ExchangeLog.LogStart("SetDistributionListMailFlowSettingsInternal"); ExchangeLog.DebugInfo("Account: {0}", accountName); @@ -3727,6 +3712,9 @@ namespace WebsitePanel.Providers.HostedSolution ExecuteShellCommand(runSpace, cmd); + if (addressLists.Length > 0) + FixShowInAddressBook(runSpace, accountName, addressLists); + } finally { @@ -3809,7 +3797,7 @@ namespace WebsitePanel.Providers.HostedSolution return list.ToArray(); } - private void SetDistributionListEmailAddressesInternal(string accountName, string[] emailAddresses) + private void SetDistributionListEmailAddressesInternal(string accountName, string[] emailAddresses, string[] addressLists) { ExchangeLog.LogStart("SetDistributionListEmailAddressesInternal"); ExchangeLog.DebugInfo("Account: {0}", accountName); @@ -3859,6 +3847,9 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("WindowsEmailAddress", primaryEmail); } ExecuteShellCommand(runSpace, cmd); + + if (addressLists.Length > 0) + FixShowInAddressBook(runSpace, accountName, addressLists); } finally { @@ -3868,7 +3859,7 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("SetDistributionListEmailAddressesInternal"); } - private void SetDistributionListPrimaryEmailAddressInternal(string accountName, string emailAddress) + private void SetDistributionListPrimaryEmailAddressInternal(string accountName, string emailAddress, string[] addressLists) { ExchangeLog.LogStart("SetDistributionListPrimaryEmailAddressInternal"); ExchangeLog.DebugInfo("Account: {0}", accountName); @@ -3886,6 +3877,8 @@ namespace WebsitePanel.Providers.HostedSolution cmd.Parameters.Add("WindowsEmailAddress", primaryEmail); ExecuteShellCommand(runSpace, cmd); + + } finally { @@ -3941,7 +3934,7 @@ namespace WebsitePanel.Providers.HostedSolution return exchangeDistributionList; } - private void SetDistributionListPermissionsInternal(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts) + private void SetDistributionListPermissionsInternal(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists) { ExchangeLog.LogStart("SetDistributionListPermissionsInternal"); @@ -3964,6 +3957,9 @@ namespace WebsitePanel.Providers.HostedSolution SetSendAsPermissions(runspace, distributionList.SendAsAccounts, cn, sendAsAccounts); SetDistributionListSendOnBehalfAccounts(runspace, accountName, sendOnBehalfAccounts); + if (addressLists.Length > 0) + FixShowInAddressBook(runspace, accountName, addressLists); + } catch (Exception ex) { @@ -4142,8 +4138,8 @@ namespace WebsitePanel.Providers.HostedSolution private void SetPublicFolderPermissions(Runspace runSpace, string folder, string securityGroup) { - RemovePublicFolderClientPermission(runSpace, folder, "Default", "Author"); - //RemovePublicFolderClientPermission(runSpace, folder, "Anonymous", "CreateItems"); + //set the default Permission to 'Reviewer' + RemovePublicFolderClientPermission(runSpace, folder, "Default", "Author"); AddPublicFolderClientPermission(runSpace, folder, securityGroup, "Reviewer"); } @@ -4325,7 +4321,22 @@ namespace WebsitePanel.Providers.HostedSolution info.Name = (string)GetPSObjectProperty(publicFolder, "Name"); info.MailEnabled = (bool)GetPSObjectProperty(publicFolder, "MailEnabled"); info.HideFromAddressBook = (bool)GetPSObjectProperty(publicFolder, "HiddenFromAddressListsEnabled"); - info.AuthorsAccounts = GetPublicFolderAuthors(runSpace, folder); + info.NETBIOS = GetNETBIOSDomainName(); + info.Accounts = GetPublicFolderAccounts(runSpace, folder); + + if (info.MailEnabled) + { + Command cmd = new Command("Get-MailPublicFolder"); + cmd.Parameters.Add("Identity", folder); + if (!string.IsNullOrEmpty(PublicFolderServer)) + cmd.Parameters.Add("Server", PublicFolderServer); + result = ExecuteShellCommand(runSpace, cmd); + if (result.Count > 0) + { + publicFolder = result[0]; + info.SAMAccountName = string.Format("{0}\\{1}", GetNETBIOSDomainName(), (string)GetPSObjectProperty(publicFolder, "Alias")); + } + } } finally { @@ -4335,47 +4346,45 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("GetPublicFolderGeneralSettingsInternal"); return info; } + + private ExchangeAccount[] GetPublicFolderAccounts(Runspace runSpace, string folder) + { + ExchangeLog.LogStart("GetPublicFolderAccounts"); + ExchangeLog.DebugInfo("Folder: {0}", folder); - private ExchangeAccount[] GetPublicFolderAuthors(Runspace runSpace, string folder) - { - ExchangeLog.LogStart("GetPublicFolderAuthors"); - ExchangeLog.DebugInfo("Folder: {0}", folder); + List list = new List(); + ExchangeAccount account = null; - List list = new List(); - ExchangeAccount account = null; + Command cmd = new Command("Get-PublicFolderClientPermission"); + cmd.Parameters.Add("Identity", folder); + if (!string.IsNullOrEmpty(PublicFolderServer)) + cmd.Parameters.Add("Server", PublicFolderServer); + Collection result = ExecuteShellCommand(runSpace, cmd); - Command cmd = new Command("Get-PublicFolderClientPermission"); - cmd.Parameters.Add("Identity", folder); - if (!string.IsNullOrEmpty(PublicFolderServer)) - cmd.Parameters.Add("Server", PublicFolderServer); - Collection result = ExecuteShellCommand(runSpace, cmd); + foreach (PSObject obj in result) + { + string userId = ObjToString(GetPSObjectProperty(obj, "User")); + if (userId == "Default" || userId == "Anonymous" || userId.StartsWith("NT User:") == true) + continue; - foreach (PSObject obj in result) - { - string userId = ObjToString(GetPSObjectProperty(obj, "User")); - if (userId == "Default" || userId == "Anonymous") - continue; - - object rights = GetPSObjectProperty(obj, "AccessRights"); - int count = (int)GetObjectPropertyValue(rights, "Count"); - for (int i = 0; i < count; i++) - { - string right = ObjToString(GetObjectIndexerValue(rights, i)); - if (right == "Author") - { - account = GetExchangeAccount(runSpace, userId); - if (account != null) - list.Add(account); - break; - } - } - } - ExchangeLog.LogEnd("GetPublicFolderAuthors"); - return list.ToArray(); - } + object rights = GetPSObjectProperty(obj, "AccessRights"); + int count = (int)GetObjectPropertyValue(rights, "Count"); + for (int i = 0; i < count; i++) + { + account = GetExchangeAccount(runSpace, userId); + string permission = ObjToString(GetObjectIndexerValue(rights, i)); + if (account != null) + account.PublicFolderPermission = permission; + list.Add(account); + break; + } + } + ExchangeLog.LogEnd("GetPublicFolderAccounts"); + return list.ToArray(); + } private void SetPublicFolderGeneralSettingsInternal(string folder, string newFolderName, - string[] authorAccounts, bool hideFromAddressBook) + bool hideFromAddressBook, ExchangeAccount[] accounts) { ExchangeLog.LogStart("SetPublicFolderGeneralSettingsInternal"); ExchangeLog.DebugInfo("Folder: {0}", folder); @@ -4389,46 +4398,44 @@ namespace WebsitePanel.Providers.HostedSolution Collection result = GetPublicFolderObject(runSpace, folder); PSObject publicFolder = result[0]; string folderName = (string)GetPSObjectProperty(publicFolder, "Name"); - ExchangeAccount[] accounts = GetPublicFolderAuthors(runSpace, folder); - - //authors - Dictionary existingAuthors = new Dictionary(); - Dictionary newAuthors = new Dictionary(); - List authorsToDelete = new List(); - List authorsToAdd = new List(); - - foreach (ExchangeAccount account in accounts) - { - existingAuthors.Add(account.AccountName.ToLower(), account.AccountName); - } - - foreach (string newAuthor in authorAccounts) - { - newAuthors.Add(newAuthor.ToLower(), newAuthor); - if (!existingAuthors.ContainsKey(newAuthor.ToLower())) - { - authorsToAdd.Add(newAuthor); - } - } - - foreach (string existingAuthor in existingAuthors.Keys) - { - if (!newAuthors.ContainsKey(existingAuthor)) - { - authorsToDelete.Add(existingAuthors[existingAuthor]); - } - } - - foreach (string user in authorsToAdd) - { - AddPublicFolderClientPermission(runSpace, folder, user, "Author"); - } - - foreach (string user in authorsToDelete) - { - RemovePublicFolderClientPermission(runSpace, folder, user, "Author"); - } + ExchangeAccount[] allAccounts = GetPublicFolderAccounts(runSpace, folder); + + //Remove all accounts and re-apply + List accountsToDelete = new List(); + List accountsToAdd = new List(); + + foreach (ExchangeAccount existingAccount in allAccounts) + { + try + { + RemovePublicFolderClientPermission( runSpace, + folder, + existingAccount.AccountName.Contains("@") ? existingAccount.AccountName : @"\" + existingAccount.AccountName, + existingAccount.PublicFolderPermission); + } + catch (Exception) + { + throw; + } + + } + foreach (ExchangeAccount newAccount in accounts) + { + try + { + AddPublicFolderClientPermission(runSpace, + folder, + newAccount.AccountName.Contains("@") ? newAccount.AccountName : @"\" + newAccount.AccountName, + newAccount.PublicFolderPermission); + } + catch (Exception) + { + throw; + } + + } + //general settings Command cmd = new Command("Set-PublicFolder"); cmd.Parameters.Add("Identity", folder); @@ -4769,7 +4776,7 @@ namespace WebsitePanel.Providers.HostedSolution return resultObjectDN; } - private string CreateAddressList(Runspace runSpace, string organizationId) + internal string CreateAddressList(Runspace runSpace, string organizationId) { ExchangeLog.LogStart("CreateAddressList"); string addressListName = this.GetAddressListName(organizationId); @@ -4821,7 +4828,60 @@ namespace WebsitePanel.Providers.HostedSolution return addressListDN; } - private void UpdateAddressList(Runspace runSpace, string id, string securityGroup) + internal string CreateRoomsAddressList(Runspace runSpace, string organizationId) + { + ExchangeLog.LogStart("CreateRoomList"); + string addressListName = this.GetRoomsAddressListName(organizationId); + string addressListDN = this.GetAddressListDN(runSpace, addressListName); + if (!string.IsNullOrEmpty(addressListDN)) + { + //address list already exists - we will use it + ExchangeLog.LogWarning("Room List '{0}' already exists", new object[] { addressListName }); + } + else + { + //try to create a new address list (10 attempts) + int attempts = 0; + Command cmd = null; + Collection result = null; + + while (true) + { + try + { + //try to create address list + cmd = new Command("New-AddressList"); + cmd.Parameters.Add("Name", addressListName); + cmd.Parameters.Add("IncludedRecipients", "Resources"); + cmd.Parameters.Add("ConditionalCustomAttribute1", organizationId); + + result = ExecuteShellCommand(runSpace, cmd); + addressListDN = CheckResultObjectDN(result); + } + catch (Exception ex) + { + ExchangeLog.LogError(ex); + } + if (addressListDN != null) + break; + + if (attempts > 9) + throw new Exception( + string.Format("Could not create Room List '{0}' ", addressListName)); + + attempts++; + ExchangeLog.LogWarning("Attempt #{0} to create room list failed!", attempts); + // wait 1 sec + System.Threading.Thread.Sleep(1000); + } + } + + ExchangeLog.LogEnd("CreateRoomList"); + return addressListDN; + } + + + internal void UpdateAddressList(Runspace runSpace, string id, string securityGroup) { ExchangeLog.LogStart("UpdateAddressList"); @@ -4835,7 +4895,7 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("UpdateAddressList"); } - private void DeleteAddressList(Runspace runSpace, string id) + internal void DeleteAddressList(Runspace runSpace, string id) { ExchangeLog.LogStart("DeleteAddressList"); Command cmd = new Command("Remove-AddressList"); @@ -4845,116 +4905,33 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("DeleteAddressList"); } - private string GetRoomsAddressListDN(Runspace runSpace, string id) + + internal virtual void DeleteAddressBookPolicy(Runspace runSpace, string id) { - ExchangeLog.LogStart("GetRoomsAddressListDN"); + ExchangeLog.LogStart("DeleteAddressBookPolicy"); + ExchangeLog.LogEnd("DeleteAddressBookPolicy"); + } + + + + internal string GetGlobalAddressListDN(Runspace runSpace, string id) + { + ExchangeLog.LogStart("GetGlobalAddressListDN"); string resultObjectDN = null; - Command cmd = new Command("Get-AddressList"); + Command cmd = new Command("Get-GlobalAddressList"); cmd.Parameters.Add("Identity", id); Collection result = this.ExecuteShellCommand(runSpace, cmd); if ((result != null) && (result.Count > 0)) { resultObjectDN = this.GetResultObjectDN(result); - ExchangeLog.DebugInfo("RAL DN: {0}", new object[] { resultObjectDN }); + ExchangeLog.DebugInfo("GAL DN: {0}", new object[] { resultObjectDN }); } - ExchangeLog.DebugInfo("GetRommsAddressListDN, cmd = {0}", cmd.CommandText); - ExchangeLog.LogEnd("GetRoomsAddressListDN"); + ExchangeLog.LogEnd("GetGlobalAddressListDN"); return resultObjectDN; } - private string CreateRoomsAddressList(Runspace runSpace, string organizationId) - { - ExchangeLog.LogStart("CreateRoomsAddressList"); - string roomsAddressListName = this.GetRoomsAddressListName(organizationId); - string roomsAddressListDN = this.GetRoomsAddressListDN(runSpace, roomsAddressListName); - if (!string.IsNullOrEmpty(roomsAddressListDN)) - { - //rooms address list already exists - we will use it - ExchangeLog.LogWarning("Rooms Address List '{0}' already exists", new object[] { roomsAddressListName }); - } - else - { - //try to create a new rooms address list (10 attempts) - int attempts = 0; - Command cmd = null; - Collection result = null; - while (true) - { - try - { - //try to create address list - cmd = new Command("New-AddressList"); - cmd.Parameters.Add("Name", roomsAddressListName); - cmd.Parameters.Add("IncludedRecipients", "Resources"); - cmd.Parameters.Add("ConditionalCustomAttribute1", organizationId); - - result = ExecuteShellCommand(runSpace, cmd); - roomsAddressListDN = CheckResultObjectDN(result); - } - catch (Exception ex) - { - ExchangeLog.LogError(ex); - } - if (roomsAddressListDN != null) - break; - - if (attempts > 9) - throw new Exception( - string.Format("Could not create Rooms Address List '{0}' cmd = '{1}'", roomsAddressListName, cmd)); - - attempts++; - ExchangeLog.LogWarning("Attempt #{0} to create rooms address list failed!", attempts); - // wait 1 sec - System.Threading.Thread.Sleep(1000); - } - } - - ExchangeLog.LogEnd("CreateRoomsAddressList"); - return roomsAddressListDN; - } - - private void UpdateRoomsAddressList(Runspace runSpace, string id, string securityGroup) - { - ExchangeLog.LogStart("UpdateRoomsAddressList"); - - string path = AddADPrefix(id); - Command cmd = new Command("Update-AddressList"); - cmd.Parameters.Add("Identity", id); - ExecuteShellCommand(runSpace, cmd); - - AdjustADSecurity(path, securityGroup, false); - - ExchangeLog.LogEnd("UpdateRoomsAddressList"); - } - - private void DeleteRoomsAddressList(Runspace runSpace, string id) - { - ExchangeLog.LogStart("DeleteRoomsAddressList"); - Command cmd = new Command("Remove-AddressList"); - cmd.Parameters.Add("Identity", id); - cmd.Parameters.Add("Confirm", false); - ExecuteShellCommand(runSpace, cmd); - ExchangeLog.LogEnd("DeleteRoomsAddressList"); - } - - private string GetGlobalAddressListDN(Runspace runSpace, string id) - { - ExchangeLog.LogStart("GetGlobalAddressListDN"); - string resultObjectDN = null; - Command cmd = new Command("Get-GlobalAddressList"); - cmd.Parameters.Add("Identity", id); - Collection result = this.ExecuteShellCommand(runSpace, cmd); - if ((result != null) && (result.Count > 0)) - { - resultObjectDN = this.GetResultObjectDN(result); - ExchangeLog.DebugInfo("GAL DN: {0}", new object[] { resultObjectDN }); - } - ExchangeLog.LogEnd("GetGlobalAddressListDN"); - return resultObjectDN; - } - - private string CreateGlobalAddressList(Runspace runSpace, string organizationId) + internal string CreateGlobalAddressList(Runspace runSpace, string organizationId) { ExchangeLog.LogStart("CreateGlobalAddressList"); @@ -4971,7 +4948,7 @@ namespace WebsitePanel.Providers.HostedSolution return id; } - private void UpdateGlobalAddressList(Runspace runSpace, string id, string securityGroup) + internal void UpdateGlobalAddressList(Runspace runSpace, string id, string securityGroup) { ExchangeLog.LogStart("UpdateGlobalAddressList"); @@ -4986,7 +4963,7 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("UpdateGlobalAddressList"); } - private void DeleteGlobalAddressList(Runspace runSpace, string id) + internal void DeleteGlobalAddressList(Runspace runSpace, string id) { ExchangeLog.LogStart("DeleteGlobalAddressList"); Command cmd = new Command("Remove-GlobalAddressList"); @@ -4998,44 +4975,39 @@ namespace WebsitePanel.Providers.HostedSolution private string CreateOfflineAddressBook(Runspace runSpace, string organizationId, string server, string oabVirtualDirs) { - ExchangeLog.LogStart("CreateOfflineAddressBook"); + ExchangeLog.LogStart("CreateOfflineAddressBook"); - string oabName = GetOfflineAddressBookName(organizationId); + string oabName = GetOfflineAddressBookName(organizationId); + string addressListName = GetAddressListName(organizationId); - bool enableSP2abp = false; - if (ConfigurationManager.AppSettings[CONFIG_ENABLESP2ABP] != null) - enableSP2abp = Boolean.Parse(ConfigurationManager.AppSettings[CONFIG_ENABLESP2ABP]); - Version exchangeVersion = GetExchangeVersion(); - string addressListName; - if (enableSP2abp && (exchangeVersion >= new Version(14, 2))) - { - // Ex2010SP2 with ABP support, want to use GAL for OAB - addressListName = GetGlobalAddressListName(organizationId); - } - else - { - // Ex2007 or Ex2010 without ABP support, have to use AL for OAB - addressListName = GetAddressListName(organizationId); - } + Command cmd = new Command("New-OfflineAddressBook"); + cmd.Parameters.Add("Name", oabName); + cmd.Parameters.Add("Server", server); + cmd.Parameters.Add("AddressLists", addressListName); + cmd.Parameters.Add("PublicFolderDistributionEnabled", PublicFolderDistributionEnabled); + cmd.Parameters.Add("IsDefault", false); - Command cmd = new Command("New-OfflineAddressBook"); - cmd.Parameters.Add("Name", oabName); - cmd.Parameters.Add("Server", server); - cmd.Parameters.Add("AddressLists", addressListName); - cmd.Parameters.Add("PublicFolderDistributionEnabled", true); - cmd.Parameters.Add("IsDefault", false); - if (!string.IsNullOrEmpty(oabVirtualDirs)) - { - cmd.Parameters.Add("VirtualDirectories", oabVirtualDirs); - } - Collection result = ExecuteShellCommand(runSpace, cmd); - string id = GetResultObjectDN(result); + //TODO: fix web distribution + if (!string.IsNullOrEmpty(oabVirtualDirs)) + { + ArrayList virtualDirs = new ArrayList(); + string[] strTmp = oabVirtualDirs.Split(','); + foreach (string s in strTmp) + { + virtualDirs.Add(s); + } - ExchangeLog.LogEnd("CreateOfflineAddressBook"); + cmd.Parameters.Add("VirtualDirectories", (String[])virtualDirs.ToArray(typeof(string))); + } - return id; - } + Collection result = ExecuteShellCommand(runSpace, cmd); + string id = GetResultObjectDN(result); + + ExchangeLog.LogEnd("CreateOfflineAddressBook"); + + return id; + } private void UpdateOfflineAddressBook(Runspace runSpace, string id, string securityGroup) { @@ -5053,7 +5025,7 @@ namespace WebsitePanel.Providers.HostedSolution } - private void DeleteOfflineAddressBook(Runspace runSpace, string id) + internal void DeleteOfflineAddressBook(Runspace runSpace, string id) { ExchangeLog.LogStart("DeleteOfflineAddressBook"); Command cmd = new Command("Remove-OfflineAddressBook"); @@ -5063,31 +5035,6 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("DeleteOfflineAddressBook"); } - private string CreateAddressPolicy(Runspace runSpace, string organizationId) - { - ExchangeLog.LogStart("CreateAddressPolicy"); - - string ABP = GetAddressPolicyName(organizationId); - string AL = GetAddressListName(organizationId); - string GAL = GetGlobalAddressListName(organizationId); - string OAB = GetOfflineAddressBookName(organizationId); - string RL = GetRoomsAddressListName(organizationId); - - Command cmd = new Command("New-AddressBookPolicy"); - cmd.Parameters.Add("Name", ABP); - cmd.Parameters.Add("GlobalAddressList", GAL); - cmd.Parameters.Add("OfflineAddressBook", OAB); - cmd.Parameters.Add("AddressLists", AL); - cmd.Parameters.Add("RoomList", RL); - - - Collection result = ExecuteShellCommand(runSpace, cmd); - string id = GetResultObjectDN(result); - - ExchangeLog.LogEnd("CreateAddressPolicy"); - return id; - } - private void DeleteAddressPolicy(Runspace runSpace, string id) { ExchangeLog.LogStart("DeleteAddressPolicy"); @@ -5103,7 +5050,7 @@ namespace WebsitePanel.Providers.HostedSolution return orgName + " Address List"; } - private string GetGlobalAddressListName(string orgName) + internal string GetGlobalAddressListName(string orgName) { return orgName + " Global Address List"; } @@ -5112,7 +5059,8 @@ namespace WebsitePanel.Providers.HostedSolution { return orgName + " Offline Address Book"; } - private string GetAddressPolicyName(string orgName) + + internal string GetAddressBookPolicyName(string orgName) { return orgName + " Address Policy"; } @@ -5171,7 +5119,7 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("DeleteADObject"); } - private DirectoryEntry GetRootOU() + private DirectoryEntry GetRootOU() { ExchangeLog.LogStart("GetRootOU"); StringBuilder sb = new StringBuilder(); @@ -5186,7 +5134,7 @@ namespace WebsitePanel.Providers.HostedSolution return de; } - private void SetADObjectProperty(DirectoryEntry oDE, string name, string value) + private void SetADObjectProperty(DirectoryEntry oDE, string name, string value) { if (!string.IsNullOrEmpty(value)) { @@ -5201,14 +5149,14 @@ namespace WebsitePanel.Providers.HostedSolution } } - private void SetADObjectPropertyValue(DirectoryEntry oDE, string name, string value) + internal void SetADObjectPropertyValue(DirectoryEntry oDE, string name, string value) { PropertyValueCollection collection = oDE.Properties[name]; collection.Value = value; } - private void AddADObjectProperty(DirectoryEntry oDE, string name, string value) + internal void AddADObjectProperty(DirectoryEntry oDE, string name, string value) { if (!string.IsNullOrEmpty(value)) { @@ -5217,7 +5165,7 @@ namespace WebsitePanel.Providers.HostedSolution } } - private DirectoryEntry GetADObject(string path) + internal DirectoryEntry GetADObject(string path) { DirectoryEntry de = null; if (path.StartsWith("LDAP://" + PrimaryDomainController + "/", true, CultureInfo.InvariantCulture)) @@ -5235,7 +5183,7 @@ namespace WebsitePanel.Providers.HostedSolution return de; } - private object GetADObjectProperty(DirectoryEntry entry, string name) + internal object GetADObjectProperty(DirectoryEntry entry, string name) { if (entry.Properties.Contains(name)) return entry.Properties[name][0]; @@ -5243,6 +5191,18 @@ namespace WebsitePanel.Providers.HostedSolution return String.Empty; } + + private string GetOrganizationPath(string organizationId) + { + StringBuilder sb = new StringBuilder(); + // append provider + AppendOUPath(sb, organizationId); + AppendOUPath(sb, RootOU); + AppendDomainPath(sb, RootDomain); + + return sb.ToString(); + } + private void AppendProtocol(StringBuilder sb) { sb.Append("LDAP://"); @@ -5279,7 +5239,7 @@ namespace WebsitePanel.Providers.HostedSolution } } - private string AddADPrefix(string path) + internal string AddADPrefix(string path) { string dn = path; if (!dn.ToUpper().StartsWith("LDAP://")) @@ -5305,7 +5265,7 @@ namespace WebsitePanel.Providers.HostedSolution return dn; } - private string ConvertADPathToCanonicalName(string name) + internal string ConvertADPathToCanonicalName(string name) { if (string.IsNullOrEmpty(name)) @@ -5364,7 +5324,7 @@ namespace WebsitePanel.Providers.HostedSolution } - private void AdjustADSecurity(string objPath, string securityGroupPath, bool isAddressBook) + internal virtual void AdjustADSecurity(string objPath, string securityGroupPath, bool isAddressBook) { ExchangeLog.LogStart("AdjustADSecurity"); ExchangeLog.DebugInfo(" Active Direcory object: {0}", objPath); @@ -5496,7 +5456,7 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("AddGlobalUPNSuffix"); }*/ - private string GetNETBIOSDomainName() + internal string GetNETBIOSDomainName() { ExchangeLog.LogStart("GetNETBIOSDomainName"); string ret = string.Empty; @@ -6035,7 +5995,7 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogEnd("CreateOrganizationActiveSyncPolicyInternal"); } - private string CreateActiveSyncPolicy(Runspace runSpace, string organizationId) + internal string CreateActiveSyncPolicy(Runspace runSpace, string organizationId) { ExchangeLog.LogStart("CreateActiveSyncPolicy"); Command cmd = new Command("New-ActiveSyncMailboxPolicy"); @@ -6048,7 +6008,7 @@ namespace WebsitePanel.Providers.HostedSolution return id; } - private void DeleteActiveSyncPolicy(Runspace runSpace, string id) + internal void DeleteActiveSyncPolicy(Runspace runSpace, string id) { ExchangeLog.LogStart("DeleteActiveSyncPolicy"); Command cmd = new Command("Remove-ActiveSyncMailboxPolicy"); @@ -6184,35 +6144,43 @@ namespace WebsitePanel.Providers.HostedSolution private ExchangeMobileDevice[] GetMobileDevicesInternal(string accountName) { - ExchangeLog.LogStart("GetMobileDevicesInternal"); - ExchangeLog.DebugInfo("Account name: {0}", accountName); + ExchangeLog.LogStart("GetMobileDevicesInternal"); + ExchangeLog.DebugInfo("Account name: {0}", accountName); - List devices = new List(); - ExchangeMobileDevice device = null; + List devices = new List(); + ExchangeMobileDevice device = null; - Runspace runSpace = null; - try - { - runSpace = OpenRunspace(); - Command cmd = new Command("Get-ActiveSyncDeviceStatistics"); - cmd.Parameters.Add("Mailbox", accountName); - Collection result = ExecuteShellCommand(runSpace, cmd); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + Command cmd = new Command("Get-ActiveSyncDeviceStatistics"); + cmd.Parameters.Add("Mailbox", accountName); - if (result != null) - { - foreach (PSObject obj in result) - { - device = GetMobileDeviceObject(obj); - devices.Add(device); - } - } - } - finally - { - CloseRunspace(runSpace); - } - ExchangeLog.LogEnd("GetMobileDevicesInternal"); - return devices.ToArray(); + Collection result = null; + try + { + result = ExecuteShellCommand(runSpace, cmd); + } + catch (Exception) + { + } + + if (result != null) + { + foreach (PSObject obj in result) + { + device = GetMobileDeviceObject(obj); + devices.Add(device); + } + } + } + finally + { + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("GetMobileDevicesInternal"); + return devices.ToArray(); } private ExchangeMobileDevice GetMobileDeviceObject(PSObject obj) @@ -6625,7 +6593,7 @@ namespace WebsitePanel.Providers.HostedSolution return ret; } - private string GetServerName() + internal string GetServerName() { string ret = null; if (!string.IsNullOrEmpty(MailboxCluster)) @@ -6668,12 +6636,12 @@ namespace WebsitePanel.Providers.HostedSolution #region Transactions - private ExchangeTransaction StartTransaction() + internal ExchangeTransaction StartTransaction() { return new ExchangeTransaction(); } - private void RollbackTransaction(ExchangeTransaction transaction) + internal void RollbackTransaction(ExchangeTransaction transaction) { ExchangeLog.LogStart("RollbackTransaction"); Runspace runSpace = null; @@ -6712,58 +6680,61 @@ namespace WebsitePanel.Providers.HostedSolution ExchangeLog.LogInfo("Rollback action: {0}", action.ActionType); switch (action.ActionType) { - case TransactionAction.TransactionActionTypes.CreateOrganizationUnit: - DeleteADObject(action.Id); - break; - case TransactionAction.TransactionActionTypes.CreateDistributionGroup: - RemoveDistributionGroup(runspace, action.Id); - break; - case TransactionAction.TransactionActionTypes.EnableDistributionGroup: - DisableMailSecurityDistributionGroup(runspace, action.Id); - break; - case TransactionAction.TransactionActionTypes.CreateGlobalAddressList: - DeleteGlobalAddressList(runspace, action.Id); - break; - case TransactionAction.TransactionActionTypes.CreateAddressList: - DeleteAddressList(runspace, action.Id); - break; - case TransactionAction.TransactionActionTypes.CreateRoomsAddressList: - DeleteRoomsAddressList(runspace, action.Id); + case TransactionAction.TransactionActionTypes.CreateOrganizationUnit: + DeleteADObject(action.Id); break; - case TransactionAction.TransactionActionTypes.CreateOfflineAddressBook: - DeleteOfflineAddressBook(runspace, action.Id); - break; - case TransactionAction.TransactionActionTypes.CreateActiveSyncPolicy: - DeleteActiveSyncPolicy(runspace, action.Id); - break; - case TransactionAction.TransactionActionTypes.CreateAcceptedDomain: - RemoveAcceptedDomain(runspace, action.Id); - break; - case TransactionAction.TransactionActionTypes.AddUPNSuffix: - RemoveUPNSuffix(action.Id, action.Suffix); - break; - case TransactionAction.TransactionActionTypes.CreateMailbox: - RemoveMailbox(runspace, action.Id); - break; - case TransactionAction.TransactionActionTypes.CreateContact: - RemoveContact(runspace, action.Id); - break; - case TransactionAction.TransactionActionTypes.CreatePublicFolder: - RemovePublicFolder(runspace, action.Id); - break; - case TransactionAction.TransactionActionTypes.AddMailboxFullAccessPermission: - RemoveMailboxAccessPermission(runspace, action.Account, action.Id, "FullAccess"); - break; - case TransactionAction.TransactionActionTypes.AddSendAsPermission: - RemoveADPermission(runspace, action.Account, action.Id, null, "Send-as", null); - break; - case TransactionAction.TransactionActionTypes.RemoveMailboxFullAccessPermission: - SetMailboxPermission(runspace, action.Account, action.Id, "FullAccess"); - break; - case TransactionAction.TransactionActionTypes.RemoveSendAsPermission: - SetExtendedRights(runspace, action.Account, action.Id, "Send-as"); - break; - } + case TransactionAction.TransactionActionTypes.CreateDistributionGroup: + RemoveDistributionGroup(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.EnableDistributionGroup: + DisableMailSecurityDistributionGroup(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.CreateGlobalAddressList: + DeleteGlobalAddressList(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.CreateAddressList: + DeleteAddressList(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.CreateAddressBookPolicy: + DeleteAddressBookPolicy(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.CreateOfflineAddressBook: + DeleteOfflineAddressBook(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.CreateActiveSyncPolicy: + DeleteActiveSyncPolicy(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.CreateAcceptedDomain: + RemoveAcceptedDomain(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.AddUPNSuffix: + RemoveUPNSuffix(action.Id, action.Suffix); + break; + case TransactionAction.TransactionActionTypes.CreateMailbox: + RemoveMailbox(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.EnableMailbox: + DisableMailbox(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.CreateContact: + RemoveContact(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.CreatePublicFolder: + RemovePublicFolder(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.AddMailboxFullAccessPermission: + RemoveMailboxAccessPermission(runspace, action.Account, action.Id, "FullAccess"); + break; + case TransactionAction.TransactionActionTypes.AddSendAsPermission: + RemoveADPermission(runspace, action.Account, action.Id, null, "Send-as", null); + break; + case TransactionAction.TransactionActionTypes.RemoveMailboxFullAccessPermission: + SetMailboxPermission(runspace, action.Account, action.Id, "FullAccess"); + break; + case TransactionAction.TransactionActionTypes.RemoveSendAsPermission: + SetExtendedRights(runspace, action.Account, action.Id, "Send-as"); + break; + } } #endregion } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010.cs index 414b73f2..fdb674cf 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -167,7 +167,7 @@ namespace WebsitePanel.Providers.HostedSolution return runspace; } - private static Assembly ResolveExchangeAssembly(object p, ResolveEventArgs args) + internal static Assembly ResolveExchangeAssembly(object p, ResolveEventArgs args) { //Add path for the Exchange 2007 DLLs if (args.Name.Contains("Microsoft.Exchange")) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs new file mode 100644 index 00000000..e2b16d4f --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Exchange2010SP2.cs @@ -0,0 +1,753 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.IO; +using System.Configuration; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Text; +using System.Reflection; +using System.Globalization; +using System.Collections; + +using System.DirectoryServices; +using System.Security; +using System.Security.Principal; +using System.Security.AccessControl; + +using System.Management.Automation; +using System.Management.Automation.Runspaces; + +using WebsitePanel.Providers; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers.Utils; +using WebsitePanel.Server.Utils; +using Microsoft.Exchange.Data.Directory.Recipient; +using Microsoft.Win32; + +using Microsoft.Exchange.Data; +using Microsoft.Exchange.Data.Directory; +using Microsoft.Exchange.Data.Storage; + +namespace WebsitePanel.Providers.HostedSolution +{ + public class Exchange2010SP2 : Exchange2010 + { + #region Static constructor + + static private Hashtable htBbalancer = new Hashtable(); + + static Exchange2010SP2() + { + AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(ResolveExchangeAssembly); + ExchangeRegistryPath = "SOFTWARE\\Microsoft\\ExchangeServer\\v14\\Setup"; + } + #endregion + + + #region Organization + /// + /// Creates organization on Mail Server + /// + /// + /// + internal override Organization ExtendToExchangeOrganizationInternal(string organizationId, string securityGroup, bool IsConsumer) + { + ExchangeLog.LogStart("CreateOrganizationInternal"); + ExchangeLog.DebugInfo(" Organization Id: {0}", organizationId); + + ExchangeTransaction transaction = StartTransaction(); + Organization info = new Organization(); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + string server = GetServerName(); + string securityGroupPath = AddADPrefix(securityGroup); + + //Create mail enabled organization security group + EnableMailSecurityDistributionGroup(runSpace, securityGroup, organizationId); + transaction.RegisterMailEnabledDistributionGroup(securityGroup); + UpdateSecurityDistributionGroup(runSpace, securityGroup, organizationId, IsConsumer); + + //create GAL + string galId = CreateGlobalAddressList(runSpace, organizationId); + transaction.RegisterNewGlobalAddressList(galId); + ExchangeLog.LogInfo(" Global Address List: {0}", galId); + UpdateGlobalAddressList(runSpace, galId, securityGroupPath); + + //create AL + string alId = CreateAddressList(runSpace, organizationId); + transaction.RegisterNewAddressList(alId); + ExchangeLog.LogInfo(" Address List: {0}", alId); + UpdateAddressList(runSpace, alId, securityGroupPath); + + //create RAL + string ralId = CreateRoomsAddressList(runSpace, organizationId); + transaction.RegisterNewRoomsAddressList(ralId); + ExchangeLog.LogInfo(" Rooms Address List: {0}", ralId); + UpdateAddressList(runSpace, ralId, securityGroupPath); + + //create ActiveSync policy + string asId = CreateActiveSyncPolicy(runSpace, organizationId); + transaction.RegisterNewActiveSyncPolicy(asId); + ExchangeLog.LogInfo(" ActiveSync Policy: {0}", asId); + + info.AddressList = alId; + info.GlobalAddressList = galId; + info.RoomsAddressList = ralId; + info.OrganizationId = organizationId; + } + catch (Exception ex) + { + ExchangeLog.LogError("CreateOrganizationInternal", ex); + RollbackTransaction(transaction); + throw; + } + finally + { + + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("CreateOrganizationInternal"); + return info; + } + + + internal override Organization CreateOrganizationAddressBookPolicyInternal(string organizationId, string gal, string addressBook, string roomList, string oab) + { + ExchangeLog.LogStart("CreateOrganizationAddressBookPolicyInternal"); + ExchangeLog.LogInfo(" Organization Id: {0}", organizationId); + ExchangeLog.LogInfo(" GAL: {0}", gal); + ExchangeLog.LogInfo(" AddressBook: {0}", addressBook); + ExchangeLog.LogInfo(" RoomList: {0}", roomList); + ExchangeLog.LogInfo(" OAB: {0}", oab); + + ExchangeTransaction transaction = StartTransaction(); + + Organization info = new Organization(); + string policyName = GetAddressBookPolicyName(organizationId); + + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + Command cmd = new Command("New-AddressBookPolicy"); + cmd.Parameters.Add("Name", policyName); + cmd.Parameters.Add("AddressLists", addressBook); + cmd.Parameters.Add("RoomList", roomList); + cmd.Parameters.Add("GlobalAddressList", gal); + cmd.Parameters.Add("OfflineAddressBook", oab); + + Collection result = ExecuteShellCommand(runSpace, cmd); + info.AddressBookPolicy = GetResultObjectDN(result); + + } + catch (Exception ex) + { + ExchangeLog.LogError("CreateOrganizationAddressBookPolicyInternal", ex); + RollbackTransaction(transaction); + throw; + } + finally + { + + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("CreateOrganizationAddressBookPolicyInternal"); + return info; + } + + internal override bool DeleteOrganizationInternal(string organizationId, string distinguishedName, + string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy) + { + ExchangeLog.LogStart("DeleteOrganizationInternal"); + bool ret = true; + + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + + string ou = ConvertADPathToCanonicalName(distinguishedName); + + if (!DeleteOrganizationMailboxes(runSpace, ou)) + ret = false; + + if (!DeleteOrganizationContacts(runSpace, ou)) + ret = false; + + if (!DeleteOrganizationDistributionLists(runSpace, ou)) + ret = false; + + //delete AddressBookPolicy + try + { + if (!string.IsNullOrEmpty(addressBookPolicy)) + DeleteAddressBookPolicy(runSpace, addressBookPolicy); + } + catch (Exception ex) + { + ret = false; + ExchangeLog.LogError("Could not delete AddressBook Policy " + addressBookPolicy, ex); + } + + //delete OAB + try + { + if (!string.IsNullOrEmpty(offlineAddressBook)) + DeleteOfflineAddressBook(runSpace, offlineAddressBook); + } + catch (Exception ex) + { + ret = false; + ExchangeLog.LogError("Could not delete Offline Address Book " + offlineAddressBook, ex); + } + + //delete AL + try + { + if (!string.IsNullOrEmpty(addressList)) + DeleteAddressList(runSpace, addressList); + } + catch (Exception ex) + { + ret = false; + ExchangeLog.LogError("Could not delete Address List " + addressList, ex); + } + + //delete RL + try + { + if (!string.IsNullOrEmpty(roomList)) + DeleteAddressList(runSpace, roomList); + } + catch (Exception ex) + { + ret = false; + ExchangeLog.LogError("Could not delete Address List " + roomList, ex); + } + + + //delete GAL + try + { + if (!string.IsNullOrEmpty(globalAddressList)) + DeleteGlobalAddressList(runSpace, globalAddressList); + } + catch (Exception ex) + { + ret = false; + ExchangeLog.LogError("Could not delete Global Address List " + globalAddressList, ex); + } + + //delete ActiveSync policy + try + { + DeleteActiveSyncPolicy(runSpace, organizationId); + } + catch (Exception ex) + { + ret = false; + ExchangeLog.LogError("Could not delete ActiveSyncPolicy " + organizationId, ex); + } + + //disable mail security distribution group + try + { + DisableMailSecurityDistributionGroup(runSpace, securityGroup); + } + catch (Exception ex) + { + ret = false; + ExchangeLog.LogError("Could not disable mail security distribution group " + securityGroup, ex); + } + } + catch (Exception ex) + { + ret = false; + ExchangeLog.LogError("DeleteOrganizationInternal", ex); + throw; + } + finally + { + + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("DeleteOrganizationInternal"); + return ret; + } + + internal override void DeleteAddressBookPolicy(Runspace runSpace, string id) + { + ExchangeLog.LogStart("DeleteAddressBookPolicy"); + //if (id != "IsConsumer") + //{ + Command cmd = new Command("Remove-AddressBookPolicy"); + cmd.Parameters.Add("Identity", id); + cmd.Parameters.Add("Confirm", false); + ExecuteShellCommand(runSpace, cmd); + //} + ExchangeLog.LogEnd("DeleteAddressBookPolicy"); + } + + #endregion + + #region Mailbox + internal override string CreateMailEnableUserInternal(string upn, string organizationId, string organizationDistinguishedName, ExchangeAccountType accountType, + string mailboxDatabase, string offlineAddressBook, string addressBookPolicy, + string accountName, bool enablePOP, bool enableIMAP, + bool enableOWA, bool enableMAPI, bool enableActiveSync, + int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, + int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool hideFromAddressBook, bool IsConsumer) + { + + ExchangeLog.LogStart("CreateMailEnableUserInternal"); + ExchangeLog.DebugInfo("Organization Id: {0}", organizationId); + + string ret = null; + ExchangeTransaction transaction = StartTransaction(); + Runspace runSpace = null; + + int attempts = 0; + string id = null; + + try + { + runSpace = OpenRunspace(); + Command cmd = null; + Collection result = null; + + //try to enable mail user for 10 times + while (true) + { + try + { + //create mailbox + cmd = new Command("Enable-Mailbox"); + cmd.Parameters.Add("Identity", upn); + cmd.Parameters.Add("Alias", accountName); + string database = GetDatabase(runSpace, PrimaryDomainController, mailboxDatabase); + ExchangeLog.DebugInfo("database: " + database); + if (database != string.Empty) + { + cmd.Parameters.Add("Database", database); + } + if (accountType == ExchangeAccountType.Equipment) + cmd.Parameters.Add("Equipment"); + else if (accountType == ExchangeAccountType.Room) + cmd.Parameters.Add("Room"); + + result = ExecuteShellCommand(runSpace, cmd); + + id = CheckResultObjectDN(result); + } + catch (Exception ex) + { + ExchangeLog.LogError(ex); + } + if (id != null) + break; + + if (attempts > 9) + throw new Exception( + string.Format("Could not enable mail user '{0}' ", upn)); + + attempts++; + ExchangeLog.LogWarning("Attempt #{0} to enable mail user failed!", attempts); + // wait 5 sec + System.Threading.Thread.Sleep(1000); + } + + transaction.RegisterEnableMailbox(id); + + string windowsEmailAddress = ObjToString(GetPSObjectProperty(result[0], "WindowsEmailAddress")); + + //update mailbox + cmd = new Command("Set-Mailbox"); + cmd.Parameters.Add("Identity", id); + cmd.Parameters.Add("OfflineAddressBook", offlineAddressBook); + cmd.Parameters.Add("EmailAddressPolicyEnabled", false); + cmd.Parameters.Add("CustomAttribute1", organizationId); + cmd.Parameters.Add("CustomAttribute3", windowsEmailAddress); + cmd.Parameters.Add("PrimarySmtpAddress", upn); + cmd.Parameters.Add("WindowsEmailAddress", upn); + + cmd.Parameters.Add("UseDatabaseQuotaDefaults", new bool?(false)); + cmd.Parameters.Add("UseDatabaseRetentionDefaults", false); + cmd.Parameters.Add("IssueWarningQuota", ConvertKBToUnlimited(issueWarningKB)); + cmd.Parameters.Add("ProhibitSendQuota", ConvertKBToUnlimited(prohibitSendKB)); + cmd.Parameters.Add("ProhibitSendReceiveQuota", ConvertKBToUnlimited(prohibitSendReceiveKB)); + cmd.Parameters.Add("RetainDeletedItemsFor", ConvertDaysToEnhancedTimeSpan(keepDeletedItemsDays)); + cmd.Parameters.Add("RecipientLimits", ConvertInt32ToUnlimited(maxRecipients)); + cmd.Parameters.Add("MaxSendSize", ConvertKBToUnlimited(maxSendMessageSizeKB)); + cmd.Parameters.Add("MaxReceiveSize", ConvertKBToUnlimited(maxReceiveMessageSizeKB)); + if (IsConsumer) cmd.Parameters.Add("HiddenFromAddressListsEnabled", true); + else + cmd.Parameters.Add("HiddenFromAddressListsEnabled", hideFromAddressBook); + cmd.Parameters.Add("AddressBookPolicy", addressBookPolicy); + ExecuteShellCommand(runSpace, cmd); + + //Client Access + cmd = new Command("Set-CASMailbox"); + cmd.Parameters.Add("Identity", id); + cmd.Parameters.Add("ActiveSyncEnabled", enableActiveSync); + if (enableActiveSync) + { + cmd.Parameters.Add("ActiveSyncMailboxPolicy", organizationId); + } + cmd.Parameters.Add("OWAEnabled", enableOWA); + cmd.Parameters.Add("MAPIEnabled", enableMAPI); + cmd.Parameters.Add("PopEnabled", enablePOP); + cmd.Parameters.Add("ImapEnabled", enableIMAP); + ExecuteShellCommand(runSpace, cmd); + + //add to the security group + cmd = new Command("Add-DistributionGroupMember"); + cmd.Parameters.Add("Identity", organizationId); + cmd.Parameters.Add("Member", id); + cmd.Parameters.Add("BypassSecurityGroupManagerCheck", true); + ExecuteShellCommand(runSpace, cmd); + + if (!IsConsumer) + { + //Set-MailboxFolderPermission for calendar + cmd = new Command("Add-MailboxFolderPermission"); + cmd.Parameters.Add("Identity", id + ":\\calendar"); + cmd.Parameters.Add("AccessRights", "Reviewer"); + cmd.Parameters.Add("User", organizationId); + ExecuteShellCommand(runSpace, cmd); + } + cmd = new Command("Set-MailboxFolderPermission"); + cmd.Parameters.Add("Identity", id + ":\\calendar"); + cmd.Parameters.Add("AccessRights", "None"); + cmd.Parameters.Add("User", "Default"); + ExecuteShellCommand(runSpace, cmd); + + ret = string.Format("{0}\\{1}", GetNETBIOSDomainName(), accountName); + ExchangeLog.LogEnd("CreateMailEnableUserInternal"); + return ret; + } + catch (Exception ex) + { + ExchangeLog.LogError("CreateMailEnableUserInternal", ex); + RollbackTransaction(transaction); + throw; + } + finally + { + CloseRunspace(runSpace); + } + } + + + internal override void DisableMailboxInternal(string id) + { + ExchangeLog.LogStart("DisableMailboxInternal"); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + Command cmd = new Command("Get-Mailbox"); + cmd.Parameters.Add("Identity", id); + Collection result = ExecuteShellCommand(runSpace, cmd); + + if (result != null && result.Count > 0) + { + string upn = ObjToString(GetPSObjectProperty(result[0], "UserPrincipalName")); + + string addressbookPolicy = ObjToString(GetPSObjectProperty(result[0], "AddressBookPolicy")); + + cmd = new Command("Disable-Mailbox"); + cmd.Parameters.Add("Identity", id); + cmd.Parameters.Add("Confirm", false); + ExecuteShellCommand(runSpace, cmd); + + if (addressbookPolicy == (upn + " AP")) + { + try + { + DeleteAddressBookPolicy(runSpace, upn + " AP"); + } + catch (Exception) + { + } + + try + { + DeleteGlobalAddressList(runSpace, upn + " GAL"); + } + catch (Exception) + { + } + + try + { + DeleteAddressList(runSpace, upn + " AL"); + } + catch (Exception) + { + } + } + + + } + + } + + finally + { + + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("DisableMailboxInternal"); + } + + + internal override void DeleteMailboxInternal(string accountName) + { + ExchangeLog.LogStart("DeleteMailboxInternal"); + ExchangeLog.DebugInfo("Account Name: {0}", accountName); + + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + Command cmd = new Command("Get-Mailbox"); + cmd.Parameters.Add("Identity", accountName); + Collection result = ExecuteShellCommand(runSpace, cmd); + + if (result != null && result.Count > 0) + { + string upn = ObjToString(GetPSObjectProperty(result[0], "UserPrincipalName")); + string addressbookPolicy = ObjToString(GetPSObjectProperty(result[0], "AddressBookPolicy")); + + RemoveMailbox(runSpace, accountName); + + if (addressbookPolicy == (upn + " AP")) + { + try + { + DeleteAddressBookPolicy(runSpace, upn + " AP"); + } + catch (Exception) + { + } + + try + { + DeleteGlobalAddressList(runSpace, upn + " GAL"); + } + catch (Exception) + { + } + + try + { + DeleteAddressList(runSpace, upn + " AL"); + } + catch (Exception) + { + } + } + } + + + } + finally + { + + CloseRunspace(runSpace); + } + ExchangeLog.LogEnd("DeleteMailboxInternal"); + } + + + internal string GetDatabase(Runspace runSpace, string primaryDomainController, string dagName) + { + string database = string.Empty; + + if (string.IsNullOrEmpty(dagName)) return string.Empty; + + ExchangeLog.LogStart("GetDatabase"); + ExchangeLog.LogInfo("DAG: " + dagName); + + //Get Dag Servers + Collection dags = null; + Command cmd = new Command("Get-DatabaseAvailabilityGroup"); + cmd.Parameters.Add("Identity", dagName); + dags = ExecuteShellCommand(runSpace, cmd); + + if (htBbalancer == null) + htBbalancer = new Hashtable(); + + if (htBbalancer[dagName] == null) + htBbalancer.Add(dagName, 0); + + if (dags != null && dags.Count > 0) + { + + ADMultiValuedProperty servers = (ADMultiValuedProperty)GetPSObjectProperty(dags[0], "Servers"); + + if (servers != null) + { + System.Collections.Generic.List lstDatabase = new System.Collections.Generic.List(); + + foreach (object objServer in servers) + { + Collection databases = null; + cmd = new Command("Get-MailboxDatabase"); + cmd.Parameters.Add("Server", ObjToString(objServer)); + databases = ExecuteShellCommand(runSpace, cmd); + + foreach (PSObject objDatabase in databases) + { + if (((bool)GetPSObjectProperty(objDatabase, "IsExcludedFromProvisioning") == false) && + ((bool)GetPSObjectProperty(objDatabase, "IsSuspendedFromProvisioning") == false)) + { + string db = ObjToString(GetPSObjectProperty(objDatabase, "Identity")); + + bool bAdd = true; + foreach (string s in lstDatabase) + { + if (s.ToLower() == db.ToLower()) + { + bAdd = false; + break; + } + } + + if (bAdd) + { + lstDatabase.Add(db); + ExchangeLog.LogInfo("AddDatabase: " + db); + } + } + } + } + + int balancer = (int)htBbalancer[dagName]; + balancer++; + if (balancer >= lstDatabase.Count) balancer = 0; + htBbalancer[dagName] = balancer; + if (lstDatabase.Count != 0) database = lstDatabase[balancer]; + + } + } + + ExchangeLog.LogEnd("GetDatabase"); + return database; + } + + + #endregion + + #region AddressBook + internal override void AdjustADSecurity(string objPath, string securityGroupPath, bool isAddressBook) + { + ExchangeLog.LogStart("AdjustADSecurity"); + ExchangeLog.DebugInfo(" Active Direcory object: {0}", objPath); + ExchangeLog.DebugInfo(" Security Group: {0}", securityGroupPath); + + if (isAddressBook) + { + ExchangeLog.DebugInfo(" Updating Security"); + //"Download Address Book" security permission for offline address book + Guid openAddressBookGuid = new Guid("{bd919c7c-2d79-4950-bc9c-e16fd99285e8}"); + + DirectoryEntry groupEntry = GetADObject(securityGroupPath); + byte[] byteSid = (byte[])GetADObjectProperty(groupEntry, "objectSid"); + + DirectoryEntry objEntry = GetADObject(objPath); + ActiveDirectorySecurity security = objEntry.ObjectSecurity; + + // Create a SecurityIdentifier object for security group. + SecurityIdentifier groupSid = new SecurityIdentifier(byteSid, 0); + + // Create an access rule to allow users in Security Group to open address book. + ActiveDirectoryAccessRule allowOpenAddressBook = + new ActiveDirectoryAccessRule( + groupSid, + ActiveDirectoryRights.ExtendedRight, + AccessControlType.Allow, + openAddressBookGuid); + + // Create an access rule to allow users in Security Group to read object. + ActiveDirectoryAccessRule allowRead = + new ActiveDirectoryAccessRule( + groupSid, + ActiveDirectoryRights.GenericRead, + AccessControlType.Allow); + + // Remove existing rules if exist + security.RemoveAccessRuleSpecific(allowOpenAddressBook); + security.RemoveAccessRuleSpecific(allowRead); + + // Add a new access rule to allow users in Security Group to open address book. + security.AddAccessRule(allowOpenAddressBook); + // Add a new access rule to allow users in Security Group to read object. + security.AddAccessRule(allowRead); + + // Commit the changes. + objEntry.CommitChanges(); + } + + ExchangeLog.LogEnd("AdjustADSecurity"); + } + + + #endregion + + + + public override bool IsInstalled() + { + int value = 0; + bool bResult = false; + RegistryKey root = Registry.LocalMachine; + RegistryKey rk = root.OpenSubKey(ExchangeRegistryPath); + if (rk != null) + { + value = (int)rk.GetValue("MsiProductMajor", null); + if (value == 14) + { + value = (int)rk.GetValue("MsiProductMinor", null); + if (value == 2) bResult = true; + } + rk.Close(); + } + return bResult; + } + } +} + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/ExchangeLog.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/ExchangeLog.cs index 116d5b2e..aa965e8f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/ExchangeLog.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/ExchangeLog.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -33,71 +33,67 @@ using WebsitePanel.Server.Utils; namespace WebsitePanel.Providers.HostedSolution { - /// - /// Exchange Log Helper Methods - /// - internal class ExchangeLog - { - internal static string LogPrefix = "Exchange"; + /// + /// Exchange Log Helper Methods + /// + internal class ExchangeLog + { + internal static string LogPrefix = "Exchange"; - internal static void LogStart(string message, params object[] args) - { - string text = String.Format(message, args); - Log.WriteStart("{0} {1}", LogPrefix, text); - } + internal static void LogStart(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteStart("{0} {1}", LogPrefix, text); + } - internal static void LogEnd(string message, params object[] args) - { - string text = String.Format(message, args); - Log.WriteEnd("{0} {1}", LogPrefix, text); - } + internal static void LogEnd(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteEnd("{0} {1}", LogPrefix, text); + } - internal static void LogInfo(string message, params object[] args) - { - string text = String.Format(message, args); - Log.WriteInfo("{0} {1}", LogPrefix, text); - } + internal static void LogInfo(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteInfo("{0} {1}", LogPrefix, text); + } - internal static void LogWarning(string message, params object[] args) - { - string text = String.Format(message, args); - Log.WriteWarning("{0} {1}", LogPrefix, text); - } + internal static void LogWarning(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteWarning("{0} {1}", LogPrefix, text); + } - internal static void LogError(Exception ex) - { - Log.WriteError(LogPrefix, ex); - } + internal static void LogError(Exception ex) + { + Log.WriteError(LogPrefix, ex); + } - internal static void LogError(string message, Exception ex) - { - string text = String.Format("{0} {1}", LogPrefix, message); - Log.WriteError(text, ex); - } + internal static void LogError(string message, Exception ex) + { + string text = String.Format("{0} {1}", LogPrefix, message); + Log.WriteError(text, ex); + } - internal static void DebugInfo(string message, params object[] args) - { -#if DEBUG - string text = String.Format(message, args); - Log.WriteInfo("{0} {1}", LogPrefix, text); -#endif - } + internal static void DebugInfo(string message, params object[] args) + { + string text = String.Format(message, args); + Log.WriteInfo("{0} {1}", LogPrefix, text); + } - internal static void DebugCommand(Command cmd) - { -#if DEBUG - StringBuilder sb = new StringBuilder(cmd.CommandText); - foreach (CommandParameter parameter in cmd.Parameters) - { - string formatString = " -{0} {1}"; - if (parameter.Value is string) - formatString = " -{0} '{1}'"; - else if (parameter.Value is bool) - formatString = " -{0} ${1}"; - sb.AppendFormat(formatString, parameter.Name, parameter.Value); - } - Log.WriteInfo("{0} {1}", LogPrefix, sb.ToString()); -#endif - } - } + internal static void DebugCommand(Command cmd) + { + StringBuilder sb = new StringBuilder(cmd.CommandText); + foreach (CommandParameter parameter in cmd.Parameters) + { + string formatString = " -{0} {1}"; + if (parameter.Value is string) + formatString = " -{0} '{1}'"; + else if (parameter.Value is bool) + formatString = " -{0} ${1}"; + sb.AppendFormat(formatString, parameter.Name, parameter.Value); + } + Log.WriteInfo("{0} {1}", LogPrefix, sb.ToString()); + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/ExchangeTransaction.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/ExchangeTransaction.cs index ce9fbaf3..1d6e0eba 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/ExchangeTransaction.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/ExchangeTransaction.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -30,228 +30,180 @@ using System.Collections.Generic; namespace WebsitePanel.Providers.HostedSolution { - internal class ExchangeTransaction - { - List actions = null; + internal class ExchangeTransaction + { + List actions = null; - public ExchangeTransaction() - { - actions = new List(); - } + public ExchangeTransaction() + { + actions = new List(); + } - internal List Actions - { - get { return actions; } - } + internal List Actions + { + get { return actions; } + } - internal void RegisterNewOrganizationUnit(string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.CreateOrganizationUnit; - action.Id = id; - Actions.Add(action); - } + internal void RegisterNewOrganizationUnit(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.CreateOrganizationUnit; + action.Id = id; + Actions.Add(action); + } - public void RegisterNewDistributionGroup(string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.CreateDistributionGroup; - action.Id = id; - Actions.Add(action); - } + public void RegisterNewDistributionGroup(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.CreateDistributionGroup; + action.Id = id; + Actions.Add(action); + } - public void RegisterMailEnabledDistributionGroup(string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.EnableDistributionGroup; - action.Id = id; - Actions.Add(action); - } + public void RegisterMailEnabledDistributionGroup(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.EnableDistributionGroup; + action.Id = id; + Actions.Add(action); + } + + internal void RegisterNewGlobalAddressList(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.CreateGlobalAddressList; + action.Id = id; + Actions.Add(action); + } + + internal void RegisterNewAddressList(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.CreateAddressList; + action.Id = id; + Actions.Add(action); + } + + internal void RegisterNewAddressBookPolicy(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.CreateAddressBookPolicy; + action.Id = id; + Actions.Add(action); + } - internal void RegisterNewGlobalAddressList(string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.CreateGlobalAddressList; - action.Id = id; - Actions.Add(action); - } - internal void RegisterNewAddressList(string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.CreateAddressList; - action.Id = id; - Actions.Add(action); - } internal void RegisterNewRoomsAddressList(string id) { TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.CreateRoomsAddressList; + action.ActionType = TransactionAction.TransactionActionTypes.CreateAddressList; action.Id = id; Actions.Add(action); } - internal void RegisterNewAddressPolicy(string id) + + + internal void RegisterNewOfflineAddressBook(string id) { TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.CreateAddressPolicy; + action.ActionType = TransactionAction.TransactionActionTypes.CreateOfflineAddressBook; + action.Id = id; + Actions.Add(action); + } + + internal void RegisterNewActiveSyncPolicy(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.CreateActiveSyncPolicy; action.Id = id; Actions.Add(action); } - internal void RegisterNewOfflineAddressBook(string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.CreateOfflineAddressBook; - action.Id = id; - Actions.Add(action); - } + internal void RegisterNewAcceptedDomain(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.CreateAcceptedDomain; + action.Id = id; + Actions.Add(action); + } - internal void RegisterNewActiveSyncPolicy(string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.CreateActiveSyncPolicy; - action.Id = id; - Actions.Add(action); - } + internal void RegisterNewUPNSuffix(string id, string suffix) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.AddUPNSuffix; + action.Id = id; + action.Suffix = suffix; + Actions.Add(action); + } + + internal void RegisterNewMailbox(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.CreateMailbox; + action.Id = id; + Actions.Add(action); + } + + internal void RegisterEnableMailbox(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.EnableMailbox; + action.Id = id; + Actions.Add(action); + } - internal void RegisterNewAcceptedDomain(string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.CreateAcceptedDomain; - action.Id = id; - Actions.Add(action); - } + internal void RegisterNewContact(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.CreateContact; + action.Id = id; + Actions.Add(action); + } - internal void RegisterNewUPNSuffix(string id, string suffix) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.AddUPNSuffix; - action.Id = id; - action.Suffix = suffix; - Actions.Add(action); - } + internal void RegisterNewPublicFolder(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.CreatePublicFolder; + action.Id = id; + Actions.Add(action); + } - internal void RegisterNewMailbox(string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.CreateMailbox; - action.Id = id; - Actions.Add(action); - } + internal void AddMailBoxFullAccessPermission(string accountName, string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.AddMailboxFullAccessPermission; + action.Id = id; + action.Account = accountName; + Actions.Add(action); + } - internal void RegisterNewContact(string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.CreateContact; - action.Id = id; - Actions.Add(action); - } - - internal void RegisterNewPublicFolder(string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.CreatePublicFolder; - action.Id = id; - Actions.Add(action); - } - - internal void AddMailBoxFullAccessPermission(string accountName, string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.AddMailboxFullAccessPermission; - action.Id = id; - action.Account = accountName; - Actions.Add(action); - } - - internal void AddSendAsPermission(string accountName, string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.AddSendAsPermission; - action.Id = id; - action.Account = accountName; - Actions.Add(action); - } - - internal void RemoveMailboxFullAccessPermission(string accountName, string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.RemoveMailboxFullAccessPermission; - action.Id = id; - action.Account = accountName; - Actions.Add(action); - } - - internal void RemoveSendAsPermission(string accountName, string id) - { - TransactionAction action = new TransactionAction(); - action.ActionType = TransactionAction.TransactionActionTypes.RemoveSendAsPermission; - action.Id = id; - action.Account = accountName; - Actions.Add(action); - } - } - - internal class TransactionAction - { - private TransactionActionTypes actionType; - - public TransactionActionTypes ActionType - { - get { return actionType; } - set { actionType = value; } - } - - private string id; - - public string Id - { - get { return id; } - set { id = value; } - } - - private string suffix; - - public string Suffix - { - get { return suffix; } - set { suffix = value; } - } - - private string account; - - public string Account - { - get { return account; } - set { account = value; } - - } - - internal enum TransactionActionTypes - { - CreateOrganizationUnit, - CreateGlobalAddressList, - CreateAddressList, - CreateAddressPolicy, - CreateOfflineAddressBook, - CreateDistributionGroup, - EnableDistributionGroup, - CreateAcceptedDomain, - AddUPNSuffix, - CreateMailbox, - CreateContact, - CreatePublicFolder, - CreateActiveSyncPolicy, - AddMailboxFullAccessPermission, - AddSendAsPermission, - RemoveMailboxFullAccessPermission, - RemoveSendAsPermission, - CreateRoomsAddressList - }; - } + internal void AddSendAsPermission(string accountName, string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.AddSendAsPermission; + action.Id = id; + action.Account = accountName; + Actions.Add(action); + } + internal void RemoveMailboxFullAccessPermission(string accountName, string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.RemoveMailboxFullAccessPermission; + action.Id = id; + action.Account = accountName; + Actions.Add(action); + } + internal void RemoveSendAsPermission(string accountName, string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.RemoveSendAsPermission; + action.Id = id; + action.Account = accountName; + Actions.Add(action); + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSharePointServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSharePointServer.cs index 8a907a02..511480bd 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSharePointServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSharePointServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -36,14 +36,14 @@ using Microsoft.Win32; namespace WebsitePanel.Providers.HostedSolution { - /// - /// Provides hosted SharePoint server functionality implementation. - /// - public class HostedSharePointServer : HostingServiceProviderBase, IHostedSharePointServer - { - private delegate TReturn SharePointAction(HostedSharePointServerImpl impl); + /// + /// Provides hosted SharePoint server functionality implementation. + /// + public class HostedSharePointServer : HostingServiceProviderBase, IHostedSharePointServer + { + private delegate TReturn SharePointAction(HostedSharePointServerImpl impl); - protected string Wss3RegistryKey; + protected string Wss3RegistryKey; protected string Wss3Registry32Key; protected string LanguagePacksPath; @@ -54,301 +54,301 @@ namespace WebsitePanel.Providers.HostedSolution this.LanguagePacksPath = @"%commonprogramfiles%\microsoft shared\Web Server Extensions\12\HCCab\"; } - /// - /// Gets root web application uri. - /// - public Uri RootWebApplicationUri - { - get - { - return new Uri(ProviderSettings["RootWebApplicationUri"]); - } - } + /// + /// Gets root web application uri. + /// + public Uri RootWebApplicationUri + { + get + { + return new Uri(ProviderSettings["RootWebApplicationUri"]); + } + } public string BackupTemporaryFolder - { - get - { + { + get + { return ProviderSettings["BackupTemporaryFolder"]; - } - } + } + } - /// - /// Gets list of supported languages by this installation of SharePoint. - /// - /// List of supported languages - public int[] GetSupportedLanguages() - { - HostedSharePointServerImpl impl = new HostedSharePointServerImpl(); - return impl.GetSupportedLanguages(LanguagePacksPath); - } + /// + /// Gets list of supported languages by this installation of SharePoint. + /// + /// List of supported languages + public int[] GetSupportedLanguages() + { + HostedSharePointServerImpl impl = new HostedSharePointServerImpl(); + return impl.GetSupportedLanguages(LanguagePacksPath); + } - /// - /// Gets list of SharePoint collections within root web application. - /// - /// List of SharePoint collections within root web application. - public SharePointSiteCollection[] GetSiteCollections() - { - return - ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) - { - return impl.GetSiteCollections(RootWebApplicationUri); - }); - } + /// + /// Gets list of SharePoint collections within root web application. + /// + /// List of SharePoint collections within root web application. + public SharePointSiteCollection[] GetSiteCollections() + { + return + ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) + { + return impl.GetSiteCollections(RootWebApplicationUri); + }); + } - /// - /// Gets SharePoint collection within root web application with given name. - /// - /// Url that uniquely identifies site collection to be loaded. - /// SharePoint collection within root web application with given name. - public SharePointSiteCollection GetSiteCollection(string url) - { - return - ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) - { - return impl.GetSiteCollection(RootWebApplicationUri, url); - }); - } + /// + /// Gets SharePoint collection within root web application with given name. + /// + /// Url that uniquely identifies site collection to be loaded. + /// SharePoint collection within root web application with given name. + public SharePointSiteCollection GetSiteCollection(string url) + { + return + ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) + { + return impl.GetSiteCollection(RootWebApplicationUri, url); + }); + } - /// - /// Creates site collection within predefined root web application. - /// - /// Information about site coolection to be created. - public void CreateSiteCollection(SharePointSiteCollection siteCollection) - { - ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) - { - impl.CreateSiteCollection(RootWebApplicationUri, siteCollection); - return null; - }); - } + /// + /// Creates site collection within predefined root web application. + /// + /// Information about site coolection to be created. + public void CreateSiteCollection(SharePointSiteCollection siteCollection) + { + ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) + { + impl.CreateSiteCollection(RootWebApplicationUri, siteCollection); + return null; + }); + } - /// - /// Deletes site collection under given url. - /// - /// Url that uniquely identifies site collection to be deleted. - public void DeleteSiteCollection(string url) - { - ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) - { - impl.DeleteSiteCollection(RootWebApplicationUri, url); - return null; - }); - } + /// + /// Deletes site collection under given url. + /// + /// Url that uniquely identifies site collection to be deleted. + public void DeleteSiteCollection(SharePointSiteCollection siteCollection) + { + ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) + { + impl.DeleteSiteCollection(RootWebApplicationUri, siteCollection); + return null; + }); + } - /// - /// Backups site collection under give url. - /// - /// Url that uniquely identifies site collection to be deleted. - /// Resulting backup file name. - /// A value which shows whether created backup must be archived. - /// Created backup full path. - public string BackupSiteCollection(string url, string filename, bool zip) - { - return ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) - { - return impl.BackupSiteCollection(RootWebApplicationUri, url, filename, zip, BackupTemporaryFolder); - }); - } + /// + /// Backups site collection under give url. + /// + /// Url that uniquely identifies site collection to be deleted. + /// Resulting backup file name. + /// A value which shows whether created backup must be archived. + /// Created backup full path. + public string BackupSiteCollection(string url, string filename, bool zip) + { + return ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) + { + return impl.BackupSiteCollection(RootWebApplicationUri, url, filename, zip, BackupTemporaryFolder); + }); + } - - /// - /// Restores site collection under given url from backup. - /// - /// Site collection to be restored. - /// Backup file name to restore from. - public void RestoreSiteCollection(SharePointSiteCollection siteCollection, string filename) - { - ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) - { - impl.RestoreSiteCollection(RootWebApplicationUri, siteCollection, filename); - return null; - }); - } - /// - /// Gets binary data chunk of specified size from specified offset. - /// - /// Path to file to get bunary data chunk from. - /// Offset from which to start data reading. - /// Binary data chunk length. - /// Binary data chunk read from file. - public virtual byte[] GetTempFileBinaryChunk(string path, int offset, int length) - { - byte[] buffer = FileUtils.GetFileBinaryChunk(path, offset, length); + /// + /// Restores site collection under given url from backup. + /// + /// Site collection to be restored. + /// Backup file name to restore from. + public void RestoreSiteCollection(SharePointSiteCollection siteCollection, string filename) + { + ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) + { + impl.RestoreSiteCollection(RootWebApplicationUri, siteCollection, filename); + return null; + }); + } - // Delete temp file - if (buffer.Length < length) - { - FileUtils.DeleteFile(path); - } - return buffer; - } + /// + /// Gets binary data chunk of specified size from specified offset. + /// + /// Path to file to get bunary data chunk from. + /// Offset from which to start data reading. + /// Binary data chunk length. + /// Binary data chunk read from file. + public virtual byte[] GetTempFileBinaryChunk(string path, int offset, int length) + { + byte[] buffer = FileUtils.GetFileBinaryChunk(path, offset, length); - /// - /// Appends supplied binary data chunk to file. - /// - /// Non existent file name to append to. - /// Full path to existent file to append to. - /// Binary data chunk to append to. - /// Path to file that was appended with chunk. - public virtual string AppendTempFileBinaryChunk(string fileName, string path, byte[] chunk) - { - if (path == null) - { - path = Path.Combine(Path.GetTempPath(), fileName); - if (FileUtils.FileExists(path)) - { - FileUtils.DeleteFile(path); - } - } + // Delete temp file + if (buffer.Length < length) + { + FileUtils.DeleteFile(path); + } + return buffer; + } - FileUtils.AppendFileBinaryContent(path, chunk); + /// + /// Appends supplied binary data chunk to file. + /// + /// Non existent file name to append to. + /// Full path to existent file to append to. + /// Binary data chunk to append to. + /// Path to file that was appended with chunk. + public virtual string AppendTempFileBinaryChunk(string fileName, string path, byte[] chunk) + { + if (path == null) + { + path = Path.Combine(Path.GetTempPath(), fileName); + if (FileUtils.FileExists(path)) + { + FileUtils.DeleteFile(path); + } + } + + FileUtils.AppendFileBinaryContent(path, chunk); + + return path; + } - return path; - } - public override bool IsInstalled() { return IsSharePointInstalled(); - + } - /// - /// Deletes service items that represent SharePoint site collection. - /// - /// Items to be deleted. - public override void DeleteServiceItems(ServiceProviderItem[] items) - { - foreach (ServiceProviderItem item in items) - { - if (item is SharePointSiteCollection) - { - try - { - DeleteSiteCollection((item as SharePointSiteCollection).Url); - } - catch (Exception ex) - { - Log.WriteError(String.Format("Error deleting '{0}' {1}", item.Name, item.GetType().Name), ex); - } - } - } - } + /// + /// Deletes service items that represent SharePoint site collection. + /// + /// Items to be deleted. + public override void DeleteServiceItems(ServiceProviderItem[] items) + { + foreach (ServiceProviderItem item in items) + { + if (item is SharePointSiteCollection) + { + try + { + DeleteSiteCollection((SharePointSiteCollection)item); + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error deleting '{0}' {1}", item.Name, item.GetType().Name), ex); + } + } + } + } - /// - /// Calculates diskspace used by supplied service items. - /// - /// Service items to get diskspace usage for. - /// Calculated disk space usage statistics. - public override ServiceProviderItemDiskSpace[] GetServiceItemsDiskSpace(ServiceProviderItem[] items) - { - List itemsDiskspace = new List(); + /// + /// Calculates diskspace used by supplied service items. + /// + /// Service items to get diskspace usage for. + /// Calculated disk space usage statistics. + public override ServiceProviderItemDiskSpace[] GetServiceItemsDiskSpace(ServiceProviderItem[] items) + { + List itemsDiskspace = new List(); - // update items with diskspace - foreach (ServiceProviderItem item in items) - { - if (item is SharePointSiteCollection) - { - try - { - Log.WriteStart(String.Format("Calculating '{0}' site logs size", item.Name)); + // update items with diskspace + foreach (ServiceProviderItem item in items) + { + if (item is SharePointSiteCollection) + { + try + { + Log.WriteStart(String.Format("Calculating '{0}' site logs size", item.Name)); - SharePointSiteCollection site = GetSiteCollection(item.Name); - ServiceProviderItemDiskSpace diskspace = new ServiceProviderItemDiskSpace(); - diskspace.ItemId = item.Id; - diskspace.DiskSpace = site.Diskspace; - itemsDiskspace.Add(diskspace); + SharePointSiteCollection site = GetSiteCollection(item.Name); + ServiceProviderItemDiskSpace diskspace = new ServiceProviderItemDiskSpace(); + diskspace.ItemId = item.Id; + diskspace.DiskSpace = site.Diskspace; + itemsDiskspace.Add(diskspace); - Log.WriteEnd(String.Format("Calculating '{0}' site logs size", item.Name)); - } - catch (Exception ex) - { - Log.WriteError(ex); - } - } - } - return itemsDiskspace.ToArray(); - } + Log.WriteEnd(String.Format("Calculating '{0}' site logs size", item.Name)); + } + catch (Exception ex) + { + Log.WriteError(ex); + } + } + } + return itemsDiskspace.ToArray(); + } - /// - /// Checks whether Wss 3.0 is installed. - /// - /// true - if it is installed; false - otherwise. - private bool IsSharePointInstalled() - { - RegistryKey spKey = Registry.LocalMachine.OpenSubKey(Wss3RegistryKey); + /// + /// Checks whether Wss 3.0 is installed. + /// + /// true - if it is installed; false - otherwise. + private bool IsSharePointInstalled() + { + RegistryKey spKey = Registry.LocalMachine.OpenSubKey(Wss3RegistryKey); RegistryKey spKey32 = Registry.LocalMachine.OpenSubKey(Wss3Registry32Key); if (spKey == null && spKey32 == null) - { - return false; - } + { + return false; + } - string spVal = (string)spKey.GetValue("SharePoint"); - return (String.Compare(spVal, "installed", true) == 0); - } + string spVal = (string)spKey.GetValue("SharePoint"); + return (String.Compare(spVal, "installed", true) == 0); + } - /// - /// Executes supplied action within separate application domain. - /// - /// Action to be executed. - /// Any object that results from action execution or null if nothing is supposed to be returned. - /// Is thrown in case supplied action is null. - private static TReturn ExecuteSharePointAction(SharePointAction action) - { - if (action == null) - { - throw new ArgumentNullException("action"); - } + /// + /// Executes supplied action within separate application domain. + /// + /// Action to be executed. + /// Any object that results from action execution or null if nothing is supposed to be returned. + /// Is thrown in case supplied action is null. + private static TReturn ExecuteSharePointAction(SharePointAction action) + { + if (action == null) + { + throw new ArgumentNullException("action"); + } - AppDomain domain = null; - try - { - // Create instance of server implementation in a separate application domain for - // security and isolation purposes. - Type type = typeof (HostedSharePointServerImpl); - AppDomainSetup info = new AppDomainSetup(); - info.ApplicationBase = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); - info.PrivateBinPath = "bin; bin/debug"; - domain = AppDomain.CreateDomain("WSS30", null, info); + AppDomain domain = null; + try + { + // Create instance of server implementation in a separate application domain for + // security and isolation purposes. + Type type = typeof(HostedSharePointServerImpl); + AppDomainSetup info = new AppDomainSetup(); + info.ApplicationBase = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); + info.PrivateBinPath = "bin; bin/debug"; + domain = AppDomain.CreateDomain("WSS30", null, info); - HostedSharePointServerImpl impl = - (HostedSharePointServerImpl) - domain.CreateInstanceAndUnwrap(type.Assembly.FullName, type.FullName); + HostedSharePointServerImpl impl = + (HostedSharePointServerImpl) + domain.CreateInstanceAndUnwrap(type.Assembly.FullName, type.FullName); - // Execute requested action within created application domain. - return action(impl); - } - finally - { - if (domain != null) - { - AppDomain.Unload(domain); - } - } - } + // Execute requested action within created application domain. + return action(impl); + } + finally + { + if (domain != null) + { + AppDomain.Unload(domain); + } + } + } public void UpdateQuotas(string url, long maxStorage, long warningStorage) { ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) - { - impl.UpdateQuotas(RootWebApplicationUri, url, maxStorage, warningStorage); - return null; - }); - - + { + impl.UpdateQuotas(RootWebApplicationUri, url, maxStorage, warningStorage); + return null; + }); + + + - } - public SharePointSiteDiskSpace[] CalculateSiteCollectionsDiskSpace(string []urls) + public SharePointSiteDiskSpace[] CalculateSiteCollectionsDiskSpace(string[] urls) { - SharePointSiteDiskSpace []sd = null; + SharePointSiteDiskSpace[] sd = null; sd = ExecuteSharePointAction(delegate(HostedSharePointServerImpl impl) - { - return impl.CalculateSiteCollectionDiskSpace(RootWebApplicationUri, urls); - }); + { + return impl.CalculateSiteCollectionDiskSpace(RootWebApplicationUri, urls); + }); return sd; @@ -366,5 +366,10 @@ namespace WebsitePanel.Providers.HostedSolution return ret; } + public virtual void SetPeoplePickerOu(string site, string ou) + { + + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSharePointServer2010.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSharePointServer2010.cs index 0ae7dda3..f2cd57d3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSharePointServer2010.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSharePointServer2010.cs @@ -1,7 +1,46 @@ -using System; +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.IO; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Text; +using System.Management.Automation; +using System.Management.Automation.Runspaces; + +using WebsitePanel.Providers.Utils; +using WebsitePanel.Server.Utils; + +using WebsitePanel.Providers.SharePoint; + + namespace WebsitePanel.Providers.HostedSolution { public class HostedSharePointServer2010 : HostedSharePointServer @@ -12,5 +51,239 @@ namespace WebsitePanel.Providers.HostedSolution this.Wss3Registry32Key = @"SOFTWARE\Wow6432Node\Microsoft\Shared Tools\Web Server Extensions\14.0"; this.LanguagePacksPath = @"%commonprogramfiles%\microsoft shared\Web Server Extensions\14\HCCab\"; } + + #region PowerShell integration + private static RunspaceConfiguration runspaceConfiguration = null; + + internal virtual string SharepointSnapInName + { + get { return "Microsoft.SharePoint.Powershell"; } + } + + internal virtual Runspace OpenRunspace() + { + HostedSolutionLog.LogStart("OpenRunspace"); + + if (runspaceConfiguration == null) + { + runspaceConfiguration = RunspaceConfiguration.Create(); + PSSnapInException exception = null; + + PSSnapInInfo info = runspaceConfiguration.AddPSSnapIn(SharepointSnapInName, out exception); + HostedSolutionLog.LogInfo("Sharepoint snapin loaded"); + + if (exception != null) + { + HostedSolutionLog.LogWarning("SnapIn error", exception); + } + } + Runspace runSpace = RunspaceFactory.CreateRunspace(runspaceConfiguration); + // + runSpace.Open(); + // + runSpace.SessionStateProxy.SetVariable("ConfirmPreference", "none"); + HostedSolutionLog.LogEnd("OpenRunspace"); + return runSpace; + } + + internal void CloseRunspace(Runspace runspace) + { + try + { + if (runspace != null && runspace.RunspaceStateInfo.State == RunspaceState.Opened) + { + runspace.Close(); + } + } + catch (Exception ex) + { + HostedSolutionLog.LogError("Runspace error", ex); + } + } + + internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd) + { + return ExecuteShellCommand(runSpace, cmd, true); + } + + internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController) + { + object[] errors; + return ExecuteShellCommand(runSpace, cmd, useDomainController, out errors); + } + + internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd, out object[] errors) + { + return ExecuteShellCommand(runSpace, cmd, true, out errors); + } + + internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController, out object[] errors) + { + HostedSolutionLog.LogStart("ExecuteShellCommand"); + List errorList = new List(); + + HostedSolutionLog.DebugCommand(cmd); + Collection results = null; + // Create a pipeline + Pipeline pipeLine = runSpace.CreatePipeline(); + using (pipeLine) + { + // Add the command + pipeLine.Commands.Add(cmd); + // Execute the pipeline and save the objects returned. + results = pipeLine.Invoke(); + + // Log out any errors in the pipeline execution + // NOTE: These errors are NOT thrown as exceptions! + // Be sure to check this to ensure that no errors + // happened while executing the command. + if (pipeLine.Error != null && pipeLine.Error.Count > 0) + { + foreach (object item in pipeLine.Error.ReadToEnd()) + { + errorList.Add(item); + string errorMessage = string.Format("Invoke error: {0}", item); + HostedSolutionLog.LogWarning(errorMessage); + } + } + } + pipeLine = null; + errors = errorList.ToArray(); + HostedSolutionLog.LogEnd("ExecuteShellCommand"); + return results; + } + + /// + /// Returns the distinguished name of the object from the shell execution result + /// + /// + /// + internal string GetResultObjectDN(Collection result) + { + HostedSolutionLog.LogStart("GetResultObjectDN"); + if (result == null) + throw new ArgumentNullException("result", "Execution result is not specified"); + + if (result.Count < 1) + throw new ArgumentException("Execution result does not contain any object"); + + if (result.Count > 1) + throw new ArgumentException("Execution result contains more than one object"); + + PSMemberInfo info = result[0].Members["DistinguishedName"]; + if (info == null) + throw new ArgumentException("Execution result does not contain DistinguishedName property", "result"); + + string ret = info.Value.ToString(); + HostedSolutionLog.LogEnd("GetResultObjectDN"); + return ret; + } + + /// + /// Checks the object from the shell execution result. + /// + /// + /// Distinguished name of the object if object exists or null otherwise. + internal string CheckResultObjectDN(Collection result) + { + HostedSolutionLog.LogStart("CheckResultObjectDN"); + + if (result == null) + return null; + + if (result.Count < 1) + return null; + + PSMemberInfo info = result[0].Members["DistinguishedName"]; + if (info == null) + throw new ArgumentException("Execution result does not contain DistinguishedName property", "result"); + + string ret = info.Value.ToString(); + HostedSolutionLog.LogEnd("CheckResultObjectDN"); + return ret; + } + + /// + /// Returns the identity of the object from the shell execution result + /// + /// + /// + internal string GetResultObjectIdentity(Collection result) + { + HostedSolutionLog.LogStart("GetResultObjectIdentity"); + if (result == null) + throw new ArgumentNullException("result", "Execution result is not specified"); + + if (result.Count < 1) + throw new ArgumentException("Execution result is empty", "result"); + + if (result.Count > 1) + throw new ArgumentException("Execution result contains more than one object", "result"); + + PSMemberInfo info = result[0].Members["Identity"]; + if (info == null) + throw new ArgumentException("Execution result does not contain Identity property", "result"); + + string ret = info.Value.ToString(); + HostedSolutionLog.LogEnd("GetResultObjectIdentity"); + return ret; + } + + /// + /// Returns the identity of the PS object + /// + /// + /// + internal string GetPSObjectIdentity(PSObject obj) + { + HostedSolutionLog.LogStart("GetPSObjectIdentity"); + if (obj == null) + throw new ArgumentNullException("obj", "PSObject is not specified"); + + + PSMemberInfo info = obj.Members["Identity"]; + if (info == null) + throw new ArgumentException("PSObject does not contain Identity property", "obj"); + + string ret = info.Value.ToString(); + HostedSolutionLog.LogEnd("GetPSObjectIdentity"); + return ret; + } + + internal object GetPSObjectProperty(PSObject obj, string name) + { + return obj.Members[name].Value; + } + + #endregion + + public override void SetPeoplePickerOu(string site, string ou) + { + HostedSolutionLog.LogStart("SetPeoplePickerOu"); + HostedSolutionLog.LogInfo(" Site: {0}", site); + HostedSolutionLog.LogInfo(" OU: {0}", ou); + + Runspace runSpace = null; + try + { + List siteCollections = new List(); + + runSpace = OpenRunspace(); + Command cmd = new Command("Set-SPSite"); + cmd.Parameters.Add("Identity", site); + cmd.Parameters.Add("UserAccountDirectoryPath", ou); + ExecuteShellCommand(runSpace, cmd); + + } + finally + { + + CloseRunspace(runSpace); + } + + HostedSolutionLog.LogEnd("SetPeoplePickerOu"); + } + + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSharePointServerImpl.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSharePointServerImpl.cs index b88fe76f..5b0cf619 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSharePointServerImpl.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSharePointServerImpl.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -38,33 +38,48 @@ using Microsoft.SharePoint.Administration; namespace WebsitePanel.Providers.HostedSolution { - /// - /// Represents SharePoint management functionality implementation. - /// - public class HostedSharePointServerImpl : MarshalByRefObject - { - /// - /// Gets list of supported languages by this installation of SharePoint. - /// - /// List of supported languages + /// + /// Represents SharePoint management functionality implementation. + /// + public class HostedSharePointServerImpl : MarshalByRefObject + { + /// + /// Gets list of supported languages by this installation of SharePoint. + /// + /// List of supported languages public int[] GetSupportedLanguages(string languagePacksPath) - { - List languages = new List(); - string rootDirectory = FileUtils.EvaluateSystemVariables(languagePacksPath); - foreach (string dir in Directory.GetDirectories(rootDirectory)) - { - int languageId = 0; - if (Int32.TryParse(dir.Replace(rootDirectory, String.Empty), out languageId)) - { - languages.Add(languageId); - } - } + { + List languages = new List(); - return languages.ToArray(); - } + try + { + WindowsImpersonationContext wic = WindowsIdentity.GetCurrent().Impersonate(); - public long GetSiteCollectionSize(Uri root,string url) - { + try + { + SPLanguageCollection installedLanguages = SPRegionalSettings.GlobalInstalledLanguages; + + foreach (SPLanguage lang in installedLanguages) + { + languages.Add(lang.LCID); + } + + return languages.ToArray(); + + } + finally + { + wic.Undo(); + } + } + catch (Exception ex) + { + throw new InvalidOperationException("Failed to create site collection.", ex); + } + } + + public long GetSiteCollectionSize(Uri root, string url) + { WindowsImpersonationContext wic = null; try @@ -77,8 +92,8 @@ namespace WebsitePanel.Providers.HostedSolution site.RecalculateStorageUsed(); else throw new ApplicationException(string.Format("SiteCollection {0} does not exist", url)); - - return site.Usage.Storage; + + return site.Usage.Storage; } catch (Exception ex) { @@ -91,28 +106,28 @@ namespace WebsitePanel.Providers.HostedSolution wic.Undo(); } - } - + } + public SharePointSiteDiskSpace[] CalculateSiteCollectionDiskSpace(Uri root, string[] urls) - { + { WindowsImpersonationContext wic = null; - + try { wic = WindowsIdentity.GetCurrent().Impersonate(); - + SPWebApplication rootWebApplication = SPWebApplication.Lookup(root); List ret = new List(); foreach (string url in urls) { SharePointSiteDiskSpace siteDiskSpace = new SharePointSiteDiskSpace(); - rootWebApplication.Sites[url].RecalculateStorageUsed(); + rootWebApplication.Sites[url].RecalculateStorageUsed(); siteDiskSpace.Url = url; - siteDiskSpace.DiskSpace = (long)Math.Round( rootWebApplication.Sites[url].Usage.Storage / 1024.0 / 1024.0); + siteDiskSpace.DiskSpace = (long)Math.Round(rootWebApplication.Sites[url].Usage.Storage / 1024.0 / 1024.0); ret.Add(siteDiskSpace); } - return ret.ToArray(); + return ret.ToArray(); } catch (Exception ex) { @@ -125,97 +140,97 @@ namespace WebsitePanel.Providers.HostedSolution wic.Undo(); } - } - - + } + + /// - /// Gets list of SharePoint collections within root web application. - /// - /// Root web application uri. - /// List of SharePoint collections within root web application. - public SharePointSiteCollection[] GetSiteCollections(Uri rootWebApplicationUri) - { - try - { - WindowsImpersonationContext wic = WindowsIdentity.GetCurrent().Impersonate(); + /// Gets list of SharePoint collections within root web application. + /// + /// Root web application uri. + /// List of SharePoint collections within root web application. + public SharePointSiteCollection[] GetSiteCollections(Uri rootWebApplicationUri) + { + try + { + WindowsImpersonationContext wic = WindowsIdentity.GetCurrent().Impersonate(); - try - { - SPWebApplication rootWebApplication = SPWebApplication.Lookup(rootWebApplicationUri); + try + { + SPWebApplication rootWebApplication = SPWebApplication.Lookup(rootWebApplicationUri); - List siteCollections = new List(); + List siteCollections = new List(); - foreach(SPSite site in rootWebApplication.Sites) - { + foreach (SPSite site in rootWebApplication.Sites) + { SharePointSiteCollection loadedSiteCollection = new SharePointSiteCollection(); - FillSiteCollection(loadedSiteCollection, site); - siteCollections.Add(loadedSiteCollection); - } + FillSiteCollection(loadedSiteCollection, site); + siteCollections.Add(loadedSiteCollection); + } - return siteCollections.ToArray(); - } - finally - { - wic.Undo(); - } - } - catch (Exception ex) - { - throw new InvalidOperationException("Failed to create site collection.", ex); - } - } + return siteCollections.ToArray(); + } + finally + { + wic.Undo(); + } + } + catch (Exception ex) + { + throw new InvalidOperationException("Failed to create site collection.", ex); + } + } - /// - /// Gets SharePoint collection within root web application with given name. - /// - /// Root web application uri. - /// Url that uniquely identifies site collection to be loaded. - /// SharePoint collection within root web application with given name. - public SharePointSiteCollection GetSiteCollection(Uri rootWebApplicationUri, string url) - { - try - { - WindowsImpersonationContext wic = WindowsIdentity.GetCurrent().Impersonate(); + /// + /// Gets SharePoint collection within root web application with given name. + /// + /// Root web application uri. + /// Url that uniquely identifies site collection to be loaded. + /// SharePoint collection within root web application with given name. + public SharePointSiteCollection GetSiteCollection(Uri rootWebApplicationUri, string url) + { + try + { + WindowsImpersonationContext wic = WindowsIdentity.GetCurrent().Impersonate(); - try - { - SPWebApplication rootWebApplication = SPWebApplication.Lookup(rootWebApplicationUri); - string siteCollectionUrl = String.Format("{0}:{1}", url, rootWebApplicationUri.Port); - - SPSite site = rootWebApplication.Sites[siteCollectionUrl]; - if (site != null) - { - SharePointSiteCollection loadedSiteCollection = new SharePointSiteCollection(); - FillSiteCollection(loadedSiteCollection, site); - return loadedSiteCollection; - } - return null; - } - finally - { - wic.Undo(); - } - } - catch (Exception ex) - { - throw new InvalidOperationException("Failed to create site collection.", ex); - } - } + try + { + SPWebApplication rootWebApplication = SPWebApplication.Lookup(rootWebApplicationUri); + string siteCollectionUrl = String.Format("{0}:{1}", url, rootWebApplicationUri.Port); - private static void DeleteQuotaTemplate(string name) - { + SPSite site = rootWebApplication.Sites[siteCollectionUrl]; + if (site != null) + { + SharePointSiteCollection loadedSiteCollection = new SharePointSiteCollection(); + FillSiteCollection(loadedSiteCollection, site); + return loadedSiteCollection; + } + return null; + } + finally + { + wic.Undo(); + } + } + catch (Exception ex) + { + throw new InvalidOperationException("Failed to create site collection.", ex); + } + } + + private static void DeleteQuotaTemplate(string name) + { SPFarm farm = SPFarm.Local; SPWebService webService = farm.Services.GetValue(""); SPQuotaTemplateCollection quotaColl = webService.QuotaTemplates; - quotaColl.Delete(name); - } - + quotaColl.Delete(name); + } + public void UpdateQuotas(Uri root, string url, long maxStorage, long warningStorage) { WindowsImpersonationContext wic = null; - + try { wic = WindowsIdentity.GetCurrent().Impersonate(); @@ -230,10 +245,10 @@ namespace WebsitePanel.Providers.HostedSolution if (warningStorage != -1 && maxStorage != -1) - quota.StorageWarningLevel = Math.Min(warningStorage, maxStorage)*1024*1024; + quota.StorageWarningLevel = Math.Min(warningStorage, maxStorage) * 1024 * 1024; else quota.StorageWarningLevel = 0; - + rootWebApplication.GrantAccessToProcessIdentity(WindowsIdentity.GetCurrent().Name); rootWebApplication.Sites[url].Quota = quota; @@ -250,16 +265,17 @@ namespace WebsitePanel.Providers.HostedSolution } } - + /// - /// Creates site collection within predefined root web application. - /// - /// Root web application uri. - /// Information about site coolection to be created. - /// Is thrown in case requested operation fails for any reason. + /// Creates site collection within predefined root web application. + /// + /// Root web application uri. + /// Information about site coolection to be created. + /// Is thrown in case requested operation fails for any reason. public void CreateSiteCollection(Uri rootWebApplicationUri, SharePointSiteCollection siteCollection) { WindowsImpersonationContext wic = null; + HostedSolutionLog.LogStart("CreateSiteCollection"); try { @@ -267,27 +283,29 @@ namespace WebsitePanel.Providers.HostedSolution SPWebApplication rootWebApplication = SPWebApplication.Lookup(rootWebApplicationUri); string siteCollectionUrl = String.Format("{0}:{1}", siteCollection.Url, rootWebApplicationUri.Port); + HostedSolutionLog.DebugInfo("rootWebApplicationUri: {0}", rootWebApplicationUri); + HostedSolutionLog.DebugInfo("siteCollectionUrl: {0}", siteCollectionUrl); SPQuota spQuota; - + SPSite spSite = rootWebApplication.Sites.Add(siteCollectionUrl, siteCollection.Title, siteCollection.Description, - (uint) siteCollection.LocaleId, String.Empty, + (uint)siteCollection.LocaleId, String.Empty, siteCollection.OwnerLogin, siteCollection.OwnerName, siteCollection.OwnerEmail, null, null, null, true); try { - + spQuota = new SPQuota(); - + if (siteCollection.MaxSiteStorage != -1) spQuota.StorageMaximumLevel = siteCollection.MaxSiteStorage * 1024 * 1024; if (siteCollection.WarningStorage != -1 && siteCollection.MaxSiteStorage != -1) spQuota.StorageWarningLevel = Math.Min(siteCollection.WarningStorage, siteCollection.MaxSiteStorage) * 1024 * 1024; - + } catch (Exception) { @@ -298,7 +316,7 @@ namespace WebsitePanel.Providers.HostedSolution try { rootWebApplication.GrantAccessToProcessIdentity(WindowsIdentity.GetCurrent().Name); - spSite.Quota = spQuota; + spSite.Quota = spQuota; } catch (Exception) { @@ -308,8 +326,77 @@ namespace WebsitePanel.Providers.HostedSolution } rootWebApplication.Update(true); + + try + { + if (siteCollection.RootWebApplicationInteralIpAddress != string.Empty) + { + string dirPath = FileUtils.EvaluateSystemVariables(@"%windir%\system32\drivers\etc"); + string path = dirPath + "\\hosts"; + + if (FileUtils.FileExists(path)) + { + string content = FileUtils.GetFileTextContent(path); + content = content.Replace("\r\n", "\n").Replace("\n\r", "\n"); + string[] contentArr = content.Split(new char[] { '\n' }); + bool bRecordExist = false; + foreach (string s in contentArr) + { + if (s != string.Empty) + { + string IPAddr = string.Empty; + string hostName = string.Empty; + if (s[0] != '#') + { + bool bSeperator = false; + foreach (char c in s) + { + if ((c != ' ') & (c != '\t')) + { + if (bSeperator) + hostName += c; + else + IPAddr += c; + } + else + bSeperator = true; + } + + if (hostName.ToLower() == siteCollection.RootWebApplicationFQDN.ToLower()) + { + bRecordExist = true; + break; + } + + } + } + } + + if (!bRecordExist) + { + string outPut = string.Empty; + foreach (string o in contentArr) + { + if (o != string.Empty) + outPut += o + "\r\n"; + } + + outPut += siteCollection.RootWebApplicationInteralIpAddress + '\t' + siteCollection.RootWebApplicationFQDN + "\r\n"; + + FileUtils.UpdateFileTextContent(path, outPut); + } + + + } + } + } + catch (Exception ex) + { + HostedSolutionLog.LogError(ex); + + } } - catch(Exception ex) + catch (Exception ex) { HostedSolutionLog.LogError(ex); throw; @@ -318,207 +405,267 @@ namespace WebsitePanel.Providers.HostedSolution { if (wic != null) wic.Undo(); + + HostedSolutionLog.LogEnd("CreateSiteCollection"); } } - /// - /// Deletes site collection under given url. - /// - /// Root web application uri. - /// Url that uniquely identifies site collection to be deleted. - /// Is thrown in case requested operation fails for any reason. - public void DeleteSiteCollection(Uri rootWebApplicationUri, string url) - { - try - { - WindowsIdentity identity = WindowsIdentity.GetCurrent(); - WindowsImpersonationContext wic = identity.Impersonate(); + /// + /// Deletes site collection under given url. + /// + /// Root web application uri. + /// Url that uniquely identifies site collection to be deleted. + /// Is thrown in case requested operation fails for any reason. + public void DeleteSiteCollection(Uri rootWebApplicationUri, SharePointSiteCollection siteCollection) + { + try + { + WindowsIdentity identity = WindowsIdentity.GetCurrent(); + WindowsImpersonationContext wic = identity.Impersonate(); - try - { - SPWebApplication rootWebApplication = SPWebApplication.Lookup(rootWebApplicationUri); - string siteCollectionUrl = String.Format("{0}:{1}", url, rootWebApplicationUri.Port); + try + { + SPWebApplication rootWebApplication = SPWebApplication.Lookup(rootWebApplicationUri); + string siteCollectionUrl = String.Format("{0}:{1}", siteCollection.Url, rootWebApplicationUri.Port); - //string args = String.Format("-o deletesite -url {0}", siteCollectionUrl); - //string stsadm = @"c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE"; + //string args = String.Format("-o deletesite -url {0}", siteCollectionUrl); + //string stsadm = @"c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\STSADM.EXE"; - //// launch system process - //ProcessStartInfo startInfo = new ProcessStartInfo(stsadm, args); - //startInfo.WindowStyle = ProcessWindowStyle.Hidden; - //startInfo.RedirectStandardOutput = true; - //startInfo.UseShellExecute = false; - //Process proc = Process.Start(startInfo); + //// launch system process + //ProcessStartInfo startInfo = new ProcessStartInfo(stsadm, args); + //startInfo.WindowStyle = ProcessWindowStyle.Hidden; + //startInfo.RedirectStandardOutput = true; + //startInfo.UseShellExecute = false; + //Process proc = Process.Start(startInfo); - //// analyze results - //StreamReader reader = proc.StandardOutput; - //string output = reader.ReadToEnd(); - //int exitCode = proc.ExitCode; - //reader.Close(); + //// analyze results + //StreamReader reader = proc.StandardOutput; + //string output = reader.ReadToEnd(); + //int exitCode = proc.ExitCode; + //reader.Close(); - rootWebApplication.Sites.Delete(siteCollectionUrl, true); - rootWebApplication.Update(true); - } - finally - { - wic.Undo(); - } - } - catch(Exception ex) - { - throw new InvalidOperationException("Failed to delete site collection.", ex); - } - } + rootWebApplication.Sites.Delete(siteCollectionUrl, true); + rootWebApplication.Update(true); - /// - /// Backups site collection under give url. - /// - /// Root web application uri. - /// Url that uniquely identifies site collection to be deleted. - /// Resulting backup file name. - /// A value which shows whether created backup must be archived. - /// Custom temp path for backup - /// Full path to created backup. - /// Is thrown in case requested operation fails for any reason. - public string BackupSiteCollection(Uri rootWebApplicationUri, string url, string filename, bool zip, string tempPath) - { - try - { - WindowsImpersonationContext wic = WindowsIdentity.GetCurrent().Impersonate(); + try + { + if (siteCollection.RootWebApplicationInteralIpAddress != string.Empty) + { + string dirPath = FileUtils.EvaluateSystemVariables(@"%windir%\system32\drivers\etc"); + string path = dirPath + "\\hosts"; - try - { - SPWebApplication rootWebApplication = SPWebApplication.Lookup(rootWebApplicationUri); - string siteCollectionUrl = String.Format("{0}:{1}", url, rootWebApplicationUri.Port); + if (FileUtils.FileExists(path)) + { + string content = FileUtils.GetFileTextContent(path); + content = content.Replace("\r\n", "\n").Replace("\n\r", "\n"); + string[] contentArr = content.Split(new char[] { '\n' }); + string outPut = string.Empty; + foreach (string s in contentArr) + { + if (s != string.Empty) + { + string IPAddr = string.Empty; + string hostName = string.Empty; + if (s[0] != '#') + { + bool bSeperator = false; + foreach (char c in s) + { + if ((c != ' ') & (c != '\t')) + { + if (bSeperator) + hostName += c; + else + IPAddr += c; + } + else + bSeperator = true; + } - if (String.IsNullOrEmpty(tempPath)) - { - tempPath = Path.GetTempPath(); - } - string backupFileName = Path.Combine(tempPath, (zip ? StringUtils.CleanIdentifier(siteCollectionUrl) + ".bsh" : StringUtils.CleanIdentifier(filename))); - // Backup requested site. - rootWebApplication.Sites.Backup(siteCollectionUrl, backupFileName, true); + if (hostName.ToLower() != siteCollection.RootWebApplicationFQDN.ToLower()) + { + outPut += s + "\r\n"; + } - if (zip) - { - string zipFile = Path.Combine(tempPath, filename); - string zipRoot = Path.GetDirectoryName(backupFileName); + } + else + outPut += s + "\r\n"; + } + } - FileUtils.ZipFiles(zipFile, zipRoot, new string[] { Path.GetFileName(backupFileName) }); - FileUtils.DeleteFile(backupFileName); + FileUtils.UpdateFileTextContent(path, outPut); + } + } + } + catch (Exception ex) + { + HostedSolutionLog.LogError(ex); - backupFileName = zipFile; - } - return backupFileName; - } - finally - { - wic.Undo(); - } - } - catch(Exception ex) - { - throw new InvalidOperationException("Failed to backup site collection.", ex); - } - } - - /// - /// Restores site collection under given url from backup. - /// - /// Root web application uri. - /// Site collection to be restored. - /// Backup file name to restore from. - /// Is thrown in case requested operation fails for any reason. - public void RestoreSiteCollection(Uri rootWebApplicationUri, SharePointSiteCollection siteCollection, string filename) - { - string url = siteCollection.Url; - try - { - - WindowsImpersonationContext wic = WindowsIdentity.GetCurrent().Impersonate(); - - try - { - SPWebApplication rootWebApplication = SPWebApplication.Lookup(rootWebApplicationUri); - string siteCollectionUrl = String.Format("{0}:{1}", url, rootWebApplicationUri.Port); - - string tempPath = Path.GetTempPath(); - // Unzip uploaded files if required. - string expandedFile = filename; - if (Path.GetExtension(filename).ToLower() == ".zip") - { - // Unpack file. - expandedFile = FileUtils.UnzipFiles(filename, tempPath)[0]; - - // Delete zip archive. - FileUtils.DeleteFile(filename); - } - - // Delete existent site and restore new one. - rootWebApplication.Sites.Delete(siteCollectionUrl, false); - rootWebApplication.Sites.Restore(siteCollectionUrl, expandedFile, true, true); - - SPSite restoredSite = rootWebApplication.Sites[siteCollectionUrl]; - SPWeb web = restoredSite.OpenWeb(); - - SPUser owner = null; - try - { - owner = web.SiteUsers[siteCollection.OwnerLogin]; - } - catch - { - // Ignore this error. - } - if (owner == null) - { - web.SiteUsers.Add(siteCollection.OwnerLogin, siteCollection.OwnerEmail, siteCollection.OwnerName, String.Empty); - owner = web.SiteUsers[siteCollection.OwnerLogin]; - } - - restoredSite.Owner = owner; - web.Close(); - - rootWebApplication.Update(); - - // Delete expanded file. - FileUtils.DeleteFile(expandedFile); - } - finally - { - wic.Undo(); - } - } - catch(Exception ex) - { - throw new InvalidOperationException("Failed to restore site collection.", ex); - } - } + } - /// - /// Fills custom site collection with information from administration object. - /// - /// Custom site collection to fill. - /// Administration object. - private static void FillSiteCollection (SharePointSiteCollection customSiteCollection, SPSite site) - { - Uri siteUri = new Uri(site.Url); - string url = (siteUri.Port > 0) ? site.Url.Replace(String.Format(":{0}", siteUri.Port), String.Empty) : site.Url; + } + finally + { + wic.Undo(); + } + } + catch (Exception ex) + { + throw new InvalidOperationException("Failed to delete site collection.", ex); + } + } - customSiteCollection.Url = url; - customSiteCollection.OwnerLogin = site.Owner.LoginName; - customSiteCollection.OwnerName = site.Owner.Name; - customSiteCollection.OwnerEmail = site.Owner.Email; - customSiteCollection.LocaleId = site.RootWeb.Locale.LCID; - customSiteCollection.Title = site.RootWeb.Title; - customSiteCollection.Description = site.RootWeb.Description; - customSiteCollection.Bandwidth = site.Usage.Bandwidth; - customSiteCollection.Diskspace = site.Usage.Storage; - customSiteCollection.MaxSiteStorage = site.Quota.StorageMaximumLevel; - customSiteCollection.WarningStorage = site.Quota.StorageWarningLevel; - } - } + /// + /// Backups site collection under give url. + /// + /// Root web application uri. + /// Url that uniquely identifies site collection to be deleted. + /// Resulting backup file name. + /// A value which shows whether created backup must be archived. + /// Custom temp path for backup + /// Full path to created backup. + /// Is thrown in case requested operation fails for any reason. + public string BackupSiteCollection(Uri rootWebApplicationUri, string url, string filename, bool zip, string tempPath) + { + try + { + WindowsImpersonationContext wic = WindowsIdentity.GetCurrent().Impersonate(); + + try + { + SPWebApplication rootWebApplication = SPWebApplication.Lookup(rootWebApplicationUri); + string siteCollectionUrl = String.Format("{0}:{1}", url, rootWebApplicationUri.Port); + + if (String.IsNullOrEmpty(tempPath)) + { + tempPath = Path.GetTempPath(); + } + string backupFileName = Path.Combine(tempPath, (zip ? StringUtils.CleanIdentifier(siteCollectionUrl) + ".bsh" : StringUtils.CleanIdentifier(filename))); + // Backup requested site. + rootWebApplication.Sites.Backup(siteCollectionUrl, backupFileName, true); + + if (zip) + { + string zipFile = Path.Combine(tempPath, filename); + string zipRoot = Path.GetDirectoryName(backupFileName); + + FileUtils.ZipFiles(zipFile, zipRoot, new string[] { Path.GetFileName(backupFileName) }); + FileUtils.DeleteFile(backupFileName); + + backupFileName = zipFile; + } + return backupFileName; + } + finally + { + wic.Undo(); + } + } + catch (Exception ex) + { + throw new InvalidOperationException("Failed to backup site collection.", ex); + } + } + + /// + /// Restores site collection under given url from backup. + /// + /// Root web application uri. + /// Site collection to be restored. + /// Backup file name to restore from. + /// Is thrown in case requested operation fails for any reason. + public void RestoreSiteCollection(Uri rootWebApplicationUri, SharePointSiteCollection siteCollection, string filename) + { + string url = siteCollection.Url; + try + { + + WindowsImpersonationContext wic = WindowsIdentity.GetCurrent().Impersonate(); + + try + { + SPWebApplication rootWebApplication = SPWebApplication.Lookup(rootWebApplicationUri); + string siteCollectionUrl = String.Format("{0}:{1}", url, rootWebApplicationUri.Port); + + string tempPath = Path.GetTempPath(); + // Unzip uploaded files if required. + string expandedFile = filename; + if (Path.GetExtension(filename).ToLower() == ".zip") + { + // Unpack file. + expandedFile = FileUtils.UnzipFiles(filename, tempPath)[0]; + + // Delete zip archive. + FileUtils.DeleteFile(filename); + } + + // Delete existent site and restore new one. + rootWebApplication.Sites.Delete(siteCollectionUrl, false); + rootWebApplication.Sites.Restore(siteCollectionUrl, expandedFile, true, true); + + SPSite restoredSite = rootWebApplication.Sites[siteCollectionUrl]; + SPWeb web = restoredSite.OpenWeb(); + + SPUser owner = null; + try + { + owner = web.SiteUsers[siteCollection.OwnerLogin]; + } + catch + { + // Ignore this error. + } + if (owner == null) + { + web.SiteUsers.Add(siteCollection.OwnerLogin, siteCollection.OwnerEmail, siteCollection.OwnerName, String.Empty); + owner = web.SiteUsers[siteCollection.OwnerLogin]; + } + + restoredSite.Owner = owner; + web.Close(); + + rootWebApplication.Update(); + + // Delete expanded file. + FileUtils.DeleteFile(expandedFile); + } + finally + { + wic.Undo(); + } + } + catch (Exception ex) + { + throw new InvalidOperationException("Failed to restore site collection.", ex); + } + } + + + /// + /// Fills custom site collection with information from administration object. + /// + /// Custom site collection to fill. + /// Administration object. + private static void FillSiteCollection(SharePointSiteCollection customSiteCollection, SPSite site) + { + Uri siteUri = new Uri(site.Url); + string url = (siteUri.Port > 0) ? site.Url.Replace(String.Format(":{0}", siteUri.Port), String.Empty) : site.Url; + + customSiteCollection.Url = url; + customSiteCollection.OwnerLogin = site.Owner.LoginName; + customSiteCollection.OwnerName = site.Owner.Name; + customSiteCollection.OwnerEmail = site.Owner.Email; + customSiteCollection.LocaleId = site.RootWeb.Locale.LCID; + customSiteCollection.Title = site.RootWeb.Title; + customSiteCollection.Description = site.RootWeb.Description; + customSiteCollection.Bandwidth = site.Usage.Bandwidth; + customSiteCollection.Diskspace = site.Usage.Storage; + customSiteCollection.MaxSiteStorage = site.Quota.StorageMaximumLevel; + customSiteCollection.WarningStorage = site.Quota.StorageWarningLevel; + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSolutionLog.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSolutionLog.cs index ab972694..4ad0ce27 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSolutionLog.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/HostedSolutionLog.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -29,6 +29,8 @@ using System; using WebsitePanel.Providers.Common; using WebsitePanel.Server.Utils; +using System.Text; +using System.Management.Automation.Runspaces; namespace WebsitePanel.Providers.HostedSolution { @@ -121,6 +123,22 @@ namespace WebsitePanel.Providers.HostedSolution res.IsSuccess = true; return res; } + + internal static void DebugCommand(Command cmd) + { + StringBuilder sb = new StringBuilder(cmd.CommandText); + foreach (CommandParameter parameter in cmd.Parameters) + { + string formatString = " -{0} {1}"; + if (parameter.Value is string) + formatString = " -{0} '{1}'"; + else if (parameter.Value is bool) + formatString = " -{0} ${1}"; + sb.AppendFormat(formatString, parameter.Name, parameter.Value); + } + Log.WriteInfo("{0} {1}", LogPrefix, sb.ToString()); + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Lync2010.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Lync2010.cs new file mode 100644 index 00000000..21887292 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/Lync2010.cs @@ -0,0 +1,1248 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.IO; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Text; +using System.Reflection; +using System.Globalization; +using System.DirectoryServices; + +using Microsoft.Win32; + +using WebsitePanel.Providers; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers.Utils; +using WebsitePanel.Server.Utils; + +using System.Management; +using System.Management.Automation; +using System.Management.Automation.Runspaces; + +using Microsoft.Rtc.Management.Hosted; +using Microsoft.Rtc.Management.WritableConfig.Settings.Edge; +using Microsoft.Rtc.Management.WritableConfig.Settings.SimpleUrl; + + +namespace WebsitePanel.Providers.HostedSolution +{ + public class Lync2010 : HostingServiceProviderBase, ILyncServer + { + + #region Static constructor + static Lync2010() + { + LyncRegistryPath = "SOFTWARE\\Microsoft\\Real-Time Communications"; + } + + internal static string LyncRegistryPath + { + get; + set; + } + + #endregion + + + #region Properties + + /// + /// Pool FQDN + /// + private string PoolFQDN + { + get { return ProviderSettings[LyncConstants.PoolFQDN]; } + } + + private string SimpleUrlRoot + { + get { return ProviderSettings[LyncConstants.SimpleUrlRoot]; } + } + + internal string PrimaryDomainController + { + get { return ProviderSettings["PrimaryDomainController"]; } + } + + private string RootOU + { + get { return ProviderSettings["RootOU"]; } + } + + private string RootDomain + { + get { return ServerSettings.ADRootDomain; } + } + + + #endregion + + #region ILyncServer implementation + + public string CreateOrganization(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice) + { + return CreateOrganizationInternal(organizationId, sipDomain, enableConferencing, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice); + } + + public bool DeleteOrganization(string organizationId, string sipDomain) + { + return DeleteOrganizationInternal(organizationId, sipDomain); + } + + public bool CreateUser(string organizationId, string userUpn, LyncUserPlan plan) + { + return CreateUserInternal(organizationId, userUpn, plan); + } + + public LyncUser GetLyncUserGeneralSettings(string organizationId, string userUpn) + { + return GetLyncUserGeneralSettingsInternal(organizationId, userUpn); + } + + public bool SetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan) + { + return SetLyncUserPlanInternal(organizationId, userUpn, plan, null); + } + + public bool DeleteUser(string userUpn) + { + return DeleteUserInternal(userUpn); + } + + public LyncFederationDomain[] GetFederationDomains(string organizationId) + { + return GetFederationDomainsInternal(organizationId); + } + + public bool AddFederationDomain(string organizationId, string domainName, string proxyFqdn) + { + return AddFederationDomainInternal(organizationId, domainName, proxyFqdn); + } + + public bool RemoveFederationDomain(string organizationId, string domainName) + { + return RemoveFederationDomainInternal(organizationId, domainName); + } + + public void ReloadConfiguration() + { + ReloadConfigurationInternal(); + } + + #endregion + + #region organization + private string CreateOrganizationInternal(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice) + { + HostedSolutionLog.LogStart("CreateOrganizationInternal"); + HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId); + HostedSolutionLog.DebugInfo("sipDomain: {0}", sipDomain); + + string TenantId = string.Empty; + + LyncTransaction transaction = StartTransaction(); + + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + // create sip domain + Command cmd = new Command("New-CsSipDomain"); + cmd.Parameters.Add("Identity", sipDomain); + ExecuteShellCommand(runSpace, cmd, false); + + transaction.RegisterNewSipDomain(sipDomain); + + //set the msRTCSIP-Domains, TenantID, ObjectID + Guid id = Guid.NewGuid(); + + string path = AddADPrefix(GetOrganizationPath(organizationId)); + DirectoryEntry ou = ActiveDirectoryUtils.GetADObject(path); + ActiveDirectoryUtils.SetADObjectPropertyValue(ou, "msRTCSIP-Domains", sipDomain); + ActiveDirectoryUtils.SetADObjectPropertyValue(ou, "msRTCSIP-TenantId", id); + ActiveDirectoryUtils.SetADObjectPropertyValue(ou, "msRTCSIP-ObjectId", id); + ou.CommitChanges(); + + //Create simpleurls + CreateSimpleUrl(runSpace, sipDomain, id); + transaction.RegisterNewSimpleUrl(sipDomain, id.ToString()); + + //create conferencing policy + cmd = new Command("New-CsConferencingPolicy"); + cmd.Parameters.Add("Identity", organizationId); + cmd.Parameters.Add("MaxMeetingSize", maxConferenceSize); + cmd.Parameters.Add("AllowIPVideo", enableConferencingVideo); + ExecuteShellCommand(runSpace, cmd, false); + transaction.RegisterNewConferencingPolicy(organizationId); + + //create external access policy + cmd = new Command("New-CsExternalAccessPolicy"); + cmd.Parameters.Add("Identity", organizationId); + cmd.Parameters.Add("EnableFederationAccess", true); + cmd.Parameters.Add("EnableOutsideAccess", true); + cmd.Parameters.Add("EnablePublicCloudAccess", false); + cmd.Parameters.Add("EnablePublicCloudAudioVideoAccess", false); + ExecuteShellCommand(runSpace, cmd, false); + transaction.RegisterNewCsExternalAccessPolicy(organizationId); + + //Enable for federation + AllowList allowList = new AllowList(); + DomainPattern domain = new DomainPattern(sipDomain); + allowList.AllowedDomain.Add(domain); + + cmd = new Command("Set-CsTenantFederationConfiguration"); + cmd.Parameters.Add("Tenant", id); + cmd.Parameters.Add("AllowFederatedUsers", true); + cmd.Parameters.Add("AllowedDomains", allowList); + ExecuteShellCommand(runSpace, cmd, false); + + //create mobility policy + cmd = new Command("New-CsMobilityPolicy"); + cmd.Parameters.Add("Identity", organizationId + " EnableOutSideVoice"); + cmd.Parameters.Add("EnableMobility", true); + cmd.Parameters.Add("EnableOutsideVoice", true); + ExecuteShellCommand(runSpace, cmd, false); + transaction.RegisterNewCsMobilityPolicy(organizationId + " EnableOutSideVoice"); + + cmd = new Command("New-CsMobilityPolicy"); + cmd.Parameters.Add("Identity", organizationId + " DisableOutSideVoice"); + cmd.Parameters.Add("EnableMobility", true); + cmd.Parameters.Add("EnableOutsideVoice", false); + ExecuteShellCommand(runSpace, cmd, false); + transaction.RegisterNewCsMobilityPolicy(organizationId + " DisableOutSideVoice"); + + cmd = new Command("Invoke-CsManagementStoreReplication"); + ExecuteShellCommand(runSpace, cmd, false); + + + TenantId = id.ToString(); + } + catch (Exception ex) + { + HostedSolutionLog.LogError("CreateOrganizationInternal", ex); + RollbackTransaction(transaction); + throw; + } + finally + { + + CloseRunspace(runSpace); + } + + HostedSolutionLog.LogEnd("CreateOrganizationInternal"); + + return TenantId; + } + + + + private bool DeleteOrganizationInternal(string organizationId, string sipDomain) + { + HostedSolutionLog.LogStart("DeleteOrganizationInternal"); + HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId); + HostedSolutionLog.DebugInfo("sipDomain: {0}", sipDomain); + + bool ret = true; + + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + Command cmd = new Command("Get-CsTenant"); + cmd.Parameters.Add("Identity", GetOrganizationPath(organizationId)); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + Guid tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId"); + + // create sip domain + DeleteSipDomain(runSpace, sipDomain); + + //clear the msRTCSIP-Domains, TenantID, ObjectID + string path = AddADPrefix(GetOrganizationPath(organizationId)); + DirectoryEntry ou = ActiveDirectoryUtils.GetADObject(path); + ActiveDirectoryUtils.ClearADObjectPropertyValue(ou, "msRTCSIP-Domains"); + ActiveDirectoryUtils.ClearADObjectPropertyValue(ou, "msRTCSIP-TenantId"); + ActiveDirectoryUtils.ClearADObjectPropertyValue(ou, "msRTCSIP-ObjectId"); + ou.CommitChanges(); + + try + { + DeleteConferencingPolicy(runSpace, organizationId); + } + catch (Exception) + { + } + + try + { + DeleteExternalAccessPolicy(runSpace, organizationId); + } + catch (Exception) + { + } + + try + { + DeleteMobilityPolicy(runSpace, organizationId + " EnableOutSideVoice"); + } + catch (Exception) + { + } + + try + { + DeleteMobilityPolicy(runSpace, organizationId + " DisableOutSideVoice"); + } + catch (Exception) + { + } + + try + { + DeleteSimpleUrl(runSpace, sipDomain, tenantId); + } + catch (Exception) + { + } + } + + cmd = new Command("Invoke-CsManagementStoreReplication"); + ExecuteShellCommand(runSpace, cmd, false); + + } + catch (Exception ex) + { + ret = false; + HostedSolutionLog.LogError("DeleteOrganizationInternal", ex); + throw; + } + finally + { + + CloseRunspace(runSpace); + } + HostedSolutionLog.LogEnd("DeleteOrganizationInternal"); + return ret; + } + #endregion + + #region Users + private bool CreateUserInternal(string organizationId, string userUpn, LyncUserPlan plan) + { + HostedSolutionLog.LogStart("CreateUserInternal"); + HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId); + HostedSolutionLog.DebugInfo("userUpn: {0}", userUpn); + + bool ret = true; + Guid tenantId = Guid.Empty; + + LyncTransaction transaction = StartTransaction(); + + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + Command cmd = new Command("Get-CsTenant"); + cmd.Parameters.Add("Identity", GetOrganizationPath(organizationId)); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId"); + + //enable for lync + cmd = new Command("Enable-CsUser"); + cmd.Parameters.Add("Identity", userUpn); + cmd.Parameters.Add("RegistrarPool", PoolFQDN); + cmd.Parameters.Add("SipAddressType", "UserPrincipalName"); + ExecuteShellCommand(runSpace, cmd); + + transaction.RegisterNewCsUser(userUpn); + + //set groupingID and tenantID + cmd = new Command("Get-CsAdUser"); + cmd.Parameters.Add("Identity", userUpn); + result = ExecuteShellCommand(runSpace, cmd); + + + string path = AddADPrefix(GetResultObjectDN(result)); + DirectoryEntry user = ActiveDirectoryUtils.GetADObject(path); + ActiveDirectoryUtils.SetADObjectPropertyValue(user, "msRTCSIP-GroupingID", tenantId); + ActiveDirectoryUtils.SetADObjectPropertyValue(user, "msRTCSIP-TenantId", tenantId); + + string[] tmp = userUpn.Split('@'); + if (tmp.Length > 0) + { + string Url = SimpleUrlRoot + tmp[1]; + ActiveDirectoryUtils.SetADObjectPropertyValue(user, "msRTCSIP-BaseSimpleUrl", Url); + } + user.CommitChanges(); + + //set-plan + SetLyncUserPlanInternal(organizationId, userUpn, plan, runSpace); + + //initiate addressbook generation + cmd = new Command("Update-CsAddressBook"); + ExecuteShellCommand(runSpace, cmd, false); + + //initiate user database replication + cmd = new Command("Update-CsUserDatabase"); + ExecuteShellCommand(runSpace, cmd, false); + } + else + { + ret = false; + HostedSolutionLog.LogError("Failed to retrieve tenantID", null); + } + } + catch (Exception ex) + { + ret = false; + HostedSolutionLog.LogError("CreateUserInternal", ex); + RollbackTransaction(transaction); + throw; + } + finally + { + + CloseRunspace(runSpace); + } + HostedSolutionLog.LogEnd("CreateUserInternal"); + return ret; + } + + private LyncUser GetLyncUserGeneralSettingsInternal(string organizationId, string userUpn) + { + HostedSolutionLog.LogStart("GetLyncUserGeneralSettingsInternal"); + HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId); + HostedSolutionLog.DebugInfo("userUpn: {0}", userUpn); + + LyncUser lyncUser = new LyncUser(); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + Command cmd = new Command("Get-CsUser"); + cmd.Parameters.Add("Identity", userUpn); + Collection result = ExecuteShellCommand(runSpace, cmd); + PSObject user = result[0]; + + lyncUser.DisplayName = (string)GetPSObjectProperty(user, "DisplayName"); + lyncUser.PrimaryUri = (string)GetPSObjectProperty(user, "SipAddress"); + lyncUser.LineUri = (string)GetPSObjectProperty(user, "LineURI"); + } + catch (Exception ex) + { + HostedSolutionLog.LogError("GetLyncUserGeneralSettingsInternal", ex); + throw; + } + finally + { + CloseRunspace(runSpace); + } + HostedSolutionLog.LogEnd("GetLyncUserGeneralSettingsInternal"); + return lyncUser; + } + + + private bool SetLyncUserPlanInternal(string organizationId, string userUpn, LyncUserPlan plan, Runspace runSpace) + { + HostedSolutionLog.LogStart("SetLyncUserPlanInternal"); + HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId); + HostedSolutionLog.DebugInfo("userUpn: {0}", userUpn); + bool ret = true; + bool bCloseRunSpace = false; + + try + { + if (runSpace == null) + { + runSpace = OpenRunspace(); + bCloseRunSpace = true; + } + + //CsExternalAccessPolicy + Command cmd = new Command("Grant-CsExternalAccessPolicy"); + cmd.Parameters.Add("Identity", userUpn); + cmd.Parameters.Add("PolicyName", plan.Federation ? organizationId : null); + ExecuteShellCommand(runSpace, cmd); + + //CsConferencingPolicy + cmd = new Command("Grant-CsConferencingPolicy"); + cmd.Parameters.Add("Identity", userUpn); + cmd.Parameters.Add("PolicyName", plan.Federation ? organizationId : null); + ExecuteShellCommand(runSpace, cmd); + + //CsMobilityPolicy + cmd = new Command("Grant-CsMobilityPolicy"); + cmd.Parameters.Add("Identity", userUpn); + if (plan.Mobility) + cmd.Parameters.Add("PolicyName", plan.MobilityEnableOutsideVoice ? organizationId + " EnableOutSideVoice" : organizationId + " DisableOutSideVoice"); + else + cmd.Parameters.Add("PolicyName", null); + ExecuteShellCommand(runSpace, cmd); + + //initiate user database replication + cmd = new Command("Update-CsUserDatabase"); + ExecuteShellCommand(runSpace, cmd, false); + } + catch (Exception ex) + { + ret = false; + HostedSolutionLog.LogError("SetLyncUserPlanInternal", ex); + throw; + } + finally + { + + if (bCloseRunSpace) CloseRunspace(runSpace); + } + HostedSolutionLog.LogEnd("SetLyncUserPlanInternal"); + return ret; + } + + + private bool DeleteUserInternal(string userUpn) + { + HostedSolutionLog.LogStart("DeleteUserInternal"); + HostedSolutionLog.DebugInfo("userUpn: {0}", userUpn); + + bool ret = true; + + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + //Delete User + DeleteUser(runSpace, userUpn); + + //Clear groupingID and tenantID + Command cmd = new Command("Get-CsAdUser"); + cmd.Parameters.Add("Identity", userUpn); + Collection result = ExecuteShellCommand(runSpace, cmd); + + string path = AddADPrefix(GetResultObjectDN(result)); + DirectoryEntry user = ActiveDirectoryUtils.GetADObject(path); + ActiveDirectoryUtils.ClearADObjectPropertyValue(user, "msRTCSIP-GroupingID"); + ActiveDirectoryUtils.ClearADObjectPropertyValue(user, "msRTCSIP-TenantId"); + ActiveDirectoryUtils.ClearADObjectPropertyValue(user, "msRTCSIP-BaseSimpleUrl"); + user.CommitChanges(); + + //initiate addressbook generation + cmd = new Command("Update-CsAddressBook"); + ExecuteShellCommand(runSpace, cmd, false); + + //initiate user database replication + cmd = new Command("Update-CsUserDatabase"); + ExecuteShellCommand(runSpace, cmd, false); + } + catch (Exception ex) + { + ret = false; + HostedSolutionLog.LogError("DeleteUserInternal", ex); + throw; + } + finally + { + + CloseRunspace(runSpace); + } + HostedSolutionLog.LogEnd("DeleteUserInternal"); + return ret; + } + + internal void DeleteUser(Runspace runSpace, string userUpn) + { + HostedSolutionLog.LogStart("DeleteUser"); + HostedSolutionLog.DebugInfo("userUpn : {0}", userUpn); + Command cmd = new Command("Disable-CsUser"); + cmd.Parameters.Add("Identity", userUpn); + cmd.Parameters.Add("Confirm", false); + ExecuteShellCommand(runSpace, cmd, false); + HostedSolutionLog.LogEnd("DeleteUser"); + } + + #endregion + + #region SipDomains + internal void DeleteSipDomain(Runspace runSpace, string id) + { + HostedSolutionLog.LogStart("DeleteSipDomain"); + HostedSolutionLog.DebugInfo("SipDomain : {0}", id); + Command cmd = new Command("Remove-CsSipDomain"); + cmd.Parameters.Add("Identity", id); + cmd.Parameters.Add("Confirm", false); + cmd.Parameters.Add("Force", true); + ExecuteShellCommand(runSpace, cmd, false); + HostedSolutionLog.LogEnd("DeleteSipDomain"); + } + + private void CreateSimpleUrl(Runspace runSpace, string sipDomain, Guid id) + { + //Create the simpleUrlEntry + Command cmd = new Command("Get-CsSipDomain"); + Collection sipDomains = ExecuteShellCommand(runSpace, cmd, false); + + IList SimpleUrls = new List(); + + + foreach (PSObject domain in sipDomains) + { + string d = (string)GetPSObjectProperty(domain, "Name"); + string Url = SimpleUrlRoot + d; + + + //Create the simpleUrlEntry + cmd = new Command("New-CsSimpleUrlEntry"); + cmd.Parameters.Add("Url", Url); + Collection simpleUrlEntry = ExecuteShellCommand(runSpace, cmd, false); + + //Create the simpleUrl + cmd = new Command("New-CsSimpleUrl"); + cmd.Parameters.Add("Component", "meet"); + cmd.Parameters.Add("Domain", d); + cmd.Parameters.Add("SimpleUrl", simpleUrlEntry[0]); + cmd.Parameters.Add("ActiveUrl", Url); + Collection simpleUrl = ExecuteShellCommand(runSpace, cmd, false); + + SimpleUrls.Add(simpleUrl[0]); + } + + Hashtable properties = new Hashtable(); + properties.Add("Add", SimpleUrls); + + //PSListModifier + cmd = new Command("Set-CsSimpleUrlConfiguration"); + cmd.Parameters.Add("Identity", "Global"); + cmd.Parameters.Add("Tenant", id); + cmd.Parameters.Add("SimpleUrl", SimpleUrls); + ExecuteShellCommand(runSpace, cmd, false); + } + + + internal void DeleteSimpleUrl(Runspace runSpace, string sipDomain, Guid id) + { + /* + //build the url + string Url = SimpleUrlRoot + sipDomain; + + //Create the simpleUrlEntry + Command cmd = new Command("New-CsSimpleUrlEntry"); + cmd.Parameters.Add("Url", Url); + Collection simpleUrlEntry = ExecuteShellCommand(runSpace, cmd, false); + + //Create the simpleUrl + cmd = new Command("New-CsSimpleUrl"); + cmd.Parameters.Add("Component", "meet"); + cmd.Parameters.Add("Domain", sipDomain); + cmd.Parameters.Add("SimpleUrl", simpleUrlEntry[0]); + cmd.Parameters.Add("ActiveUrl", Url); + Collection simpleUrl = ExecuteShellCommand(runSpace, cmd, false); + + //PSListModifier + + Hashtable properties = new Hashtable(); + properties.Add("Remove", simpleUrl[0]); + + cmd = new Command("Set-CsSimpleUrlConfiguration"); + cmd.Parameters.Add("Identity", "Global"); + cmd.Parameters.Add("Tenant", id); + cmd.Parameters.Add("SimpleUrl", properties); + ExecuteShellCommand(runSpace, cmd, false); + */ + } + + + #endregion + + #region Policies + + internal void DeleteConferencingPolicy(Runspace runSpace, string policyName) + { + HostedSolutionLog.LogStart("DeleteConferencingPolicy"); + HostedSolutionLog.DebugInfo("policyName : {0}", policyName); + Command cmd = new Command("Remove-CsConferencingPolicy"); + cmd.Parameters.Add("Identity", policyName); + cmd.Parameters.Add("Confirm", false); + cmd.Parameters.Add("Force", true); + ExecuteShellCommand(runSpace, cmd, false); + HostedSolutionLog.LogEnd("DeleteConferencingPolicy"); + } + + internal void DeleteExternalAccessPolicy(Runspace runSpace, string policyName) + { + HostedSolutionLog.LogStart("DeleteExternalAccessPolicy"); + HostedSolutionLog.DebugInfo("policyName : {0}", policyName); + Command cmd = new Command("Remove-CsExternalAccessPolicy"); + cmd.Parameters.Add("Identity", policyName); + cmd.Parameters.Add("Confirm", false); + cmd.Parameters.Add("Force", true); + ExecuteShellCommand(runSpace, cmd, false); + HostedSolutionLog.LogEnd("DeleteExternalAccessPolicy"); + } + + internal void DeleteMobilityPolicy(Runspace runSpace, string policyName) + { + HostedSolutionLog.LogStart("DeleteMobilityPolicy"); + HostedSolutionLog.DebugInfo("policyName : {0}", policyName); + Command cmd = new Command("Remove-CsMobilityPolicy"); + cmd.Parameters.Add("Identity", policyName); + cmd.Parameters.Add("Confirm", false); + cmd.Parameters.Add("Force", true); + ExecuteShellCommand(runSpace, cmd, false); + HostedSolutionLog.LogEnd("DeleteMobilityPolicy"); + } + + #endregion + + #region Sytsem Related Methods + private void ReloadConfigurationInternal() + { + HostedSolutionLog.LogStart("ReloadConfigurationInternal"); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + Command cmd = new Command("Enable-CsComputer"); + ExecuteShellCommand(runSpace, cmd, false); + } + catch (Exception ex) + { + HostedSolutionLog.LogError("ReloadConfigurationInternal", ex); + throw; + } + finally + { + + CloseRunspace(runSpace); + } + HostedSolutionLog.LogEnd("ReloadConfigurationInternal"); + } + + + #endregion + + #region Federation Domains + private LyncFederationDomain[] GetFederationDomainsInternal(string organizationId) + { + + HostedSolutionLog.LogStart("GetFederationDomainsInternal"); + HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId); + + + LyncFederationDomain[] domains = null; + + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + Guid tenantId = Guid.Empty; + + domains = GetFederationDomainsInternal(runSpace, organizationId, ref tenantId); + + } + catch (Exception ex) + { + HostedSolutionLog.LogError("GetFederationDomainsInternal", ex); + throw; + } + finally + { + + CloseRunspace(runSpace); + } + HostedSolutionLog.LogEnd("GetFederationDomainsInternal"); + + return domains; + } + + private LyncFederationDomain[] GetFederationDomainsInternal(Runspace runSpace, string organizationId, ref Guid tenantId) + { + //Get TenantID + List domains = null; + Command cmd = new Command("Get-CsTenant"); + cmd.Parameters.Add("Identity", GetOrganizationPath(organizationId)); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId"); + + //Get-CSTenantFederationConfiguration (AllowedDomains) + cmd = new Command("Get-CsTenantFederationConfiguration"); + cmd.Parameters.Add("Tenant", tenantId); + result = ExecuteShellCommand(runSpace, cmd, false); + + if ((result != null) && (result.Count > 0)) + { + domains = new List(); + + if (GetPSObjectProperty(result[0], "AllowedDomains").GetType().ToString() == "Microsoft.Rtc.Management.WritableConfig.Settings.Edge.AllowList") + { + AllowList allowList = (AllowList)GetPSObjectProperty(result[0], "AllowedDomains"); + + foreach (DomainPattern d in allowList.AllowedDomain) + { + LyncFederationDomain domain = new LyncFederationDomain(); + domain.DomainName = d.Domain.ToString(); + domains.Add(domain); + } + } + } + } + + if (domains != null) + return domains.ToArray(); + else + return null; + } + + + private bool AddFederationDomainInternal(string organizationId, string domainName, string proxyFqdn) + { + HostedSolutionLog.LogStart("AddFederationDomainInternal"); + HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId); + HostedSolutionLog.DebugInfo("domainName: {0}", domainName); + + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + Guid tenantId = Guid.Empty; + Command cmd = new Command("Get-CsTenant"); + cmd.Parameters.Add("Identity", GetOrganizationPath(organizationId)); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId"); + + //Get-CSTenantFederationConfiguration (AllowedDomains) + cmd = new Command("Get-CsTenantFederationConfiguration"); + cmd.Parameters.Add("Tenant", tenantId); + result = ExecuteShellCommand(runSpace, cmd, false); + + if ((result != null) && (result.Count > 0)) + { + AllowList allowList = null; + + if (GetPSObjectProperty(result[0], "AllowedDomains").GetType().ToString() == "Microsoft.Rtc.Management.WritableConfig.Settings.Edge.AllowList") + { + allowList = (AllowList)GetPSObjectProperty(result[0], "AllowedDomains"); + DomainPattern domain = new DomainPattern(domainName); + allowList.AllowedDomain.Add(domain); + } + else + { + allowList = new AllowList(); + DomainPattern domain = new DomainPattern(domainName); + allowList.AllowedDomain.Add(domain); + } + + cmd = new Command("Set-CsTenantFederationConfiguration"); + cmd.Parameters.Add("Tenant", tenantId); + cmd.Parameters.Add("AllowedDomains", allowList); + ExecuteShellCommand(runSpace, cmd, false); + } + } + } + catch (Exception ex) + { + HostedSolutionLog.LogError("AddFederationDomainInternal", ex); + throw; + } + finally + { + + CloseRunspace(runSpace); + } + HostedSolutionLog.LogEnd("AddFederationDomainInternal"); + + return true; + } + + private bool RemoveFederationDomainInternal(string organizationId, string domainName) + { + HostedSolutionLog.LogStart("RemoveFederationDomainInternal"); + HostedSolutionLog.DebugInfo("organizationId: {0}", organizationId); + HostedSolutionLog.DebugInfo("domainName: {0}", domainName); + + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + Guid tenantId = Guid.Empty; + Command cmd = new Command("Get-CsTenant"); + cmd.Parameters.Add("Identity", GetOrganizationPath(organizationId)); + Collection result = ExecuteShellCommand(runSpace, cmd, false); + if ((result != null) && (result.Count > 0)) + { + tenantId = (Guid)GetPSObjectProperty(result[0], "TenantId"); + + //Get-CSTenantFederationConfiguration (AllowedDomains) + cmd = new Command("Get-CsTenantFederationConfiguration"); + cmd.Parameters.Add("Tenant", tenantId); + result = ExecuteShellCommand(runSpace, cmd, false); + + if ((result != null) && (result.Count > 0)) + { + AllowList allowList = null; + + if (GetPSObjectProperty(result[0], "AllowedDomains").GetType().ToString() == "Microsoft.Rtc.Management.WritableConfig.Settings.Edge.AllowList") + { + allowList = (AllowList)GetPSObjectProperty(result[0], "AllowedDomains"); + DomainPattern domain = new DomainPattern(domainName); + allowList.AllowedDomain.Remove(domain); + } + + cmd = new Command("Set-CsTenantFederationConfiguration"); + cmd.Parameters.Add("Tenant", tenantId); + cmd.Parameters.Add("AllowedDomains", allowList); + ExecuteShellCommand(runSpace, cmd, false); + } + } + } + catch (Exception ex) + { + HostedSolutionLog.LogError("RemoveFederationDomainInternal", ex); + throw; + } + finally + { + + CloseRunspace(runSpace); + } + HostedSolutionLog.LogEnd("RemoveFederationDomainInternal"); + + return true; + } + + + + + #endregion + + #region PowerShell integration + private static InitialSessionState session = null; + + internal virtual Runspace OpenRunspace() + { + HostedSolutionLog.LogStart("OpenRunspace"); + + if (session == null) + { + session = InitialSessionState.CreateDefault(); + session.ImportPSModule(new string[] { "ActiveDirectory", "Lync", "LyncOnline" }); + } + Runspace runSpace = RunspaceFactory.CreateRunspace(session); + // + runSpace.Open(); + // + runSpace.SessionStateProxy.SetVariable("ConfirmPreference", "none"); + HostedSolutionLog.LogEnd("OpenRunspace"); + return runSpace; + } + + internal void CloseRunspace(Runspace runspace) + { + try + { + if (runspace != null && runspace.RunspaceStateInfo.State == RunspaceState.Opened) + { + runspace.Close(); + } + } + catch (Exception ex) + { + HostedSolutionLog.LogError("Runspace error", ex); + } + } + + internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd) + { + return ExecuteShellCommand(runSpace, cmd, true); + } + + internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController) + { + object[] errors; + return ExecuteShellCommand(runSpace, cmd, useDomainController, out errors); + } + + internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd, out object[] errors) + { + return ExecuteShellCommand(runSpace, cmd, true, out errors); + } + + internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController, out object[] errors) + { + HostedSolutionLog.LogStart("ExecuteShellCommand"); + List errorList = new List(); + + if (useDomainController) + { + CommandParameter dc = new CommandParameter("DomainController", PrimaryDomainController); + if (!cmd.Parameters.Contains(dc)) + { + cmd.Parameters.Add(dc); + } + } + + HostedSolutionLog.DebugCommand(cmd); + Collection results = null; + // Create a pipeline + Pipeline pipeLine = runSpace.CreatePipeline(); + using (pipeLine) + { + // Add the command + pipeLine.Commands.Add(cmd); + // Execute the pipeline and save the objects returned. + results = pipeLine.Invoke(); + + // Log out any errors in the pipeline execution + // NOTE: These errors are NOT thrown as exceptions! + // Be sure to check this to ensure that no errors + // happened while executing the command. + if (pipeLine.Error != null && pipeLine.Error.Count > 0) + { + foreach (object item in pipeLine.Error.ReadToEnd()) + { + errorList.Add(item); + string errorMessage = string.Format("Invoke error: {0}", item); + HostedSolutionLog.LogWarning(errorMessage); + } + } + } + pipeLine = null; + errors = errorList.ToArray(); + HostedSolutionLog.LogEnd("ExecuteShellCommand"); + return results; + } + + internal object GetPSObjectProperty(PSObject obj, string name) + { + return obj.Members[name].Value; + } + + /// + /// Returns the identity of the object from the shell execution result + /// + /// + /// + internal string GetResultObjectIdentity(Collection result) + { + HostedSolutionLog.LogStart("GetResultObjectIdentity"); + if (result == null) + throw new ArgumentNullException("result", "Execution result is not specified"); + + if (result.Count < 1) + throw new ArgumentException("Execution result is empty", "result"); + + if (result.Count > 1) + throw new ArgumentException("Execution result contains more than one object", "result"); + + PSMemberInfo info = result[0].Members["Identity"]; + if (info == null) + throw new ArgumentException("Execution result does not contain Identity property", "result"); + + string ret = info.Value.ToString(); + HostedSolutionLog.LogEnd("GetResultObjectIdentity"); + return ret; + } + + internal string GetResultObjectDN(Collection result) + { + HostedSolutionLog.LogStart("GetResultObjectDN"); + if (result == null) + throw new ArgumentNullException("result", "Execution result is not specified"); + + if (result.Count < 1) + throw new ArgumentException("Execution result does not contain any object"); + + if (result.Count > 1) + throw new ArgumentException("Execution result contains more than one object"); + + PSMemberInfo info = result[0].Members["DistinguishedName"]; + if (info == null) + throw new ArgumentException("Execution result does not contain DistinguishedName property", "result"); + + string ret = info.Value.ToString(); + HostedSolutionLog.LogEnd("GetResultObjectDN"); + return ret; + } + + + #endregion + + #region Transactions + + internal LyncTransaction StartTransaction() + { + return new LyncTransaction(); + } + + internal void RollbackTransaction(LyncTransaction transaction) + { + HostedSolutionLog.LogStart("RollbackTransaction"); + Runspace runSpace = null; + try + { + runSpace = OpenRunspace(); + + + for (int i = transaction.Actions.Count - 1; i > -1; i--) + { + //reverse order + try + { + RollbackAction(transaction.Actions[i], runSpace); + } + catch (Exception ex) + { + HostedSolutionLog.LogError("Rollback error", ex); + } + } + } + catch (Exception ex) + { + HostedSolutionLog.LogError("Rollback error", ex); + } + finally + { + + CloseRunspace(runSpace); + } + HostedSolutionLog.LogEnd("RollbackTransaction"); + } + + private void RollbackAction(TransactionAction action, Runspace runspace) + { + HostedSolutionLog.LogInfo("Rollback action: {0}", action.ActionType); + switch (action.ActionType) + { + case TransactionAction.TransactionActionTypes.LyncNewSipDomain: + DeleteSipDomain(runspace, action.Id); + break; + //case TransactionAction.TransactionActionTypes.LyncNewSimpleUrl: + //DeleteSimpleUrl(runspace, action.Id); + //break; + case TransactionAction.TransactionActionTypes.LyncNewUser: + DeleteUser(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.LyncNewConferencingPolicy: + DeleteConferencingPolicy(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.LyncNewExternalAccessPolicy: + DeleteExternalAccessPolicy(runspace, action.Id); + break; + case TransactionAction.TransactionActionTypes.LyncNewMobilityPolicy: + DeleteMobilityPolicy(runspace, action.Id); + break; + } + } + + #endregion + + #region helpers + private string GetOrganizationPath(string organizationId) + { + StringBuilder sb = new StringBuilder(); + // append provider + AppendOUPath(sb, organizationId); + AppendOUPath(sb, RootOU); + AppendDomainPath(sb, RootDomain); + + return sb.ToString(); + } + + private static void AppendOUPath(StringBuilder sb, string ou) + { + if (string.IsNullOrEmpty(ou)) + return; + + string path = ou.Replace("/", "\\"); + string[] parts = path.Split('\\'); + for (int i = parts.Length - 1; i != -1; i--) + sb.Append("OU=").Append(parts[i]).Append(","); + } + + private static void AppendDomainPath(StringBuilder sb, string domain) + { + if (string.IsNullOrEmpty(domain)) + return; + + string[] parts = domain.Split('.'); + for (int i = 0; i < parts.Length; i++) + { + sb.Append("DC=").Append(parts[i]); + + if (i < (parts.Length - 1)) + sb.Append(","); + } + } + + internal string AddADPrefix(string path) + { + string dn = path; + if (!dn.ToUpper().StartsWith("LDAP://")) + { + dn = string.Format("LDAP://{0}/{1}", PrimaryDomainController, dn); + } + return dn; + } + + #endregion + + public override bool IsInstalled() + { + string value = ""; + bool bResult = false; + RegistryKey root = Registry.LocalMachine; + RegistryKey rk = root.OpenSubKey(LyncRegistryPath); + if (rk != null) + { + value = (string)rk.GetValue("ProductVersion", null); + if (value == "4.0.7577.0") + bResult = true; + + rk.Close(); + } + return bResult; + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/LyncTransaction.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/LyncTransaction.cs new file mode 100644 index 00000000..811a93ec --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/LyncTransaction.cs @@ -0,0 +1,97 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System.Collections.Generic; + +namespace WebsitePanel.Providers.HostedSolution +{ + internal class LyncTransaction + { + List actions = null; + + public LyncTransaction() + { + actions = new List(); + } + + internal List Actions + { + get { return actions; } + } + + internal void RegisterNewSipDomain(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.LyncNewSipDomain; + action.Id = id; + Actions.Add(action); + } + + internal void RegisterNewSimpleUrl(string sipDomain, string tenantID) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.LyncNewSimpleUrl; + action.Id = sipDomain; + action.Account = tenantID; + Actions.Add(action); + } + + + internal void RegisterNewConferencingPolicy(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.LyncNewConferencingPolicy; + action.Id = id; + Actions.Add(action); + } + + internal void RegisterNewCsExternalAccessPolicy(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.LyncNewExternalAccessPolicy; + action.Id = id; + Actions.Add(action); + } + + internal void RegisterNewCsMobilityPolicy(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.LyncNewMobilityPolicy; + action.Id = id; + Actions.Add(action); + } + + internal void RegisterNewCsUser(string id) + { + TransactionAction action = new TransactionAction(); + action.ActionType = TransactionAction.TransactionActionTypes.LyncNewUser; + action.Id = id; + Actions.Add(action); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OCS2007R2.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OCS2007R2.cs index 4bd3db37..7bf10578 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OCS2007R2.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OCS2007R2.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OCSEdge2007R2.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OCSEdge2007R2.cs index 4d7ceb0b..9efd8a2e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OCSEdge2007R2.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OCSEdge2007R2.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs index 6d980dcc..9b78cd77 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -342,9 +342,9 @@ namespace WebsitePanel.Providers.HostedSolution #region Users - public void CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled) + public int CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled) { - CreateUserInternal(organizationId, loginName, displayName, upn, password, enabled); + return CreateUserInternal(organizationId, loginName, displayName, upn, password, enabled); } internal int CreateUserInternal(string organizationId, string loginName, string displayName, string upn, string password, bool enabled) @@ -356,36 +356,43 @@ namespace WebsitePanel.Providers.HostedSolution if (string.IsNullOrEmpty(organizationId)) throw new ArgumentNullException("organizationId"); - + if (string.IsNullOrEmpty(loginName)) throw new ArgumentNullException("loginName"); if (string.IsNullOrEmpty(password)) throw new ArgumentNullException("password"); - bool userCreated = false; + bool userCreated = false; string userPath = null; try { string path = GetOrganizationPath(organizationId); - userPath= GetUserPath(organizationId, loginName); + userPath = GetUserPath(organizationId, loginName); if (!ActiveDirectoryUtils.AdObjectExists(userPath)) { - userPath = ActiveDirectoryUtils.CreateUser(path, loginName, displayName, password, enabled); + userPath = ActiveDirectoryUtils.CreateUser(path, upn, loginName, displayName, password, enabled); DirectoryEntry entry = new DirectoryEntry(userPath); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.UserPrincipalName, upn); entry.CommitChanges(); userCreated = true; + HostedSolutionLog.DebugInfo("User created: {0}", displayName); } else + { + HostedSolutionLog.DebugInfo("AD_OBJECT_ALREADY_EXISTS: {0}", userPath); + HostedSolutionLog.LogEnd("CreateUserInternal"); return Errors.AD_OBJECT_ALREADY_EXISTS; - - string groupPath = GetGroupPath(organizationId); + } + + string groupPath = GetGroupPath(organizationId); + HostedSolutionLog.DebugInfo("Group retrieved: {0}", groupPath); + - ActiveDirectoryUtils.AddUserToGroup(userPath, groupPath); + HostedSolutionLog.DebugInfo("Added to group: {0}", groupPath); } - catch(Exception e) + catch (Exception e) { HostedSolutionLog.LogError(e); try @@ -393,10 +400,12 @@ namespace WebsitePanel.Providers.HostedSolution if (userCreated) ActiveDirectoryUtils.DeleteADObject(userPath); } - catch(Exception ex) + catch (Exception ex) { HostedSolutionLog.LogError(ex); - } + } + + return Errors.AD_OBJECT_ALREADY_EXISTS; } HostedSolutionLog.LogEnd("CreateUserInternal"); @@ -492,10 +501,10 @@ namespace WebsitePanel.Providers.HostedSolution DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path); OrganizationUser retUser = new OrganizationUser(); - + retUser.FirstName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.FirstName); retUser.LastName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.LastName); - retUser.DisplayName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.DisplayName); + retUser.DisplayName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.DisplayName); retUser.Initials = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Initials); retUser.JobTitle = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.JobTitle); retUser.Company = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Company); @@ -513,10 +522,11 @@ namespace WebsitePanel.Providers.HostedSolution retUser.Zip = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Zip); retUser.Country = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Country); retUser.Notes = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Notes); - retUser.ExternalEmail = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.ExternalEmail); - retUser.Disabled = (bool)entry.InvokeGet(ADAttributes.AccountDisabled); + retUser.ExternalEmail = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.ExternalEmail); + retUser.Disabled = (bool)entry.InvokeGet(ADAttributes.AccountDisabled); retUser.Manager = GetManager(entry); - retUser.DomainUserName = GetDomainName(loginName); + retUser.SamAccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName); + retUser.DomainUserName = GetDomainName(ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName)); retUser.DistinguishedName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.DistinguishedName); retUser.Locked = (bool)entry.InvokeGet(ADAttributes.AccountLocked); @@ -578,7 +588,7 @@ namespace WebsitePanel.Providers.HostedSolution ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.FirstName, firstName); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.LastName, lastName); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.DisplayName, displayName); - + ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Initials, initials); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.JobTitle, jobTitle); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Company, company); @@ -596,7 +606,7 @@ namespace WebsitePanel.Providers.HostedSolution ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Zip, zip); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Country, country); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.Notes, notes); - ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.ExternalEmail, externalEmail); + ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.ExternalEmail, externalEmail); ActiveDirectoryUtils.SetADObjectProperty(entry, ADAttributes.CustomAttribute2, (disabled ? "disabled" : null)); @@ -626,6 +636,48 @@ namespace WebsitePanel.Providers.HostedSolution } + public string GetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName) + { + return GetSamAccountNameByUserPrincipalNameInternal(organizationId, userPrincipalName); + } + + private string GetSamAccountNameByUserPrincipalNameInternal(string organizationId, string userPrincipalName) + { + HostedSolutionLog.LogStart("GetSamAccountNameByUserPrincipalNameInternal"); + HostedSolutionLog.DebugInfo("userPrincipalName : {0}", userPrincipalName); + HostedSolutionLog.DebugInfo("organizationId : {0}", organizationId); + + string accountName = string.Empty; + + try + { + + string path = GetOrganizationPath(organizationId); + DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path); + + DirectorySearcher searcher = new DirectorySearcher(entry); + searcher.PropertiesToLoad.Add("userPrincipalName"); + searcher.PropertiesToLoad.Add("sAMAccountName"); + searcher.Filter = "(userPrincipalName=" + userPrincipalName + ")"; + searcher.SearchScope = SearchScope.Subtree; + + SearchResult resCollection = searcher.FindOne(); + if (resCollection != null) + { + accountName = resCollection.Properties["samaccountname"][0].ToString(); + } + + HostedSolutionLog.LogEnd("GetSamAccountNameByUserPrincipalNameInternal"); + } + catch (Exception e) + { + HostedSolutionLog.DebugInfo("Failed : {0}", e.Message); + } + + return accountName; + } + + #endregion #region Domains diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/WebsitePanel.Providers.HostedSolution.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/WebsitePanel.Providers.HostedSolution.csproj index 7d5b2014..20a414bf 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/WebsitePanel.Providers.HostedSolution.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/WebsitePanel.Providers.HostedSolution.csproj @@ -106,6 +106,15 @@ False ..\..\Lib\References\Microsoft\Microsoft.Exchange.Net.dll + + ..\..\Lib\References\Microsoft\Microsoft.Rtc.Management.Core.dll + + + ..\..\Lib\References\Microsoft\Microsoft.Rtc.Management.Hosted.dll + + + ..\..\Lib\References\Microsoft\Microsoft.Rtc.Management.WritableConfig.dll + ..\..\Lib\References\Microsoft\Microsoft.SharePoint.dll False @@ -131,7 +140,10 @@ + + + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AMSHelper.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AMSHelper.cs index 2986fffa..3466d7a2 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AMSHelper.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AMSHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AbilityMailServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AbilityMailServer.cs index 88fb80c0..c827a040 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AbilityMailServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AbilityMailServer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AmsDomain.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AmsDomain.cs index 998cfcd1..3106c7fd 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AmsDomain.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AmsDomain.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AmsMailList.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AmsMailList.cs index a7034d4c..bd393667 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AmsMailList.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AmsMailList.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AmsMailbox.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AmsMailbox.cs index 11d8b45b..4f0d3ed5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AmsMailbox.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/AmsMailbox.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/Tree.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/Tree.cs index ece7c0ef..90559e7e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/Tree.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.AbilityMailServer/Tree.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.ArgoMail/ArgoMail.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.ArgoMail/ArgoMail.vb index 1d90b547..874079b9 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.ArgoMail/ArgoMail.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.ArgoMail/ArgoMail.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.ArgoMail/ArgoMailList.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.ArgoMail/ArgoMailList.vb index 81fdb28d..a1d6df9d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.ArgoMail/ArgoMailList.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.ArgoMail/ArgoMailList.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.ArgoMail/ArgoMailListItem.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.ArgoMail/ArgoMailListItem.vb index 128a1e5a..999d92e7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.ArgoMail/ArgoMailListItem.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.ArgoMail/ArgoMailListItem.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_DELFLAGS.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_DELFLAGS.vb index 202903d0..cf38ea83 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_DELFLAGS.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_DELFLAGS.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_ERROR.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_ERROR.vb index 098f7331..e078f759 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_ERROR.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_ERROR.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_HANDLE.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_HANDLE.vb index ded53115..f7775073 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_HANDLE.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_HANDLE.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_VRFYFLAGS.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_VRFYFLAGS.vb index 39cc6a48..f061e8a0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_VRFYFLAGS.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MD_VRFYFLAGS.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MDaemon.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MDaemon.vb index 94c8417a..63f72f5e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MDaemon.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MDaemon.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, @@ -24,1940 +24,1940 @@ ' LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ' ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ' (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Imports WebsitePanel.Providers.Utils -Imports WebsitePanel.Server.Utils -Imports WebsitePanel.Providers.Common - - -Imports System.IO -Imports System.Text -Imports System.Collections -Imports System.Collections.Generic -Imports System.Runtime.InteropServices -Imports Microsoft.Win32 - - -Public Class MDaemon - Inherits HostingServiceProviderBase - Implements IMailServer - -#Region "Constants" - Public Const ALIAS_PROG_ID As String = "MDUserCOM.MDAlias" - Public Const ALIAS_ITEM_PROG_ID As String = "MDUserCOM.MDAliasItem" - Public Const LIST_PROG_ID As String = "MDUserCOM.MDList" - Public Const LIST_MEMBER_PROG_ID As String = "MDUserCOM.MDListMember" - Public Const MESSAGE_INFO_PROG_ID As String = "MDUserCOM.MDMessageInfo" - Public Const RULE_PROG_ID As String = "MDUserCOM.MDRule" - Public Const USER_PROG_ID As String = "MDUserCOM.MDUser" - Public Const USER_INFO_PROG_ID As String = "MDUserCOM.MDUserInfo" - Public Const GATEWAY_INFO_PROG_ID As String = "MDUserCOM.MDGateway" - - Private Const DefaultDomainMaxUsers As Integer = 0 - Private Const DefaultDomainMaxLists As Integer = 0 - Private Const DefaultDomainIP As String = "127.0.0.1" - Private Const DefaultDomainMaxInactive As Integer = 0 - Private Const DefaultDomainMaxMessageAge As Integer = 0 - Private Const DefaultDomainMaxDeletedIMAPMessageAge As Integer = 0 - Private Const DefaultDomainBind As Boolean = False - Private Const DefaultDomainRecurseIMAP As Boolean = False - Private Const DefaultDomainEnableAntiVirus As Boolean = True - Private Const DefaultDomainEnableAntiSpam As Boolean = True -#End Region - -#Region "Properties" - Public Property EnableIMAP() As Boolean - Get - Return Convert.ToBoolean(ProviderSettings("EnableIMAP")) - End Get - Set(ByVal value As Boolean) - ProviderSettings.Settings("EnableIMAP") = value.ToString() - End Set - End Property - - Public Property EnablePOP() As Boolean - Get - Return Convert.ToBoolean(ProviderSettings("EnablePOP")) - End Get - Set(ByVal value As Boolean) - ProviderSettings.Settings("EnablePOP") = value.ToString() - End Set - End Property -#End Region - -#Region "Internal Classes" - Class Service - Public ComObject As Object - Public Succeed As Boolean - End Class -#End Region - -#Region "Ctors" - Public Sub New() - - End Sub -#End Region - -#Region "Helper Methods" - Protected Sub RefreshMailServerCache(ByRef service As Service) - Try - Dim appCachePath As String = service.ComObject.GetAppDir() - - If Not String.IsNullOrEmpty(appCachePath) Then - appCachePath = Path.Combine(appCachePath, "ReloadCache.SEM") - File.Create(appCachePath).Close() - End If - Catch ex As Exception - - End Try - End Sub - - Protected Overridable Function LoadServiceProvider() As Service - Dim result As Service = New Service() - - Try - - Dim comObject As Object = CreateObject(USER_PROG_ID) - result.Succeed = comObject.LoadUserDll() - - If result.Succeed Then - result.ComObject = comObject - Else - result.ComObject = Nothing - Log.WriteInfo("MDUserCOM.LoadUserDll failed to initialize COM object.") - End If - - Catch ex As Exception - - Log.WriteError("Couldn't create MDUserCOM.MDUser ActiveX object.", ex) - - result.ComObject = Nothing - result.Succeed = True - - End Try - - Return result - End Function - - Protected Overridable Sub UnloadServiceProvider(ByRef service As Service) - If service.Succeed Then - service.ComObject.FreeUserDll() - End If - End Sub - - Protected Overridable Function CreateMDAliasItem(ByRef service As Service) As Object - Dim mdAlias As Object = Nothing - - If service.Succeed Then - Try - mdAlias = CreateObject(ALIAS_ITEM_PROG_ID) - Catch ex As Exception - Log.WriteError("Couldn't create MDUserCOM.MDAliasItem Acivex object.", ex) - End Try - End If - - Return mdAlias - End Function - - - Public Overrides Function Install() As String() - - Dim service As Service = LoadServiceProvider() - Dim file As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_MDAEMONINIDB) - - Dim value As String = ProviderSettings.Settings.Item(Constants.RelayAliasedMail) - Dim relayAliasedMail As Boolean = Boolean.Parse(value) - Dim relayAliasedMailValue As String = "No" - - If relayAliasedMail Then - relayAliasedMailValue = "Yes" - End If - - WriteProfileString("SPECIAL", Constants.RelayAliasedMail, relayAliasedMailValue, file) - Return MyBase.Install() - - End Function - - - - Protected Overridable Function CreateMDAlias(ByRef service As Service) As Object - Dim mdAlias As Object = Nothing - - If service.Succeed Then - Try - mdAlias = CreateObject(ALIAS_PROG_ID) - Catch ex As Exception - Log.WriteError("Couldn't create MDUserCOM.MDAlias Acivex object.", ex) - End Try - End If - - Return mdAlias - End Function - - Protected Overridable Function CreateMDList(ByRef service As Service, ByRef listName As String) As Object - Dim mdList As Object = Nothing - - If service.Succeed Then - Try - mdList = CreateObject(LIST_PROG_ID) - service.ComObject.InitListInfo(mdList, listName) - Catch ex As Exception - Log.WriteError("Couldn't create MDUserCOM.MDList ActiveX object.", ex) - End Try - End If - - Return mdList - End Function - - Protected Overridable Function CreateMDUserInfo(ByRef service As Service) As Object - Dim mdUserInfo As Object = Nothing - - Try - mdUserInfo = CreateObject(USER_INFO_PROG_ID) - service.ComObject.InitUserInfo(mdUserInfo) - Catch ex As Exception - Log.WriteError("Couldn't create MDUserCOM.MDUserInfo ActiveX object.", ex) - End Try - - Return mdUserInfo - End Function - - Protected Overridable Function CreateMDListMember(ByRef service As Service) As Object - Dim mdListMember As Object = Nothing - - If service.Succeed Then - Try - mdListMember = CreateObject(LIST_MEMBER_PROG_ID) - Catch ex As Exception - Log.WriteError("Couldn't create MDUserCOM.MDListMember ActiveX object.", ex) - End Try - End If - - Return mdListMember - End Function - - Protected Overridable Function LoadMDGateway(ByRef service As Service) As Object - Dim mdGateway As Object = Nothing - - If service.Succeed Then - Try - mdGateway = CreateObject(GATEWAY_INFO_PROG_ID) - Catch ex As Exception - Log.WriteError("Couldn't create MDUserCOM.MDGateway ActiveX object.", ex) - End Try - End If - - Return mdGateway - End Function - - Protected Sub UnloadMDGateway(ByRef service As Service, ByRef mdGateway As Object) - If service.Succeed Then - service.ComObject.FreeGateway(mdGateway) - End If - End Sub - - Protected Function GetEmailName(ByVal mailbox As String) - Return mailbox.Substring(0, mailbox.IndexOf("@")) - End Function - - Protected Function GetDomainName(ByVal mailbox As String) - Return mailbox.Substring(mailbox.IndexOf("@") + 1) - End Function - - Protected Overridable Function GetApplicationDir() As String - Dim service As Service = LoadServiceProvider() - - Try - - Dim appDir As String = service.ComObject.GetAppDir() - UnloadServiceProvider(service) - Return appDir - - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't get application dir", ex) - End Try - - End Function - - - Protected Overridable Sub PopulateUserInfo(ByRef account As MailAccount, ByRef mdUserInfo As Object) - - If Not account.ForwardingAddresses Is Nothing AndAlso account.ForwardingAddresses.Length > 0 Then - If String.IsNullOrEmpty(account.FirstName) Then - mdUserInfo.FwdAddress = String.Join(",", account.ForwardingAddresses) - mdUserInfo.IsForwarding = True - mdUserInfo.KeepForwardedMail = account.RetainLocalCopy - mdUserInfo.FullName = "Mail Forwarding" - - Else - mdUserInfo.FwdAddress = String.Join(",", account.ForwardingAddresses) - mdUserInfo.IsForwarding = True - mdUserInfo.KeepForwardedMail = account.RetainLocalCopy - mdUserInfo.FullName = String.Concat(account.FirstName, " ", account.LastName) - End If - - Else - mdUserInfo.FullName = String.Concat(account.FirstName, " ", account.LastName) - mdUserInfo.IsForwarding = False - End If - - mdUserInfo.MailBox = GetEmailName(account.Name) - mdUserInfo.Domain = GetDomainName(account.Name) - mdUserInfo.Password = account.Password - mdUserInfo.Email = account.Name - - ' TRUE if account is configured to auto-extract attachments - mdUserInfo.AutoDecode = Convert.ToBoolean(account.Item("AutoDecode")) - mdUserInfo.MailFormat = account.Item("MailFormat") - - mdUserInfo.HideFromEveryone = Convert.ToBoolean(account.Item("HideFromEveryone")) - mdUserInfo.AllowChangeViaEmail = Convert.ToBoolean(account.Item("AllowChangeViaEmail")) - mdUserInfo.CheckAddrBook = Convert.ToBoolean(account.Item("CheckAddrBook")) - mdUserInfo.EncryptEmail = Convert.ToBoolean(account.Item("EncryptEmail")) - mdUserInfo.UpdateAddrBook = Convert.ToBoolean(account.Item("UpdateAddrBook")) - - If account.MaxMailboxSize > 0 Then - mdUserInfo.ApplyQuotas = True - mdUserInfo.MaxDiskSpace = account.MaxMailboxSize - End If - End Sub - - Protected Sub PopulateGroupInfo(ByRef group As MailGroup, ByVal verify As Boolean) - Dim service As Service = LoadServiceProvider() - - Try - Dim mdList = MailGroupToMDList(service, group) - - Dim errorCode As Integer = MDaemonInterop.MDLISTERR_NOERROR - ' Verify list before creation - If verify Then - errorCode = service.ComObject.VerifyListInfo(mdList) - End If - - If errorCode = MDaemonInterop.MDLISTERR_NOERROR Then - If Not service.ComObject.WriteList(mdList) Then - Throw New Exception("Could not write group to disk.") - End If - - ClearListMembers(service, mdList) - - Dim member As String - - For Each member In group.Members - service.ComObject.ListAddMember(group.Name, member, String.Empty) - Next member - - UnloadServiceProvider(service) - Else - Throw New Exception(String.Format("Could not verify group. Error code {0}", errorCode)) - End If - - ' force to refresh cache - RefreshMailServerCache(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't populate group info.", ex) - End Try - End Sub 'PopulateGroupInfo - - Protected Overridable Sub ClearListMembers(ByRef service As Service, ByRef mdList As Object) - Dim members As New ArrayList() - - Dim member As Object = CreateMDListMember(service) - - Dim [next] As Boolean = mdList.GetFirstMember(member) - - While [next] - If Not (member.Email Is Nothing) And member.Email.Length > 0 Then - members.Add(member.Email) - End If - [next] = mdList.GetNextMember(member) - End While - - Dim email As String - For Each email In members - service.ComObject.ListRemoveMember(mdList.ListName, email) - Next email - End Sub 'ClearListMembers - - Protected Sub UpdateUserAccessInfo(ByVal userDbPath As String, ByRef account As MailAccount) - Dim service As Service = LoadServiceProvider() - - Dim hUser As Integer = service.ComObject.GetByEmail(account.Name) - - If hUser = CInt(MD_HANDLE.MD_BADHANDLE) Then - Throw New Exception(String.Format("Mailbox '{0}' not found.", account.Name)) - End If - - Dim mdUserInfo As Object = CreateMDUserInfo(service) - - PopulateUserInfo(account, mdUserInfo) - service.ComObject.FilterUserInfo(mdUserInfo) - - Dim recordExists As Boolean - - Try - If AccountExists(account.Name) Then - - Dim access As Long = 1 - - If account.Enabled Then - If EnableIMAP And EnablePOP Then - access = 1 - ElseIf EnablePOP Then - access = 2 - ElseIf EnableIMAP Then - access = 3 - End If - Else - access = 4 - End If - - recordExists = True - - ' Update access info (aka access-type) - mdUserInfo.AccessType = access - - ' Update mailbox size - If account.MaxMailboxSize > 0 Then - mdUserInfo.ApplyQuotas = True - mdUserInfo.MaxDiskSpace = CType(account.MaxMailboxSize * 1000, Long) - End If - - ' Send the changes - Dim errorCode As Integer = service.ComObject.VerifyUserInfo(mdUserInfo, CInt(MD_VRFYFLAGS.MDUSERDLL_VRFYALL)) - If errorCode <> CInt(MD_ERROR.MDDLLERR_NOERROR) Then - Throw New Exception(String.Format("Could not validate account info. Please make sure that all entries are valid. Error code {0}", errorCode)) - End If - - If Not service.ComObject.SetUserInfo(hUser, mdUserInfo) Then - Throw New Exception(String.Format("Could not update mailbox '{0}'", account.Name)) - End If - - End If - - ' Check whether a user record exists - If Not recordExists Then - Throw New Exception("Could not find mailbox info.") - End If - Catch ex As Exception - Throw New Exception("Could not update mailbox access info.", ex) - End Try - End Sub - - Protected Sub UpdateUserResponderInfo(ByVal responderDbPath As String, ByVal mailbox As MailAccount) - Try - If Not mailbox.ResponderEnabled Then - If Not File.Exists(responderDbPath) Then - Return - End If - If GetProfileSection(mailbox.Name, responderDbPath) <> 0 Then - If Not DeleteProfileSection(mailbox.Name, responderDbPath) Then - Throw New Exception("Could not delete profile section.") - End If - End If - Else - If Not File.Exists(responderDbPath) Then - Dim stream As FileStream = File.Create(responderDbPath) - stream.Close() - End If - Dim responderFile As String = Path.Combine(GetApplicationDir(), mailbox.Name + ".rsp") - If GetProfileSection(mailbox.Name, responderDbPath) <> 0 Then - responderFile = GetProfileString(mailbox.Name, "MailBackFile", responderFile, responderDbPath) - End If - ' update profile section - WriteProfileString(mailbox.Name, "MailBackFile", responderFile, responderDbPath) - WriteProfileString(mailbox.Name, "PassMessage", "No", responderDbPath) - WriteProfileString(mailbox.Name, "ResponderSubject", mailbox.ResponderSubject, responderDbPath) - ' update responder message body in responder file. - Dim sw As New StreamWriter(responderFile) - Try - sw.Write(mailbox.ResponderMessage) - Finally - sw.Dispose() - End Try - End If - Catch ex As Exception - Throw New Exception("Can't update mailbox responder info.", ex) - End Try - End Sub 'UpdateUserResponderInfo - - Private Shared Sub WriteDomainInfo(ByVal domain As MailDomain, ByVal domainDbPath As String) - ' Domain users quota - WriteProfileString(domain.Name, "MaxUsers", domain.MaxDomainUsers.ToString(), domainDbPath) - ' Domain lists quota - WriteProfileString(domain.Name, "MaxLists", domain.MaxLists.ToString(), domainDbPath) - - Dim strIP As String = DefaultDomainIP - If Not domain.ServerIP Is Nothing AndAlso domain.ServerIP.Length > 0 Then - strIP = domain.ServerIP - End If - - ' IP address - WriteProfileString(domain.Name, "IP", strIP, domainDbPath) - - ' Delete accounts within this domain if inactive for XX days (0=never) - WriteProfileString(domain.Name, "MaxInactive", domain.Item("MaxInactiveLimit"), domainDbPath) - - ' Delete messages kept by users within this domain if older than XX days (0=never) - WriteProfileString(domain.Name, "MaxMessageAge", domain.Item("MaxMessageAge"), domainDbPath) - - ' Delete deleted IMAP messages in this domain older than XX days (0 = never) - WriteProfileString(domain.Name, "MaxDeletedIMAPMessageAge", domain.Item("MaxDeletedImapMessageAge"), domainDbPath) - - ' Bind to this IP if you want to bind the secondary domain to its IP address - WriteProfileString(domain.Name, "Bind", YesNoBooleanToString(domain.Item("BindIP")), domainDbPath) - - ' Delete old messages from IMAP folders as well - WriteProfileString(domain.Name, "RecurseIMAP", YesNoBooleanToString(domain.Item("RecurseIMAP")), domainDbPath) - - ' If AntiVirus for MDaemon is installed, this option enables you the AntiVirus settings to be applied to the selected secondary domain - WriteProfileString(domain.Name, "EnableAntiVirus", YesNoBooleanToString(domain.Item("EnableAntiVirus")), domainDbPath) - - ' If you want MDaemon's current Spam Filter settings to be applied to the selected secondary domain - WriteProfileString(domain.Name, "EnableAntiSpam", YesNoBooleanToString(domain.Item("EnableAntiSpam")), domainDbPath) - - End Sub 'WriteDomainInfo - - Private Shared Function YesNoBooleanToString(ByVal val As Object) As String - Dim resultStr As String = "No" - - If Not val Is Nothing Then - Dim valueStr As String = val.ToString() - - Select Case valueStr - Case "True" - resultStr = "Yes" - Case "true" - resultStr = "Yes" - Case "1" - resultStr = "Yes" - End Select - End If - - Return resultStr - End Function 'YesNoBooleanToString - - Protected Overridable Function EmailExists(ByRef userName As String) As Boolean - Dim service As Service = LoadServiceProvider() - Dim exists As Boolean = False - - Try - exists = service.ComObject.UserExists(userName) - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception(String.Format("Can't check whether '{0}' exists", userName), ex) - End Try - - Return exists - End Function 'EmailExists - - Protected Overridable Function MailListExists(ByRef maillistName As String) As Boolean - Return EmailExists(maillistName) - End Function 'MaillistExists - - Protected Overridable Sub PopulateMailListInfo(ByRef list As MailList, ByRef verify As Boolean) - Dim service As Service = LoadServiceProvider() - - Try - Dim mdList As Object = CreateMDList(service, list.Name) - - mdList.CatalogName = String.Empty - mdList.DefaultMode = 1 - mdList.DigestFlags = 0 - mdList.DigestMBF = "DIGEST" - mdList.FooterFilePath = list.Item("FooterFilePath") - mdList.HeaderFilePath = list.Item("HeaderFilePath") - mdList.KillFilePath = list.Item("SuppressionFilePath") - 'flags - mdList.ListFlags = MDaemonInterop.MDLIST_AUTOPRUNE Or MDaemonInterop.MDLIST_CRACKMESSAGE Or MDaemonInterop.MDLIST_FORCEUNIQUEID - - Select Case list.PostingMode - Case PostingMode.MembersCanPost - mdList.ListFlags = mdList.ListFlags Or MDaemonInterop.MDLIST_PRIVATE - Case PostingMode.PasswordProtectedPosting - mdList.ListFlags = mdList.ListFlags Or MDaemonInterop.MDLIST_PASSWORDPOST - End Select - - If list.EnableSubjectPrefix Then - mdList.ListFlags = mdList.ListFlags Or MDaemonInterop.MDLIST_LISTNAMEINSUBJECT - End If - If YesNoBooleanToString(list.Item("ShowThreadNumbersInSubject")) = "Yes" Then - mdList.ListFlags = mdList.ListFlags Or MDaemonInterop.MDLIST_THREADNUMBINSUBJECT - End If - If list.Moderated Then - mdList.ListFlags = mdList.ListFlags Or MDaemonInterop.MDLIST_MODERATED - - If String.IsNullOrEmpty(list.ModeratorAddress) Then - Throw New Exception("Mailing list is supposed to be as moderated, but moderator address not specified.") - End If - - mdList.ModeratorEmail = list.ModeratorAddress - End If - - Select Case list.ReplyToMode - Case ReplyTo.RepliesToSender - mdList.ReplyAddress = String.Empty - Case ReplyTo.RepliesToList - mdList.ReplyAddress = list.Name - End Select - - - - - mdList.ListName = list.Name - mdList.ListPassword = list.Password - mdList.MaxLineCount = 0 'DIGEST - mdList.MaxMembers = Convert.ToInt32(list.Item("MaxMembers")) - mdList.MaxMessageCount = 0 'DIGEST - mdList.MaxMessageSize = list.MaxMessageSize - mdList.NotificationEmail = String.Empty - mdList.PrecedenceLevel = 60 - mdList.PublicFolderName = String.Empty - mdList.RemoteHost = String.Empty - - mdList.RoutingLimit = 0 - mdList.SendNotesTo = String.Empty - mdList.WelcomeFilePath = list.Item("WelcomeFilePath") - - Dim errorCode As Integer = MDaemonInterop.MDLISTERR_NOERROR - - If verify Then - errorCode = service.ComObject.VerifyListInfo(mdList) - End If - - If errorCode = MDaemonInterop.MDLISTERR_NOERROR Then - If Not service.ComObject.WriteList(mdList) Then - Throw New Exception("Could not write mail list to disk.") - End If - - ' Clear list - ClearListMembers(service, mdList) - - Dim member As String - For Each member In list.Members - service.ComObject.ListAddMember(list.Name, member, String.Empty) - Next member - - ' force to refresh cache - RefreshMailServerCache(service) - - UnloadServiceProvider(service) - Else - Throw New Exception(String.Format("Could not verify mail list. Error code {0}", errorCode)) - End If - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't populate mail list info.", ex) - End Try - End Sub 'PopulateMailListInfo - - Protected Overridable Sub DeleteAlias(ByVal email As String, ByVal [alias] As String) - Dim service As Service = LoadServiceProvider() - Try - If Not service.ComObject.DeleteAlias([alias], email) Then - Throw New Exception(String.Format("Alias {0} not found", [alias])) - End If - - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't delete alias", ex) - End Try - End Sub 'DeleteAlias - - Protected Overridable Function CreateMailboxItem(ByRef mdUserInfo As Object) As MailAccount - Dim mailbox As New MailAccount() - mailbox.Name = mdUserInfo.Email - - Dim names() As String = mdUserInfo.FullName.ToString().Split(New String() {" "}, StringSplitOptions.None) - - If names.Length = 2 Then - mailbox.FirstName = names(0) - mailbox.LastName = names(1) - ElseIf names.Length = 1 Then - mailbox.FirstName = names(0) - End If - - mailbox.Password = mdUserInfo.Password - mailbox.Item("Comments") = mdUserInfo.Comments - mailbox.Item("AutoDecode") = Convert.ToBoolean(mdUserInfo.AutoDecode) - mailbox.Item("MailFormat") = mdUserInfo.MailFormat - mailbox.Item("HideFromEveryone") = Convert.ToBoolean(mdUserInfo.HideFromEveryone) - mailbox.Item("AllowChangeViaEmail") = Convert.ToBoolean(mdUserInfo.AllowChangeViaEmail) - mailbox.Item("CheckAddrBook") = Convert.ToBoolean(mdUserInfo.CheckAddrBook) - mailbox.Item("EncryptEmail") = Convert.ToBoolean(mdUserInfo.EncryptEmail) - mailbox.Item("UpdateAddrBook") = Convert.ToBoolean(mdUserInfo.UpdateAddrBook) - 'forwarding - Dim isForwarding As Boolean = Convert.ToBoolean(mdUserInfo.IsForwarding) - - If isForwarding Then - mailbox.DeleteOnForward = True - mailbox.ForwardingAddresses = CStr(mdUserInfo.FwdAddress).Split(",".ToCharArray()) - mailbox.Item("FwdHost") = mdUserInfo.FwdHost - mailbox.Item("FwdPort") = mdUserInfo.FwdPort - mailbox.Item("FwdSendAs") = mdUserInfo.FwdSendAs - End If - - mailbox.RetainLocalCopy = Convert.ToBoolean(mdUserInfo.KeepForwardedMail) - - - mailbox.MaxMailboxSize = ParseLong(mdUserInfo.MaxDiskSpace, 0) / 1000 - - Return mailbox - End Function 'CreateMailboxItem - - Protected Overridable Sub PopulateMailboxAccessInfo(ByVal userDbPath As String, ByVal mailbox As MailAccount) - Dim service As Service = LoadServiceProvider() - - Dim hUser As Integer = service.ComObject.GetByEmail(mailbox.Name) - - If hUser = CInt(MD_HANDLE.MD_BADHANDLE) Then - Throw New Exception(String.Format("Mailbox '{0}' not found.", mailbox.Name)) - End If - - Dim mdUserInfo As Object = CreateMDUserInfo(service) - - PopulateUserInfo(mailbox, mdUserInfo) - service.ComObject.FilterUserInfo(mdUserInfo) - - Dim recordExists As Boolean - - Try - If AccountExists(mailbox.Name) Then - - Dim access As Long = 1 - - Select Case mdUserInfo.AccessType - Case 1 - mailbox.Enabled = True - mailbox.Item("EnableIMAP") = True - mailbox.Item("EnablePOP") = True - - Case 2 - mailbox.Enabled = True - mailbox.Item("EnableIMAP") = False - mailbox.Item("EnablePOP") = True - - Case 3 - mailbox.Enabled = True - mailbox.Item("EnableIMAP") = True - mailbox.Item("EnablePOP") = False - - Case Else - mailbox.Enabled = False - mailbox.Item("EnableIMAP") = False - mailbox.Item("EnablePOP") = False - - End Select - - recordExists = True - - End If - - If Not recordExists Then - Throw New Exception(String.Format("Could not find mailbox '{0}' info.", mailbox.Name)) - End If - - Catch ex As Exception - Throw New Exception(String.Format("Could not read mailbox '{0}' access info.", mailbox.Name), ex) - End Try - End Sub 'PopulateMailboxAccessInfo - - Protected Overridable Sub PopulateMailboxResponderInfo(ByVal responderDbPath As String, ByVal mailbox As MailAccount) - Try - If Not File.Exists(responderDbPath) Then - mailbox.ResponderEnabled = False - mailbox.ResponderMessage = String.Empty - Exit Sub - End If - - Dim retVal As Integer = GetProfileSection(mailbox.Name, responderDbPath) - - If retVal = 0 Then - mailbox.ResponderEnabled = False - mailbox.ResponderMessage = String.Empty - Else - mailbox.ResponderEnabled = True - Dim responderFile As String = GetProfileString(mailbox.Name, "MailBackFile", String.Empty, responderDbPath) - mailbox.ResponderSubject = GetProfileString(mailbox.Name, "ResponderSubject", String.Empty, responderDbPath) - - If responderFile Is Nothing Or responderFile.Length = 0 Then - Throw New Exception("Responder file not specified.") - End If - - If Not File.Exists(responderFile) Then - Throw New Exception("Responder file not found.") - End If - - Using reader As New StreamReader(responderFile) - 'Dim line As String = String.Empty - - 'Dim builder As StringBuilder = New StringBuilder() - - 'Do - ' line = reader.ReadLine() - - ' If line Is Nothing Then - ' Continue Do - ' End If - - ' builder.Append(line) - ' builder.Append(Environment.NewLine) - 'Loop While Not line Is Nothing - - 'mailbox.ResponderMessage = builder.ToString() - - mailbox.ResponderMessage = reader.ReadToEnd() - End Using - End If - Catch ex As Exception - Throw New Exception("Can't read mailbox responder info.", ex) - End Try - End Sub - - Protected Overridable Function CreateDomainItemFromProfile(ByVal domainName As String, ByVal profilePath As String) As MailDomain - Dim item As New MailDomain() - item.Name = domainName - item.MaxDomainUsers = DefaultDomainMaxUsers - item.MaxLists = DefaultDomainMaxLists - item.ServerIP = DefaultDomainIP - item.Item("MaxInactiveLimit") = DefaultDomainMaxInactive - item.Item("MaxMessageAge") = DefaultDomainMaxMessageAge - item.Item("MaxDeletedImapMessageAge") = DefaultDomainMaxDeletedIMAPMessageAge - item.Item("BindIP") = DefaultDomainBind - item.Item("RecurseIMAP") = DefaultDomainRecurseIMAP - item.Item("EnableAntiVirus") = DefaultDomainEnableAntiVirus - item.Item("EnableAntiSpam") = DefaultDomainEnableAntiSpam - - Dim retVal As Integer = GetProfileSection(domainName, profilePath) - If retVal <> 0 Then - Dim strMaxUsers As String = GetProfileString(domainName, "MaxUsers", DefaultDomainMaxUsers.ToString(), profilePath) - item.MaxDomainUsers = ParseInt32(strMaxUsers, DefaultDomainMaxUsers) - - Dim strMaxLists As String = GetProfileString(domainName, "MaxLists", DefaultDomainMaxLists.ToString(), profilePath) - item.MaxLists = ParseInt32(strMaxLists, DefaultDomainMaxLists) - - Dim strIP As String = GetProfileString(domainName, "IP", DefaultDomainIP, profilePath) - item.ServerIP = strIP - - item.Item("MaxInactiveLimit") = GetProfileString(domainName, "MaxInactive", DefaultDomainMaxInactive.ToString(), profilePath) - - item.Item("MaxMessageAge") = GetProfileString(domainName, "MaxMessageAge", DefaultDomainMaxMessageAge.ToString(), profilePath) - - item.Item("MaxDeletedImapMessageAge") = GetProfileString(domainName, "MaxDeletedIMAPMessageAge", DefaultDomainMaxDeletedIMAPMessageAge.ToString(), profilePath) - - item.Item("BindIP") = GetProfileString(domainName, "Bind", YesNoBooleanToString(DefaultDomainBind), profilePath) - - item.Item("RecurseIMAP") = GetProfileString(domainName, "RecurseIMAP", YesNoBooleanToString(DefaultDomainRecurseIMAP), profilePath) - - item.Item("EnableAntiVirus") = GetProfileString(domainName, "EnableAntiVirus", YesNoBooleanToString(DefaultDomainEnableAntiVirus), profilePath) - - item.Item("EnableAntiSpam") = GetProfileString(domainName, "EnableAntiSpam", YesNoBooleanToString(DefaultDomainEnableAntiSpam), profilePath) - End If - Return item - End Function 'CreateDomainItemFromProfile - - Protected Overridable Function MDListToMailGroup(ByRef mdList As Object) As MailGroup - Dim group As New MailGroup() - - group.Name = mdList.ListName - group.Item("CatalogName") = mdList.CatalogName - - group.Item("DefaultMode") = mdList.DefaultMode.ToString() - group.Item("DigestFlags") = mdList.DigestFlags.ToString() - group.Item("DigestMBF") = mdList.DigestMBF - - group.Item("FooterFilePath") = mdList.FooterFilePath - group.Item("HeaderFilePath") = mdList.HeaderFilePath - group.Item("KillFilePath") = mdList.KillFilePath - group.Item("ListFlags") = mdList.ListFlags.ToString() - group.Item("GroupPassword") = mdList.ListPassword - group.Item("ModeratorEmail") = mdList.ModeratorEmail - group.Item("NotificationEmail") = mdList.NotificationEmail - - group.Item("MaxLineCount") = mdList.MaxLineCount.ToString() - group.Item("MaxMembers") = mdList.MaxMembers.ToString() - group.Item("MaxMessageCount") = mdList.MaxMessageCount.ToString() - group.Item("MaxMessageSize") = mdList.MaxMessageSize.ToString() - - 'mdList.PrecedenceLevel = 50 - group.Item("PublicFolderName") = mdList.PublicFolderName - group.Item("RemoteHost") = mdList.RemoteHost - group.Item("ReplyAddress") = mdList.ReplyAddress - group.Item("RoutingLimit") = mdList.RoutingLimit.ToString() - group.Item("SendNotesTo") = mdList.SendNotesTo - group.Item("WelcomeFilePath") = mdList.WelcomeFilePath - - Return group - End Function - - Protected Overridable Function MailGroupToMDList(ByRef service As Service, ByRef group As MailGroup) As Object - Dim mdList As Object = Nothing - - If service.Succeed Then - mdList = CreateMDList(service, group.Name) - mdList.CatalogName = group.Item("CatalogName") - mdList.DefaultMode = ParseLong(group.Item("DefaultMode"), 1) - mdList.DigestFlags = ParseLong(group.Item("DigestFlags"), 0) - - mdList.DigestMBF = "DIGEST" - - mdList.FooterFilePath = group.Item("FooterFilePath") - mdList.HeaderFilePath = group.Item("HeaderFilePath") - mdList.KillFilePath = group.Item("KillFilePath") - - mdList.ListFlags = MDaemonInterop.MDLIST_AUTOPRUNE Or MDaemonInterop.MDLIST_USELISTNAME Or MDaemonInterop.MDLIST_CRACKMESSAGE Or MDaemonInterop.MDLIST_FORCEUNIQUEID - - mdList.ListName = group.Name - mdList.ListPassword = group.Item("GroupPassword") - mdList.ModeratorEmail = group.Item("ModeratorEmail") - mdList.NotificationEmail = group.Item("NotificationEmail") - - mdList.MaxLineCount = ParseLong(group.Item("MaxLineCount"), 0) - mdList.MaxMembers = ParseLong(group.Item("MaxMembers"), 0) - mdList.MaxMessageCount = ParseLong(group.Item("MaxMessageCount"), 0) - mdList.MaxMessageSize = ParseLong(group.Item("MaxMessageSize"), 0) - - mdList.PrecedenceLevel = 50 - - mdList.PublicFolderName = group.Item("PublicFolderName") - mdList.RemoteHost = group.Item("RemoteHost") - mdList.ReplyAddress = group.Item("ReplyAddress") - mdList.RoutingLimit = ParseLong(group.Item("RoutingLimit"), 0) - mdList.SendNotesTo = group.Item("SendNotesTo") - mdList.WelcomeFilePath = group.Item("WelcomeFilePath") - End If - - Return mdList - End Function - - Protected Overridable Function CreateMailGroupItem(ByRef service As Service, ByRef mdList As Object) As MailGroup - Dim group As MailGroup = Nothing - - group = MDListToMailGroup(mdList) - - Dim member As Object = CreateMDListMember(service) - Dim members As New List(Of String) - - Dim [next] As Boolean = mdList.GetFirstMember(member) - - While [next] - If Not member.Email Is Nothing And member.Email.Length > 0 Then - members.Add(member.Email) - End If - [next] = mdList.GetNextMember(member) - End While - - group.Members = members.ToArray() - - Return group - End Function 'CreateMailGroupItem - - - Protected Overridable Function CreateMailListItem(ByRef service As Service, ByRef mdList As Object) As MailList - Dim list As New MailList() - list.Name = mdList.ListName - - list.Password = mdList.ListPassword - list.ModeratorAddress = mdList.ModeratorEmail - list.MaxMessageSize = mdList.MaxMessageSize - list.Item("MaxMembers") = mdList.MaxMembers - - list.Item("FooterFilePath") = mdList.FooterFilePath - list.Item("HeaderFilePath") = mdList.HeaderFilePath - list.Item("SuppressionFilePath") = mdList.KillFilePath - list.Item("WelcomeFilePath") = mdList.WelcomeFilePath - - list.Moderated = (mdList.ListFlags And MDaemonInterop.MDLIST_MODERATED) = MDaemonInterop.MDLIST_MODERATED - If (mdList.ListFlags And MDaemonInterop.MDLIST_PRIVATE) = MDaemonInterop.MDLIST_PRIVATE Then - list.PostingMode = PostingMode.MembersCanPost - ElseIf (mdList.ListFlags And MDaemonInterop.MDLIST_PASSWORDPOST) = MDaemonInterop.MDLIST_PASSWORDPOST Then - list.PostingMode = PostingMode.PasswordProtectedPosting - Else - list.PostingMode = PostingMode.AnyoneCanPost - End If - - - - If mdList.ReplyAddress.Length > 0 Then - list.ReplyToMode = ReplyTo.RepliesToList - ElseIf mdList.ReplyAddress.Length = 0 Then - list.ReplyToMode = ReplyTo.RepliesToSender - End If - - - If (mdList.ListFlags And MDaemonInterop.MDLIST_LISTNAMEINSUBJECT) = MDaemonInterop.MDLIST_LISTNAMEINSUBJECT Then - list.Item("ShowNameInSubject") = "True" - End If - - If (mdList.ListFlags And MDaemonInterop.MDLIST_THREADNUMBINSUBJECT) = MDaemonInterop.MDLIST_THREADNUMBINSUBJECT Then - list.Item("ShowThreadNumbersInSubject") = "True" - End If - - If service.Succeed Then - Dim member As Object = CreateMDListMember(service) - Dim members As New List(Of String) - Dim [next] As Boolean = mdList.GetFirstMember(member) - - While [next] - If Not (member.Email Is Nothing) And member.Email.Length > 0 Then - members.Add(member.Email) - End If - [next] = mdList.GetNextMember(member) - End While - - list.Members = members.ToArray() - End If - - Return list - End Function 'CreateMailListItem - - Protected Overridable Function GetAllLists(ByRef service As Service) As String() - Dim arrayList As New List(Of String) - Dim objects As Object = Nothing - - Try - If service.Succeed Then - service.ComObject.GetMailingLists(objects) - Dim lists As Array = TryCast(objects, Array) - - If lists Is Nothing Then - Exit Try - End If - - Dim list As Object - - For Each list In lists - Dim listName As String = list.ToString() - If listName Is Nothing Then - Continue For - End If - If listName.Length = 0 Then - Continue For - End If - - arrayList.Add(listName) - Next list - End If - Catch ex As Exception - Throw New Exception("Can't get the list of mailing lists", ex) - End Try - - Return arrayList.ToArray() - End Function 'GetAllLists -#End Region - -#Region "Convert Routines" - Private Shared Function ParseLong(ByVal strValue As String, ByVal defaultValue As Long) As Long - Dim ret As Long = defaultValue - Try - ret = Long.Parse(strValue) - Catch - End Try - Return ret - End Function - - Private Shared Function ParseInt32(ByVal strValue As String, ByVal defaultValue As Integer) As Integer - Dim ret As Integer = defaultValue - Try - ret = Int32.Parse(strValue) - Catch - End Try - Return ret - End Function 'ParseInt32 - - Private Shared Function ParseYesNoBoolean(ByVal strValue As String, ByVal defaultValue As Boolean) As Boolean - Dim ret As Boolean = defaultValue - Dim val As String = strValue.Trim().ToLower() - If val = "yes" Then - ret = True - Else - If val = "no" Then - ret = False - End If - End If - Return ret - End Function 'ParseYesNoBoolean -#End Region - -#Region "Profile Section" - Private Shared Function DeleteProfileSection(ByVal section As String, ByVal file As String) As Boolean - Dim key As String = Nothing - Dim strValue As String = Nothing - Dim retVal As Integer = MDaemonInterop.WritePrivateProfileString(section, key, strValue, file) - Return retVal <> 0 - End Function 'DeleteProfileSection - - Private Shared Function WriteProfileSection(ByVal section As String, ByVal file As String) As Boolean - Dim content As String = String.Empty - Dim retVal As Integer = MDaemonInterop.WritePrivateProfileSection(section, content, file) - Return retVal <> 0 - End Function 'WriteProfileSection - - Private Shared Function WriteProfileString(ByVal section As String, ByVal key As String, ByVal strValue As String, ByVal file As String) As Boolean - Dim retVal As Integer = MDaemonInterop.WritePrivateProfileString(section, key, strValue, file) - Return retVal <> 0 - End Function 'WriteProfileString - - Private Shared Function GetProfileString(ByVal section As String, ByVal key As String, ByVal defaultValue As String, ByVal file As String) As String - Dim retVal As Integer = 0 - Dim retString As New String(" "c, &H100) - retVal = MDaemonInterop.GetPrivateProfileString(section, key, defaultValue, retString, &HFF, file) - If retVal = 0 Then - retString = Nothing - Else - retString = Trim(retString).Replace(CStr(ControlChars.NullChar), "") - End If - Return retString - End Function 'GetProfileString - - Private Shared Function GetProfileSection(ByVal section As String, ByVal file As String) As Integer - Dim retVal As Integer = 0 - Dim retString As String = String.Empty - retVal = MDaemonInterop.GetPrivateProfileSection(section, retString, &HFF, file) - Return retVal - End Function 'GetProfileSection -#End Region - - Public Function AccountExists(ByVal mailboxName As String) As Boolean Implements IMailServer.AccountExists - Dim service As Service = LoadServiceProvider() - Dim exists As Boolean = False - - If service.Succeed Then - exists = service.ComObject.UserExists(mailboxName) - End If - - UnloadServiceProvider(service) - - Return exists - End Function - - Public Sub AddDomainAlias(ByVal domainName As String, ByVal aliasName As String) Implements IMailServer.AddDomainAlias - Dim service As Service = LoadServiceProvider() - - Try - aliasName = String.Concat("*@", aliasName) - domainName = String.Concat("*@", domainName) - - Dim succeed As Boolean = service.ComObject.CreateAlias(domainName, aliasName) - - If Not succeed Then - Throw New Exception("Can't add domain alias.") - End If - - ' force to refresh cache - RefreshMailServerCache(service) - - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - - Throw New Exception("Can't add domain alias.", ex) - End Try - - End Sub - - Public Sub CreateAccount(ByVal mailbox As MailAccount) Implements IMailServer.CreateAccount - Dim service As Service = LoadServiceProvider() - - Try - Dim mdUserInfo As Object = CreateMDUserInfo(service) - PopulateUserInfo(mailbox, mdUserInfo) - service.ComObject.FilterUserInfo(mdUserInfo) - Dim errorCode As Integer = service.ComObject.AddUser(mdUserInfo) - - Select Case CType(errorCode, MD_ERROR) - Case MD_ERROR.MDDLLERR_NOERROR - Dim userDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_USERLISTDB) - - UpdateUserAccessInfo(userDbPath, mailbox) - - Dim responderDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_AUTORESPDB) - - UpdateUserResponderInfo(responderDbPath, mailbox) - 'service.ComObject.ReloadUsers() - Case MD_ERROR.MDDLLERR_USEREXISTS - Throw New Exception("Mailbox is already registered.") - Case Else - Throw New Exception(String.Format("Could not add user. Error code {0}", errorCode)) - End Select - - ' force to refresh cache - 'RefreshMailServerCache(service) - - ' force to reload DLL data - 'service.ComObject.ReloadUsers() - - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't create mailbox", ex) - End Try - End Sub - - Public Sub CreateDomain(ByVal domain As MailDomain) Implements IMailServer.CreateDomain - Dim service As Service = LoadServiceProvider() - - Try - Dim domainDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_DOMAINDB) - Dim retVal As Integer = GetProfileSection(domain.Name, domainDbPath) - If retVal <> 0 Then - Throw New Exception(String.Format("Domain '{0}' already exists on the server", domain.Name)) - End If - If Not WriteProfileSection(domain.Name, domainDbPath) Then - Throw New Exception(String.Format("Could not create profile section in '{0}' file.", domainDbPath)) - End If - WriteDomainInfo(domain, domainDbPath) - - ' force to refresh cache - RefreshMailServerCache(service) - - ' force to reload DLL data - service.ComObject.ReloadUsers() - - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't create domain", ex) - End Try - End Sub - - Public Sub CreateGroup(ByVal group As MailGroup) Implements IMailServer.CreateGroup - Try - If GroupExists(group.Name) Then - Throw New Exception(String.Format("Group {0} already exists.", group.Name)) - End If - PopulateGroupInfo(group, True) - Catch ex As Exception - Throw New Exception("Can't create group.", ex) - End Try - End Sub - - Public Sub CreateList(ByVal maillist As MailList) Implements IMailServer.CreateList - Try - If MailListExists(maillist.Name) Then - Throw New Exception(String.Format("Mail list {0} already exists.", maillist.Name)) - End If - - PopulateMailListInfo(maillist, False) - Catch ex As Exception - Throw New Exception("Can't create mail list.", ex) - End Try - End Sub - - Public Sub DeleteAccount(ByVal mailboxName As String) Implements IMailServer.DeleteAccount - Dim service As Service = LoadServiceProvider() - Try - Dim res As Boolean = service.ComObject.DeleteUser(mailboxName, CInt(MD_DELFLAGS.MDUSERDLL_DDELETEALL)) - If Not res Then - Throw New Exception("Can't delete mailbox") - End If - - UnloadServiceProvider(service) - - ' force to refresh cache - RefreshMailServerCache(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't delete mailbox", ex) - End Try - End Sub - - Public Function MailAliasExists(ByVal mailAliasName As String) As Boolean Implements IMailServer.MailAliasExists - Dim path As String = GetAppFolderPath() + "Alias.dat" - Dim split As String() - Using sr As StreamReader = New StreamReader(path) - Dim line As String - Do - line = sr.ReadLine() - If (Not String.IsNullOrEmpty(line)) Then - split = line.Split(New [Char]() {"="c}) - Else - Continue Do - End If - If mailAliasName.Equals(split(0).Trim) Then - Return True - End If - Loop Until line Is Nothing - sr.Close() - End Using - Return False - End Function - - Public Function GetMailAliases(ByVal domainName As String) As MailAlias() Implements IMailServer.GetMailAliases - Dim aliases As List(Of MailAlias) = New List(Of MailAlias) - Dim path As String = GetAppFolderPath() + "Alias.dat" - Dim split As String() - Using sr As StreamReader = New StreamReader(path) - Dim line As String - Do - line = sr.ReadLine() - If (Not String.IsNullOrEmpty(line)) Then - split = line.Split(New [Char]() {"="c}) - Else - Continue Do - End If - If domainName.Equals(GetDomainName(split(0).Trim)) Then - Dim mailAlias As New MailAlias() - mailAlias.Name = split(0).Trim - mailAlias.ForwardTo = split(1).Trim - aliases.Add(mailAlias) - End If - Loop Until line Is Nothing - sr.Close() - End Using - - - Return aliases.ToArray - End Function - - Public Function GetMailAlias(ByVal mailAliasName As String) As MailAlias Implements IMailServer.GetMailAlias - Dim mailAlias As New MailAlias - Dim newMailAlias As New MailAlias - - If AccountExists(mailAliasName) Then - Try - Dim mailAccount As MailAccount = GetAccount(mailAliasName) - newMailAlias.Name = mailAccount.Name - newMailAlias.ForwardTo = mailAccount.ForwardingAddresses(0) - 'delete incorrect account - DeleteAccount(mailAliasName) - 'recreate mail alias - CreateMailAlias(newMailAlias) - Return newMailAlias - Catch ex As Exception - 'do nothing - End Try - End If - - Dim path As String = GetAppFolderPath() + "Alias.dat" - Dim split As String() - Using sr As StreamReader = New StreamReader(path) - Dim line As String - Do - line = sr.ReadLine() - If (Not String.IsNullOrEmpty(line)) Then - split = line.Split(New [Char]() {"="c}) - Else - Continue Do - End If - If mailAliasName.Equals(split(0).Trim) Then - mailAlias.Name = split(0).Trim - mailAlias.ForwardTo = split(1).Trim - Exit Do - End If - Loop Until line Is Nothing - sr.Close() - End Using - Return mailAlias - End Function - - Public Sub CreateMailAlias(ByVal mailAlias As MailAlias) Implements IMailServer.CreateMailAlias - - Dim service As Service = LoadServiceProvider() - Dim succeed As Boolean = service.ComObject.CreateAlias(mailAlias.ForwardTo, mailAlias.Name) - - If Not succeed Then - Throw New Exception(String.Format("Could not create mail alias {0}", mailAlias.Name)) - End If - End Sub - - Public Sub UpdateMailAlias(ByVal mailAlias As MailAlias) Implements IMailServer.UpdateMailAlias - DeleteMailAlias(mailAlias.Name) - 'recreate alias - CreateMailAlias(mailAlias) - End Sub - - Public Sub DeleteMailAlias(ByVal mailAliasName As String) Implements IMailServer.DeleteMailAlias - Dim service As Service = LoadServiceProvider() - Dim mailAlias As MailAlias = GetMailAlias(mailAliasName) - - Dim succeed As Boolean = service.ComObject.DeleteAlias(mailAlias.ForwardTo, mailAlias.Name) - - If Not succeed Then - Throw New Exception(String.Format("Could not delete mail alias {0}", mailAlias.Name)) - End If - End Sub - - Public Sub DeleteDomain(ByVal domainName As String) Implements IMailServer.DeleteDomain - Dim service As Service = LoadServiceProvider() - - Try - service.ComObject.DeleteDomain(domainName) - - ' force to refresh cache - RefreshMailServerCache(service) - - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't delete domain", ex) - End Try - End Sub - - Public Overrides Sub DeleteServiceItems(ByVal items() As ServiceProviderItem) - - For Each item As ServiceProviderItem In items - - If (TypeOf item Is MailDomain) Then - - Try - DeleteDomain(item.Name) - Catch ex As Exception - Log.WriteError(String.Format("Error deleting '{0}' SmarterMail domain", item.Name), ex) - End Try - - End If - - Next - - End Sub - - - Public Sub DeleteDomainAlias(ByVal domainName As String, ByVal aliasName As String) Implements IMailServer.DeleteDomainAlias - Try - If Not DomainAliasExists(domainName, aliasName) Then - Throw New Exception(String.Format("Domain alias {0} does not exist", aliasName)) - End If - Dim [alias] As String = "*@" + aliasName - Dim domain As String = "*@" + domainName - DeleteAlias(domain, [alias]) - Catch ex As Exception - Throw New Exception("Can't delete domain alias", ex) - End Try - End Sub - - Public Sub DeleteGroup(ByVal groupName As String) Implements IMailServer.DeleteGroup - DeleteList(groupName) - End Sub - - Public Sub DeleteList(ByVal maillistName As String) Implements IMailServer.DeleteList - Dim service As Service = LoadServiceProvider() - - Try - service.ComObject.DeleteList(maillistName) - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't delete list", ex) - End Try - - End Sub - - Public Function DomainAliasExists(ByVal domainName As String, ByVal aliasName As String) As Boolean Implements IMailServer.DomainAliasExists - Dim exists As Boolean = False - - Try - Dim aliases As String() = GetDomainAliases(domainName) - Dim [alias] As String - For Each [alias] In aliases - If String.Compare([alias], aliasName, True) = 0 Then - exists = True - Exit For - End If - Next [alias] - Catch ex As Exception - Throw New Exception("Can't check whether domain alias exists", ex) - End Try - - Return exists - End Function - - Public Function DomainExists(ByVal domainName As String) As Boolean Implements IMailServer.DomainExists - Try - Dim ret As Boolean = False - Dim domains() As String = GetDomains() - Dim domain As String - For Each domain In domains - If String.Compare(domain, domainName, True) = 0 Then - ret = True - Exit For - End If - Next domain - Return ret - Catch ex As Exception - Throw New Exception("Can't check whether domain exists", ex) - End Try - End Function - - Public Function GetDomains() As String() Implements IMailServer.GetDomains - Dim service As Service = LoadServiceProvider() - - Try - Dim domainsCount As Integer = service.ComObject.GetDomainCount() - Dim domains() As Object = New Object() {domainsCount} - service.ComObject.GetDomainNames(domains) - - Dim ret As New ArrayList() - Dim domain As Object - For Each domain In domains - ret.Add(domain.ToString()) - Next domain - - UnloadServiceProvider(service) - - Return CType(ret.ToArray(GetType(String)), String()) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't get the list of domains", ex) - End Try - End Function 'GetDomains - - Public Function GetAccount(ByVal mailboxName As String) As MailAccount Implements IMailServer.GetAccount - Dim service As Service = LoadServiceProvider() - Dim mailbox As MailAccount = Nothing - - Try - Dim hUser As Integer = service.ComObject.GetByEmail(mailboxName) - - If hUser = CInt(MD_HANDLE.MD_BADHANDLE) Then - Throw New Exception(String.Format("Mailbox '{0}' not found.", mailboxName)) - End If - - Dim mdUserInfo As Object = CreateMDUserInfo(service) - service.ComObject.GetUserInfo(hUser, mdUserInfo) - - mailbox = CreateMailboxItem(mdUserInfo) - - Dim userDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_USERLISTDB) - PopulateMailboxAccessInfo(userDbPath, mailbox) - - Dim responderDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_AUTORESPDB) - PopulateMailboxResponderInfo(responderDbPath, mailbox) - - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't get mailbox", ex) - End Try - - Return mailbox - End Function - - Public Function GetAccounts(ByVal domainName As String) As MailAccount() Implements IMailServer.GetAccounts - Dim service As Service = LoadServiceProvider() - Dim accounts As List(Of MailAccount) = New List(Of MailAccount) - - Try - Dim badHandle As Integer = CType(MD_HANDLE.MD_BADHANDLE, Integer) - Dim hUser As Integer = service.ComObject.FindFirst() - - Do - If hUser = badHandle Then - Continue Do - End If - - Dim domain As String = service.ComObject.GetDomain(hUser) - If String.Compare(domain, domainName, True) = 0 Then - Dim mailbox As String = service.ComObject.GetEmail(hUser) - Dim fullname As String = service.ComObject.GetFullName(hUser) - - Dim account As MailAccount = New MailAccount() - account.Name = mailbox - Dim names() As String = fullname.Split(New String() {" "}, StringSplitOptions.None) - - If names.Length = 2 Then - account.FirstName = names(0) - account.LastName = names(1) - ElseIf names.Length = 1 Then - account.FirstName = names(0) - End If - - accounts.Add(account) - End If - hUser = service.ComObject.FindNext(hUser) - Loop While Not hUser = badHandle - - service.ComObject.FindClose() - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't get the list of domain users", ex) - End Try - - Return accounts.ToArray() - End Function - - Public Function GetDomain(ByVal domainName As String) As MailDomain Implements IMailServer.GetDomain - Dim service As Service = LoadServiceProvider() - Dim domainItem As MailDomain = Nothing - - Try - If Not DomainExists(domainName) Then - Throw New Exception(String.Format("Domain '{0}' does not exist", domainName)) - End If - - Dim domainDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_DOMAINDB) - domainItem = CreateDomainItemFromProfile(domainName, domainDbPath) - - ' read catch-all and abuse accounts - Dim postmasterAlias As String = String.Concat("Postmaster@", domainItem.Name) - Dim abuseAlias As String = String.Concat("Abuse@", domainItem.Name) - - Dim mdAlias As Object = CreateMDAlias(service) - Dim aliasItem As Object = CreateMDAliasItem(service) - Dim result As Boolean = mdAlias.GetFirstAlias(aliasItem) - - While result - If String.Compare(postmasterAlias, aliasItem.Alias, True) = 0 Then - domainItem.CatchAllAccount = GetEmailName(aliasItem.Email) - ElseIf String.Compare(abuseAlias, aliasItem.Alias, True) = 0 Then - domainItem.AbuseAccount = GetEmailName(aliasItem.Email) - End If - - If Not String.IsNullOrEmpty(domainItem.CatchAllAccount) AndAlso Not String.IsNullOrEmpty(domainItem.AbuseAccount) Then - Exit While - End If - - result = mdAlias.GetNextAlias(aliasItem) - End While - - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't get domain info", ex) - End Try - - Return domainItem - End Function - - Public Function GetDomainAliases(ByVal domainName As String) As String() Implements IMailServer.GetDomainAliases - Dim service As Service = LoadServiceProvider() - Dim aliases As New ArrayList() - Dim domainPattern As String = "*@" + domainName - - Try - Dim mdAlias As Object = CreateMDAlias(service) - Dim aliasItem As Object = CreateMDAliasItem(service) - Dim result As Boolean = mdAlias.GetFirstAlias(aliasItem) - While result - Dim domain As String = aliasItem.Email - If String.Compare(domain, domainPattern, True) = 0 Then - Dim [alias] As String = GetDomainName(aliasItem.Alias) - aliases.Add([alias]) - End If - result = mdAlias.GetNextAlias(aliasItem) - End While - UnloadServiceProvider(service) - Return CType(aliases.ToArray(GetType(String)), String()) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't get the list of domain aliases", ex) - End Try - End Function - - Public Function GetGroup(ByVal groupName As String) As MailGroup Implements IMailServer.GetGroup - Dim service As Service = LoadServiceProvider() - Dim mailGroup As MailGroup = Nothing - - Try - Dim mdList As Object = CreateMDList(service, groupName) - mailGroup = CreateMailGroupItem(service, mdList) - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't get group", ex) - End Try - - Return mailGroup - End Function - - Public Function GetGroups(ByVal domainName As String) As MailGroup() Implements IMailServer.GetGroups - Dim service As Service = LoadServiceProvider() - Dim groups As New List(Of MailGroup) - - Try - Dim lists As String() = GetAllLists(service) - Dim mdList As Object = Nothing - Dim listName As String - - For Each listName In lists - Dim domain As String = GetDomainName(listName) - If String.Compare(domain, domainName, True) <> 0 Then - Continue For - End If - - mdList = CreateMDList(service, listName) - If mdList.PrecedenceLevel = 50 Then - Dim item As New MailGroup() - item.Name = listName - groups.Add(item) - End If - Next listName - - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't get the list of domain groups", ex) - End Try - - Return groups.ToArray() - End Function - - Public Function GetList(ByVal maillistName As String) As MailList Implements IMailServer.GetList - Dim service As Service = LoadServiceProvider() - Dim mailList As MailList = Nothing - - Try - Dim mdList As Object = CreateMDList(service, maillistName) - mailList = CreateMailListItem(service, mdList) - - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't get mail list", ex) - End Try - - Return mailList - End Function - - Public Function GetLists(ByVal domainName As String) As MailList() Implements IMailServer.GetLists - Dim service As Service = LoadServiceProvider() - Dim arrayList As New List(Of MailList) - - Try - Dim lists As String() = GetAllLists(service) - Dim mdList As Object = Nothing - Dim listName As String - - For Each listName In lists - Dim domain As String = GetDomainName(listName) - If String.Compare(domain, domainName, True) <> 0 Then - Continue For - End If - - mdList = CreateMDList(service, listName) - If mdList.PrecedenceLevel <> 50 Then - Dim item As New MailList() - item.Name = listName - arrayList.Add(item) - End If - Next listName - - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't get the list of mailing lists.", ex) - End Try - - Return arrayList.ToArray() - End Function - - Public Function GroupExists(ByVal groupName As String) As Boolean Implements IMailServer.GroupExists - Return EmailExists(groupName) - End Function - - Public Function ListExists(ByVal maillistName As String) As Boolean Implements IMailServer.ListExists - Return EmailExists(maillistName) - End Function - - Public Sub UpdateAccount(ByVal mailbox As MailAccount) Implements IMailServer.UpdateAccount - Dim service As Service = LoadServiceProvider() - - Try - Dim hUser As Integer = service.ComObject.GetByEmail(mailbox.Name) - - If hUser = CInt(MD_HANDLE.MD_BADHANDLE) Then - Throw New Exception(String.Format("Mailbox '{0}' not found.", mailbox.Name)) - End If - - Dim mdUserInfo As Object = CreateMDUserInfo(service) - - PopulateUserInfo(mailbox, mdUserInfo) - service.ComObject.FilterUserInfo(mdUserInfo) - - If mailbox.Enabled = True Then - mdUserInfo.AccessType = "Y"c - Else - mdUserInfo.AccessType = "C"c - End If - - Dim errorCode As Integer = service.ComObject.VerifyUserInfo(mdUserInfo, CInt(MD_VRFYFLAGS.MDUSERDLL_VRFYALL)) - If errorCode <> CInt(MD_ERROR.MDDLLERR_NOERROR) Then - Throw New Exception(String.Format("Could not validate account info. Please make sure that all entries are valid. Error code {0}", errorCode)) - End If - - If Not service.ComObject.SetUserInfo(hUser, mdUserInfo) Then - Throw New Exception(String.Format("Could not update mailbox '{0}'", mailbox.Name)) - End If - - Dim userDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_USERLISTDB) - UpdateUserAccessInfo(userDbPath, mailbox) - - Dim responderDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_AUTORESPDB) - UpdateUserResponderInfo(responderDbPath, mailbox) - - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception(String.Format("Could not update mailbox '{0}'", mailbox.Name), ex) - End Try - End Sub - - Public Sub UpdateDomain(ByVal domain As MailDomain) Implements IMailServer.UpdateDomain - Dim service As Service = LoadServiceProvider() - - Try - Dim postmaster As String = String.Concat(domain.CatchAllAccount, "@", domain.Name) - Dim abuse As String = String.Concat(domain.AbuseAccount, "@", domain.Name) - - Dim postmasterAlias As String = String.Concat("Postmaster@", domain.Name) - Dim abuseAlias As String = String.Concat("Abuse@", domain.Name) - - Dim pmOldEmail As String = Nothing - Dim abOldEmail As String = Nothing - - Dim mdAlias As Object = CreateMDAlias(service) - Dim aliasItem As Object = CreateMDAliasItem(service) - Dim result As Boolean = mdAlias.GetFirstAlias(aliasItem) - - While result - If String.Compare(postmasterAlias, aliasItem.Alias, True) = 0 Then - pmOldEmail = aliasItem.Email - ElseIf String.Compare(abuseAlias, aliasItem.Alias, True) = 0 Then - abOldEmail = aliasItem.Email - End If - - If Not String.IsNullOrEmpty(pmOldEmail) AndAlso Not String.IsNullOrEmpty(abOldEmail) Then - Exit While - End If - - result = mdAlias.GetNextAlias(aliasItem) - End While - - ' cleanup postmaster alias - If Not String.IsNullOrEmpty(pmOldEmail) Then - service.ComObject.DeleteAlias(postmasterAlias, pmOldEmail) - End If - - ' cleanup abuse alias - If Not String.IsNullOrEmpty(abOldEmail) Then - service.ComObject.DeleteAlias(abuseAlias, abOldEmail) - End If - - If Not service.ComObject.CreateAlias(postmaster, postmasterAlias) Then - Throw New Exception("Couldn't assign domain postmaster account.") - End If - - If Not service.ComObject.CreateAlias(abuse, abuseAlias) Then - Throw New Exception("Couldn't assign domain abuse account.") - End If - - Dim domainDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_DOMAINDB) - Dim retVal As Integer = GetProfileSection(domain.Name, domainDbPath) - - If retVal = 0 Then - If Not WriteProfileSection(domain.Name, domainDbPath) Then - Throw New Exception(String.Format("Could not create profile section in '{0}' file.", domainDbPath)) - End If - End If - - WriteDomainInfo(domain, domainDbPath) - - ' force to refresh cache - RefreshMailServerCache(service) - - 'reload domains - service.ComObject.ReloadUsers() - - UnloadServiceProvider(service) - Catch ex As Exception - UnloadServiceProvider(service) - Throw New Exception("Can't update domain", ex) - End Try - End Sub - - Public Sub UpdateGroup(ByVal group As MailGroup) Implements IMailServer.UpdateGroup - Try - If Not GroupExists(group.Name) Then - Throw New Exception(String.Format("Group {0} does not exists.", group.Name)) - End If - PopulateGroupInfo(group, False) - Catch ex As Exception - Throw New Exception("Can't update group.", ex) - End Try - End Sub - - Public Sub UpdateList(ByVal maillist As MailList) Implements IMailServer.UpdateList - Try - If Not GroupExists(maillist.Name) Then - Throw New Exception(String.Format("Mail list {0} does not exists.", maillist.Name)) - End If - PopulateMailListInfo(maillist, False) - Catch ex As Exception - Throw New Exception("Can't update mail list.", ex) - End Try - End Sub - -#Region "HostingServiceProvider methods" - Public Overrides Sub ChangeServiceItemsState(ByVal items() As ServiceProviderItem, ByVal enabled As Boolean) - For Each item As ServiceProviderItem In items - If TypeOf item Is MailDomain Then - Try - ' get mail domain accounts - Dim accounts As MailAccount() = Me.GetAccounts(item.Name) - ' disable each mail account - For Each account As MailAccount In accounts - account.Enabled = enabled - ' change service item state - UpdateAccount(account) - Next - Catch ex As Exception - Log.WriteError(String.Format("Error switching '{0}' mail domain", item.Name), ex) - End Try - End If - Next - End Sub -#End Region - - Public Function GetAppFolderPath() As String - Dim uninstalString As String = "" - Dim returnPath As String = "" - Dim key32bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MDaemon Server") - If (key32bit IsNot Nothing) Then - uninstalString = CStr(key32bit.GetValue("UninstallString")) - Else - Dim key64bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\MDaemon Server") - If (key64bit IsNot Nothing) Then - uninstalString = CStr(key32bit.GetValue("UninstallString")) - Else - Return "C:\MDaemon\App\" - End If - End If - If [String].IsNullOrEmpty(uninstalString) = False Then - Dim split As String() = uninstalString.Split(New [Char]() {" "c}) - returnPath = split(0).Remove(split(0).LastIndexOf("\") + 1) - End If - - If [String].IsNullOrEmpty(uninstalString) = False Then - Return returnPath - End If - Return "C:\MDaemon\App\" - End Function - - Public Overrides Function IsInstalled() As Boolean - Dim version As String = "" - Dim key32bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MDaemon Server") - If (key32bit IsNot Nothing) Then - version = CStr(key32bit.GetValue("DisplayVersion")) - Else - Dim key64bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\MDaemon Server") - If (key64bit IsNot Nothing) Then - version = CStr(key64bit.GetValue("DisplayVersion")) - Else - Return False - End If - End If - If [String].IsNullOrEmpty(version) = False Then - Dim split As String() = version.Split(New [Char]() {"."c}) - Return split(0).Equals("9") Or split(0).Equals("10") Or split(0).Equals("11") - Else - Return False - End If - End Function - +' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Imports WebsitePanel.Providers.Utils +Imports WebsitePanel.Server.Utils +Imports WebsitePanel.Providers.Common + + +Imports System.IO +Imports System.Text +Imports System.Collections +Imports System.Collections.Generic +Imports System.Runtime.InteropServices +Imports Microsoft.Win32 + + +Public Class MDaemon + Inherits HostingServiceProviderBase + Implements IMailServer + +#Region "Constants" + Public Const ALIAS_PROG_ID As String = "MDUserCOM.MDAlias" + Public Const ALIAS_ITEM_PROG_ID As String = "MDUserCOM.MDAliasItem" + Public Const LIST_PROG_ID As String = "MDUserCOM.MDList" + Public Const LIST_MEMBER_PROG_ID As String = "MDUserCOM.MDListMember" + Public Const MESSAGE_INFO_PROG_ID As String = "MDUserCOM.MDMessageInfo" + Public Const RULE_PROG_ID As String = "MDUserCOM.MDRule" + Public Const USER_PROG_ID As String = "MDUserCOM.MDUser" + Public Const USER_INFO_PROG_ID As String = "MDUserCOM.MDUserInfo" + Public Const GATEWAY_INFO_PROG_ID As String = "MDUserCOM.MDGateway" + + Private Const DefaultDomainMaxUsers As Integer = 0 + Private Const DefaultDomainMaxLists As Integer = 0 + Private Const DefaultDomainIP As String = "127.0.0.1" + Private Const DefaultDomainMaxInactive As Integer = 0 + Private Const DefaultDomainMaxMessageAge As Integer = 0 + Private Const DefaultDomainMaxDeletedIMAPMessageAge As Integer = 0 + Private Const DefaultDomainBind As Boolean = False + Private Const DefaultDomainRecurseIMAP As Boolean = False + Private Const DefaultDomainEnableAntiVirus As Boolean = True + Private Const DefaultDomainEnableAntiSpam As Boolean = True +#End Region + +#Region "Properties" + Public Property EnableIMAP() As Boolean + Get + Return Convert.ToBoolean(ProviderSettings("EnableIMAP")) + End Get + Set(ByVal value As Boolean) + ProviderSettings.Settings("EnableIMAP") = value.ToString() + End Set + End Property + + Public Property EnablePOP() As Boolean + Get + Return Convert.ToBoolean(ProviderSettings("EnablePOP")) + End Get + Set(ByVal value As Boolean) + ProviderSettings.Settings("EnablePOP") = value.ToString() + End Set + End Property +#End Region + +#Region "Internal Classes" + Class Service + Public ComObject As Object + Public Succeed As Boolean + End Class +#End Region + +#Region "Ctors" + Public Sub New() + + End Sub +#End Region + +#Region "Helper Methods" + Protected Sub RefreshMailServerCache(ByRef service As Service) + Try + Dim appCachePath As String = service.ComObject.GetAppDir() + + If Not String.IsNullOrEmpty(appCachePath) Then + appCachePath = Path.Combine(appCachePath, "ReloadCache.SEM") + File.Create(appCachePath).Close() + End If + Catch ex As Exception + + End Try + End Sub + + Protected Overridable Function LoadServiceProvider() As Service + Dim result As Service = New Service() + + Try + + Dim comObject As Object = CreateObject(USER_PROG_ID) + result.Succeed = comObject.LoadUserDll() + + If result.Succeed Then + result.ComObject = comObject + Else + result.ComObject = Nothing + Log.WriteInfo("MDUserCOM.LoadUserDll failed to initialize COM object.") + End If + + Catch ex As Exception + + Log.WriteError("Couldn't create MDUserCOM.MDUser ActiveX object.", ex) + + result.ComObject = Nothing + result.Succeed = True + + End Try + + Return result + End Function + + Protected Overridable Sub UnloadServiceProvider(ByRef service As Service) + If service.Succeed Then + service.ComObject.FreeUserDll() + End If + End Sub + + Protected Overridable Function CreateMDAliasItem(ByRef service As Service) As Object + Dim mdAlias As Object = Nothing + + If service.Succeed Then + Try + mdAlias = CreateObject(ALIAS_ITEM_PROG_ID) + Catch ex As Exception + Log.WriteError("Couldn't create MDUserCOM.MDAliasItem Acivex object.", ex) + End Try + End If + + Return mdAlias + End Function + + + Public Overrides Function Install() As String() + + Dim service As Service = LoadServiceProvider() + Dim file As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_MDAEMONINIDB) + + Dim value As String = ProviderSettings.Settings.Item(Constants.RelayAliasedMail) + Dim relayAliasedMail As Boolean = Boolean.Parse(value) + Dim relayAliasedMailValue As String = "No" + + If relayAliasedMail Then + relayAliasedMailValue = "Yes" + End If + + WriteProfileString("SPECIAL", Constants.RelayAliasedMail, relayAliasedMailValue, file) + Return MyBase.Install() + + End Function + + + + Protected Overridable Function CreateMDAlias(ByRef service As Service) As Object + Dim mdAlias As Object = Nothing + + If service.Succeed Then + Try + mdAlias = CreateObject(ALIAS_PROG_ID) + Catch ex As Exception + Log.WriteError("Couldn't create MDUserCOM.MDAlias Acivex object.", ex) + End Try + End If + + Return mdAlias + End Function + + Protected Overridable Function CreateMDList(ByRef service As Service, ByRef listName As String) As Object + Dim mdList As Object = Nothing + + If service.Succeed Then + Try + mdList = CreateObject(LIST_PROG_ID) + service.ComObject.InitListInfo(mdList, listName) + Catch ex As Exception + Log.WriteError("Couldn't create MDUserCOM.MDList ActiveX object.", ex) + End Try + End If + + Return mdList + End Function + + Protected Overridable Function CreateMDUserInfo(ByRef service As Service) As Object + Dim mdUserInfo As Object = Nothing + + Try + mdUserInfo = CreateObject(USER_INFO_PROG_ID) + service.ComObject.InitUserInfo(mdUserInfo) + Catch ex As Exception + Log.WriteError("Couldn't create MDUserCOM.MDUserInfo ActiveX object.", ex) + End Try + + Return mdUserInfo + End Function + + Protected Overridable Function CreateMDListMember(ByRef service As Service) As Object + Dim mdListMember As Object = Nothing + + If service.Succeed Then + Try + mdListMember = CreateObject(LIST_MEMBER_PROG_ID) + Catch ex As Exception + Log.WriteError("Couldn't create MDUserCOM.MDListMember ActiveX object.", ex) + End Try + End If + + Return mdListMember + End Function + + Protected Overridable Function LoadMDGateway(ByRef service As Service) As Object + Dim mdGateway As Object = Nothing + + If service.Succeed Then + Try + mdGateway = CreateObject(GATEWAY_INFO_PROG_ID) + Catch ex As Exception + Log.WriteError("Couldn't create MDUserCOM.MDGateway ActiveX object.", ex) + End Try + End If + + Return mdGateway + End Function + + Protected Sub UnloadMDGateway(ByRef service As Service, ByRef mdGateway As Object) + If service.Succeed Then + service.ComObject.FreeGateway(mdGateway) + End If + End Sub + + Protected Function GetEmailName(ByVal mailbox As String) + Return mailbox.Substring(0, mailbox.IndexOf("@")) + End Function + + Protected Function GetDomainName(ByVal mailbox As String) + Return mailbox.Substring(mailbox.IndexOf("@") + 1) + End Function + + Protected Overridable Function GetApplicationDir() As String + Dim service As Service = LoadServiceProvider() + + Try + + Dim appDir As String = service.ComObject.GetAppDir() + UnloadServiceProvider(service) + Return appDir + + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't get application dir", ex) + End Try + + End Function + + + Protected Overridable Sub PopulateUserInfo(ByRef account As MailAccount, ByRef mdUserInfo As Object) + + If Not account.ForwardingAddresses Is Nothing AndAlso account.ForwardingAddresses.Length > 0 Then + If String.IsNullOrEmpty(account.FirstName) Then + mdUserInfo.FwdAddress = String.Join(",", account.ForwardingAddresses) + mdUserInfo.IsForwarding = True + mdUserInfo.KeepForwardedMail = account.RetainLocalCopy + mdUserInfo.FullName = "Mail Forwarding" + + Else + mdUserInfo.FwdAddress = String.Join(",", account.ForwardingAddresses) + mdUserInfo.IsForwarding = True + mdUserInfo.KeepForwardedMail = account.RetainLocalCopy + mdUserInfo.FullName = String.Concat(account.FirstName, " ", account.LastName) + End If + + Else + mdUserInfo.FullName = String.Concat(account.FirstName, " ", account.LastName) + mdUserInfo.IsForwarding = False + End If + + mdUserInfo.MailBox = GetEmailName(account.Name) + mdUserInfo.Domain = GetDomainName(account.Name) + mdUserInfo.Password = account.Password + mdUserInfo.Email = account.Name + + ' TRUE if account is configured to auto-extract attachments + mdUserInfo.AutoDecode = Convert.ToBoolean(account.Item("AutoDecode")) + mdUserInfo.MailFormat = account.Item("MailFormat") + + mdUserInfo.HideFromEveryone = Convert.ToBoolean(account.Item("HideFromEveryone")) + mdUserInfo.AllowChangeViaEmail = Convert.ToBoolean(account.Item("AllowChangeViaEmail")) + mdUserInfo.CheckAddrBook = Convert.ToBoolean(account.Item("CheckAddrBook")) + mdUserInfo.EncryptEmail = Convert.ToBoolean(account.Item("EncryptEmail")) + mdUserInfo.UpdateAddrBook = Convert.ToBoolean(account.Item("UpdateAddrBook")) + + If account.MaxMailboxSize > 0 Then + mdUserInfo.ApplyQuotas = True + mdUserInfo.MaxDiskSpace = account.MaxMailboxSize + End If + End Sub + + Protected Sub PopulateGroupInfo(ByRef group As MailGroup, ByVal verify As Boolean) + Dim service As Service = LoadServiceProvider() + + Try + Dim mdList = MailGroupToMDList(service, group) + + Dim errorCode As Integer = MDaemonInterop.MDLISTERR_NOERROR + ' Verify list before creation + If verify Then + errorCode = service.ComObject.VerifyListInfo(mdList) + End If + + If errorCode = MDaemonInterop.MDLISTERR_NOERROR Then + If Not service.ComObject.WriteList(mdList) Then + Throw New Exception("Could not write group to disk.") + End If + + ClearListMembers(service, mdList) + + Dim member As String + + For Each member In group.Members + service.ComObject.ListAddMember(group.Name, member, String.Empty) + Next member + + UnloadServiceProvider(service) + Else + Throw New Exception(String.Format("Could not verify group. Error code {0}", errorCode)) + End If + + ' force to refresh cache + RefreshMailServerCache(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't populate group info.", ex) + End Try + End Sub 'PopulateGroupInfo + + Protected Overridable Sub ClearListMembers(ByRef service As Service, ByRef mdList As Object) + Dim members As New ArrayList() + + Dim member As Object = CreateMDListMember(service) + + Dim [next] As Boolean = mdList.GetFirstMember(member) + + While [next] + If Not (member.Email Is Nothing) And member.Email.Length > 0 Then + members.Add(member.Email) + End If + [next] = mdList.GetNextMember(member) + End While + + Dim email As String + For Each email In members + service.ComObject.ListRemoveMember(mdList.ListName, email) + Next email + End Sub 'ClearListMembers + + Protected Sub UpdateUserAccessInfo(ByVal userDbPath As String, ByRef account As MailAccount) + Dim service As Service = LoadServiceProvider() + + Dim hUser As Integer = service.ComObject.GetByEmail(account.Name) + + If hUser = CInt(MD_HANDLE.MD_BADHANDLE) Then + Throw New Exception(String.Format("Mailbox '{0}' not found.", account.Name)) + End If + + Dim mdUserInfo As Object = CreateMDUserInfo(service) + + PopulateUserInfo(account, mdUserInfo) + service.ComObject.FilterUserInfo(mdUserInfo) + + Dim recordExists As Boolean + + Try + If AccountExists(account.Name) Then + + Dim access As Long = 1 + + If account.Enabled Then + If EnableIMAP And EnablePOP Then + access = 1 + ElseIf EnablePOP Then + access = 2 + ElseIf EnableIMAP Then + access = 3 + End If + Else + access = 4 + End If + + recordExists = True + + ' Update access info (aka access-type) + mdUserInfo.AccessType = access + + ' Update mailbox size + If account.MaxMailboxSize > 0 Then + mdUserInfo.ApplyQuotas = True + mdUserInfo.MaxDiskSpace = CType(account.MaxMailboxSize * 1000, Long) + End If + + ' Send the changes + Dim errorCode As Integer = service.ComObject.VerifyUserInfo(mdUserInfo, CInt(MD_VRFYFLAGS.MDUSERDLL_VRFYALL)) + If errorCode <> CInt(MD_ERROR.MDDLLERR_NOERROR) Then + Throw New Exception(String.Format("Could not validate account info. Please make sure that all entries are valid. Error code {0}", errorCode)) + End If + + If Not service.ComObject.SetUserInfo(hUser, mdUserInfo) Then + Throw New Exception(String.Format("Could not update mailbox '{0}'", account.Name)) + End If + + End If + + ' Check whether a user record exists + If Not recordExists Then + Throw New Exception("Could not find mailbox info.") + End If + Catch ex As Exception + Throw New Exception("Could not update mailbox access info.", ex) + End Try + End Sub + + Protected Sub UpdateUserResponderInfo(ByVal responderDbPath As String, ByVal mailbox As MailAccount) + Try + If Not mailbox.ResponderEnabled Then + If Not File.Exists(responderDbPath) Then + Return + End If + If GetProfileSection(mailbox.Name, responderDbPath) <> 0 Then + If Not DeleteProfileSection(mailbox.Name, responderDbPath) Then + Throw New Exception("Could not delete profile section.") + End If + End If + Else + If Not File.Exists(responderDbPath) Then + Dim stream As FileStream = File.Create(responderDbPath) + stream.Close() + End If + Dim responderFile As String = Path.Combine(GetApplicationDir(), mailbox.Name + ".rsp") + If GetProfileSection(mailbox.Name, responderDbPath) <> 0 Then + responderFile = GetProfileString(mailbox.Name, "MailBackFile", responderFile, responderDbPath) + End If + ' update profile section + WriteProfileString(mailbox.Name, "MailBackFile", responderFile, responderDbPath) + WriteProfileString(mailbox.Name, "PassMessage", "No", responderDbPath) + WriteProfileString(mailbox.Name, "ResponderSubject", mailbox.ResponderSubject, responderDbPath) + ' update responder message body in responder file. + Dim sw As New StreamWriter(responderFile) + Try + sw.Write(mailbox.ResponderMessage) + Finally + sw.Dispose() + End Try + End If + Catch ex As Exception + Throw New Exception("Can't update mailbox responder info.", ex) + End Try + End Sub 'UpdateUserResponderInfo + + Private Shared Sub WriteDomainInfo(ByVal domain As MailDomain, ByVal domainDbPath As String) + ' Domain users quota + WriteProfileString(domain.Name, "MaxUsers", domain.MaxDomainUsers.ToString(), domainDbPath) + ' Domain lists quota + WriteProfileString(domain.Name, "MaxLists", domain.MaxLists.ToString(), domainDbPath) + + Dim strIP As String = DefaultDomainIP + If Not domain.ServerIP Is Nothing AndAlso domain.ServerIP.Length > 0 Then + strIP = domain.ServerIP + End If + + ' IP address + WriteProfileString(domain.Name, "IP", strIP, domainDbPath) + + ' Delete accounts within this domain if inactive for XX days (0=never) + WriteProfileString(domain.Name, "MaxInactive", domain.Item("MaxInactiveLimit"), domainDbPath) + + ' Delete messages kept by users within this domain if older than XX days (0=never) + WriteProfileString(domain.Name, "MaxMessageAge", domain.Item("MaxMessageAge"), domainDbPath) + + ' Delete deleted IMAP messages in this domain older than XX days (0 = never) + WriteProfileString(domain.Name, "MaxDeletedIMAPMessageAge", domain.Item("MaxDeletedImapMessageAge"), domainDbPath) + + ' Bind to this IP if you want to bind the secondary domain to its IP address + WriteProfileString(domain.Name, "Bind", YesNoBooleanToString(domain.Item("BindIP")), domainDbPath) + + ' Delete old messages from IMAP folders as well + WriteProfileString(domain.Name, "RecurseIMAP", YesNoBooleanToString(domain.Item("RecurseIMAP")), domainDbPath) + + ' If AntiVirus for MDaemon is installed, this option enables you the AntiVirus settings to be applied to the selected secondary domain + WriteProfileString(domain.Name, "EnableAntiVirus", YesNoBooleanToString(domain.Item("EnableAntiVirus")), domainDbPath) + + ' If you want MDaemon's current Spam Filter settings to be applied to the selected secondary domain + WriteProfileString(domain.Name, "EnableAntiSpam", YesNoBooleanToString(domain.Item("EnableAntiSpam")), domainDbPath) + + End Sub 'WriteDomainInfo + + Private Shared Function YesNoBooleanToString(ByVal val As Object) As String + Dim resultStr As String = "No" + + If Not val Is Nothing Then + Dim valueStr As String = val.ToString() + + Select Case valueStr + Case "True" + resultStr = "Yes" + Case "true" + resultStr = "Yes" + Case "1" + resultStr = "Yes" + End Select + End If + + Return resultStr + End Function 'YesNoBooleanToString + + Protected Overridable Function EmailExists(ByRef userName As String) As Boolean + Dim service As Service = LoadServiceProvider() + Dim exists As Boolean = False + + Try + exists = service.ComObject.UserExists(userName) + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception(String.Format("Can't check whether '{0}' exists", userName), ex) + End Try + + Return exists + End Function 'EmailExists + + Protected Overridable Function MailListExists(ByRef maillistName As String) As Boolean + Return EmailExists(maillistName) + End Function 'MaillistExists + + Protected Overridable Sub PopulateMailListInfo(ByRef list As MailList, ByRef verify As Boolean) + Dim service As Service = LoadServiceProvider() + + Try + Dim mdList As Object = CreateMDList(service, list.Name) + + mdList.CatalogName = String.Empty + mdList.DefaultMode = 1 + mdList.DigestFlags = 0 + mdList.DigestMBF = "DIGEST" + mdList.FooterFilePath = list.Item("FooterFilePath") + mdList.HeaderFilePath = list.Item("HeaderFilePath") + mdList.KillFilePath = list.Item("SuppressionFilePath") + 'flags + mdList.ListFlags = MDaemonInterop.MDLIST_AUTOPRUNE Or MDaemonInterop.MDLIST_CRACKMESSAGE Or MDaemonInterop.MDLIST_FORCEUNIQUEID + + Select Case list.PostingMode + Case PostingMode.MembersCanPost + mdList.ListFlags = mdList.ListFlags Or MDaemonInterop.MDLIST_PRIVATE + Case PostingMode.PasswordProtectedPosting + mdList.ListFlags = mdList.ListFlags Or MDaemonInterop.MDLIST_PASSWORDPOST + End Select + + If list.EnableSubjectPrefix Then + mdList.ListFlags = mdList.ListFlags Or MDaemonInterop.MDLIST_LISTNAMEINSUBJECT + End If + If YesNoBooleanToString(list.Item("ShowThreadNumbersInSubject")) = "Yes" Then + mdList.ListFlags = mdList.ListFlags Or MDaemonInterop.MDLIST_THREADNUMBINSUBJECT + End If + If list.Moderated Then + mdList.ListFlags = mdList.ListFlags Or MDaemonInterop.MDLIST_MODERATED + + If String.IsNullOrEmpty(list.ModeratorAddress) Then + Throw New Exception("Mailing list is supposed to be as moderated, but moderator address not specified.") + End If + + mdList.ModeratorEmail = list.ModeratorAddress + End If + + Select Case list.ReplyToMode + Case ReplyTo.RepliesToSender + mdList.ReplyAddress = String.Empty + Case ReplyTo.RepliesToList + mdList.ReplyAddress = list.Name + End Select + + + + + mdList.ListName = list.Name + mdList.ListPassword = list.Password + mdList.MaxLineCount = 0 'DIGEST + mdList.MaxMembers = Convert.ToInt32(list.Item("MaxMembers")) + mdList.MaxMessageCount = 0 'DIGEST + mdList.MaxMessageSize = list.MaxMessageSize + mdList.NotificationEmail = String.Empty + mdList.PrecedenceLevel = 60 + mdList.PublicFolderName = String.Empty + mdList.RemoteHost = String.Empty + + mdList.RoutingLimit = 0 + mdList.SendNotesTo = String.Empty + mdList.WelcomeFilePath = list.Item("WelcomeFilePath") + + Dim errorCode As Integer = MDaemonInterop.MDLISTERR_NOERROR + + If verify Then + errorCode = service.ComObject.VerifyListInfo(mdList) + End If + + If errorCode = MDaemonInterop.MDLISTERR_NOERROR Then + If Not service.ComObject.WriteList(mdList) Then + Throw New Exception("Could not write mail list to disk.") + End If + + ' Clear list + ClearListMembers(service, mdList) + + Dim member As String + For Each member In list.Members + service.ComObject.ListAddMember(list.Name, member, String.Empty) + Next member + + ' force to refresh cache + RefreshMailServerCache(service) + + UnloadServiceProvider(service) + Else + Throw New Exception(String.Format("Could not verify mail list. Error code {0}", errorCode)) + End If + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't populate mail list info.", ex) + End Try + End Sub 'PopulateMailListInfo + + Protected Overridable Sub DeleteAlias(ByVal email As String, ByVal [alias] As String) + Dim service As Service = LoadServiceProvider() + Try + If Not service.ComObject.DeleteAlias([alias], email) Then + Throw New Exception(String.Format("Alias {0} not found", [alias])) + End If + + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't delete alias", ex) + End Try + End Sub 'DeleteAlias + + Protected Overridable Function CreateMailboxItem(ByRef mdUserInfo As Object) As MailAccount + Dim mailbox As New MailAccount() + mailbox.Name = mdUserInfo.Email + + Dim names() As String = mdUserInfo.FullName.ToString().Split(New String() {" "}, StringSplitOptions.None) + + If names.Length = 2 Then + mailbox.FirstName = names(0) + mailbox.LastName = names(1) + ElseIf names.Length = 1 Then + mailbox.FirstName = names(0) + End If + + mailbox.Password = mdUserInfo.Password + mailbox.Item("Comments") = mdUserInfo.Comments + mailbox.Item("AutoDecode") = Convert.ToBoolean(mdUserInfo.AutoDecode) + mailbox.Item("MailFormat") = mdUserInfo.MailFormat + mailbox.Item("HideFromEveryone") = Convert.ToBoolean(mdUserInfo.HideFromEveryone) + mailbox.Item("AllowChangeViaEmail") = Convert.ToBoolean(mdUserInfo.AllowChangeViaEmail) + mailbox.Item("CheckAddrBook") = Convert.ToBoolean(mdUserInfo.CheckAddrBook) + mailbox.Item("EncryptEmail") = Convert.ToBoolean(mdUserInfo.EncryptEmail) + mailbox.Item("UpdateAddrBook") = Convert.ToBoolean(mdUserInfo.UpdateAddrBook) + 'forwarding + Dim isForwarding As Boolean = Convert.ToBoolean(mdUserInfo.IsForwarding) + + If isForwarding Then + mailbox.DeleteOnForward = True + mailbox.ForwardingAddresses = CStr(mdUserInfo.FwdAddress).Split(",".ToCharArray()) + mailbox.Item("FwdHost") = mdUserInfo.FwdHost + mailbox.Item("FwdPort") = mdUserInfo.FwdPort + mailbox.Item("FwdSendAs") = mdUserInfo.FwdSendAs + End If + + mailbox.RetainLocalCopy = Convert.ToBoolean(mdUserInfo.KeepForwardedMail) + + + mailbox.MaxMailboxSize = ParseLong(mdUserInfo.MaxDiskSpace, 0) / 1000 + + Return mailbox + End Function 'CreateMailboxItem + + Protected Overridable Sub PopulateMailboxAccessInfo(ByVal userDbPath As String, ByVal mailbox As MailAccount) + Dim service As Service = LoadServiceProvider() + + Dim hUser As Integer = service.ComObject.GetByEmail(mailbox.Name) + + If hUser = CInt(MD_HANDLE.MD_BADHANDLE) Then + Throw New Exception(String.Format("Mailbox '{0}' not found.", mailbox.Name)) + End If + + Dim mdUserInfo As Object = CreateMDUserInfo(service) + + PopulateUserInfo(mailbox, mdUserInfo) + service.ComObject.FilterUserInfo(mdUserInfo) + + Dim recordExists As Boolean + + Try + If AccountExists(mailbox.Name) Then + + Dim access As Long = 1 + + Select Case mdUserInfo.AccessType + Case 1 + mailbox.Enabled = True + mailbox.Item("EnableIMAP") = True + mailbox.Item("EnablePOP") = True + + Case 2 + mailbox.Enabled = True + mailbox.Item("EnableIMAP") = False + mailbox.Item("EnablePOP") = True + + Case 3 + mailbox.Enabled = True + mailbox.Item("EnableIMAP") = True + mailbox.Item("EnablePOP") = False + + Case Else + mailbox.Enabled = False + mailbox.Item("EnableIMAP") = False + mailbox.Item("EnablePOP") = False + + End Select + + recordExists = True + + End If + + If Not recordExists Then + Throw New Exception(String.Format("Could not find mailbox '{0}' info.", mailbox.Name)) + End If + + Catch ex As Exception + Throw New Exception(String.Format("Could not read mailbox '{0}' access info.", mailbox.Name), ex) + End Try + End Sub 'PopulateMailboxAccessInfo + + Protected Overridable Sub PopulateMailboxResponderInfo(ByVal responderDbPath As String, ByVal mailbox As MailAccount) + Try + If Not File.Exists(responderDbPath) Then + mailbox.ResponderEnabled = False + mailbox.ResponderMessage = String.Empty + Exit Sub + End If + + Dim retVal As Integer = GetProfileSection(mailbox.Name, responderDbPath) + + If retVal = 0 Then + mailbox.ResponderEnabled = False + mailbox.ResponderMessage = String.Empty + Else + mailbox.ResponderEnabled = True + Dim responderFile As String = GetProfileString(mailbox.Name, "MailBackFile", String.Empty, responderDbPath) + mailbox.ResponderSubject = GetProfileString(mailbox.Name, "ResponderSubject", String.Empty, responderDbPath) + + If responderFile Is Nothing Or responderFile.Length = 0 Then + Throw New Exception("Responder file not specified.") + End If + + If Not File.Exists(responderFile) Then + Throw New Exception("Responder file not found.") + End If + + Using reader As New StreamReader(responderFile) + 'Dim line As String = String.Empty + + 'Dim builder As StringBuilder = New StringBuilder() + + 'Do + ' line = reader.ReadLine() + + ' If line Is Nothing Then + ' Continue Do + ' End If + + ' builder.Append(line) + ' builder.Append(Environment.NewLine) + 'Loop While Not line Is Nothing + + 'mailbox.ResponderMessage = builder.ToString() + + mailbox.ResponderMessage = reader.ReadToEnd() + End Using + End If + Catch ex As Exception + Throw New Exception("Can't read mailbox responder info.", ex) + End Try + End Sub + + Protected Overridable Function CreateDomainItemFromProfile(ByVal domainName As String, ByVal profilePath As String) As MailDomain + Dim item As New MailDomain() + item.Name = domainName + item.MaxDomainUsers = DefaultDomainMaxUsers + item.MaxLists = DefaultDomainMaxLists + item.ServerIP = DefaultDomainIP + item.Item("MaxInactiveLimit") = DefaultDomainMaxInactive + item.Item("MaxMessageAge") = DefaultDomainMaxMessageAge + item.Item("MaxDeletedImapMessageAge") = DefaultDomainMaxDeletedIMAPMessageAge + item.Item("BindIP") = DefaultDomainBind + item.Item("RecurseIMAP") = DefaultDomainRecurseIMAP + item.Item("EnableAntiVirus") = DefaultDomainEnableAntiVirus + item.Item("EnableAntiSpam") = DefaultDomainEnableAntiSpam + + Dim retVal As Integer = GetProfileSection(domainName, profilePath) + If retVal <> 0 Then + Dim strMaxUsers As String = GetProfileString(domainName, "MaxUsers", DefaultDomainMaxUsers.ToString(), profilePath) + item.MaxDomainUsers = ParseInt32(strMaxUsers, DefaultDomainMaxUsers) + + Dim strMaxLists As String = GetProfileString(domainName, "MaxLists", DefaultDomainMaxLists.ToString(), profilePath) + item.MaxLists = ParseInt32(strMaxLists, DefaultDomainMaxLists) + + Dim strIP As String = GetProfileString(domainName, "IP", DefaultDomainIP, profilePath) + item.ServerIP = strIP + + item.Item("MaxInactiveLimit") = GetProfileString(domainName, "MaxInactive", DefaultDomainMaxInactive.ToString(), profilePath) + + item.Item("MaxMessageAge") = GetProfileString(domainName, "MaxMessageAge", DefaultDomainMaxMessageAge.ToString(), profilePath) + + item.Item("MaxDeletedImapMessageAge") = GetProfileString(domainName, "MaxDeletedIMAPMessageAge", DefaultDomainMaxDeletedIMAPMessageAge.ToString(), profilePath) + + item.Item("BindIP") = GetProfileString(domainName, "Bind", YesNoBooleanToString(DefaultDomainBind), profilePath) + + item.Item("RecurseIMAP") = GetProfileString(domainName, "RecurseIMAP", YesNoBooleanToString(DefaultDomainRecurseIMAP), profilePath) + + item.Item("EnableAntiVirus") = GetProfileString(domainName, "EnableAntiVirus", YesNoBooleanToString(DefaultDomainEnableAntiVirus), profilePath) + + item.Item("EnableAntiSpam") = GetProfileString(domainName, "EnableAntiSpam", YesNoBooleanToString(DefaultDomainEnableAntiSpam), profilePath) + End If + Return item + End Function 'CreateDomainItemFromProfile + + Protected Overridable Function MDListToMailGroup(ByRef mdList As Object) As MailGroup + Dim group As New MailGroup() + + group.Name = mdList.ListName + group.Item("CatalogName") = mdList.CatalogName + + group.Item("DefaultMode") = mdList.DefaultMode.ToString() + group.Item("DigestFlags") = mdList.DigestFlags.ToString() + group.Item("DigestMBF") = mdList.DigestMBF + + group.Item("FooterFilePath") = mdList.FooterFilePath + group.Item("HeaderFilePath") = mdList.HeaderFilePath + group.Item("KillFilePath") = mdList.KillFilePath + group.Item("ListFlags") = mdList.ListFlags.ToString() + group.Item("GroupPassword") = mdList.ListPassword + group.Item("ModeratorEmail") = mdList.ModeratorEmail + group.Item("NotificationEmail") = mdList.NotificationEmail + + group.Item("MaxLineCount") = mdList.MaxLineCount.ToString() + group.Item("MaxMembers") = mdList.MaxMembers.ToString() + group.Item("MaxMessageCount") = mdList.MaxMessageCount.ToString() + group.Item("MaxMessageSize") = mdList.MaxMessageSize.ToString() + + 'mdList.PrecedenceLevel = 50 + group.Item("PublicFolderName") = mdList.PublicFolderName + group.Item("RemoteHost") = mdList.RemoteHost + group.Item("ReplyAddress") = mdList.ReplyAddress + group.Item("RoutingLimit") = mdList.RoutingLimit.ToString() + group.Item("SendNotesTo") = mdList.SendNotesTo + group.Item("WelcomeFilePath") = mdList.WelcomeFilePath + + Return group + End Function + + Protected Overridable Function MailGroupToMDList(ByRef service As Service, ByRef group As MailGroup) As Object + Dim mdList As Object = Nothing + + If service.Succeed Then + mdList = CreateMDList(service, group.Name) + mdList.CatalogName = group.Item("CatalogName") + mdList.DefaultMode = ParseLong(group.Item("DefaultMode"), 1) + mdList.DigestFlags = ParseLong(group.Item("DigestFlags"), 0) + + mdList.DigestMBF = "DIGEST" + + mdList.FooterFilePath = group.Item("FooterFilePath") + mdList.HeaderFilePath = group.Item("HeaderFilePath") + mdList.KillFilePath = group.Item("KillFilePath") + + mdList.ListFlags = MDaemonInterop.MDLIST_AUTOPRUNE Or MDaemonInterop.MDLIST_USELISTNAME Or MDaemonInterop.MDLIST_CRACKMESSAGE Or MDaemonInterop.MDLIST_FORCEUNIQUEID + + mdList.ListName = group.Name + mdList.ListPassword = group.Item("GroupPassword") + mdList.ModeratorEmail = group.Item("ModeratorEmail") + mdList.NotificationEmail = group.Item("NotificationEmail") + + mdList.MaxLineCount = ParseLong(group.Item("MaxLineCount"), 0) + mdList.MaxMembers = ParseLong(group.Item("MaxMembers"), 0) + mdList.MaxMessageCount = ParseLong(group.Item("MaxMessageCount"), 0) + mdList.MaxMessageSize = ParseLong(group.Item("MaxMessageSize"), 0) + + mdList.PrecedenceLevel = 50 + + mdList.PublicFolderName = group.Item("PublicFolderName") + mdList.RemoteHost = group.Item("RemoteHost") + mdList.ReplyAddress = group.Item("ReplyAddress") + mdList.RoutingLimit = ParseLong(group.Item("RoutingLimit"), 0) + mdList.SendNotesTo = group.Item("SendNotesTo") + mdList.WelcomeFilePath = group.Item("WelcomeFilePath") + End If + + Return mdList + End Function + + Protected Overridable Function CreateMailGroupItem(ByRef service As Service, ByRef mdList As Object) As MailGroup + Dim group As MailGroup = Nothing + + group = MDListToMailGroup(mdList) + + Dim member As Object = CreateMDListMember(service) + Dim members As New List(Of String) + + Dim [next] As Boolean = mdList.GetFirstMember(member) + + While [next] + If Not member.Email Is Nothing And member.Email.Length > 0 Then + members.Add(member.Email) + End If + [next] = mdList.GetNextMember(member) + End While + + group.Members = members.ToArray() + + Return group + End Function 'CreateMailGroupItem + + + Protected Overridable Function CreateMailListItem(ByRef service As Service, ByRef mdList As Object) As MailList + Dim list As New MailList() + list.Name = mdList.ListName + + list.Password = mdList.ListPassword + list.ModeratorAddress = mdList.ModeratorEmail + list.MaxMessageSize = mdList.MaxMessageSize + list.Item("MaxMembers") = mdList.MaxMembers + + list.Item("FooterFilePath") = mdList.FooterFilePath + list.Item("HeaderFilePath") = mdList.HeaderFilePath + list.Item("SuppressionFilePath") = mdList.KillFilePath + list.Item("WelcomeFilePath") = mdList.WelcomeFilePath + + list.Moderated = (mdList.ListFlags And MDaemonInterop.MDLIST_MODERATED) = MDaemonInterop.MDLIST_MODERATED + If (mdList.ListFlags And MDaemonInterop.MDLIST_PRIVATE) = MDaemonInterop.MDLIST_PRIVATE Then + list.PostingMode = PostingMode.MembersCanPost + ElseIf (mdList.ListFlags And MDaemonInterop.MDLIST_PASSWORDPOST) = MDaemonInterop.MDLIST_PASSWORDPOST Then + list.PostingMode = PostingMode.PasswordProtectedPosting + Else + list.PostingMode = PostingMode.AnyoneCanPost + End If + + + + If mdList.ReplyAddress.Length > 0 Then + list.ReplyToMode = ReplyTo.RepliesToList + ElseIf mdList.ReplyAddress.Length = 0 Then + list.ReplyToMode = ReplyTo.RepliesToSender + End If + + + If (mdList.ListFlags And MDaemonInterop.MDLIST_LISTNAMEINSUBJECT) = MDaemonInterop.MDLIST_LISTNAMEINSUBJECT Then + list.Item("ShowNameInSubject") = "True" + End If + + If (mdList.ListFlags And MDaemonInterop.MDLIST_THREADNUMBINSUBJECT) = MDaemonInterop.MDLIST_THREADNUMBINSUBJECT Then + list.Item("ShowThreadNumbersInSubject") = "True" + End If + + If service.Succeed Then + Dim member As Object = CreateMDListMember(service) + Dim members As New List(Of String) + Dim [next] As Boolean = mdList.GetFirstMember(member) + + While [next] + If Not (member.Email Is Nothing) And member.Email.Length > 0 Then + members.Add(member.Email) + End If + [next] = mdList.GetNextMember(member) + End While + + list.Members = members.ToArray() + End If + + Return list + End Function 'CreateMailListItem + + Protected Overridable Function GetAllLists(ByRef service As Service) As String() + Dim arrayList As New List(Of String) + Dim objects As Object = Nothing + + Try + If service.Succeed Then + service.ComObject.GetMailingLists(objects) + Dim lists As Array = TryCast(objects, Array) + + If lists Is Nothing Then + Exit Try + End If + + Dim list As Object + + For Each list In lists + Dim listName As String = list.ToString() + If listName Is Nothing Then + Continue For + End If + If listName.Length = 0 Then + Continue For + End If + + arrayList.Add(listName) + Next list + End If + Catch ex As Exception + Throw New Exception("Can't get the list of mailing lists", ex) + End Try + + Return arrayList.ToArray() + End Function 'GetAllLists +#End Region + +#Region "Convert Routines" + Private Shared Function ParseLong(ByVal strValue As String, ByVal defaultValue As Long) As Long + Dim ret As Long = defaultValue + Try + ret = Long.Parse(strValue) + Catch + End Try + Return ret + End Function + + Private Shared Function ParseInt32(ByVal strValue As String, ByVal defaultValue As Integer) As Integer + Dim ret As Integer = defaultValue + Try + ret = Int32.Parse(strValue) + Catch + End Try + Return ret + End Function 'ParseInt32 + + Private Shared Function ParseYesNoBoolean(ByVal strValue As String, ByVal defaultValue As Boolean) As Boolean + Dim ret As Boolean = defaultValue + Dim val As String = strValue.Trim().ToLower() + If val = "yes" Then + ret = True + Else + If val = "no" Then + ret = False + End If + End If + Return ret + End Function 'ParseYesNoBoolean +#End Region + +#Region "Profile Section" + Private Shared Function DeleteProfileSection(ByVal section As String, ByVal file As String) As Boolean + Dim key As String = Nothing + Dim strValue As String = Nothing + Dim retVal As Integer = MDaemonInterop.WritePrivateProfileString(section, key, strValue, file) + Return retVal <> 0 + End Function 'DeleteProfileSection + + Private Shared Function WriteProfileSection(ByVal section As String, ByVal file As String) As Boolean + Dim content As String = String.Empty + Dim retVal As Integer = MDaemonInterop.WritePrivateProfileSection(section, content, file) + Return retVal <> 0 + End Function 'WriteProfileSection + + Private Shared Function WriteProfileString(ByVal section As String, ByVal key As String, ByVal strValue As String, ByVal file As String) As Boolean + Dim retVal As Integer = MDaemonInterop.WritePrivateProfileString(section, key, strValue, file) + Return retVal <> 0 + End Function 'WriteProfileString + + Private Shared Function GetProfileString(ByVal section As String, ByVal key As String, ByVal defaultValue As String, ByVal file As String) As String + Dim retVal As Integer = 0 + Dim retString As New String(" "c, &H100) + retVal = MDaemonInterop.GetPrivateProfileString(section, key, defaultValue, retString, &HFF, file) + If retVal = 0 Then + retString = Nothing + Else + retString = Trim(retString).Replace(CStr(ControlChars.NullChar), "") + End If + Return retString + End Function 'GetProfileString + + Private Shared Function GetProfileSection(ByVal section As String, ByVal file As String) As Integer + Dim retVal As Integer = 0 + Dim retString As String = String.Empty + retVal = MDaemonInterop.GetPrivateProfileSection(section, retString, &HFF, file) + Return retVal + End Function 'GetProfileSection +#End Region + + Public Function AccountExists(ByVal mailboxName As String) As Boolean Implements IMailServer.AccountExists + Dim service As Service = LoadServiceProvider() + Dim exists As Boolean = False + + If service.Succeed Then + exists = service.ComObject.UserExists(mailboxName) + End If + + UnloadServiceProvider(service) + + Return exists + End Function + + Public Sub AddDomainAlias(ByVal domainName As String, ByVal aliasName As String) Implements IMailServer.AddDomainAlias + Dim service As Service = LoadServiceProvider() + + Try + aliasName = String.Concat("*@", aliasName) + domainName = String.Concat("*@", domainName) + + Dim succeed As Boolean = service.ComObject.CreateAlias(domainName, aliasName) + + If Not succeed Then + Throw New Exception("Can't add domain alias.") + End If + + ' force to refresh cache + RefreshMailServerCache(service) + + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + + Throw New Exception("Can't add domain alias.", ex) + End Try + + End Sub + + Public Sub CreateAccount(ByVal mailbox As MailAccount) Implements IMailServer.CreateAccount + Dim service As Service = LoadServiceProvider() + + Try + Dim mdUserInfo As Object = CreateMDUserInfo(service) + PopulateUserInfo(mailbox, mdUserInfo) + service.ComObject.FilterUserInfo(mdUserInfo) + Dim errorCode As Integer = service.ComObject.AddUser(mdUserInfo) + + Select Case CType(errorCode, MD_ERROR) + Case MD_ERROR.MDDLLERR_NOERROR + Dim userDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_USERLISTDB) + + UpdateUserAccessInfo(userDbPath, mailbox) + + Dim responderDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_AUTORESPDB) + + UpdateUserResponderInfo(responderDbPath, mailbox) + 'service.ComObject.ReloadUsers() + Case MD_ERROR.MDDLLERR_USEREXISTS + Throw New Exception("Mailbox is already registered.") + Case Else + Throw New Exception(String.Format("Could not add user. Error code {0}", errorCode)) + End Select + + ' force to refresh cache + 'RefreshMailServerCache(service) + + ' force to reload DLL data + 'service.ComObject.ReloadUsers() + + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't create mailbox", ex) + End Try + End Sub + + Public Sub CreateDomain(ByVal domain As MailDomain) Implements IMailServer.CreateDomain + Dim service As Service = LoadServiceProvider() + + Try + Dim domainDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_DOMAINDB) + Dim retVal As Integer = GetProfileSection(domain.Name, domainDbPath) + If retVal <> 0 Then + Throw New Exception(String.Format("Domain '{0}' already exists on the server", domain.Name)) + End If + If Not WriteProfileSection(domain.Name, domainDbPath) Then + Throw New Exception(String.Format("Could not create profile section in '{0}' file.", domainDbPath)) + End If + WriteDomainInfo(domain, domainDbPath) + + ' force to refresh cache + RefreshMailServerCache(service) + + ' force to reload DLL data + service.ComObject.ReloadUsers() + + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't create domain", ex) + End Try + End Sub + + Public Sub CreateGroup(ByVal group As MailGroup) Implements IMailServer.CreateGroup + Try + If GroupExists(group.Name) Then + Throw New Exception(String.Format("Group {0} already exists.", group.Name)) + End If + PopulateGroupInfo(group, True) + Catch ex As Exception + Throw New Exception("Can't create group.", ex) + End Try + End Sub + + Public Sub CreateList(ByVal maillist As MailList) Implements IMailServer.CreateList + Try + If MailListExists(maillist.Name) Then + Throw New Exception(String.Format("Mail list {0} already exists.", maillist.Name)) + End If + + PopulateMailListInfo(maillist, False) + Catch ex As Exception + Throw New Exception("Can't create mail list.", ex) + End Try + End Sub + + Public Sub DeleteAccount(ByVal mailboxName As String) Implements IMailServer.DeleteAccount + Dim service As Service = LoadServiceProvider() + Try + Dim res As Boolean = service.ComObject.DeleteUser(mailboxName, CInt(MD_DELFLAGS.MDUSERDLL_DDELETEALL)) + If Not res Then + Throw New Exception("Can't delete mailbox") + End If + + UnloadServiceProvider(service) + + ' force to refresh cache + RefreshMailServerCache(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't delete mailbox", ex) + End Try + End Sub + + Public Function MailAliasExists(ByVal mailAliasName As String) As Boolean Implements IMailServer.MailAliasExists + Dim path As String = GetAppFolderPath() + "Alias.dat" + Dim split As String() + Using sr As StreamReader = New StreamReader(path) + Dim line As String + Do + line = sr.ReadLine() + If (Not String.IsNullOrEmpty(line)) Then + split = line.Split(New [Char]() {"="c}) + Else + Continue Do + End If + If mailAliasName.Equals(split(0).Trim) Then + Return True + End If + Loop Until line Is Nothing + sr.Close() + End Using + Return False + End Function + + Public Function GetMailAliases(ByVal domainName As String) As MailAlias() Implements IMailServer.GetMailAliases + Dim aliases As List(Of MailAlias) = New List(Of MailAlias) + Dim path As String = GetAppFolderPath() + "Alias.dat" + Dim split As String() + Using sr As StreamReader = New StreamReader(path) + Dim line As String + Do + line = sr.ReadLine() + If (Not String.IsNullOrEmpty(line)) Then + split = line.Split(New [Char]() {"="c}) + Else + Continue Do + End If + If domainName.Equals(GetDomainName(split(0).Trim)) Then + Dim mailAlias As New MailAlias() + mailAlias.Name = split(0).Trim + mailAlias.ForwardTo = split(1).Trim + aliases.Add(mailAlias) + End If + Loop Until line Is Nothing + sr.Close() + End Using + + + Return aliases.ToArray + End Function + + Public Function GetMailAlias(ByVal mailAliasName As String) As MailAlias Implements IMailServer.GetMailAlias + Dim mailAlias As New MailAlias + Dim newMailAlias As New MailAlias + + If AccountExists(mailAliasName) Then + Try + Dim mailAccount As MailAccount = GetAccount(mailAliasName) + newMailAlias.Name = mailAccount.Name + newMailAlias.ForwardTo = mailAccount.ForwardingAddresses(0) + 'delete incorrect account + DeleteAccount(mailAliasName) + 'recreate mail alias + CreateMailAlias(newMailAlias) + Return newMailAlias + Catch ex As Exception + 'do nothing + End Try + End If + + Dim path As String = GetAppFolderPath() + "Alias.dat" + Dim split As String() + Using sr As StreamReader = New StreamReader(path) + Dim line As String + Do + line = sr.ReadLine() + If (Not String.IsNullOrEmpty(line)) Then + split = line.Split(New [Char]() {"="c}) + Else + Continue Do + End If + If mailAliasName.Equals(split(0).Trim) Then + mailAlias.Name = split(0).Trim + mailAlias.ForwardTo = split(1).Trim + Exit Do + End If + Loop Until line Is Nothing + sr.Close() + End Using + Return mailAlias + End Function + + Public Sub CreateMailAlias(ByVal mailAlias As MailAlias) Implements IMailServer.CreateMailAlias + + Dim service As Service = LoadServiceProvider() + Dim succeed As Boolean = service.ComObject.CreateAlias(mailAlias.ForwardTo, mailAlias.Name) + + If Not succeed Then + Throw New Exception(String.Format("Could not create mail alias {0}", mailAlias.Name)) + End If + End Sub + + Public Sub UpdateMailAlias(ByVal mailAlias As MailAlias) Implements IMailServer.UpdateMailAlias + DeleteMailAlias(mailAlias.Name) + 'recreate alias + CreateMailAlias(mailAlias) + End Sub + + Public Sub DeleteMailAlias(ByVal mailAliasName As String) Implements IMailServer.DeleteMailAlias + Dim service As Service = LoadServiceProvider() + Dim mailAlias As MailAlias = GetMailAlias(mailAliasName) + + Dim succeed As Boolean = service.ComObject.DeleteAlias(mailAlias.ForwardTo, mailAlias.Name) + + If Not succeed Then + Throw New Exception(String.Format("Could not delete mail alias {0}", mailAlias.Name)) + End If + End Sub + + Public Sub DeleteDomain(ByVal domainName As String) Implements IMailServer.DeleteDomain + Dim service As Service = LoadServiceProvider() + + Try + service.ComObject.DeleteDomain(domainName) + + ' force to refresh cache + RefreshMailServerCache(service) + + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't delete domain", ex) + End Try + End Sub + + Public Overrides Sub DeleteServiceItems(ByVal items() As ServiceProviderItem) + + For Each item As ServiceProviderItem In items + + If (TypeOf item Is MailDomain) Then + + Try + DeleteDomain(item.Name) + Catch ex As Exception + Log.WriteError(String.Format("Error deleting '{0}' SmarterMail domain", item.Name), ex) + End Try + + End If + + Next + + End Sub + + + Public Sub DeleteDomainAlias(ByVal domainName As String, ByVal aliasName As String) Implements IMailServer.DeleteDomainAlias + Try + If Not DomainAliasExists(domainName, aliasName) Then + Throw New Exception(String.Format("Domain alias {0} does not exist", aliasName)) + End If + Dim [alias] As String = "*@" + aliasName + Dim domain As String = "*@" + domainName + DeleteAlias(domain, [alias]) + Catch ex As Exception + Throw New Exception("Can't delete domain alias", ex) + End Try + End Sub + + Public Sub DeleteGroup(ByVal groupName As String) Implements IMailServer.DeleteGroup + DeleteList(groupName) + End Sub + + Public Sub DeleteList(ByVal maillistName As String) Implements IMailServer.DeleteList + Dim service As Service = LoadServiceProvider() + + Try + service.ComObject.DeleteList(maillistName) + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't delete list", ex) + End Try + + End Sub + + Public Function DomainAliasExists(ByVal domainName As String, ByVal aliasName As String) As Boolean Implements IMailServer.DomainAliasExists + Dim exists As Boolean = False + + Try + Dim aliases As String() = GetDomainAliases(domainName) + Dim [alias] As String + For Each [alias] In aliases + If String.Compare([alias], aliasName, True) = 0 Then + exists = True + Exit For + End If + Next [alias] + Catch ex As Exception + Throw New Exception("Can't check whether domain alias exists", ex) + End Try + + Return exists + End Function + + Public Function DomainExists(ByVal domainName As String) As Boolean Implements IMailServer.DomainExists + Try + Dim ret As Boolean = False + Dim domains() As String = GetDomains() + Dim domain As String + For Each domain In domains + If String.Compare(domain, domainName, True) = 0 Then + ret = True + Exit For + End If + Next domain + Return ret + Catch ex As Exception + Throw New Exception("Can't check whether domain exists", ex) + End Try + End Function + + Public Function GetDomains() As String() Implements IMailServer.GetDomains + Dim service As Service = LoadServiceProvider() + + Try + Dim domainsCount As Integer = service.ComObject.GetDomainCount() + Dim domains() As Object = New Object() {domainsCount} + service.ComObject.GetDomainNames(domains) + + Dim ret As New ArrayList() + Dim domain As Object + For Each domain In domains + ret.Add(domain.ToString()) + Next domain + + UnloadServiceProvider(service) + + Return CType(ret.ToArray(GetType(String)), String()) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't get the list of domains", ex) + End Try + End Function 'GetDomains + + Public Function GetAccount(ByVal mailboxName As String) As MailAccount Implements IMailServer.GetAccount + Dim service As Service = LoadServiceProvider() + Dim mailbox As MailAccount = Nothing + + Try + Dim hUser As Integer = service.ComObject.GetByEmail(mailboxName) + + If hUser = CInt(MD_HANDLE.MD_BADHANDLE) Then + Throw New Exception(String.Format("Mailbox '{0}' not found.", mailboxName)) + End If + + Dim mdUserInfo As Object = CreateMDUserInfo(service) + service.ComObject.GetUserInfo(hUser, mdUserInfo) + + mailbox = CreateMailboxItem(mdUserInfo) + + Dim userDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_USERLISTDB) + PopulateMailboxAccessInfo(userDbPath, mailbox) + + Dim responderDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_AUTORESPDB) + PopulateMailboxResponderInfo(responderDbPath, mailbox) + + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't get mailbox", ex) + End Try + + Return mailbox + End Function + + Public Function GetAccounts(ByVal domainName As String) As MailAccount() Implements IMailServer.GetAccounts + Dim service As Service = LoadServiceProvider() + Dim accounts As List(Of MailAccount) = New List(Of MailAccount) + + Try + Dim badHandle As Integer = CType(MD_HANDLE.MD_BADHANDLE, Integer) + Dim hUser As Integer = service.ComObject.FindFirst() + + Do + If hUser = badHandle Then + Continue Do + End If + + Dim domain As String = service.ComObject.GetDomain(hUser) + If String.Compare(domain, domainName, True) = 0 Then + Dim mailbox As String = service.ComObject.GetEmail(hUser) + Dim fullname As String = service.ComObject.GetFullName(hUser) + + Dim account As MailAccount = New MailAccount() + account.Name = mailbox + Dim names() As String = fullname.Split(New String() {" "}, StringSplitOptions.None) + + If names.Length = 2 Then + account.FirstName = names(0) + account.LastName = names(1) + ElseIf names.Length = 1 Then + account.FirstName = names(0) + End If + + accounts.Add(account) + End If + hUser = service.ComObject.FindNext(hUser) + Loop While Not hUser = badHandle + + service.ComObject.FindClose() + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't get the list of domain users", ex) + End Try + + Return accounts.ToArray() + End Function + + Public Function GetDomain(ByVal domainName As String) As MailDomain Implements IMailServer.GetDomain + Dim service As Service = LoadServiceProvider() + Dim domainItem As MailDomain = Nothing + + Try + If Not DomainExists(domainName) Then + Throw New Exception(String.Format("Domain '{0}' does not exist", domainName)) + End If + + Dim domainDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_DOMAINDB) + domainItem = CreateDomainItemFromProfile(domainName, domainDbPath) + + ' read catch-all and abuse accounts + Dim postmasterAlias As String = String.Concat("Postmaster@", domainItem.Name) + Dim abuseAlias As String = String.Concat("Abuse@", domainItem.Name) + + Dim mdAlias As Object = CreateMDAlias(service) + Dim aliasItem As Object = CreateMDAliasItem(service) + Dim result As Boolean = mdAlias.GetFirstAlias(aliasItem) + + While result + If String.Compare(postmasterAlias, aliasItem.Alias, True) = 0 Then + domainItem.CatchAllAccount = GetEmailName(aliasItem.Email) + ElseIf String.Compare(abuseAlias, aliasItem.Alias, True) = 0 Then + domainItem.AbuseAccount = GetEmailName(aliasItem.Email) + End If + + If Not String.IsNullOrEmpty(domainItem.CatchAllAccount) AndAlso Not String.IsNullOrEmpty(domainItem.AbuseAccount) Then + Exit While + End If + + result = mdAlias.GetNextAlias(aliasItem) + End While + + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't get domain info", ex) + End Try + + Return domainItem + End Function + + Public Function GetDomainAliases(ByVal domainName As String) As String() Implements IMailServer.GetDomainAliases + Dim service As Service = LoadServiceProvider() + Dim aliases As New ArrayList() + Dim domainPattern As String = "*@" + domainName + + Try + Dim mdAlias As Object = CreateMDAlias(service) + Dim aliasItem As Object = CreateMDAliasItem(service) + Dim result As Boolean = mdAlias.GetFirstAlias(aliasItem) + While result + Dim domain As String = aliasItem.Email + If String.Compare(domain, domainPattern, True) = 0 Then + Dim [alias] As String = GetDomainName(aliasItem.Alias) + aliases.Add([alias]) + End If + result = mdAlias.GetNextAlias(aliasItem) + End While + UnloadServiceProvider(service) + Return CType(aliases.ToArray(GetType(String)), String()) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't get the list of domain aliases", ex) + End Try + End Function + + Public Function GetGroup(ByVal groupName As String) As MailGroup Implements IMailServer.GetGroup + Dim service As Service = LoadServiceProvider() + Dim mailGroup As MailGroup = Nothing + + Try + Dim mdList As Object = CreateMDList(service, groupName) + mailGroup = CreateMailGroupItem(service, mdList) + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't get group", ex) + End Try + + Return mailGroup + End Function + + Public Function GetGroups(ByVal domainName As String) As MailGroup() Implements IMailServer.GetGroups + Dim service As Service = LoadServiceProvider() + Dim groups As New List(Of MailGroup) + + Try + Dim lists As String() = GetAllLists(service) + Dim mdList As Object = Nothing + Dim listName As String + + For Each listName In lists + Dim domain As String = GetDomainName(listName) + If String.Compare(domain, domainName, True) <> 0 Then + Continue For + End If + + mdList = CreateMDList(service, listName) + If mdList.PrecedenceLevel = 50 Then + Dim item As New MailGroup() + item.Name = listName + groups.Add(item) + End If + Next listName + + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't get the list of domain groups", ex) + End Try + + Return groups.ToArray() + End Function + + Public Function GetList(ByVal maillistName As String) As MailList Implements IMailServer.GetList + Dim service As Service = LoadServiceProvider() + Dim mailList As MailList = Nothing + + Try + Dim mdList As Object = CreateMDList(service, maillistName) + mailList = CreateMailListItem(service, mdList) + + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't get mail list", ex) + End Try + + Return mailList + End Function + + Public Function GetLists(ByVal domainName As String) As MailList() Implements IMailServer.GetLists + Dim service As Service = LoadServiceProvider() + Dim arrayList As New List(Of MailList) + + Try + Dim lists As String() = GetAllLists(service) + Dim mdList As Object = Nothing + Dim listName As String + + For Each listName In lists + Dim domain As String = GetDomainName(listName) + If String.Compare(domain, domainName, True) <> 0 Then + Continue For + End If + + mdList = CreateMDList(service, listName) + If mdList.PrecedenceLevel <> 50 Then + Dim item As New MailList() + item.Name = listName + arrayList.Add(item) + End If + Next listName + + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't get the list of mailing lists.", ex) + End Try + + Return arrayList.ToArray() + End Function + + Public Function GroupExists(ByVal groupName As String) As Boolean Implements IMailServer.GroupExists + Return EmailExists(groupName) + End Function + + Public Function ListExists(ByVal maillistName As String) As Boolean Implements IMailServer.ListExists + Return EmailExists(maillistName) + End Function + + Public Sub UpdateAccount(ByVal mailbox As MailAccount) Implements IMailServer.UpdateAccount + Dim service As Service = LoadServiceProvider() + + Try + Dim hUser As Integer = service.ComObject.GetByEmail(mailbox.Name) + + If hUser = CInt(MD_HANDLE.MD_BADHANDLE) Then + Throw New Exception(String.Format("Mailbox '{0}' not found.", mailbox.Name)) + End If + + Dim mdUserInfo As Object = CreateMDUserInfo(service) + + PopulateUserInfo(mailbox, mdUserInfo) + service.ComObject.FilterUserInfo(mdUserInfo) + + If mailbox.Enabled = True Then + mdUserInfo.AccessType = "Y"c + Else + mdUserInfo.AccessType = "C"c + End If + + Dim errorCode As Integer = service.ComObject.VerifyUserInfo(mdUserInfo, CInt(MD_VRFYFLAGS.MDUSERDLL_VRFYALL)) + If errorCode <> CInt(MD_ERROR.MDDLLERR_NOERROR) Then + Throw New Exception(String.Format("Could not validate account info. Please make sure that all entries are valid. Error code {0}", errorCode)) + End If + + If Not service.ComObject.SetUserInfo(hUser, mdUserInfo) Then + Throw New Exception(String.Format("Could not update mailbox '{0}'", mailbox.Name)) + End If + + Dim userDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_USERLISTDB) + UpdateUserAccessInfo(userDbPath, mailbox) + + Dim responderDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_AUTORESPDB) + UpdateUserResponderInfo(responderDbPath, mailbox) + + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception(String.Format("Could not update mailbox '{0}'", mailbox.Name), ex) + End Try + End Sub + + Public Sub UpdateDomain(ByVal domain As MailDomain) Implements IMailServer.UpdateDomain + Dim service As Service = LoadServiceProvider() + + Try + Dim postmaster As String = String.Concat(domain.CatchAllAccount, "@", domain.Name) + Dim abuse As String = String.Concat(domain.AbuseAccount, "@", domain.Name) + + Dim postmasterAlias As String = String.Concat("Postmaster@", domain.Name) + Dim abuseAlias As String = String.Concat("Abuse@", domain.Name) + + Dim pmOldEmail As String = Nothing + Dim abOldEmail As String = Nothing + + Dim mdAlias As Object = CreateMDAlias(service) + Dim aliasItem As Object = CreateMDAliasItem(service) + Dim result As Boolean = mdAlias.GetFirstAlias(aliasItem) + + While result + If String.Compare(postmasterAlias, aliasItem.Alias, True) = 0 Then + pmOldEmail = aliasItem.Email + ElseIf String.Compare(abuseAlias, aliasItem.Alias, True) = 0 Then + abOldEmail = aliasItem.Email + End If + + If Not String.IsNullOrEmpty(pmOldEmail) AndAlso Not String.IsNullOrEmpty(abOldEmail) Then + Exit While + End If + + result = mdAlias.GetNextAlias(aliasItem) + End While + + ' cleanup postmaster alias + If Not String.IsNullOrEmpty(pmOldEmail) Then + service.ComObject.DeleteAlias(postmasterAlias, pmOldEmail) + End If + + ' cleanup abuse alias + If Not String.IsNullOrEmpty(abOldEmail) Then + service.ComObject.DeleteAlias(abuseAlias, abOldEmail) + End If + + If Not service.ComObject.CreateAlias(postmaster, postmasterAlias) Then + Throw New Exception("Couldn't assign domain postmaster account.") + End If + + If Not service.ComObject.CreateAlias(abuse, abuseAlias) Then + Throw New Exception("Couldn't assign domain abuse account.") + End If + + Dim domainDbPath As String = service.ComObject.GetDBPath(MDaemonInterop.MDUSERDLL_DOMAINDB) + Dim retVal As Integer = GetProfileSection(domain.Name, domainDbPath) + + If retVal = 0 Then + If Not WriteProfileSection(domain.Name, domainDbPath) Then + Throw New Exception(String.Format("Could not create profile section in '{0}' file.", domainDbPath)) + End If + End If + + WriteDomainInfo(domain, domainDbPath) + + ' force to refresh cache + RefreshMailServerCache(service) + + 'reload domains + service.ComObject.ReloadUsers() + + UnloadServiceProvider(service) + Catch ex As Exception + UnloadServiceProvider(service) + Throw New Exception("Can't update domain", ex) + End Try + End Sub + + Public Sub UpdateGroup(ByVal group As MailGroup) Implements IMailServer.UpdateGroup + Try + If Not GroupExists(group.Name) Then + Throw New Exception(String.Format("Group {0} does not exists.", group.Name)) + End If + PopulateGroupInfo(group, False) + Catch ex As Exception + Throw New Exception("Can't update group.", ex) + End Try + End Sub + + Public Sub UpdateList(ByVal maillist As MailList) Implements IMailServer.UpdateList + Try + If Not GroupExists(maillist.Name) Then + Throw New Exception(String.Format("Mail list {0} does not exists.", maillist.Name)) + End If + PopulateMailListInfo(maillist, False) + Catch ex As Exception + Throw New Exception("Can't update mail list.", ex) + End Try + End Sub + +#Region "HostingServiceProvider methods" + Public Overrides Sub ChangeServiceItemsState(ByVal items() As ServiceProviderItem, ByVal enabled As Boolean) + For Each item As ServiceProviderItem In items + If TypeOf item Is MailDomain Then + Try + ' get mail domain accounts + Dim accounts As MailAccount() = Me.GetAccounts(item.Name) + ' disable each mail account + For Each account As MailAccount In accounts + account.Enabled = enabled + ' change service item state + UpdateAccount(account) + Next + Catch ex As Exception + Log.WriteError(String.Format("Error switching '{0}' mail domain", item.Name), ex) + End Try + End If + Next + End Sub +#End Region + + Public Function GetAppFolderPath() As String + Dim uninstalString As String = "" + Dim returnPath As String = "" + Dim key32bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MDaemon Server") + If (key32bit IsNot Nothing) Then + uninstalString = CStr(key32bit.GetValue("UninstallString")) + Else + Dim key64bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\MDaemon Server") + If (key64bit IsNot Nothing) Then + uninstalString = CStr(key32bit.GetValue("UninstallString")) + Else + Return "C:\MDaemon\App\" + End If + End If + If [String].IsNullOrEmpty(uninstalString) = False Then + Dim split As String() = uninstalString.Split(New [Char]() {" "c}) + returnPath = split(0).Remove(split(0).LastIndexOf("\") + 1) + End If + + If [String].IsNullOrEmpty(uninstalString) = False Then + Return returnPath + End If + Return "C:\MDaemon\App\" + End Function + + Public Overrides Function IsInstalled() As Boolean + Dim version As String = "" + Dim key32bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MDaemon Server") + If (key32bit IsNot Nothing) Then + version = CStr(key32bit.GetValue("DisplayVersion")) + Else + Dim key64bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\MDaemon Server") + If (key64bit IsNot Nothing) Then + version = CStr(key64bit.GetValue("DisplayVersion")) + Else + Return False + End If + End If + If [String].IsNullOrEmpty(version) = False Then + Dim split As String() = version.Split(New [Char]() {"."c}) + Return split(0).Equals("9") Or split(0).Equals("10") Or split(0).Equals("11") + Else + Return False + End If + End Function + End Class \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MDaemonInterop.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MDaemonInterop.vb index e58c254c..be2ed279 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MDaemonInterop.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MDaemon/MDaemonInterop.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MELogReader.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MELogReader.vb index d2bda344..12a69a83 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MELogReader.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MELogReader.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnable.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnable.vb index 4dc67b0b..9229def6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnable.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnable.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, @@ -41,42 +41,31 @@ Public Class MailEnable Inherits HostingServiceProviderBase Implements IMailServer - Private Const DOMAIN_PROG_ID As String = "MEAOSM.Domain" - Private Const BLACKLIST_PROG_ID As String = "MEAOSM.Blacklist" - Private Const POSTOFFICE_PROG_ID As String = "MEAOPO.Postoffice" - Private Const LOGIN_PROG_ID As String = "MEAOAU.Login" - Private Const MAILBOX_PROG_ID As String = "MEAOPO.Mailbox" - Private Const MAILLIST_PROG_ID As String = "MEAOLS.List" - Private Const LIST_MEMBER_PROG_ID As String = "MEAOLS.ListMember" - Private Const ADDRESS_MAP_PROG_ID As String = "MEAOAM.AddressMap" - Private Const GROUP_PROG_ID As String = "MEAOPO.Group" - Private Const GROUP_MEMBER_PROG_ID As String = "MEAOPO.GroupMember" - #Region "Domains" - Public Overridable Function GetDomains() As String() Implements IMailServer.GetDomains + Public Overridable Function GetDomains() As String() Implements IMailServer.GetDomains - Dim domainList As List(Of String) = New List(Of String) - Dim po As Object = CreateObject(POSTOFFICE_PROG_ID) + Dim domainList As List(Of String) = New List(Of String) + Dim po As New WebsitePanel.Providers.Mail.MailEnablePostoffice - po.Account = "" - po.Name = "" - po.Status = -1 - If po.FindFirstPostoffice() = 1 Then - Do - domainList.Add(po.Name) - po.Account = "" - po.Name = "" - po.Status = -1 - Loop While po.FindNextPostoffice() = 1 - End If + po.Account = "" + po.Name = "" + po.Status = -1 + If po.FindFirstPostoffice() = 1 Then + Do + domainList.Add(po.Name) + po.Account = "" + po.Name = "" + po.Status = -1 + Loop While po.FindNextPostoffice() = 1 + End If - Return domainList.ToArray() + Return domainList.ToArray() - End Function + End Function Public Overridable Function DomainExists(ByVal domainName As String) As Boolean Implements IMailServer.DomainExists - Dim domain As Object = CreateObject(DOMAIN_PROG_ID) + Dim domain As New WebsitePanel.Providers.Mail.MailEnableDomain ResetDomain(domain) domain.AccountName = domainName @@ -87,7 +76,7 @@ Public Class MailEnable Public Overridable Function GetDomain(ByVal domainName As String) As MailDomain Implements IMailServer.GetDomain Dim info As MailDomain = Nothing - Dim domain As Object = CreateObject(DOMAIN_PROG_ID) + Dim domain As New WebsitePanel.Providers.Mail.MailEnableDomain ResetDomain(domain) domain.AccountName = domainName @@ -104,7 +93,7 @@ Public Class MailEnable Public Overridable Sub CreateDomain(ByVal domainInfo As MailDomain) Implements IMailServer.CreateDomain 'create a new postoffice for each account - Dim postoffice As Object = CreateObject(POSTOFFICE_PROG_ID) + Dim postoffice As New WebsitePanel.Providers.Mail.MailEnablePostoffice postoffice.Account = domainInfo.Name postoffice.Name = domainInfo.Name postoffice.Status = IIf((domainInfo.Enabled), 1, 0) @@ -113,7 +102,7 @@ Public Class MailEnable Throw New Exception("Postoffice creation failedNot ") End If - Dim domain As Object = CreateObject(DOMAIN_PROG_ID) + Dim domain As New WebsitePanel.Providers.Mail.MailEnableDomain domain.AccountName = domainInfo.Name domain.DomainName = domainInfo.Name domain.DomainRedirectionHosts = domainInfo.RedirectionHosts @@ -127,7 +116,7 @@ Public Class MailEnable Dim blackListedDomain As String For Each blackListedDomain In domainInfo.BlackList - Dim blacklist As Object = CreateObject(BLACKLIST_PROG_ID) + Dim blacklist As New WebsitePanel.Providers.Mail.MailEnableDomainBlacklist blacklist.Account = domainInfo.Name blacklist.Status = 1 blacklist.TargetDomainName = domainInfo.Name @@ -139,7 +128,7 @@ Public Class MailEnable End Sub Public Overridable Sub UpdateDomain(ByVal info As MailDomain) Implements IMailServer.UpdateDomain - Dim domain As Object = CreateObject(DOMAIN_PROG_ID) + Dim domain As New WebsitePanel.Providers.Mail.MailEnableDomain domain.AccountName = info.Name domain.DomainName = info.Name domain.DomainRedirectionHosts = String.Empty @@ -148,9 +137,22 @@ Public Class MailEnable domain.Status = -1 If (domain.GetDomain() = 1) Then + Dim newStatus As Integer = IIf(info.Enabled, 1, 0) Dim newRedirectionStatus As Integer = IIf(info.RedirectionActive, 1, 0) + 'redirection status has 3 states, so we don't use redirectionaction + '0=off, 1=on, 2=on for authenticated only + If info("MailEnable_SmartHostEnabled") Then + If info("MailEnable_SmartHostAuth") Then + newRedirectionStatus = 2 + Else + newRedirectionStatus = 1 + End If + Else + newRedirectionStatus = 0 + End If + domain.EditDomain( _ info.Name, _ newStatus, _ @@ -161,12 +163,13 @@ Public Class MailEnable ' ' Update the Catch All Account ' - Dim oAddressMap As Object = CreateObject(ADDRESS_MAP_PROG_ID) + Dim oAddressMap As New WebsitePanel.Providers.Mail.MailEnableAddressMap oAddressMap.Account = info.Name ' account oAddressMap.DestinationAddress = "" oAddressMap.SourceAddress = "[SMTP:*@" & info.Name & "]" oAddressMap.Scope = "" + If info.CatchAllAccount = "" Then ' things are tricky here because we want to change it so we know what we are deleting oAddressMap.SourceAddress = "[SMTP:*@" & info.Name & "]" @@ -175,7 +178,7 @@ Public Class MailEnable ' ' Change its value if it exists ' - If oAddressMap.EditAddressMap(info.Name, "[DELETE:ME]", "[DELETE:ME]", "0") Then + If oAddressMap.EditAddressMap(info.Name, "[DELETE:ME]", "[DELETE:ME]", "0", oAddressMap.Status) Then oAddressMap.Account = info.Name oAddressMap.DestinationAddress = "[DELETE:ME]" oAddressMap.SourceAddress = "[DELETE:ME]" @@ -187,7 +190,8 @@ Public Class MailEnable Dim NewSourceAddress As String = "[SMTP:*@" & info.Name & "]" Dim NewDestinationAddress As String = "[SF:" & info.Name & "/" & GetMailboxName(info.CatchAllAccount) & "]" Dim NewScope As String = "0" - If oAddressMap.EditAddressMap(NewAccount, NewSourceAddress, NewDestinationAddress, NewScope) <> 1 Then + + If oAddressMap.EditAddressMap(NewAccount, NewSourceAddress, NewDestinationAddress, NewScope, 0) <> 1 Then ' ' We need to add it because there was not one defined ' @@ -216,7 +220,7 @@ Public Class MailEnable Dim NewSourceAddress = "[SMTP:postmaster@" & info.Name & "]" Dim NewDestinationAddress = "[SF:" & info.Name & "/" & GetMailboxName(info.PostmasterAccount) & "]" Dim NewScope = "0" - If oAddressMap.EditAddressMap(NewAccount, NewSourceAddress, NewDestinationAddress, NewScope) <> 1 Then + If oAddressMap.EditAddressMap(NewAccount, NewSourceAddress, NewDestinationAddress, NewScope, 0) <> 1 Then ' ' We need to add it because there was not one defined ' @@ -245,7 +249,7 @@ Public Class MailEnable Dim NewSourceAddress = "[SMTP:Abuse@" & info.Name & "]" Dim NewDestinationAddress = "[SF:" & info.Name & "/" & GetMailboxName(info.AbuseAccount) & "]" Dim NewScope = "0" - If oAddressMap.EditAddressMap(NewAccount, NewSourceAddress, NewDestinationAddress, NewScope) <> 1 Then + If oAddressMap.EditAddressMap(NewAccount, NewSourceAddress, NewDestinationAddress, NewScope, 0) <> 1 Then ' ' We need to add it because there was not one defined ' @@ -260,7 +264,7 @@ Public Class MailEnable 'edit blacklists 'delete all the blacklists - Dim blacklist As Object = CreateObject(BLACKLIST_PROG_ID) + Dim blacklist As New WebsitePanel.Providers.Mail.MailEnableDomainBlacklist ResetBlacklist(blacklist) blacklist.Account = info.Name blacklist.TargetDomainName = info.Name @@ -270,7 +274,7 @@ Public Class MailEnable blacklist.RemoveBlacklist() ' initialize blacklist again - blacklist = CreateObject(BLACKLIST_PROG_ID) + blacklist = New WebsitePanel.Providers.Mail.MailEnableDomainBlacklist ResetBlacklist(blacklist) blacklist.Account = info.Name blacklist.TargetDomainName = info.Name @@ -279,7 +283,7 @@ Public Class MailEnable 'add new blacklists Dim blacklistedDomainName As String For Each blacklistedDomainName In info.BlackList - blacklist = CreateObject(BLACKLIST_PROG_ID) + blacklist = New WebsitePanel.Providers.Mail.MailEnableDomainBlacklist blacklist.Account = info.Name blacklist.TargetDomainName = info.Name blacklist.BannedDomainName = blacklistedDomainName @@ -289,18 +293,20 @@ Public Class MailEnable blacklist.AddBlacklist() Next + End If End Sub Public Overridable Sub DeleteDomain(ByVal domainName As String) Implements IMailServer.DeleteDomain 'delete all postoffice logins - Dim login As Object = CreateObject(LOGIN_PROG_ID) + Dim login As New WebsitePanel.Providers.Mail.MailEnableLogin ResetLogin(login) login.Account = domainName login.RemoveLogin() 'delete all the mailboxes - Dim mailbox As Object = CreateObject(MAILBOX_PROG_ID) + Dim mailbox As New WebsitePanel.Providers.Mail.MailEnableMailbox + ResetMailbox(mailbox) mailbox.Postoffice = domainName mailbox.RemoveMailbox() @@ -310,7 +316,7 @@ Public Class MailEnable Dim list As MailList For Each list In lists ' remove list members - Dim listMember As Object = CreateObject(LIST_MEMBER_PROG_ID) + Dim listMember As New WebsitePanel.Providers.Mail.MailEnableListMember listMember.AccountName = domainName listMember.ListName = GetMailboxName(list.Name) listMember.Address = "" @@ -319,7 +325,7 @@ Public Class MailEnable listMember.RemoveListMember() ' delete maillist - Dim mailList As Object = CreateObject(MAILLIST_PROG_ID) + Dim mailList As New WebsitePanel.Providers.Mail.MailEnableList ResetMaillist(mailList) mailList.AccountName = domainName mailList.ListName = GetMailboxName(list.Name) @@ -331,14 +337,14 @@ Public Class MailEnable Dim group As MailGroup For Each group In groups ' remove group members - Dim groupMember As Object = CreateObject(GROUP_MEMBER_PROG_ID) + Dim groupMember As New WebsitePanel.Providers.Mail.MailEnableGroupMember groupMember.Postoffice = domainName groupMember.Mailbox = GetMailboxName(group.Name) groupMember.Address = "" groupMember.RemoveGroupMember() ' delete group - Dim objGroup As Object = CreateObject(GROUP_PROG_ID) + Dim objGroup As New WebsitePanel.Providers.Mail.MailEnableGroup ResetGroup(objGroup) objGroup.Postoffice = domainName objGroup.GroupName = GetMailboxName(group.Name) @@ -346,25 +352,25 @@ Public Class MailEnable Next 'delete all address mappings - Dim map As Object = CreateObject(ADDRESS_MAP_PROG_ID) + Dim map As New WebsitePanel.Providers.Mail.MailEnableAddressMap ResetAddressMap(map) map.Account = domainName - map.RemoveAddressMap() + map.RemoveAddressMap(True) 'delete all the blacklists - Dim blacklist As Object = CreateObject(BLACKLIST_PROG_ID) + Dim blacklist As New WebsitePanel.Providers.Mail.MailEnableDomainBlacklist ResetBlacklist(blacklist) blacklist.Account = domainName blacklist.RemoveBlacklist() 'delete all domains - Dim domain As Object = CreateObject(DOMAIN_PROG_ID) + Dim domain As New WebsitePanel.Providers.Mail.MailEnableDomain ResetDomain(domain) domain.AccountName = domainName domain.RemoveDomain() 'delete postoffice - Dim po As Object = CreateObject(POSTOFFICE_PROG_ID) + Dim po As New WebsitePanel.Providers.Mail.MailEnablePostoffice po.Account = domainName po.Name = domainName po.Host = "" @@ -385,12 +391,24 @@ Public Class MailEnable info.Name = domain.DomainName info.RedirectionHosts = domain.DomainRedirectionHosts info.RedirectionActive = (domain.DomainRedirectionStatus = 1) + + If domain.DomainRedirectionStatus = 2 Then + info("MailEnable_SmartHostAuth") = True + info("MailEnable_SmartHostEnabled") = True + ElseIf domain.DomainRedirectionStatus = 1 Then + info("MailEnable_SmartHostEnabled") = True + info("MailEnable_SmartHostAuth") = False + Else + info("MailEnable_SmartHostEnabled") = false + info("MailEnable_SmartHostAuth") = False + End If + info.Enabled = (domain.Status = 1) ' ' We need to get the catch all account for the domain ' - Dim oAddressMap As Object = CreateObject(ADDRESS_MAP_PROG_ID) + Dim oAddressMap As New WebsitePanel.Providers.Mail.MailEnableAddressMap oAddressMap.Account = info.Name oAddressMap.DestinationAddress = "" oAddressMap.SourceAddress = "[SMTP:*@" & info.Name & "]" @@ -432,7 +450,7 @@ Public Class MailEnable 'getting black mail list Dim blacklists As ArrayList = New ArrayList - Dim blacklist As Object = CreateObject(BLACKLIST_PROG_ID) + Dim blacklist As New WebsitePanel.Providers.Mail.MailEnableDomainBlacklist blacklist.Account = domain.AccountName blacklist.Host = domain.Host blacklist.TargetDomainName = domain.DomainName @@ -461,7 +479,7 @@ Public Class MailEnable #Region "Domain Aliases" Public Overridable Function DomainAliasExists(ByVal domainName As String, ByVal aliasName As String) As Boolean Implements IMailServer.DomainAliasExists - Dim domain As Object = CreateObject(DOMAIN_PROG_ID) + Dim domain As New WebsitePanel.Providers.Mail.MailEnableDomain ResetDomain(domain) domain.AccountName = domainName @@ -472,7 +490,7 @@ Public Class MailEnable Public Overridable Function GetDomainAliases(ByVal domainName As String) As String() Implements IMailServer.GetDomainAliases Dim aliases As List(Of String) = New List(Of String) - Dim domain As Object = CreateObject(DOMAIN_PROG_ID) + Dim domain As New WebsitePanel.Providers.Mail.MailEnableDomain ResetDomain(domain) domain.AccountName = domainName @@ -498,7 +516,7 @@ Public Class MailEnable Public Overridable Sub AddDomainAlias(ByVal domainName As String, ByVal aliasName As String) Implements IMailServer.AddDomainAlias ' add new domain - Dim domain As Object = CreateObject(DOMAIN_PROG_ID) + Dim domain As New WebsitePanel.Providers.Mail.MailEnableDomain domain.AccountName = domainName domain.DomainName = aliasName domain.DomainRedirectionHosts = "" @@ -513,7 +531,7 @@ Public Class MailEnable ' get current "main domain" address mappings Dim srcAddr As String = "@" + domainName + "]" Dim maps As ArrayList = New ArrayList - Dim map As Object = CreateObject(ADDRESS_MAP_PROG_ID) + Dim map As New WebsitePanel.Providers.Mail.MailEnableAddressMap ResetAddressMap(map) map.Account = domainName @@ -545,21 +563,21 @@ Public Class MailEnable 'delete all address mappings Dim addr As String = "@" + aliasName.ToLower() + "]" Dim maps As ArrayList = New ArrayList - Dim map As Object = CreateObject(ADDRESS_MAP_PROG_ID) + Dim map As New WebsitePanel.Providers.Mail.MailEnableAddressMap ResetAddressMap(map) map.Account = domainName map.SourceAddress = "[SMTP:*@" + aliasName + "]" - map.RemoveAddressMap() + map.RemoveAddressMap(True) 'delete all the blacklists - Dim blacklist As Object = CreateObject(BLACKLIST_PROG_ID) + Dim blacklist As New WebsitePanel.Providers.Mail.MailEnableDomainBlacklist ResetBlacklist(blacklist) blacklist.Account = domainName blacklist.TargetDomainName = aliasName blacklist.RemoveBlacklist() 'delete all domains - Dim domain As Object = CreateObject(DOMAIN_PROG_ID) + Dim domain As New WebsitePanel.Providers.Mail.MailEnableDomain ResetDomain(domain) domain.AccountName = domainName domain.DomainName = aliasName @@ -568,11 +586,15 @@ Public Class MailEnable #End Region #Region "Accounts" + Public Overridable Function GetAccounts(ByVal domainName As String) As MailAccount() Implements IMailServer.GetAccounts + Dim mailboxes As List(Of MailAccount) = New List(Of MailAccount) - Dim mailbox As Object = CreateObject(MAILBOX_PROG_ID) + Dim mailbox As New WebsitePanel.Providers.Mail.MailEnableMailbox + ResetMailbox(mailbox) mailbox.Postoffice = domainName + mailbox.Size = -4 'we use -4 since this prevents the function from calculating quotas, which is slow If mailbox.FindFirstMailbox() = 1 Then Do @@ -583,6 +605,7 @@ Public Class MailEnable End If ResetMailbox(mailbox) mailbox.Postoffice = domainName + mailbox.Size = -4 Loop While mailbox.FindNextMailbox() = 1 End If @@ -591,10 +614,10 @@ Public Class MailEnable Public Overridable Function GetAccount(ByVal mailboxName As String) As MailAccount Implements IMailServer.GetAccount Dim info As MailAccount = Nothing - Dim mailbox As Object = CreateObject(MAILBOX_PROG_ID) + Dim mailbox As New WebsitePanel.Providers.Mail.MailEnableMailbox ResetMailbox(mailbox) mailbox.Postoffice = GetDomainName(mailboxName) - mailbox.Mailbox = GetMailboxName(mailboxName) + mailbox.MailboxName = GetMailboxName(mailboxName) If (mailbox.GetMailbox() <> 1) Then Throw New Exception("Could not find the mailbox") @@ -607,10 +630,10 @@ Public Class MailEnable Return info End Function - Private Function GetMailboxInfo(ByVal mailbox As Object) As MailAccount + Private Function GetMailboxInfo(ByVal mailbox As WebsitePanel.Providers.Mail.MailEnableMailbox) As MailAccount Dim info As MailAccount = New MailAccount info.MaxMailboxSize = IIf(mailbox.Limit = -1, 0, mailbox.Limit / 1024) - info.Name = mailbox.Mailbox + "@" + mailbox.Postoffice + info.Name = mailbox.MailboxName + "@" + mailbox.Postoffice Dim redirectAddrs As ArrayList = New ArrayList Dim smtpAddress As String @@ -633,12 +656,12 @@ Public Class MailEnable info.ResponderMessage = mailbox.GetAutoResponderContents() info.ReplyTo = GetMailBoxReplyToAddress(info.Name) - Dim map As Object = CreateObject(ADDRESS_MAP_PROG_ID) + Dim map As New WebsitePanel.Providers.Mail.MailEnableAddressMap map.Account = info.Name map.DestinationAddress = String.Format("[SF:{0}/{1}]", info.Name, info.Name) map.SourceAddress = "" - Dim login As Object = CreateObject(LOGIN_PROG_ID) + Dim login As New WebsitePanel.Providers.Mail.MailEnableLogin ResetLogin(login) login.Account = mailbox.Postoffice login.UserName = info.Name @@ -651,9 +674,9 @@ Public Class MailEnable Return info End Function - Private Function GetMailAliasInfo(ByVal mailbox As Object) As MailAlias + Private Function GetMailAliasInfo(ByVal mailbox As WebsitePanel.Providers.Mail.MailEnableMailbox) As MailAlias Dim info As MailAlias = New MailAlias - info.Name = mailbox.Mailbox + "@" + mailbox.Postoffice + info.Name = mailbox.MailboxName + "@" + mailbox.Postoffice Dim redirectAddrs As ArrayList = New ArrayList Dim smtpAddress As String @@ -673,12 +696,12 @@ Public Class MailEnable info.DeleteOnForward = (mailbox.RedirectStatus.Equals(1)) info.Enabled = (mailbox.Status = 1) - Dim map As Object = CreateObject(ADDRESS_MAP_PROG_ID) + Dim map As New WebsitePanel.Providers.Mail.MailEnableAddressMap map.Account = info.Name map.DestinationAddress = String.Format("[SF:{0}/{1}]", info.Name, info.Name) map.SourceAddress = "" - Dim login As Object = CreateObject(LOGIN_PROG_ID) + Dim login As New WebsitePanel.Providers.Mail.MailEnableLogin ResetLogin(login) login.Account = mailbox.Postoffice login.UserName = info.Name @@ -692,22 +715,22 @@ Public Class MailEnable End Function Public Overridable Function AccountExists(ByVal mailboxName As String) As Boolean Implements IMailServer.AccountExists - Dim mailbox As Object = CreateObject(MAILBOX_PROG_ID) + Dim mailbox As New WebsitePanel.Providers.Mail.MailEnableMailbox ResetMailbox(mailbox) mailbox.Postoffice = GetDomainName(mailboxName) - mailbox.Mailbox = GetMailboxName(mailboxName) + mailbox.MailboxName = GetMailboxName(mailboxName) Return (mailbox.GetMailbox() = 1) End Function Public Overridable Sub CreateAccount(ByVal info As MailAccount) Implements IMailServer.CreateAccount - Dim mailbox As Object = CreateObject(MAILBOX_PROG_ID) + Dim mailbox As New WebsitePanel.Providers.Mail.MailEnableMailbox Dim domainName As String = GetDomainName(info.Name) Dim mailboxName As String = GetMailboxName(info.Name) mailbox.Postoffice = domainName mailbox.Limit = IIf(info.MaxMailboxSize = 0, -1, info.MaxMailboxSize * 1024) ' convert to kilobytes - mailbox.Mailbox = GetMailboxName(info.Name) + mailbox.MailboxName = GetMailboxName(info.Name) If info.ForwardingAddresses Is Nothing Then info.ForwardingAddresses = New String() {} @@ -749,7 +772,7 @@ Public Class MailEnable CreateAddressMapsForAllDomains(domainName, mailboxName, destinationAddress) ' create login - Dim login As Object = CreateObject(LOGIN_PROG_ID) + Dim login As New WebsitePanel.Providers.Mail.MailEnableLogin login.Account = domainName login.Password = info.Password login.Status = IIf(info.Enabled, 1, 0) @@ -770,9 +793,9 @@ Public Class MailEnable Dim domainName As String = GetDomainName(info.Name) Dim mailboxName As String = GetMailboxName(info.Name) - Dim mailbox As Object = CreateObject(MAILBOX_PROG_ID) + Dim mailbox As New WebsitePanel.Providers.Mail.MailEnableMailbox mailbox.Postoffice = domainName - mailbox.Mailbox = mailboxName + mailbox.MailboxName = mailboxName If info.ForwardingAddresses Is Nothing Then info.ForwardingAddresses = New String() {} @@ -811,6 +834,8 @@ Public Class MailEnable If (String.IsNullOrEmpty(info.ReplyTo) = False) Then SetMailBoxReplyToAddress(info.Name, info.ReplyTo) + Else + SetMailBoxReplyToAddress(info.Name, "") End If mailbox.SetAutoResponderStatus(info.ResponderEnabled) @@ -824,7 +849,7 @@ Public Class MailEnable ' change login password If (info.Password.Length > 0) Then - Dim login As Object = CreateObject(LOGIN_PROG_ID) + Dim login As New WebsitePanel.Providers.Mail.MailEnableLogin ResetLogin(login) login.Account = domainName login.UserName = info.Name @@ -843,23 +868,25 @@ Public Class MailEnable ' build autoresponder file WriteMailboxAutoresponderFile(info) + + End Sub Public Overridable Sub DeleteAccount(ByVal name As String) Implements IMailServer.DeleteAccount Dim domainName As String = GetDomainName(name) Dim mailboxName As String = GetMailboxName(name) - Dim mailbox As Object = CreateObject(MAILBOX_PROG_ID) + Dim mailbox As New WebsitePanel.Providers.Mail.MailEnableMailbox ResetMailbox(mailbox) mailbox.Postoffice = domainName - mailbox.Mailbox = mailboxName + mailbox.MailboxName = mailboxName If (mailbox.RemoveMailbox() <> 1) Then Throw New Exception(String.Format("Could not delete mailbox '{0}'", mailboxName)) End If 'delete the login for this mailbox - Dim login As Object = CreateObject(LOGIN_PROG_ID) + Dim login As New WebsitePanel.Providers.Mail.MailEnableLogin ResetLogin(login) login.Account = domainName login.UserName = name @@ -870,7 +897,7 @@ Public Class MailEnable 'delete the address map for this mailbox - Dim map As Object = CreateObject(ADDRESS_MAP_PROG_ID) + Dim map As New WebsitePanel.Providers.Mail.MailEnableAddressMap ResetAddressMap(map) map.Account = domainName map.DestinationAddress = String.Format("[SF:{0}/{1}]", domainName, mailboxName) @@ -885,10 +912,13 @@ Public Class MailEnable End Function Public Function GetMailAliases(ByVal domainName As String) As MailAlias() Implements IMailServer.GetMailAliases + Dim mailAliases As List(Of MailAlias) = New List(Of MailAlias) - Dim mailbox As Object = CreateObject(MAILBOX_PROG_ID) + Dim mailbox As New WebsitePanel.Providers.Mail.MailEnableMailbox + ResetMailbox(mailbox) mailbox.Postoffice = domainName + mailbox.Size = -4 If mailbox.FindFirstMailbox() = 1 Then Do @@ -898,18 +928,20 @@ Public Class MailEnable End If ResetMailbox(mailbox) mailbox.Postoffice = domainName + mailbox.Size = -4 Loop While mailbox.FindNextMailbox() = 1 End If Return mailAliases.ToArray() End Function + Public Function GetMailAlias(ByVal mailAliasName As String) As MailAlias Implements IMailServer.GetMailAlias Dim info As MailAlias = Nothing - Dim mailAlias As Object = CreateObject(MAILBOX_PROG_ID) + Dim mailAlias As New WebsitePanel.Providers.Mail.MailEnableMailbox ResetMailbox(mailAlias) mailAlias.Postoffice = GetDomainName(mailAliasName) - mailAlias.Mailbox = GetMailboxName(mailAliasName) + mailAlias.MailboxName = GetMailboxName(mailAliasName) If (mailAlias.GetMailbox() <> 1) Then Throw New Exception("Could not find the mailbox") @@ -942,7 +974,7 @@ Public Class MailEnable ' ============================ Public Overridable Function GroupExists(ByVal groupName As String) As Boolean Implements IMailServer.GroupExists - Dim group As Object = CreateObject(GROUP_PROG_ID) + Dim group As New WebsitePanel.Providers.Mail.MailEnableGroup ResetGroup(group) group.Postoffice = GetDomainName(groupName) group.GroupName = GetMailboxName(groupName) @@ -951,7 +983,7 @@ Public Class MailEnable End Function Public Overridable Function GetGroup(ByVal groupName As String) As MailGroup Implements IMailServer.GetGroup - Dim objGroup As Object = CreateObject(GROUP_PROG_ID) + Dim objGroup As New WebsitePanel.Providers.Mail.MailEnableGroup ResetGroup(objGroup) objGroup.Postoffice = GetDomainName(groupName) objGroup.GroupName = GetMailboxName(groupName) @@ -966,7 +998,7 @@ Public Class MailEnable Public Overridable Function GetGroups(ByVal domainName As String) As MailGroup() Implements IMailServer.GetGroups Dim groups As List(Of MailGroup) = New List(Of MailGroup) - Dim objGroup As Object = CreateObject(GROUP_PROG_ID) + Dim objGroup As New WebsitePanel.Providers.Mail.MailEnableGroup ResetGroup(objGroup) objGroup.Postoffice = domainName @@ -992,7 +1024,7 @@ Public Class MailEnable group.Members = New String() {} End If - Dim objGroup As Object = CreateObject(GROUP_PROG_ID) + Dim objGroup As New WebsitePanel.Providers.Mail.MailEnableGroup ResetGroup(objGroup) objGroup.Postoffice = domainName @@ -1007,7 +1039,7 @@ Public Class MailEnable ' add group members Dim member As String For Each member In group.Members - Dim groupMember As Object = CreateObject(GROUP_MEMBER_PROG_ID) + Dim groupMember As New WebsitePanel.Providers.Mail.MailEnableGroupMember groupMember.Postoffice = domainName groupMember.Address = String.Format("[SMTP:{0}]", member) groupMember.Mailbox = groupName @@ -1028,7 +1060,7 @@ Public Class MailEnable group.Members = New String() {} End If - Dim objGroup As Object = CreateObject(GROUP_PROG_ID) + Dim objGroup As New WebsitePanel.Providers.Mail.MailEnableGroup ResetGroup(objGroup) objGroup.Postoffice = domainName @@ -1046,7 +1078,7 @@ Public Class MailEnable IIf(group.Enabled, 1, 0)) 'delete group members - Dim objMember As Object = CreateObject(GROUP_MEMBER_PROG_ID) + Dim objMember As New WebsitePanel.Providers.Mail.MailEnableGroupMember objMember.Postoffice = domainName objMember.Mailbox = groupName objMember.Address = "" @@ -1055,7 +1087,7 @@ Public Class MailEnable ' add group members Dim member As String For Each member In group.Members - Dim groupMember As Object = CreateObject(GROUP_MEMBER_PROG_ID) + Dim groupMember As New WebsitePanel.Providers.Mail.MailEnableGroupMember groupMember.Postoffice = domainName groupMember.Address = String.Format("[SMTP:{0}]", member) groupMember.Mailbox = groupName @@ -1071,21 +1103,21 @@ Public Class MailEnable Dim groupName As String = GetMailboxName(name) ' remove group - Dim objGroup As Object = CreateObject(GROUP_PROG_ID) + Dim objGroup As New WebsitePanel.Providers.Mail.MailEnableGroup ResetGroup(objGroup) objGroup.Postoffice = domainName objGroup.GroupName = groupName objGroup.RemoveGroup() 'delete group members - Dim objMember As Object = CreateObject(GROUP_MEMBER_PROG_ID) + Dim objMember As New WebsitePanel.Providers.Mail.MailEnableGroupMember objMember.Postoffice = domainName objMember.Mailbox = groupName objMember.Address = "" objMember.RemoveGroupMember() ' delete address maps - Dim map As Object = CreateObject(ADDRESS_MAP_PROG_ID) + Dim map As New WebsitePanel.Providers.Mail.MailEnableAddressMap ResetAddressMap(map) map.Account = domainName map.DestinationAddress = String.Format("[SF:{0}/{1}]", domainName, groupName) @@ -1096,7 +1128,7 @@ Public Class MailEnable #Region "Lists" Public Overridable Function GetList(ByVal maillistName As String) As MailList Implements IMailServer.GetList - Dim mailList As Object = CreateObject(MAILLIST_PROG_ID) + Dim mailList As New WebsitePanel.Providers.Mail.MailEnableList ResetMaillist(mailList) mailList.AccountName = GetDomainName(maillistName) mailList.ListName = GetMailboxName(maillistName) @@ -1112,7 +1144,7 @@ Public Class MailEnable Dim maillists As List(Of MailList) = New List(Of MailList) Try - Dim mailList As Object = CreateObject(MAILLIST_PROG_ID) + Dim mailList As New WebsitePanel.Providers.Mail.MailEnableList ResetMaillist(mailList) mailList.AccountName = domainName @@ -1165,7 +1197,7 @@ Public Class MailEnable Dim domainName As String = GetDomainName(name) Dim mailListName As String = GetMailboxName(name) - Dim listMember As Object = CreateObject(LIST_MEMBER_PROG_ID) + Dim listMember As New WebsitePanel.Providers.Mail.MailEnableListMember listMember.AccountName = domainName listMember.ListName = mailListName listMember.Address = "" @@ -1192,7 +1224,7 @@ Public Class MailEnable End Function Public Overridable Function ListExists(ByVal maillistName As String) As Boolean Implements IMailServer.ListExists - Dim mailList As Object = CreateObject(MAILLIST_PROG_ID) + Dim mailList As New WebsitePanel.Providers.Mail.MailEnableList ResetMaillist(mailList) mailList.AccountName = GetDomainName(maillistName) mailList.ListName = GetMailboxName(maillistName) @@ -1210,7 +1242,7 @@ Public Class MailEnable info.Members = New String() {} End If - Dim mailList As Object = CreateObject(MAILLIST_PROG_ID) + Dim mailList As New WebsitePanel.Providers.Mail.MailEnableList ResetMaillist(mailList) mailList.AccountName = domainName @@ -1239,7 +1271,7 @@ Public Class MailEnable 'create mail list members Dim member As String For Each member In info.Members - Dim listMember As Object = CreateObject(LIST_MEMBER_PROG_ID) + Dim listMember As New WebsitePanel.Providers.Mail.MailEnableListMember listMember.AccountName = domainName listMember.Address = String.Format("[SMTP:{0}]", member) listMember.ListMemberType = 0 @@ -1265,7 +1297,7 @@ Public Class MailEnable info.Members = New String() {} End If - Dim mailList As Object = CreateObject(MAILLIST_PROG_ID) + Dim mailList As New WebsitePanel.Providers.Mail.MailEnableList ResetMaillist(mailList) mailList.AccountName = domainName @@ -1318,7 +1350,7 @@ Public Class MailEnable -1) 'delete list members - Dim listMember As Object = CreateObject(LIST_MEMBER_PROG_ID) + Dim listMember As New WebsitePanel.Providers.Mail.MailEnableListMember listMember.AccountName = domainName listMember.ListName = maillistName listMember.Address = "" @@ -1329,7 +1361,7 @@ Public Class MailEnable 'create mail list members Dim member As String For Each member In info.Members - listMember = CreateObject(LIST_MEMBER_PROG_ID) + listMember = New WebsitePanel.Providers.Mail.MailEnableListMember listMember.AccountName = domainName listMember.ListName = maillistName listMember.Address = String.Format("[SMTP:{0}]", member) @@ -1353,14 +1385,14 @@ Public Class MailEnable Dim maillistName As String = GetMailboxName(name) ' remove mailing list - Dim mailList As Object = CreateObject(MAILLIST_PROG_ID) + Dim mailList As New WebsitePanel.Providers.Mail.MailEnableList ResetMaillist(mailList) mailList.ListName = maillistName mailList.AccountName = domainName mailList.RemoveList() ' delete list members - Dim listMember As Object = CreateObject(LIST_MEMBER_PROG_ID) + Dim listMember As New WebsitePanel.Providers.Mail.MailEnableListMember listMember.AccountName = domainName listMember.ListName = maillistName listMember.Address = "" @@ -1370,7 +1402,7 @@ Public Class MailEnable listMember.RemoveListMember() ' delete address maps - Dim map As Object = CreateObject(ADDRESS_MAP_PROG_ID) + Dim map As New WebsitePanel.Providers.Mail.MailEnableAddressMap ResetAddressMap(map) map.Account = domainName map.DestinationAddress = String.Format("[LS:{0}/{1}]", domainName, maillistName) @@ -1415,10 +1447,10 @@ Public Class MailEnable login.Status = -1 End Sub - Private Sub ResetMailbox(ByVal mailbox As Object) + Private Sub ResetMailbox(ByVal mailbox As WebsitePanel.Providers.Mail.MailEnableMailbox) mailbox.Postoffice = "" mailbox.Host = "" - mailbox.Mailbox = "" + mailbox.MailboxName = "" mailbox.RedirectAddress = "" mailbox.Limit = -1 mailbox.RedirectStatus = -1 @@ -1495,7 +1527,7 @@ Public Class MailEnable Dim domainName As String = GetDomainName(name) Dim groupName As String = GetMailboxName(name) - Dim groupMember As Object = CreateObject(GROUP_MEMBER_PROG_ID) + Dim groupMember As New WebsitePanel.Providers.Mail.MailEnableGroupMember groupMember.Postoffice = domainName groupMember.Mailbox = groupName groupMember.Address = "" @@ -1516,8 +1548,8 @@ Public Class MailEnable End Function Private Sub CreateAddressMapsForAllDomains(ByVal domainName As String, ByVal aliasName As String, ByVal targetAddress As String) - Dim oDomain As Object = CreateObject(DOMAIN_PROG_ID) - Dim oAddressMap As Object = CreateObject(ADDRESS_MAP_PROG_ID) + Dim oDomain As New WebsitePanel.Providers.Mail.MailEnableDomain + Dim oAddressMap As New WebsitePanel.Providers.Mail.MailEnableAddressMap oDomain.AccountName = domainName oDomain.DomainName = "" oDomain.Status = -1 @@ -1586,88 +1618,88 @@ Public Class MailEnable End Sub Public Overrides Sub DeleteServiceItems(ByVal items() As ServiceProviderItem) - For Each item As ServiceProviderItem In items - If TypeOf item Is MailDomain Then - Try - DeleteDomain(item.Name) - Catch ex As Exception - Log.WriteError(String.Format("Error deleting '{0}' mail domain", item.Name), ex) - End Try - End If - Next - End Sub + For Each item As ServiceProviderItem In items + If TypeOf item Is MailDomain Then + Try + DeleteDomain(item.Name) + Catch ex As Exception + Log.WriteError(String.Format("Error deleting '{0}' mail domain", item.Name), ex) + End Try + End If + Next + End Sub Public Overrides Function GetServiceItemsDiskSpace(ByVal items() As ServiceProviderItem) As ServiceProviderItemDiskSpace() - Dim itemsDiskspace As List(Of ServiceProviderItemDiskSpace) = New List(Of ServiceProviderItemDiskSpace) + Dim itemsDiskspace As List(Of ServiceProviderItemDiskSpace) = New List(Of ServiceProviderItemDiskSpace) - ' update items with diskspace - Dim item As ServiceProviderItem - For Each item In items - If TypeOf item Is MailAccount Then - Try - ' get mailbox size - Dim name As String = item.Name + ' update items with diskspace + Dim item As ServiceProviderItem + For Each item In items + If TypeOf item Is MailAccount Then + Try + ' get mailbox size + Dim name As String = item.Name - ' try to get MailEnable postoffices path - Dim poPath As String = GetPostofficesPath() - If poPath Is Nothing Then - Continue For - End If - Dim mailboxName As String = name.Substring(0, name.IndexOf("@")) - Dim domainName As String = name.Substring((name.IndexOf("@") + 1)) + ' try to get MailEnable postoffices path + Dim poPath As String = GetPostofficesPath() + If poPath Is Nothing Then + Continue For + End If + Dim mailboxName As String = name.Substring(0, name.IndexOf("@")) + Dim domainName As String = name.Substring((name.IndexOf("@") + 1)) - Dim mailboxPath As String = [String].Format("{0}\{1}\Mailroot\{2}", poPath, domainName, mailboxName) + Dim mailboxPath As String = [String].Format("{0}\{1}\Mailroot\{2}", poPath, domainName, mailboxName) - ' calculate disk space - Dim diskspace As New ServiceProviderItemDiskSpace() - diskspace.ItemId = item.Id - diskspace.DiskSpace = FileUtils.CalculateFolderSize(mailboxPath) - itemsDiskspace.Add(diskspace) - Catch ex As Exception - Log.WriteError("Error calculating disk space for mail account: " + item.Name, ex) - End Try - End If - Next item + ' calculate disk space + Dim diskspace As New ServiceProviderItemDiskSpace() + diskspace.ItemId = item.Id + diskspace.DiskSpace = FileUtils.CalculateFolderSize(mailboxPath) + itemsDiskspace.Add(diskspace) + Catch ex As Exception + Log.WriteError("Error calculating disk space for mail account: " + item.Name, ex) + End Try + End If + Next item - Return itemsDiskspace.ToArray() + Return itemsDiskspace.ToArray() End Function Public Overrides Function GetServiceItemsBandwidth(ByVal items() As ServiceProviderItem, ByVal since As Date) As ServiceProviderItemBandwidth() - Dim itemsBandwidth(items.Length) As ServiceProviderItemBandwidth + Dim itemsBandwidth(items.Length) As ServiceProviderItemBandwidth - Dim logsPath As String = GetLoggingPath() - If logsPath Is Nothing Then - Return Nothing - End If - ' calculate bandwidth for mail enable - ' parse mail logs - Dim parser As New LogParser("Mail", "mailenable_pop", Path.Combine(logsPath, "pop"), "account") + Dim logsPath As String = GetLoggingPath() + If logsPath Is Nothing Then + Return Nothing + End If + ' calculate bandwidth for mail enable + ' parse mail logs + Dim parser As New LogParser("Mail", "mailenable_pop", Path.Combine(logsPath, "pop"), "account") parser.ParseLogs(Of LogReader)() - parser = New LogParser("Mail", "mailenable_smtp", Path.Combine(logsPath, "smtp"), "account") + parser = New LogParser("Mail", "mailenable_smtp", Path.Combine(logsPath, "smtp"), "account") parser.ParseLogs(Of MELogReader)() - ' update items with diskspace - Dim i As Integer - For i = 0 To items.Length - 1 - Dim item As ServiceProviderItem = items(i) + ' update items with diskspace + Dim i As Integer + For i = 0 To items.Length - 1 + Dim item As ServiceProviderItem = items(i) - ' create new bandwidth object - itemsBandwidth(i) = New ServiceProviderItemBandwidth() - itemsBandwidth(i).ItemId = item.Id - itemsBandwidth(i).Days = New DailyStatistics(0) {} + ' create new bandwidth object + itemsBandwidth(i) = New ServiceProviderItemBandwidth() + itemsBandwidth(i).ItemId = item.Id + itemsBandwidth(i).Days = New DailyStatistics(0) {} - If TypeOf item Is MailDomain Then - Try - ' get daily statistics - itemsBandwidth(i).Days = parser.GetDailyStatistics(since, New String() {item.Name}) - Catch ex As Exception - Log.WriteError("Error calculating bandwidth for mail domain: " + item.Name, ex) - End Try - End If - Next i - Return itemsBandwidth + If TypeOf item Is MailDomain Then + Try + ' get daily statistics + itemsBandwidth(i).Days = parser.GetDailyStatistics(since, New String() {item.Name}) + Catch ex As Exception + Log.WriteError("Error calculating bandwidth for mail domain: " + item.Name, ex) + End Try + End If + Next i + Return itemsBandwidth End Function Private Sub DeleteMailBoxDirectory(ByVal name As String) @@ -1772,87 +1804,60 @@ Public Class MailEnable End Sub Private Sub SetMailBoxReplyToAddress(ByVal mailbox As String, ByVal replyToAddress As String) - Dim mailBoxFile As String = String.Format("Config\PostOffices\{0}\MAILBOXES\{1}.sys", GetDomainName(mailbox), GetMailboxName(mailbox)) - Dim mailboxPath As String = Path.Combine(GetInstallPath(), mailBoxFile) - If (File.Exists(mailboxPath) <> True) Then - Dim stream As New IO.FileStream(mailboxPath, IO.FileMode.OpenOrCreate, IO.FileAccess.ReadWrite, IO.FileShare.None) - Dim writer As New StreamWriter(stream) - writer.WriteLine("[General]") - writer.Dispose() - stream.Dispose() - End If + Dim oMEAOSO As New WebsitePanel.Providers.Mail.MailEnableOption - Dim reader As New StreamReader(mailboxPath) + With oMEAOSO + .Scope = 2 + .Query = GetDomainName(mailbox) & "/" & GetMailboxName(mailbox) + .ValueName = "ReplyAddress" + .Value = replyToAddress + .SetOption() + End With - Dim Count As Integer = 0 - While reader.Peek <> -1 - Dim line As String = reader.ReadLine() - If line.Contains("ReplyAddress") Then - reader.Dispose() - ReplaceLine(mailboxPath, Count, String.Format("ReplyAddress={0}", replyToAddress)) - Exit Sub - End If - Count = Count + 1 - End While - - reader.Dispose() - AppendLine(mailboxPath, String.Format("ReplyAddress={0}", replyToAddress)) - - 'Dim writer As New StreamWriter(mailboxPath) - 'writer.WriteLine(String.Format("ReplyAddress={0}", replyToAddress)) - 'writer.Close() - 'writer.Dispose() - - End Sub - - - Private Sub ReplaceLine(ByRef FileAddress As String, ByRef line As Integer, ByVal address As String) - Dim TheFileLines As New List(Of String) - TheFileLines.AddRange(System.IO.File.ReadAllLines(FileAddress)) - If line >= TheFileLines.Count Then Exit Sub - TheFileLines.RemoveAt(line) - TheFileLines.Add(address) - File.WriteAllLines(FileAddress, TheFileLines.ToArray) - End Sub - - Private Sub AppendLine(ByRef FileAddress As String, ByRef line As String) - Dim TheFileLines As New List(Of String) - TheFileLines.AddRange(System.IO.File.ReadAllLines(FileAddress)) - TheFileLines.Add(line) - File.WriteAllLines(FileAddress, TheFileLines.ToArray) End Sub Private Function GetMailBoxReplyToAddress(ByVal mailbox As String) - Dim mailBoxFile As String = String.Format("Config\PostOffices\{0}\MAILBOXES\{1}.sys", GetDomainName(mailbox), GetMailboxName(mailbox)) - Dim mailboxPath As String = Path.Combine(GetInstallPath(), mailBoxFile) - If (File.Exists(mailboxPath) = False) Then - Return String.Empty - End If + Dim oMEAOSO As New WebsitePanel.Providers.Mail.MailEnableOption - Dim reader As New StreamReader(mailboxPath) + With oMEAOSO + .Scope = 2 + .Query = GetDomainName(mailbox) & "/" & GetMailboxName(mailbox) + .ValueName = "ReplyAddress" + .GetOption() + Return .Value + End With - While reader.Peek <> -1 - Dim line As String = reader.ReadLine() - If line.Contains("ReplyAddress") Then - Dim split As String() = line.Split(New [Char]() {"="c}) - Return split(1) - End If - End While - reader.Dispose() - Return String.Empty End Function - Private Function GetPostofficesPath() As String - Dim key As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Mail Enable\Mail Enable") - Return CStr(key.GetValue("Mail Root")) + Function GetMailEnableRegistryItem(item As String) As String + + Dim key As RegistryKey + + If IntPtr.Size > 4 Then + key = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Mail Enable\Mail Enable") + Else + key = Registry.LocalMachine.OpenSubKey("SOFTWARE\Mail Enable\Mail Enable") + End If + + Return CStr(key.GetValue(item)) + + End Function + + + Shared Function GetPostofficesPath() As String + + Dim oLocal As New MailEnable + Return oLocal.GetMailEnableRegistryItem("Mail Root") + End Function Private Function GetInstallPath() As String - Dim key As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Mail Enable\Mail Enable") - Return CStr(key.GetValue("Program Directory")) + + Return GetMailEnableRegistryItem("Program Directory") + End Function @@ -1953,69 +1958,84 @@ Public Class MailEnable End Function Private Function GetAnnotationPath(ByVal postOfficeName As String) As String + + 'the annotation paths are in the configuration directory + Dim programPath As String = "" - Dim key32bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Mail Enable\Mail Enable") - If (key32bit Is Nothing) Then - Dim key64bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Mail Enable\Mail Enable") - If (key64bit Is Nothing) Then - Return String.Empty - Else - programPath = CStr(key64bit.GetValue("Data Directory")) - Return Path.Combine(programPath, String.Format("Config\Postoffices\{0}\ANNOTATIONS", postOfficeName)) - End If + Dim key As RegistryKey + + If IntPtr.Size > 4 Then + key = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Mail Enable\Mail Enable") Else - programPath = CStr(key32bit.GetValue("Data Directory")) - Return Path.Combine(programPath, String.Format("Config\Postoffices\{0}\ANNOTATIONS", postOfficeName)) + key = Registry.LocalMachine.OpenSubKey("SOFTWARE\Mail Enable\Mail Enable") End If + If (key Is Nothing) Then + Return String.Empty + Else + programPath = CStr(key.GetValue("Configuration Directory")) + Return Path.Combine(programPath, String.Format("Postoffices\{0}\ANNOTATIONS", postOfficeName)) + End If + + End Function + + Private Function NonCString(ByVal InString As String) As String + Dim NTPos As Integer + NTPos = InStr(1, InString, Chr(0), CompareMethod.Binary) + If NTPos > 0 Then + NonCString = Left(InString, NTPos - 1) + Else + NonCString = InString + End If + End Function + + Private Function CString(ByVal InString As String) As String + CString = InString & Chr(0) End Function Private Function GetLoggingPath() As String Dim programPath As String = "" - Dim key32bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Mail Enable\Mail Enable") - If (key32bit Is Nothing) Then - Dim key64bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Mail Enable\Mail Enable") - If (key64bit Is Nothing) Then - Return String.Empty - Else - Return CStr(key64bit.GetValue("W3C Logging Directory")) - End If + Dim key As RegistryKey + + If IntPtr.Size > 4 Then + key = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Mail Enable\Mail Enable") Else - Return CStr(key32bit.GetValue("W3C Logging Directory")) + key = Registry.LocalMachine.OpenSubKey("SOFTWARE\Mail Enable\Mail Enable") + End If + + If (key Is Nothing) Then + Return String.Empty + Else + Return CStr(key.GetValue("W3C Logging Directory")) End If End Function + #End Region Public Overrides Function IsInstalled() As Boolean + Dim version As String = "" - Dim key32bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Mail Enable\Mail Enable") - If (key32bit Is Nothing) Then - Dim key64bit As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Mail Enable\Mail Enable") - If (key64bit Is Nothing) Then - Return False - Else - version = CStr(key64bit.GetValue("Enterprise Version")) - If (version Is Nothing) Then - version = CStr(key64bit.GetValue("Version")) - If (version Is Nothing Or version.Equals("0")) Then - version = CStr(key64bit.GetValue("Professional Version")) - End If - End If - End If + Dim key As RegistryKey + + If IntPtr.Size > 4 Then + key = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Mail Enable\Mail Enable") Else - version = CStr(key32bit.GetValue("Enterprise Version")) - If (version Is Nothing) Then - version = CStr(key32bit.GetValue("Version")) - If (version Is Nothing Or version.Equals("0")) Then - version = CStr(key32bit.GetValue("Professional Version")) - End If + key = Registry.LocalMachine.OpenSubKey("SOFTWARE\Mail Enable\Mail Enable") + End If + + version = CStr(key.GetValue("Enterprise Version")) + If (version Is Nothing) Then + version = CStr(key.GetValue("Version")) + If (version Is Nothing Or version.Equals("0")) Then + version = CStr(key.GetValue("Professional Version")) End If End If + If [String].IsNullOrEmpty(version) = False Then Dim split As String() = version.Split(New [Char]() {"."c}) - Return split(0).Equals("1") Or split(0).Equals("2") Or split(0).Equals("3") Or split(0).Equals("4") + Return split(0).Equals("1") Or split(0).Equals("2") Or split(0).Equals("3") Or split(0).Equals("4") Or split(0).Equals("5") Or split(0).Equals("6") Else Return False End If diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableAddressMap.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableAddressMap.vb new file mode 100644 index 00000000..3bff334d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableAddressMap.vb @@ -0,0 +1,261 @@ +' Copyright (c) 2012, Outercurve Foundation. +' All rights reserved. +' +' Redistribution and use in source and binary forms, with or without modification, +' are permitted provided that the following conditions are met: +' +' - Redistributions of source code must retain the above copyright notice, this +' list of conditions and the following disclaimer. +' +' - Redistributions in binary form must reproduce the above copyright notice, +' this list of conditions and the following disclaimer in the documentation +' and/or other materials provided with the distribution. +' +' - Neither the name of the Outercurve Foundation nor the names of its +' contributors may be used to endorse or promote products derived from this +' software without specific prior written permission. +' +' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +' (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +' LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +' ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +' (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Option Strict Off +Option Explicit On + +Namespace WebsitePanel.Providers.Mail + Public Class MailEnableAddressMap + Inherits MarshalByRefObject + + Private AccountVal As String = "" + Private SourceAddressVal As String = "" + Private DestinationAddressVal As String = "" + Private ScopeVal As String = "" + Private HostVal As String = "" + Private StatusVal As Integer + + Private Structure IADDRESSMAPENTRYTYPE + Public Account As String + Public SourceAddress As String + Public DestinationAddress As String + Public Scope As String + Public Status As Integer + End Structure + + Private Declare Function AddressMapGet Lib "MEAIAM.DLL" (ByRef lpAddressMap As IADDRESSMAPENTRYTYPE) As Integer + Private Declare Function AddressMapFindFirst Lib "MEAIAM.DLL" (ByRef lpAddressMap As IADDRESSMAPENTRYTYPE) As Integer + Private Declare Function AddressMapFindNext Lib "MEAIAM.DLL" (ByRef lpAddressMap As IADDRESSMAPENTRYTYPE) As Integer + Private Declare Function AddressMapAdd Lib "MEAIAM.DLL" (ByRef lpAddressMap As IADDRESSMAPENTRYTYPE) As Integer + Private Declare Function AddressMapEdit Lib "MEAIAM.DLL" (ByRef TargetAddressMap As IADDRESSMAPENTRYTYPE, ByRef NewAddressMap As IADDRESSMAPENTRYTYPE) As Integer + Private Declare Function AddressMapRemove Lib "MEAIAM.DLL" (ByRef lpAddressMap As IADDRESSMAPENTRYTYPE) As Integer + Private Declare Function SetCurrentHost Lib "MEAIAM.DLL" (ByVal CurrentHost As String) As Integer + + Public Function SetHost() As Integer + SetHost = SetCurrentHost(Host) + End Function + + Public Function GetAddressMap() As Integer + + Dim CAddressMap As IADDRESSMAPENTRYTYPE + + CAddressMap.Account = Account + CAddressMap.SourceAddress = SourceAddress + CAddressMap.DestinationAddress = DestinationAddress + CAddressMap.Scope = Scope + CAddressMap.Status = Status + GetAddressMap = AddressMapGet(CAddressMap) + Account = CAddressMap.Account + SourceAddress = CAddressMap.SourceAddress + DestinationAddress = CAddressMap.DestinationAddress + Scope = CAddressMap.Scope + Status = CAddressMap.Status + End Function + + Public Function FindFirstAddressMap() As Integer + Dim CAddressMap As IADDRESSMAPENTRYTYPE + CAddressMap.Account = Account + CAddressMap.SourceAddress = SourceAddress + CAddressMap.DestinationAddress = DestinationAddress + CAddressMap.Scope = Scope + CAddressMap.Status = Status + FindFirstAddressMap = AddressMapFindFirst(CAddressMap) + Account = CAddressMap.Account + SourceAddress = CAddressMap.SourceAddress + DestinationAddress = CAddressMap.DestinationAddress + Scope = CAddressMap.Scope + Status = CAddressMap.Status + End Function + + Public Function FindNextAddressMap() As Integer + Dim CAddressMap As IADDRESSMAPENTRYTYPE + CAddressMap.Account = Account + CAddressMap.SourceAddress = SourceAddress + CAddressMap.DestinationAddress = DestinationAddress + CAddressMap.Scope = Scope + CAddressMap.Status = Status + FindNextAddressMap = AddressMapFindNext(CAddressMap) + Account = CAddressMap.Account + SourceAddress = CAddressMap.SourceAddress + DestinationAddress = CAddressMap.DestinationAddress + Scope = CAddressMap.Scope + Status = CAddressMap.Status + End Function + + Public Function AddAddressMap() As Integer + Dim CAddressMap As IADDRESSMAPENTRYTYPE + CAddressMap.Account = Account + CAddressMap.SourceAddress = SourceAddress + CAddressMap.DestinationAddress = DestinationAddress + CAddressMap.Scope = Scope + CAddressMap.Status = Status + AddAddressMap = AddressMapAdd(CAddressMap) + Account = CAddressMap.Account + SourceAddress = CAddressMap.SourceAddress + DestinationAddress = CAddressMap.DestinationAddress + Scope = CAddressMap.Scope + Status = CAddressMap.Status + End Function + + Private Function CString(ByVal InString As String) As String + CString = InString & Chr(0) + End Function + + Private Function NonCString(ByVal InString As String) As String + Dim NTPos As Integer + NTPos = InStr(1, InString, Chr(0), CompareMethod.Binary) + If NTPos > 0 Then + NonCString = Left(InString, NTPos - 1) + Else + NonCString = InString + End If + + End Function + Public Function RemoveAddressMap(Optional ByVal DeleteAll As Boolean = False) As Integer + Dim CAddressMap As IADDRESSMAPENTRYTYPE + Dim lResult As Long + + 'if the one to remove is a catchall we need to rename first + If Not DeleteAll And InStr(1, SourceAddress, "[SMTP:*@", vbTextCompare) = 1 Then + + Dim oAddressMap As New MailEnableAddressMap + + With oAddressMap + .Account = Account + .DestinationAddress = DestinationAddress + .Scope = "" + .SourceAddress = SourceAddress + End With + + lResult = oAddressMap.EditAddressMap(Account, "[SMTP:___~@deleteme]", "[SF:___~" & Account & "/toremove]", "", -1) + + oAddressMap = Nothing + + CAddressMap.Account = CString(Account) + CAddressMap.SourceAddress = CString("[SMTP:___~@deleteme]") + CAddressMap.DestinationAddress = CString("[SF:___~" & Account & "/toremove]") + CAddressMap.Scope = CString("") + CAddressMap.Status = Status + RemoveAddressMap = AddressMapRemove(CAddressMap) + Account = NonCString(CAddressMap.Account) + SourceAddress = NonCString(CAddressMap.SourceAddress) + DestinationAddress = NonCString(CAddressMap.DestinationAddress) + Scope = NonCString(CAddressMap.Scope) + Status = CAddressMap.Status + + Exit Function + End If + + CAddressMap.Account = CString(Account) + CAddressMap.SourceAddress = CString(SourceAddress) + CAddressMap.DestinationAddress = CString(DestinationAddress) + CAddressMap.Scope = CString(Scope) + CAddressMap.Status = Status + RemoveAddressMap = AddressMapRemove(CAddressMap) + Account = NonCString(CAddressMap.Account) + SourceAddress = NonCString(CAddressMap.SourceAddress) + DestinationAddress = NonCString(CAddressMap.DestinationAddress) + Scope = NonCString(CAddressMap.Scope) + Status = CAddressMap.Status + End Function + + Public Function EditAddressMap(ByVal NewAccount As String, ByVal NewSourceAddress As String, ByVal NewDestinationAddress As String, ByVal NewScope As String, ByVal NewStatus As Integer) As Integer + Dim CAddressMap As IADDRESSMAPENTRYTYPE + Dim CAddressMapData As IADDRESSMAPENTRYTYPE + CAddressMap.Account = Account + CAddressMap.SourceAddress = SourceAddress + CAddressMap.DestinationAddress = DestinationAddress + CAddressMap.Scope = Scope + CAddressMap.Status = Status + + CAddressMapData.Account = NewAccount + CAddressMapData.SourceAddress = NewSourceAddress + CAddressMapData.DestinationAddress = NewDestinationAddress + CAddressMapData.Scope = NewScope + CAddressMapData.Status = NewStatus + EditAddressMap = AddressMapEdit(CAddressMap, CAddressMapData) + End Function + + Public Property Account() As String + Get + Return Me.AccountVal + End Get + Set(ByVal Value As String) + Me.AccountVal = Value + End Set + End Property + + Public Property SourceAddress() As String + Get + Return Me.SourceAddressVal + End Get + Set(ByVal Value As String) + Me.SourceAddressVal = Value + End Set + End Property + + Public Property DestinationAddress() As String + Get + Return Me.DestinationAddressVal + End Get + Set(ByVal Value As String) + Me.DestinationAddressVal = Value + End Set + End Property + + Public Property Status() As Integer + Get + Return Me.StatusVal + End Get + Set(ByVal Value As Integer) + Me.StatusVal = Value + End Set + End Property + + + Public Property Scope() As String + Get + Return Me.ScopeVal + End Get + Set(ByVal Value As String) + Me.ScopeVal = Value + End Set + End Property + + Public Property Host() As String + Get + Return Me.HostVal + End Get + Set(ByVal Value As String) + Me.HostVal = Value + End Set + End Property + + End Class + +End Namespace diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableBlacklist.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableBlacklist.vb new file mode 100644 index 00000000..d5a0c026 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableBlacklist.vb @@ -0,0 +1,227 @@ +' Copyright (c) 2012, Outercurve Foundation. +' All rights reserved. +' +' Redistribution and use in source and binary forms, with or without modification, +' are permitted provided that the following conditions are met: +' +' - Redistributions of source code must retain the above copyright notice, this +' list of conditions and the following disclaimer. +' +' - Redistributions in binary form must reproduce the above copyright notice, +' this list of conditions and the following disclaimer in the documentation +' and/or other materials provided with the distribution. +' +' - Neither the name of the Outercurve Foundation nor the names of its +' contributors may be used to endorse or promote products derived from this +' software without specific prior written permission. +' +' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +' (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +' LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +' ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +' (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Option Strict Off +Option Explicit On + +Namespace WebsitePanel.Providers.Mail + + Public Class MailEnableDomainBlacklist + Inherits MarshalByRefObject + + Private TargetDomainNameVal As String + Private BannedDomainNameVal As String + Private StatusVal As Integer + Private AccountVal As String + Private HostVal As String + + Private Structure ISMTPBLACKLISTTYPE + Public TargetDomainName As String + Public BannedDomainName As String + Public Status As Integer + Public Account As String + End Structure + + Private Declare Function SMTPBlacklistAdd Lib "MEAISM.DLL" (ByRef SMTPBlacklist As ISMTPBLACKLISTTYPE) As Integer + Private Declare Function SMTPBlacklistGet Lib "MEAISM.DLL" (ByRef SMTPBlacklistCriteria As ISMTPBLACKLISTTYPE) As Integer + Private Declare Function SMTPBlacklistEdit Lib "MEAISM.DLL" (ByRef SMTPBlacklistCriteria As ISMTPBLACKLISTTYPE, ByRef SMTPBlacklistData As ISMTPBLACKLISTTYPE) As Integer + Private Declare Function SMTPBlacklistRemove Lib "MEAISM.DLL" (ByRef SMTPBlacklist As ISMTPBLACKLISTTYPE) As Integer + Private Declare Function SMTPBlacklistFindFirst Lib "MEAISM.DLL" (ByRef SMTPBlacklist As ISMTPBLACKLISTTYPE) As Integer + Private Declare Function SMTPBlacklistFindNext Lib "MEAISM.DLL" (ByRef SMTPBlacklist As ISMTPBLACKLISTTYPE) As Integer + Private Declare Function SetCurrentHost Lib "MEAISM.DLL" (ByVal CurrentHost As String) As Integer + + Public Function SetHost() As Integer + SetHost = SetCurrentHost(Host) + End Function + + Public Function AddBlacklist() As Integer + + Dim CBlacklist As ISMTPBLACKLISTTYPE + + CBlacklist.TargetDomainName = TargetDomainName + CBlacklist.BannedDomainName = BannedDomainName + CBlacklist.Status = Status + CBlacklist.Account = Account + + AddBlacklist = SMTPBlacklistAdd(CBlacklist) + + TargetDomainName = CBlacklist.TargetDomainName + BannedDomainName = CBlacklist.BannedDomainName + Status = CBlacklist.Status + Account = CBlacklist.Account + + End Function + + + Public Function GetBlacklist() As Integer + + Dim CBlacklist As ISMTPBLACKLISTTYPE + + CBlacklist.TargetDomainName = TargetDomainName + CBlacklist.BannedDomainName = BannedDomainName + CBlacklist.Status = Status + CBlacklist.Account = Account + + GetBlacklist = SMTPBlacklistGet(CBlacklist) + + TargetDomainName = CBlacklist.TargetDomainName + BannedDomainName = CBlacklist.BannedDomainName + Status = CBlacklist.Status + Account = CBlacklist.Account + + End Function + + + Public Function EditBlacklist(ByVal NewTargetDomainName As String, ByVal NewBannedDomainName As String, ByVal NewStatus As Integer, ByVal NewAccount As String) As Integer + + Dim CBlacklist As ISMTPBLACKLISTTYPE + Dim CBlacklistData As ISMTPBLACKLISTTYPE + + CBlacklist.TargetDomainName = TargetDomainName + CBlacklist.BannedDomainName = BannedDomainName + CBlacklist.Status = Status + CBlacklist.Account = Account + CBlacklistData.TargetDomainName = NewTargetDomainName + CBlacklistData.BannedDomainName = NewBannedDomainName + CBlacklistData.Status = NewStatus + CBlacklistData.Account = NewAccount + + EditBlacklist = SMTPBlacklistEdit(CBlacklist, CBlacklistData) + + TargetDomainName = CBlacklist.TargetDomainName + BannedDomainName = CBlacklist.BannedDomainName + Status = CBlacklist.Status + Account = CBlacklist.Account + + End Function + + + Public Function RemoveBlacklist() As Integer + + Dim CBlacklist As ISMTPBLACKLISTTYPE + + CBlacklist.TargetDomainName = TargetDomainName + CBlacklist.BannedDomainName = BannedDomainName + CBlacklist.Status = Status + CBlacklist.Account = Account + + RemoveBlacklist = SMTPBlacklistRemove(CBlacklist) + + TargetDomainName = CBlacklist.TargetDomainName + BannedDomainName = CBlacklist.BannedDomainName + Status = CBlacklist.Status + Account = CBlacklist.Account + + End Function + + + Public Function FindFirstBlacklist() As Integer + + Dim CBlacklist As ISMTPBLACKLISTTYPE + + CBlacklist.TargetDomainName = TargetDomainName + CBlacklist.BannedDomainName = BannedDomainName + CBlacklist.Status = Status + CBlacklist.Account = Account + + FindFirstBlacklist = SMTPBlacklistFindFirst(CBlacklist) + + TargetDomainName = CBlacklist.TargetDomainName + BannedDomainName = CBlacklist.BannedDomainName + Status = CBlacklist.Status + Account = CBlacklist.Account + + End Function + + + Public Function FindNextBlacklist() As Integer + + Dim CBlacklist As ISMTPBLACKLISTTYPE + + CBlacklist.TargetDomainName = TargetDomainName + CBlacklist.BannedDomainName = BannedDomainName + CBlacklist.Status = Status + CBlacklist.Account = Account + + FindNextBlacklist = SMTPBlacklistFindNext(CBlacklist) + + TargetDomainName = CBlacklist.TargetDomainName + BannedDomainName = CBlacklist.BannedDomainName + Status = CBlacklist.Status + Account = CBlacklist.Account + + End Function + + Public Property TargetDomainName() As String + Get + Return Me.TargetDomainNameVal + End Get + Set(ByVal Value As String) + Me.TargetDomainNameVal = Value + End Set + End Property + + Public Property BannedDomainName() As String + Get + Return Me.BannedDomainNameVal + End Get + Set(ByVal Value As String) + Me.BannedDomainNameVal = Value + End Set + End Property + + Public Property Status() As Integer + Get + Return Me.StatusVal + End Get + Set(ByVal Value As Integer) + Me.StatusVal = Value + End Set + End Property + + Public Property Account() As String + Get + Return Me.AccountVal + End Get + Set(ByVal Value As String) + Me.AccountVal = Value + End Set + End Property + + Public Property Host() As String + Get + Return Me.HostVal + End Get + Set(ByVal Value As String) + Me.HostVal = Value + End Set + End Property + + End Class + +End Namespace diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableDomain.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableDomain.vb new file mode 100644 index 00000000..8fdb926c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableDomain.vb @@ -0,0 +1,400 @@ +' Copyright (c) 2012, Outercurve Foundation. +' All rights reserved. +' +' Redistribution and use in source and binary forms, with or without modification, +' are permitted provided that the following conditions are met: +' +' - Redistributions of source code must retain the above copyright notice, this +' list of conditions and the following disclaimer. +' +' - Redistributions in binary form must reproduce the above copyright notice, +' this list of conditions and the following disclaimer in the documentation +' and/or other materials provided with the distribution. +' +' - Neither the name of the Outercurve Foundation nor the names of its +' contributors may be used to endorse or promote products derived from this +' software without specific prior written permission. +' +' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +' (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +' LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +' ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +' (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Option Strict Off +Option Explicit On + +Namespace WebsitePanel.Providers.Mail + + Public Class MailEnableDomain + Inherits MarshalByRefObject + + Private DomainNameVal As String + Private StatusVal As Integer + Private DomainRedirectionStatusVal As Integer + Private DomainRedirectionHostsVal As String + Private AccountNameVal As String + Private HostVal As String + Private RetainModeVal As Integer ' this is used to hold messages waiting for pickup by issued ETRN + Private PollForMessagesVal As Integer ' this indicates that we need to poll a host for messages for this domain + Private UpStreamHostVal As String ' this is the address of the host to poll if we are set to poll a remote host + Private PollIntervalVal As Integer ' this is the frequency in minutes that we need to poll the remote host + Private AliasModeVal As Integer + Private AliasNameVal As String + + Private Structure ISMTPDOMAINTYPE + Public DomainName As String + Public Status As Integer + Public DomainRedirectionStatus As Integer + Public DomainRedirectionHosts As String + Public AccountName As String + Public RetainMode As Integer ' this is used to hold messages waiting for pickup by issued ETRN + Public PollForMessages As Integer ' this indicates that we need to poll a host for messages for this domain + Public UpStreamHost As String ' this is the address of the host to poll if we are set to poll a remote host + Public PollInterval As Integer ' this is the frequency in minutes that we need to poll the remote host + Public AliasMode As Integer + Public AliasName As String + End Structure + + Private Declare Function SMTPDomainAdd Lib "MEAISM.DLL" (ByRef SMTPDomain As ISMTPDOMAINTYPE) As Integer + Private Declare Function SMTPDomainGet Lib "MEAISM.DLL" (ByRef SMTPDomainCriteria As ISMTPDOMAINTYPE) As Integer + Private Declare Function SMTPDomainEdit Lib "MEAISM.DLL" (ByRef SMTPDomainCriteria As ISMTPDOMAINTYPE, ByRef SMTPDomainData As ISMTPDOMAINTYPE) As Integer + Private Declare Function SMTPDomainRemove Lib "MEAISM.DLL" (ByRef SMTPDomain As ISMTPDOMAINTYPE) As Integer + Private Declare Function SMTPDomainFindFirst Lib "MEAISM.DLL" (ByRef SMTPDomain As ISMTPDOMAINTYPE) As Integer + Private Declare Function SMTPDomainFindNext Lib "MEAISM.DLL" (ByRef SMTPDomain As ISMTPDOMAINTYPE) As Integer + Private Declare Function SetCurrentHost Lib "MEAISM.DLL" (ByVal CurrentHost As String) As Integer + + Public Function SetHost() As Integer + SetHost = SetCurrentHost(Host) + End Function + + Public Function AddDomain() As Integer + + Dim CDomain As ISMTPDOMAINTYPE + + CDomain.AliasMode = 0 + CDomain.AliasName = "" + CDomain.PollForMessages = 0 + CDomain.PollInterval = 0 + CDomain.RetainMode = 0 + CDomain.UpStreamHost = "" + + CDomain.AccountName = AccountName + CDomain.DomainName = DomainName + CDomain.DomainRedirectionHosts = DomainRedirectionHosts + CDomain.DomainRedirectionStatus = DomainRedirectionStatus + CDomain.Status = Status + + AddDomain = SMTPDomainAdd(CDomain) + + AccountName = CDomain.AccountName + DomainName = CDomain.DomainName + DomainRedirectionHosts = CDomain.DomainRedirectionHosts + DomainRedirectionStatus = CDomain.DomainRedirectionStatus + Status = CDomain.Status + + 'Console.WriteLine("AddDomain called on server") + + End Function + + + Public Function GetDomain() As Integer + + Dim CDomain As ISMTPDOMAINTYPE + CDomain.AliasMode = -1 + CDomain.AliasName = "" + CDomain.PollForMessages = -1 + CDomain.PollInterval = -1 + CDomain.RetainMode = -1 + CDomain.UpStreamHost = "" + + CDomain.AccountName = AccountName + CDomain.DomainName = DomainName + CDomain.DomainRedirectionHosts = DomainRedirectionHosts + CDomain.DomainRedirectionStatus = DomainRedirectionStatus + CDomain.Status = Status + + GetDomain = SMTPDomainGet(CDomain) + + AccountName = CDomain.AccountName + DomainName = CDomain.DomainName + DomainRedirectionHosts = CDomain.DomainRedirectionHosts + DomainRedirectionStatus = CDomain.DomainRedirectionStatus + Status = CDomain.Status + + End Function + + + Public Function EditDomain(ByVal NewDomainName As String, ByVal NewStatus As Integer, ByVal NewDomainRedirectionStatus As Integer, ByVal NewDomainRedirectionHosts As String, ByVal NewAccountName As String) As Integer + + Dim CDomain As ISMTPDOMAINTYPE + CDomain.AliasMode = -1 + CDomain.AliasName = "" + CDomain.PollForMessages = -1 + CDomain.PollInterval = -1 + CDomain.RetainMode = -1 + CDomain.UpStreamHost = "" + Dim CDomainData As ISMTPDOMAINTYPE + + CDomain.AccountName = AccountName + CDomain.DomainName = DomainName + CDomain.DomainRedirectionHosts = DomainRedirectionHosts + CDomain.DomainRedirectionStatus = DomainRedirectionStatus + CDomain.Status = Status + CDomainData.AccountName = NewAccountName + CDomainData.DomainName = NewDomainName + CDomainData.DomainRedirectionHosts = NewDomainRedirectionHosts + CDomainData.DomainRedirectionStatus = NewDomainRedirectionStatus + CDomainData.Status = NewStatus + + CDomainData.AliasMode = 0 + CDomainData.AliasName = "" + CDomainData.PollForMessages = 0 + CDomainData.PollInterval = 0 + CDomainData.RetainMode = 0 + CDomainData.UpStreamHost = "" + + EditDomain = SMTPDomainEdit(CDomain, CDomainData) + + AccountName = CDomain.AccountName + DomainName = CDomain.DomainName + DomainRedirectionHosts = CDomain.DomainRedirectionHosts + DomainRedirectionStatus = CDomain.DomainRedirectionStatus + Status = CDomain.Status + + End Function + + + Public Function RemoveDomain() As Integer + + Dim CDomain As ISMTPDOMAINTYPE + CDomain.AliasMode = -1 + CDomain.AliasName = "" + CDomain.PollForMessages = -1 + CDomain.PollInterval = -1 + CDomain.RetainMode = -1 + CDomain.UpStreamHost = "" + + CDomain.AccountName = AccountName + CDomain.DomainName = DomainName + CDomain.DomainRedirectionHosts = DomainRedirectionHosts + CDomain.DomainRedirectionStatus = DomainRedirectionStatus + CDomain.Status = Status + + RemoveDomain = SMTPDomainRemove(CDomain) + + AccountName = CDomain.AccountName + DomainName = CDomain.DomainName + DomainRedirectionHosts = CDomain.DomainRedirectionHosts + DomainRedirectionStatus = CDomain.DomainRedirectionStatus + Status = CDomain.Status + + End Function + + + Public Function FindFirstDomain() As Integer + + Dim CDomain As ISMTPDOMAINTYPE + CDomain.AliasMode = -1 + CDomain.AliasName = "" + CDomain.PollForMessages = -1 + CDomain.PollInterval = -1 + CDomain.RetainMode = -1 + CDomain.UpStreamHost = "" + + CDomain.AccountName = AccountName + CDomain.DomainName = DomainName + CDomain.DomainRedirectionHosts = DomainRedirectionHosts + CDomain.DomainRedirectionStatus = DomainRedirectionStatus + CDomain.Status = Status + + FindFirstDomain = SMTPDomainFindFirst(CDomain) + + AccountName = CDomain.AccountName + DomainName = CDomain.DomainName + DomainRedirectionHosts = CDomain.DomainRedirectionHosts + DomainRedirectionStatus = CDomain.DomainRedirectionStatus + Status = CDomain.Status + + End Function + + + Public Function FindNextDomain() As Integer + + Dim CDomain As ISMTPDOMAINTYPE + + CDomain.AccountName = AccountName + CDomain.DomainName = DomainName + CDomain.DomainRedirectionHosts = DomainRedirectionHosts + CDomain.DomainRedirectionStatus = DomainRedirectionStatus + CDomain.Status = Status + + + CDomain.AliasMode = -1 + CDomain.AliasName = "" + CDomain.PollForMessages = -1 + CDomain.PollInterval = -1 + CDomain.RetainMode = -1 + CDomain.UpStreamHost = "" + + FindNextDomain = SMTPDomainFindNext(CDomain) + + AccountName = CDomain.AccountName + DomainName = CDomain.DomainName + DomainRedirectionHosts = CDomain.DomainRedirectionHosts + DomainRedirectionStatus = CDomain.DomainRedirectionStatus + Status = CDomain.Status + + End Function + + Public Property DomainName() As String + Get + Return Me.DomainNameVal + End Get + Set(ByVal Value As String) + Me.DomainNameVal = Value + End Set + End Property + + Public Property Status() As Integer + Get + Return Me.StatusVal + End Get + Set(ByVal Value As Integer) + Me.StatusVal = Value + End Set + End Property + + Public Property DomainRedirectionStatus() As Integer + Get + Return Me.DomainRedirectionStatusVal + End Get + Set(ByVal Value As Integer) + Me.DomainRedirectionStatusVal = Value + End Set + End Property + + Public Property DomainRedirectionHosts() As String + Get + Return Me.DomainRedirectionHostsVal + End Get + Set(ByVal Value As String) + Me.DomainRedirectionHostsVal = Value + End Set + End Property + + Public Property AccountName() As String + Get + Return Me.AccountNameVal + End Get + Set(ByVal Value As String) + Me.AccountNameVal = Value + End Set + End Property + + Public Property Host() As String + Get + Return Me.HostVal + End Get + Set(ByVal Value As String) + Me.HostVal = Value + End Set + End Property + + Public Property RetainMode() As Integer + Get + Return Me.RetainModeVal + End Get + Set(ByVal Value As Integer) + Me.RetainModeVal = Value + End Set + End Property + + Public Property PollForMessages() As Integer + Get + Return Me.PollForMessagesVal + End Get + Set(ByVal Value As Integer) + Me.PollForMessagesVal = Value + End Set + End Property + + Public Property UpStreamHost() As String + Get + Return Me.UpStreamHostVal + End Get + Set(ByVal Value As String) + Me.UpStreamHostVal = Value + End Set + End Property + + Public Property PollInterval() As Integer + Get + Return Me.PollIntervalVal + End Get + Set(ByVal Value As Integer) + Me.PollIntervalVal = Value + End Set + End Property + + Public Property AliasMode() As Integer + Get + Return Me.AliasModeVal + End Get + Set(ByVal Value As Integer) + Me.AliasModeVal = Value + End Set + End Property + + Public Property AliasName() As String + Get + Return Me.AliasNameVal + End Get + Set(ByVal Value As String) + Me.AliasNameVal = Value + End Set + End Property + + Private Function CString(ByVal InString As String) As String + CString = InString & Chr(0) + End Function + + Private Function NonCString(ByVal InString As String) As String + Dim NTPos As Integer + NTPos = InStr(1, InString, Chr(0), CompareMethod.Binary) + If NTPos > 0 Then + NonCString = Left(InString, NTPos - 1) + Else + NonCString = InString + End If + + End Function + + Public Function Exists(ByVal DomainName As String) As Boolean + + Dim CDomain As New ISMTPDOMAINTYPE + + CDomain.AccountName = CString("") + CDomain.DomainName = CString(DomainName) + CDomain.DomainRedirectionHosts = CString("") + CDomain.DomainRedirectionStatus = -1 + CDomain.Status = -1 + + Exists = (SMTPDomainGet(CDomain) = 1) + + End Function + + Private Sub AddDataTableColumns(ByRef oTable As DataTable) + oTable.Columns.Add("DomainName", GetType(String)) + oTable.Columns.Add("Status", GetType(Long)) + oTable.Columns.Add("RedirectionStatus", GetType(Long)) + oTable.Columns.Add("RedirectionHosts", GetType(String)) + End Sub + + End Class +End Namespace diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableGroup.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableGroup.vb new file mode 100644 index 00000000..32fc0b28 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableGroup.vb @@ -0,0 +1,219 @@ +' Copyright (c) 2012, Outercurve Foundation. +' All rights reserved. +' +' Redistribution and use in source and binary forms, with or without modification, +' are permitted provided that the following conditions are met: +' +' - Redistributions of source code must retain the above copyright notice, this +' list of conditions and the following disclaimer. +' +' - Redistributions in binary form must reproduce the above copyright notice, +' this list of conditions and the following disclaimer in the documentation +' and/or other materials provided with the distribution. +' +' - Neither the name of the Outercurve Foundation nor the names of its +' contributors may be used to endorse or promote products derived from this +' software without specific prior written permission. +' +' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +' (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +' LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +' ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +' (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Namespace WebsitePanel.Providers.Mail + + Public Class MailEnableGroup + Inherits MarshalByRefObject + + Private RecipientAddressVal As String + Private PostofficeVal As String + Private GroupNameVal As String + Private GroupFileVal As String + Private GroupStatusVal As Integer + Private HostVal As String + + Private Structure IGROUPTYPE + Public RecipientAddress As String + Public Postoffice As String + Public GroupName As String + Public GroupFile As String + Public GroupStatus As Integer + End Structure + + Private Declare Function GroupGet Lib "MEAIPO.DLL" (ByRef lpGroup As IGROUPTYPE) As Integer + Private Declare Function GroupFindFirst Lib "MEAIPO.DLL" (ByRef lpGroup As IGROUPTYPE) As Integer + Private Declare Function GroupFindNext Lib "MEAIPO.DLL" (ByRef lpGroup As IGROUPTYPE) As Integer + Private Declare Function GroupAdd Lib "MEAIPO.DLL" (ByRef lpGroup As IGROUPTYPE) As Integer + Private Declare Function GroupEdit Lib "MEAIPO.DLL" (ByRef TargetGroup As IGROUPTYPE, ByRef NewGroup As IGROUPTYPE) As Integer + Private Declare Function GroupRemove Lib "MEAIPO.DLL" (ByRef lpGroup As IGROUPTYPE) As Integer + Private Declare Function SetCurrentHost Lib "MEAIPO.DLL" (ByVal CurrentHost As String) As Integer + + Public Function SetHost() As Integer + SetHost = SetCurrentHost(Host) + End Function + + Public Function FindFirstGroup() As Integer + Dim CGroup As IGROUPTYPE + CGroup.GroupFile = GroupFile + CGroup.Postoffice = Postoffice + CGroup.GroupName = GroupName + CGroup.RecipientAddress = RecipientAddress + CGroup.GroupStatus = GroupStatus + FindFirstGroup = GroupFindFirst(CGroup) + GroupFile = CGroup.GroupFile + Postoffice = CGroup.Postoffice + GroupName = CGroup.GroupName + RecipientAddress = CGroup.RecipientAddress + GroupStatus = CGroup.GroupStatus + End Function + Public Function FindNextGroup() As Integer + Dim CGroup As IGROUPTYPE + CGroup.GroupFile = GroupFile + CGroup.Postoffice = Postoffice + CGroup.GroupName = GroupName + CGroup.RecipientAddress = RecipientAddress + CGroup.GroupStatus = GroupStatus + FindNextGroup = GroupFindNext(CGroup) + GroupFile = CGroup.GroupFile + Postoffice = CGroup.Postoffice + GroupName = CGroup.GroupName + RecipientAddress = CGroup.RecipientAddress + GroupStatus = CGroup.GroupStatus + End Function + + Public Function AddGroup() As Integer + Dim CGroup As IGROUPTYPE + CGroup.GroupFile = GroupFile + CGroup.Postoffice = Postoffice + CGroup.GroupName = GroupName + CGroup.RecipientAddress = RecipientAddress + CGroup.GroupStatus = GroupStatus + AddGroup = GroupAdd(CGroup) + GroupFile = CGroup.GroupFile + Postoffice = CGroup.Postoffice + GroupName = CGroup.GroupName + RecipientAddress = CGroup.RecipientAddress + GroupStatus = CGroup.GroupStatus + End Function + + Public Function GetGroup() As Integer + Dim CGroup As IGROUPTYPE + CGroup.GroupFile = GroupFile + CGroup.Postoffice = Postoffice + CGroup.GroupName = GroupName + CGroup.RecipientAddress = RecipientAddress + CGroup.GroupStatus = GroupStatus + GetGroup = GroupGet(CGroup) + GroupFile = CGroup.GroupFile + Postoffice = CGroup.Postoffice + GroupName = CGroup.GroupName + RecipientAddress = CGroup.RecipientAddress + GroupStatus = CGroup.GroupStatus + End Function + Public Function RemoveGroup() As Integer + Dim CGroup As IGROUPTYPE + CGroup.GroupFile = GroupFile + CGroup.Postoffice = Postoffice + CGroup.GroupName = GroupName + CGroup.RecipientAddress = RecipientAddress + CGroup.GroupStatus = GroupStatus + RemoveGroup = GroupRemove(CGroup) + GroupFile = CGroup.GroupFile + Postoffice = CGroup.Postoffice + GroupName = CGroup.GroupName + RecipientAddress = CGroup.RecipientAddress + GroupStatus = CGroup.GroupStatus + End Function + + Public Function EditGroup(ByVal NewRecipientAddress As String, ByVal NewPostoffice As String, ByVal NewGroupName As String, ByVal NewGroupFile As String, ByVal NewGroupStatus As Integer) As Integer + Dim CGroup As IGROUPTYPE + Dim CGroupData As IGROUPTYPE + ' Get the Find Stuff Set up + CGroup.GroupFile = GroupFile + CGroup.GroupName = GroupName + CGroup.Postoffice = Postoffice + CGroup.RecipientAddress = RecipientAddress + CGroup.GroupStatus = GroupStatus + ' Get the Data Set up + CGroupData.GroupFile = NewGroupFile + CGroupData.GroupName = NewGroupName + CGroupData.Postoffice = NewPostoffice + CGroupData.RecipientAddress = NewRecipientAddress + CGroupData.GroupStatus = NewGroupStatus + + EditGroup = GroupEdit(CGroup, CGroupData) + GroupFile = CGroupData.GroupFile + Postoffice = CGroupData.Postoffice + GroupName = CGroupData.GroupName + RecipientAddress = CGroupData.RecipientAddress + GroupStatus = CGroup.GroupStatus + End Function + + Private Sub AddDataTableColumns(ByRef oTable As DataTable) + oTable.Columns.Add("GroupName", GetType(String)) + oTable.Columns.Add("GroupStatus", GetType(Long)) + oTable.Columns.Add("RecipientAddress", GetType(String)) + End Sub + + Public Property RecipientAddress() As String + Get + Return Me.RecipientAddressVal + End Get + Set(ByVal value As String) + Me.RecipientAddressVal = value + End Set + End Property + + Public Property Postoffice() As String + Get + Return Me.PostofficeVal + End Get + Set(ByVal value As String) + Me.PostofficeVal = value + End Set + End Property + + Public Property GroupName() As String + Get + Return Me.GroupNameVal + End Get + Set(ByVal value As String) + Me.GroupNameVal = value + End Set + End Property + + Public Property GroupFile() As String + Get + Return Me.GroupFileVal + End Get + Set(ByVal value As String) + Me.GroupFileVal = value + End Set + End Property + + Public Property GroupStatus() As Integer + Get + Return Me.GroupStatusVal + End Get + Set(ByVal value As Integer) + Me.GroupStatusVal = value + End Set + End Property + + Public Property Host() As String + Get + Return Me.HostVal + End Get + Set(ByVal value As String) + Me.HostVal = value + End Set + End Property + End Class + +End Namespace \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableGroupMember.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableGroupMember.vb new file mode 100644 index 00000000..c1a65800 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableGroupMember.vb @@ -0,0 +1,169 @@ +' Copyright (c) 2012, Outercurve Foundation. +' All rights reserved. +' +' Redistribution and use in source and binary forms, with or without modification, +' are permitted provided that the following conditions are met: +' +' - Redistributions of source code must retain the above copyright notice, this +' list of conditions and the following disclaimer. +' +' - Redistributions in binary form must reproduce the above copyright notice, +' this list of conditions and the following disclaimer in the documentation +' and/or other materials provided with the distribution. +' +' - Neither the name of the Outercurve Foundation nor the names of its +' contributors may be used to endorse or promote products derived from this +' software without specific prior written permission. +' +' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +' (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +' LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +' ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +' (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Namespace WebsitePanel.Providers.Mail + + Public Class MailEnableGroupMember + Inherits MarshalByRefObject + + Private AddressVal As String + Private PostofficeVal As String + Private MailboxVal As String + Private HostVal As String + + Private Structure IGROUPMEMBERTYPE + Public Address As String + Public Postoffice As String + Public Mailbox As String + End Structure + + Private Declare Function GroupMemberGet Lib "MEAIPO.DLL" (ByRef lpGroupMember As IGROUPMEMBERTYPE) As Integer + Private Declare Function GroupMemberFindFirst Lib "MEAIPO.DLL" (ByRef lpGroupMember As IGROUPMEMBERTYPE) As Integer + Private Declare Function GroupMemberFindNext Lib "MEAIPO.DLL" (ByRef lpGroupMember As IGROUPMEMBERTYPE) As Integer + Private Declare Function GroupMemberAdd Lib "MEAIPO.DLL" (ByRef lpGroupMember As IGROUPMEMBERTYPE) As Integer + Private Declare Function GroupMemberEdit Lib "MEAIPO.DLL" (ByRef TargetGroupMember As IGROUPMEMBERTYPE, ByRef NewGroupMember As IGROUPMEMBERTYPE) As Integer + Private Declare Function GroupMemberRemove Lib "MEAIPO.DLL" (ByRef lpGroupMember As IGROUPMEMBERTYPE) As Integer + Private Declare Function SetCurrentHost Lib "MEAIPO.DLL" (ByVal CurrentHost As String) As Integer + + Public Function SetHost() As Integer + SetHost = SetCurrentHost(Host) + End Function + + + Public Function FindFirstGroupMember() As Integer + Dim CGroupMember As IGROUPMEMBERTYPE + + CGroupMember.Address = Address + CGroupMember.Postoffice = Postoffice + CGroupMember.Mailbox = Mailbox + FindFirstGroupMember = GroupMemberFindFirst(CGroupMember) + Address = CGroupMember.Address + Postoffice = CGroupMember.Postoffice + Mailbox = CGroupMember.Mailbox + + End Function + + Public Function FindNextGroupMember() As Integer + Dim CGroupMember As IGROUPMEMBERTYPE + CGroupMember.Address = Address + CGroupMember.Postoffice = Postoffice + CGroupMember.Mailbox = Mailbox + FindNextGroupMember = GroupMemberFindNext(CGroupMember) + Address = CGroupMember.Address + Postoffice = CGroupMember.Postoffice + Mailbox = CGroupMember.Mailbox + End Function + + Public Function AddGroupMember() As Integer + Dim CGroupMember As IGROUPMEMBERTYPE + CGroupMember.Address = Address + CGroupMember.Postoffice = Postoffice + CGroupMember.Mailbox = Mailbox + AddGroupMember = GroupMemberAdd(CGroupMember) + Address = CGroupMember.Address + Postoffice = CGroupMember.Postoffice + Mailbox = CGroupMember.Mailbox + End Function + + Public Function GetGroupMember() As Integer + Dim CGroupMember As IGROUPMEMBERTYPE + CGroupMember.Address = Address + CGroupMember.Postoffice = Postoffice + CGroupMember.Mailbox = Mailbox + GetGroupMember = GroupMemberGet(CGroupMember) + Address = CGroupMember.Address + Postoffice = CGroupMember.Postoffice + Mailbox = CGroupMember.Mailbox + End Function + Public Function RemoveGroupMember() As Integer + Dim CGroupMember As IGROUPMEMBERTYPE + CGroupMember.Address = Address + CGroupMember.Postoffice = Postoffice + CGroupMember.Mailbox = Mailbox + RemoveGroupMember = GroupMemberRemove(CGroupMember) + Address = CGroupMember.Address + Postoffice = CGroupMember.Postoffice + Mailbox = CGroupMember.Mailbox + End Function + Public Function EditGroupMember(ByVal NewAddress As String, ByVal NewPostoffice As String, ByVal NewMailbox As String) As Integer + + Dim CGroupMember As IGROUPMEMBERTYPE + Dim CGroupMemberData As IGROUPMEMBERTYPE + ' Get the Find Stuff Set up + CGroupMember.Address = Address + CGroupMember.Postoffice = Postoffice + CGroupMember.Mailbox = Mailbox + ' Get the Data Set up + CGroupMemberData.Address = NewAddress + CGroupMemberData.Postoffice = NewPostoffice + CGroupMemberData.Mailbox = NewMailbox + EditGroupMember = GroupMemberEdit(CGroupMember, CGroupMemberData) + + CGroupMemberData.Address = CGroupMemberData.Address + CGroupMemberData.Postoffice = CGroupMemberData.Postoffice + CGroupMemberData.Mailbox = CGroupMemberData.Mailbox + End Function + + Public Property Address() As String + Get + Return Me.AddressVal + End Get + Set(ByVal value As String) + Me.AddressVal = value + End Set + End Property + + Public Property Postoffice() As String + Get + Return Me.PostofficeVal + End Get + Set(ByVal value As String) + Me.PostofficeVal = value + End Set + End Property + + Public Property Mailbox() As String + Get + Return Me.MailboxVal + End Get + Set(ByVal value As String) + Me.MailboxVal = value + End Set + End Property + + Public Property Host() As String + Get + Return Me.HostVal + End Get + Set(ByVal value As String) + Me.HostVal = value + End Set + End Property + End Class + +End Namespace diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableList.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableList.vb new file mode 100644 index 00000000..8f58806a --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableList.vb @@ -0,0 +1,1134 @@ +' Copyright (c) 2012, Outercurve Foundation. +' All rights reserved. +' +' Redistribution and use in source and binary forms, with or without modification, +' are permitted provided that the following conditions are met: +' +' - Redistributions of source code must retain the above copyright notice, this +' list of conditions and the following disclaimer. +' +' - Redistributions in binary form must reproduce the above copyright notice, +' this list of conditions and the following disclaimer in the documentation +' and/or other materials provided with the distribution. +' +' - Neither the name of the Outercurve Foundation nor the names of its +' contributors may be used to endorse or promote products derived from this +' software without specific prior written permission. +' +' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +' (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +' LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +' ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +' (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Namespace WebsitePanel.Providers.Mail + + Public Class MailEnableList + Inherits MarshalByRefObject + + Private DescriptionVal As String + Private AccountNameVal As String + Private ListNameVal As String + Private ListTypeVal As Long + Private ListStatusVal As Long + Private ModeratorAddressVal As String + Private HeaderAnnotationStatusVal As Long + Private HeaderAnnotationVal As String + Private FooterAnnotationStatusVal As Long + Private FooterAnnotationVal As String + Private ListAddressVal As String + + ' + ' New Fields + ' + Private SubscribeMessageFileStatusVal As Long + Private SubscribeMessageFileVal As String + Private UnsubscribeMessageFileStatusVal As Long + Private UnsubscribeMessageFileVal As String + Private SubjectSuffixStatusVal As Long + Private SubjectSuffixVal As String + Private SubjectPrefixStatusVal As Long + Private SubjectPrefixVal As String + Private OwnerVal As String + Private HelpMessageFileStatusVal As Long + Private HelpMessageFileVal As String + Private RemovalMessageFileStatusVal As Long + Private RemovalMessageFileVal As String + Private ReplyToModeVal As Long + Private MaxMessageSizeVal As Long + Private PostingModeVal As Long + Private SubScriptionModeVal As Long + Private AuthenticationModeVal As Long + Private PasswordVal As String + Private DigestModeVal As Long + Private DigestMailboxVal As String + Private DigestAnnotationModeVal As Long + Private DigestAttachmentModeVal As Long + Private DigestMessageSeparationModeVal As Long + Private DigestSchedulingStatusVal As Long + Private DigestSchedulingModeVal As Long + Private DigestSchedulingIntervalVal As Long + Private FromAddressModeVal As Long + + ' + ' Host Fields + ' + Public Host As String + + Private Structure ILISTTYPE + Public ListName As String + Public AccountName As String + Public ListType As Integer + Public ModeratorAddress As String + Public ListStatus As Integer + Public Description As String + Public HeaderAnnotationStatus As Integer + Public HeaderAnnotation As String + Public FooterAnnotationStatus As Integer + Public FooterAnnotation As String + Public ListAddress As String + ' + ' New feilds + ' + Public SubscribeMessageFileStatus As Integer + Public SubscribeMessageFile As String + Public UnsubscribeMessageFileStatus As Integer + Public UnsubscribeMessageFile As String + Public SubjectSuffixStatus As Integer + Public SubjectSuffix As String + Public SubjectPrefixStatus As Integer + Public SubjectPrefix As String + Public Owner As String + Public HelpMessageFileStatus As Integer + Public HelpMessageFile As String + Public RemovalMessageFileStatus As Integer + Public RemovalMessageFile As String + Public ReplyToMode As Integer + Public MaxMessageSize As Integer + Public PostingMode As Integer + Public SubScriptionMode As Integer + Public AuthenticationMode As Integer + Public Password As String + Public DigestMode As Integer + Public DigestMailbox As String + Public DigestAnnotationMode As Integer + Public DigestAttachmentMode As Integer + Public DigestMessageSeparationMode As Integer + Public DigestSchedulingStatus As Integer + Public DigestSchedulingMode As Integer + Public DigestSchedulingInterval As Integer + Public FromAddressMode As Integer + End Structure + + + Private Declare Function ListGet Lib "MEAILS.DLL" (ByRef lpList As ILISTTYPE) As Integer + Private Declare Function ListFindFirst Lib "MEAILS.DLL" (ByRef lpList As ILISTTYPE) As Integer + Private Declare Function ListFindNext Lib "MEAILS.DLL" (ByRef lpList As ILISTTYPE) As Integer + Private Declare Function ListAdd Lib "MEAILS.DLL" (ByRef lpList As ILISTTYPE) As Integer + Private Declare Function ListEdit Lib "MEAILS.DLL" (ByRef TargetList As ILISTTYPE, ByRef NewList As ILISTTYPE) As Integer + Private Declare Function ListRemove Lib "MEAILS.DLL" (ByRef lpList As ILISTTYPE) As Integer + Private Declare Function SetCurrentHost Lib "MEAILS.DLL" (ByVal CurrentHost As String) As Integer + + + Private Structure IANNOTATIONTYPE + Public AnnotationName As String + Public AccountName As String + Public AnnotationText As String + End Structure + + Private Declare Function AnnotationGet Lib "MEAILS.DLL" (ByRef lpAnnotation As IANNOTATIONTYPE) As Integer + Private Declare Function AnnotationAdd Lib "MEAILS.DLL" (ByRef lpAnnotation As IANNOTATIONTYPE) As Integer + Private Declare Function AnnotationRemove Lib "MEAILS.DLL" (ByRef lpAnnotation As IANNOTATIONTYPE) As Integer + + + Public Function SetHost() As Integer + SetHost = SetCurrentHost(Host) + End Function + + Public Function FindFirstList() As Integer + Dim CList As ILISTTYPE + CList.ListType = ListType + CList.AccountName = AccountName + CList.ListName = ListName + CList.Description = Description + CList.ListStatus = ListStatus + CList.HeaderAnnotationStatus = HeaderAnnotationStatus + CList.HeaderAnnotation = HeaderAnnotation + CList.FooterAnnotationStatus = FooterAnnotationStatus + CList.FooterAnnotation = FooterAnnotation + CList.ModeratorAddress = ModeratorAddress + CList.ListAddress = ListAddress + CList.SubscribeMessageFileStatus = SubscribeMessageFileStatus + CList.SubscribeMessageFile = SubscribeMessageFile + CList.UnsubscribeMessageFileStatus = UnsubscribeMessageFileStatus + CList.UnsubscribeMessageFile = UnsubscribeMessageFile + CList.SubjectSuffixStatus = SubjectSuffixStatus + CList.SubjectSuffix = SubjectSuffix + CList.SubjectPrefixStatus = SubjectPrefixStatus + CList.SubjectPrefix = SubjectPrefix + CList.Owner = Owner + CList.HelpMessageFileStatus = HelpMessageFileStatus + CList.HelpMessageFile = HelpMessageFile + CList.RemovalMessageFileStatus = RemovalMessageFileStatus + CList.RemovalMessageFile = RemovalMessageFile + CList.ReplyToMode = ReplyToMode + CList.MaxMessageSize = MaxMessageSize + CList.PostingMode = PostingMode + CList.SubScriptionMode = SubScriptionMode + CList.AuthenticationMode = AuthenticationMode + CList.Password = Password + CList.DigestMode = DigestMode + CList.DigestMailbox = DigestMailbox + CList.DigestAnnotationMode = DigestAnnotationMode + CList.DigestAttachmentMode = DigestAttachmentMode + CList.DigestMessageSeparationMode = DigestMessageSeparationMode + CList.DigestSchedulingStatus = DigestSchedulingStatus + CList.DigestSchedulingMode = DigestSchedulingMode + CList.DigestSchedulingInterval = DigestSchedulingInterval + CList.FromAddressMode = FromAddressMode + ' + ' Make Call + ' + FindFirstList = ListFindFirst(CList) + ListType = CList.ListType + AccountName = CList.AccountName + ListName = CList.ListName + Description = CList.Description + ListStatus = CList.ListStatus + HeaderAnnotationStatus = CList.HeaderAnnotationStatus + HeaderAnnotation = CList.HeaderAnnotation + FooterAnnotationStatus = CList.FooterAnnotationStatus + FooterAnnotation = CList.FooterAnnotation + ModeratorAddress = CList.ModeratorAddress + ListAddress = CList.ListAddress + SubscribeMessageFileStatus = CList.SubscribeMessageFileStatus + SubscribeMessageFile = CList.SubscribeMessageFile + UnsubscribeMessageFileStatus = CList.UnsubscribeMessageFileStatus + UnsubscribeMessageFile = CList.UnsubscribeMessageFile + SubjectSuffixStatus = CList.SubjectSuffixStatus + SubjectSuffix = CList.SubjectSuffix + SubjectPrefixStatus = CList.SubjectPrefixStatus + SubjectPrefix = CList.SubjectPrefix + Owner = CList.Owner + HelpMessageFileStatus = CList.HelpMessageFileStatus + HelpMessageFile = CList.HelpMessageFile + RemovalMessageFileStatus = CList.RemovalMessageFileStatus + RemovalMessageFile = CList.RemovalMessageFile + ReplyToMode = CList.ReplyToMode + MaxMessageSize = CList.MaxMessageSize + PostingMode = CList.PostingMode + SubScriptionMode = CList.SubScriptionMode + AuthenticationMode = CList.AuthenticationMode + Password = CList.Password + DigestMode = CList.DigestMode + DigestMailbox = CList.DigestMailbox + DigestAnnotationMode = CList.DigestAnnotationMode + DigestAttachmentMode = CList.DigestAttachmentMode + DigestMessageSeparationMode = CList.DigestMessageSeparationMode + DigestSchedulingStatus = CList.DigestSchedulingStatus + DigestSchedulingMode = CList.DigestSchedulingMode + DigestSchedulingInterval = CList.DigestSchedulingInterval + FromAddressMode = CList.FromAddressMode + End Function + Public Function FindNextList() As Integer + Dim CList As ILISTTYPE + CList.ListType = ListType + CList.AccountName = AccountName + CList.ListName = ListName + CList.Description = Description + CList.ListStatus = ListStatus + CList.HeaderAnnotationStatus = HeaderAnnotationStatus + CList.HeaderAnnotation = HeaderAnnotation + CList.FooterAnnotationStatus = FooterAnnotationStatus + CList.FooterAnnotation = FooterAnnotation + CList.ModeratorAddress = ModeratorAddress + CList.ListAddress = ListAddress + CList.SubscribeMessageFileStatus = SubscribeMessageFileStatus + CList.SubscribeMessageFile = SubscribeMessageFile + CList.UnsubscribeMessageFileStatus = UnsubscribeMessageFileStatus + CList.UnsubscribeMessageFile = UnsubscribeMessageFile + CList.SubjectSuffixStatus = SubjectSuffixStatus + CList.SubjectSuffix = SubjectSuffix + CList.SubjectPrefixStatus = SubjectPrefixStatus + CList.SubjectPrefix = SubjectPrefix + CList.Owner = Owner + CList.HelpMessageFileStatus = HelpMessageFileStatus + CList.HelpMessageFile = HelpMessageFile + CList.RemovalMessageFileStatus = RemovalMessageFileStatus + CList.RemovalMessageFile = RemovalMessageFile + CList.ReplyToMode = ReplyToMode + CList.MaxMessageSize = MaxMessageSize + CList.PostingMode = PostingMode + CList.SubScriptionMode = SubScriptionMode + CList.AuthenticationMode = AuthenticationMode + CList.Password = Password + CList.DigestMode = DigestMode + CList.DigestMailbox = DigestMailbox + CList.DigestAnnotationMode = DigestAnnotationMode + CList.DigestAttachmentMode = DigestAttachmentMode + CList.DigestMessageSeparationMode = DigestMessageSeparationMode + CList.DigestSchedulingStatus = DigestSchedulingStatus + CList.DigestSchedulingMode = DigestSchedulingMode + CList.DigestSchedulingInterval = DigestSchedulingInterval + CList.FromAddressMode = FromAddressMode + ' + ' Make Call + ' + FindNextList = ListFindNext(CList) + ListType = CList.ListType + AccountName = CList.AccountName + ListName = CList.ListName + Description = CList.Description + ListStatus = CList.ListStatus + HeaderAnnotationStatus = CList.HeaderAnnotationStatus + HeaderAnnotation = CList.HeaderAnnotation + FooterAnnotationStatus = CList.FooterAnnotationStatus + FooterAnnotation = CList.FooterAnnotation + ModeratorAddress = CList.ModeratorAddress + ListAddress = CList.ListAddress + SubscribeMessageFileStatus = CList.SubscribeMessageFileStatus + SubscribeMessageFile = CList.SubscribeMessageFile + UnsubscribeMessageFileStatus = CList.UnsubscribeMessageFileStatus + UnsubscribeMessageFile = CList.UnsubscribeMessageFile + SubjectSuffixStatus = CList.SubjectSuffixStatus + SubjectSuffix = CList.SubjectSuffix + SubjectPrefixStatus = CList.SubjectPrefixStatus + SubjectPrefix = CList.SubjectPrefix + Owner = CList.Owner + HelpMessageFileStatus = CList.HelpMessageFileStatus + HelpMessageFile = CList.HelpMessageFile + RemovalMessageFileStatus = CList.RemovalMessageFileStatus + RemovalMessageFile = CList.RemovalMessageFile + ReplyToMode = CList.ReplyToMode + MaxMessageSize = CList.MaxMessageSize + PostingMode = CList.PostingMode + SubScriptionMode = CList.SubScriptionMode + AuthenticationMode = CList.AuthenticationMode + Password = CList.Password + DigestMode = CList.DigestMode + DigestMailbox = CList.DigestMailbox + DigestAnnotationMode = CList.DigestAnnotationMode + DigestAttachmentMode = CList.DigestAttachmentMode + DigestMessageSeparationMode = CList.DigestMessageSeparationMode + DigestSchedulingStatus = CList.DigestSchedulingStatus + DigestSchedulingMode = CList.DigestSchedulingMode + DigestSchedulingInterval = CList.DigestSchedulingInterval + FromAddressMode = CList.FromAddressMode + End Function + + Public Function AddList() As Integer + Dim CList As ILISTTYPE + CList.ListType = ListType + CList.AccountName = AccountName + CList.ListName = ListName + CList.Description = Description + CList.ListStatus = ListStatus + CList.HeaderAnnotationStatus = HeaderAnnotationStatus + CList.HeaderAnnotation = HeaderAnnotation + CList.FooterAnnotationStatus = FooterAnnotationStatus + CList.FooterAnnotation = FooterAnnotation + CList.ModeratorAddress = ModeratorAddress + CList.ListAddress = ListAddress + CList.SubscribeMessageFileStatus = SubscribeMessageFileStatus + CList.SubscribeMessageFile = SubscribeMessageFile + CList.UnsubscribeMessageFileStatus = UnsubscribeMessageFileStatus + CList.UnsubscribeMessageFile = UnsubscribeMessageFile + CList.SubjectSuffixStatus = SubjectSuffixStatus + CList.SubjectSuffix = SubjectSuffix + CList.SubjectPrefixStatus = SubjectPrefixStatus + CList.SubjectPrefix = SubjectPrefix + CList.Owner = Owner + CList.HelpMessageFileStatus = HelpMessageFileStatus + CList.HelpMessageFile = HelpMessageFile + CList.RemovalMessageFileStatus = RemovalMessageFileStatus + CList.RemovalMessageFile = RemovalMessageFile + CList.ReplyToMode = ReplyToMode + CList.MaxMessageSize = MaxMessageSize + CList.PostingMode = PostingMode + CList.SubScriptionMode = SubScriptionMode + CList.AuthenticationMode = AuthenticationMode + CList.Password = Password + CList.DigestMode = DigestMode + CList.DigestMailbox = DigestMailbox + CList.DigestAnnotationMode = DigestAnnotationMode + CList.DigestAttachmentMode = DigestAttachmentMode + CList.DigestMessageSeparationMode = DigestMessageSeparationMode + CList.DigestSchedulingStatus = DigestSchedulingStatus + CList.DigestSchedulingMode = DigestSchedulingMode + CList.DigestSchedulingInterval = DigestSchedulingInterval + CList.FromAddressMode = FromAddressMode + ' + ' Make Call + ' + AddList = ListAdd(CList) + ListType = CList.ListType + AccountName = CList.AccountName + ListName = CList.ListName + Description = CList.Description + ListStatus = CList.ListStatus + HeaderAnnotationStatus = CList.HeaderAnnotationStatus + HeaderAnnotation = CList.HeaderAnnotation + FooterAnnotationStatus = CList.FooterAnnotationStatus + FooterAnnotation = CList.FooterAnnotation + ModeratorAddress = CList.ModeratorAddress + ListAddress = CList.ListAddress + SubscribeMessageFileStatus = CList.SubscribeMessageFileStatus + SubscribeMessageFile = CList.SubscribeMessageFile + UnsubscribeMessageFileStatus = CList.UnsubscribeMessageFileStatus + UnsubscribeMessageFile = CList.UnsubscribeMessageFile + SubjectSuffixStatus = CList.SubjectSuffixStatus + SubjectSuffix = CList.SubjectSuffix + SubjectPrefixStatus = CList.SubjectPrefixStatus + SubjectPrefix = CList.SubjectPrefix + Owner = CList.Owner + HelpMessageFileStatus = CList.HelpMessageFileStatus + HelpMessageFile = CList.HelpMessageFile + RemovalMessageFileStatus = CList.RemovalMessageFileStatus + RemovalMessageFile = CList.RemovalMessageFile + ReplyToMode = CList.ReplyToMode + MaxMessageSize = CList.MaxMessageSize + PostingMode = CList.PostingMode + SubScriptionMode = CList.SubScriptionMode + AuthenticationMode = CList.AuthenticationMode + Password = CList.Password + DigestMode = CList.DigestMode + DigestMailbox = CList.DigestMailbox + DigestAnnotationMode = CList.DigestAnnotationMode + DigestAttachmentMode = CList.DigestAttachmentMode + DigestMessageSeparationMode = CList.DigestMessageSeparationMode + DigestSchedulingStatus = CList.DigestSchedulingStatus + DigestSchedulingMode = CList.DigestSchedulingMode + DigestSchedulingInterval = CList.DigestSchedulingInterval + FromAddressMode = CList.FromAddressMode + End Function + + Public Function GetList() As Integer + Dim CList As ILISTTYPE + CList.ListType = ListType + CList.AccountName = AccountName + CList.ListName = ListName + CList.Description = Description + CList.ListStatus = ListStatus + CList.HeaderAnnotationStatus = HeaderAnnotationStatus + CList.HeaderAnnotation = HeaderAnnotation + CList.FooterAnnotationStatus = FooterAnnotationStatus + CList.FooterAnnotation = FooterAnnotation + CList.ModeratorAddress = ModeratorAddress + CList.ListAddress = ListAddress + CList.SubscribeMessageFileStatus = SubscribeMessageFileStatus + CList.SubscribeMessageFile = SubscribeMessageFile + CList.UnsubscribeMessageFileStatus = UnsubscribeMessageFileStatus + CList.UnsubscribeMessageFile = UnsubscribeMessageFile + CList.SubjectSuffixStatus = SubjectSuffixStatus + CList.SubjectSuffix = SubjectSuffix + CList.SubjectPrefixStatus = SubjectPrefixStatus + CList.SubjectPrefix = SubjectPrefix + CList.Owner = Owner + CList.HelpMessageFileStatus = HelpMessageFileStatus + CList.HelpMessageFile = HelpMessageFile + CList.RemovalMessageFileStatus = RemovalMessageFileStatus + CList.RemovalMessageFile = RemovalMessageFile + CList.ReplyToMode = ReplyToMode + CList.MaxMessageSize = MaxMessageSize + CList.PostingMode = PostingMode + CList.SubScriptionMode = SubScriptionMode + CList.AuthenticationMode = AuthenticationMode + CList.Password = Password + CList.DigestMode = DigestMode + CList.DigestMailbox = DigestMailbox + CList.DigestAnnotationMode = DigestAnnotationMode + CList.DigestAttachmentMode = DigestAttachmentMode + CList.DigestMessageSeparationMode = DigestMessageSeparationMode + CList.DigestSchedulingStatus = DigestSchedulingStatus + CList.DigestSchedulingMode = DigestSchedulingMode + CList.DigestSchedulingInterval = DigestSchedulingInterval + CList.FromAddressMode = FromAddressMode + ' + ' Make Call + ' + GetList = ListGet(CList) + ListType = CList.ListType + AccountName = CList.AccountName + ListName = CList.ListName + Description = CList.Description + ListStatus = CList.ListStatus + HeaderAnnotationStatus = CList.HeaderAnnotationStatus + HeaderAnnotation = CList.HeaderAnnotation + FooterAnnotationStatus = CList.FooterAnnotationStatus + FooterAnnotation = CList.FooterAnnotation + ModeratorAddress = CList.ModeratorAddress + ListAddress = CList.ListAddress + 'new + SubscribeMessageFileStatus = CList.SubscribeMessageFileStatus + SubscribeMessageFile = CList.SubscribeMessageFile + UnsubscribeMessageFileStatus = CList.UnsubscribeMessageFileStatus + UnsubscribeMessageFile = CList.UnsubscribeMessageFile + SubjectSuffixStatus = CList.SubjectSuffixStatus + SubjectSuffix = CList.SubjectSuffix + SubjectPrefixStatus = CList.SubjectPrefixStatus + SubjectPrefix = CList.SubjectPrefix + Owner = CList.Owner + HelpMessageFileStatus = CList.HelpMessageFileStatus + HelpMessageFile = CList.HelpMessageFile + RemovalMessageFileStatus = CList.RemovalMessageFileStatus + RemovalMessageFile = CList.RemovalMessageFile + ReplyToMode = CList.ReplyToMode + MaxMessageSize = CList.MaxMessageSize + PostingMode = CList.PostingMode + SubScriptionMode = CList.SubScriptionMode + AuthenticationMode = CList.AuthenticationMode + Password = CList.Password + DigestMode = CList.DigestMode + DigestMailbox = CList.DigestMailbox + DigestAnnotationMode = CList.DigestAnnotationMode + DigestAttachmentMode = CList.DigestAttachmentMode + DigestMessageSeparationMode = CList.DigestMessageSeparationMode + DigestSchedulingStatus = CList.DigestSchedulingStatus + DigestSchedulingMode = CList.DigestSchedulingMode + DigestSchedulingInterval = CList.DigestSchedulingInterval + FromAddressMode = CList.FromAddressMode + End Function + Public Function RemoveList() As Integer + Dim CList As ILISTTYPE + CList.ListType = ListType + CList.AccountName = AccountName + CList.ListName = ListName + CList.Description = Description + CList.ListStatus = ListStatus + CList.HeaderAnnotationStatus = HeaderAnnotationStatus + CList.HeaderAnnotation = HeaderAnnotation + CList.FooterAnnotationStatus = FooterAnnotationStatus + CList.FooterAnnotation = FooterAnnotation + CList.ModeratorAddress = ModeratorAddress + CList.ListAddress = ListAddress + CList.SubscribeMessageFileStatus = SubscribeMessageFileStatus + CList.SubscribeMessageFile = SubscribeMessageFile + CList.UnsubscribeMessageFileStatus = UnsubscribeMessageFileStatus + CList.UnsubscribeMessageFile = UnsubscribeMessageFile + CList.SubjectSuffixStatus = SubjectSuffixStatus + CList.SubjectSuffix = SubjectSuffix + CList.SubjectPrefixStatus = SubjectPrefixStatus + CList.SubjectPrefix = SubjectPrefix + CList.Owner = Owner + CList.HelpMessageFileStatus = HelpMessageFileStatus + CList.HelpMessageFile = HelpMessageFile + CList.RemovalMessageFileStatus = RemovalMessageFileStatus + CList.RemovalMessageFile = RemovalMessageFile + CList.ReplyToMode = ReplyToMode + CList.MaxMessageSize = MaxMessageSize + CList.PostingMode = PostingMode + CList.SubScriptionMode = SubScriptionMode + CList.AuthenticationMode = AuthenticationMode + CList.Password = Password + CList.DigestMode = DigestMode + CList.DigestMailbox = DigestMailbox + CList.DigestAnnotationMode = DigestAnnotationMode + CList.DigestAttachmentMode = DigestAttachmentMode + CList.DigestMessageSeparationMode = DigestMessageSeparationMode + CList.DigestSchedulingStatus = DigestSchedulingStatus + CList.DigestSchedulingMode = DigestSchedulingMode + CList.DigestSchedulingInterval = DigestSchedulingInterval + CList.FromAddressMode = FromAddressMode + ' + ' Make Call + ' + RemoveList = ListRemove(CList) + ListType = CList.ListType + AccountName = CList.AccountName + ListName = CList.ListName + Description = CList.Description + ListStatus = CList.ListStatus + HeaderAnnotationStatus = CList.HeaderAnnotationStatus + HeaderAnnotation = CList.HeaderAnnotation + FooterAnnotationStatus = CList.FooterAnnotationStatus + FooterAnnotation = CList.FooterAnnotation + ModeratorAddress = CList.ModeratorAddress + ListAddress = CList.ListAddress + SubscribeMessageFileStatus = CList.SubscribeMessageFileStatus + SubscribeMessageFile = CList.SubscribeMessageFile + UnsubscribeMessageFileStatus = CList.UnsubscribeMessageFileStatus + UnsubscribeMessageFile = CList.UnsubscribeMessageFile + SubjectSuffixStatus = CList.SubjectSuffixStatus + SubjectSuffix = CList.SubjectSuffix + SubjectPrefixStatus = CList.SubjectPrefixStatus + SubjectPrefix = CList.SubjectPrefix + Owner = CList.Owner + HelpMessageFileStatus = CList.HelpMessageFileStatus + HelpMessageFile = CList.HelpMessageFile + RemovalMessageFileStatus = CList.RemovalMessageFileStatus + RemovalMessageFile = CList.RemovalMessageFile + ReplyToMode = CList.ReplyToMode + MaxMessageSize = CList.MaxMessageSize + PostingMode = CList.PostingMode + SubScriptionMode = CList.SubScriptionMode + AuthenticationMode = CList.AuthenticationMode + Password = CList.Password + DigestMode = CList.DigestMode + DigestMailbox = CList.DigestMailbox + DigestAnnotationMode = CList.DigestAnnotationMode + DigestAttachmentMode = CList.DigestAttachmentMode + DigestMessageSeparationMode = CList.DigestMessageSeparationMode + DigestSchedulingStatus = CList.DigestSchedulingStatus + DigestSchedulingMode = CList.DigestSchedulingMode + DigestSchedulingInterval = CList.DigestSchedulingInterval + FromAddressMode = CList.FromAddressMode + End Function + + Public Function EditList(ByVal NewDescription As String, ByVal NewAccountName As String, ByVal NewListName As String, ByVal NewListType As Long, ByVal NewListStatus As Long, ByVal NewHeaderAnnotationStatus As Long, ByVal NewHeaderAnnotation As String, ByVal NewFooterAnnotationStatus As Long, ByVal NewFooterAnnotation As String, ByVal NewModeratorAddress As String, ByVal NewListAddress As String, _ + Optional ByVal NewSubscribeMessageFileStatus As Long = -1, Optional ByVal NewSubscribeMessageFile As String = "(Nil)", Optional ByVal NewUnsubscribeMessageFileStatus As Long = -1, Optional ByVal NewUnsubscribeMessageFile As String = "(Nil)", Optional ByVal NewSubjectSuffixStatus As Long = -1, Optional ByVal NewSubjectSuffix As String = "(Nil)", Optional ByVal NewSubjectPrefixStatus As Long = -1, Optional ByVal NewSubjectPrefix As String = "(Nil)", Optional ByVal NewOwner As String = "(Nil)", Optional ByVal NewHelpMessageFileStatus As Long = -1, _ + Optional ByVal NewHelpMessageFile As String = "(Nil)", Optional ByVal NewRemovalMessageFileStatus As Long = -1, Optional ByVal NewRemovalMessageFile As String = "(Nil)", Optional ByVal NewReplyToMode As Long = -1, Optional ByVal NewMaxMessageSize As Long = -1, Optional ByVal NewPostingMode As Long = -1, Optional ByVal NewSubScriptionMode As Long = -1, Optional ByVal NewAuthenticationMode As Long = -1, Optional ByVal NewPassword As String = "(Nil)", Optional ByVal NewDigestMode As Long = -1, Optional ByVal NewDigestMailbox As String = "(Nil)", _ + Optional ByVal NewDigestAnnotationMode As Long = -1, Optional ByVal NewDigestAttachmentMode As Long = -1, Optional ByVal NewDigestMessageSeparationMode As Long = -1, Optional ByVal NewDigestSchedulingStatus As Long = -1, _ + Optional ByVal NewDigestSchedulingMode As Long = -1, Optional ByVal NewDigestSchedulingInterval As Long = -1, Optional ByVal NewFromAddressMode As Long = -1) As Integer + ' + ' hmm - if we pass these with default values of Blank, then how will we know whether or not to clear then or not? + ' + ' + Dim CList As ILISTTYPE + Dim CListData As ILISTTYPE + ' Get the Find Stuff Set up + CList.ListType = ListType + CList.ListName = ListName + CList.AccountName = AccountName + CList.Description = Description + CList.ListStatus = ListStatus + CList.HeaderAnnotationStatus = HeaderAnnotationStatus + CList.HeaderAnnotation = HeaderAnnotation + CList.FooterAnnotationStatus = FooterAnnotationStatus + CList.FooterAnnotation = FooterAnnotation + CList.ModeratorAddress = ModeratorAddress + CList.ListAddress = ListAddress + CList.SubscribeMessageFileStatus = SubscribeMessageFileStatus + CList.SubscribeMessageFile = SubscribeMessageFile + CList.UnsubscribeMessageFileStatus = UnsubscribeMessageFileStatus + CList.UnsubscribeMessageFile = UnsubscribeMessageFile + CList.SubjectSuffixStatus = SubjectSuffixStatus + CList.SubjectSuffix = SubjectSuffix + CList.SubjectPrefixStatus = SubjectPrefixStatus + CList.SubjectPrefix = SubjectPrefix + CList.Owner = Owner + CList.HelpMessageFileStatus = HelpMessageFileStatus + CList.HelpMessageFile = HelpMessageFile + CList.RemovalMessageFileStatus = RemovalMessageFileStatus + CList.RemovalMessageFile = RemovalMessageFile + CList.ReplyToMode = ReplyToMode + CList.MaxMessageSize = MaxMessageSize + CList.PostingMode = PostingMode + CList.SubScriptionMode = SubScriptionMode + CList.AuthenticationMode = AuthenticationMode + CList.Password = Password + CList.DigestMode = DigestMode + CList.DigestMailbox = DigestMailbox + CList.DigestAnnotationMode = DigestAnnotationMode + CList.DigestAttachmentMode = DigestAttachmentMode + CList.DigestMessageSeparationMode = DigestMessageSeparationMode + CList.DigestSchedulingStatus = DigestSchedulingStatus + CList.DigestSchedulingMode = DigestSchedulingMode + CList.DigestSchedulingInterval = DigestSchedulingInterval + CList.FromAddressMode = FromAddressMode + ' Get the Data Set up + CListData.ListType = NewListType + CListData.ListName = NewListName + CListData.AccountName = NewAccountName + CListData.Description = NewDescription + CListData.ListStatus = NewListStatus 'NewHeaderAnnotationStatus As Long, NewHeaderAnnotation As String, NewFooterAnnotationStatus As Long, NewFooterAnnotation As String,NewModeratorAddress As String + CListData.HeaderAnnotationStatus = NewHeaderAnnotationStatus + CListData.HeaderAnnotation = NewHeaderAnnotation + CListData.FooterAnnotationStatus = NewFooterAnnotationStatus + CListData.FooterAnnotation = NewFooterAnnotation + CListData.ModeratorAddress = NewModeratorAddress + CListData.ListAddress = NewListAddress + CListData.SubscribeMessageFileStatus = NewSubscribeMessageFileStatus + CListData.SubscribeMessageFile = NewSubscribeMessageFile + CListData.UnsubscribeMessageFileStatus = NewUnsubscribeMessageFileStatus + CListData.UnsubscribeMessageFile = NewUnsubscribeMessageFile + CListData.SubjectSuffixStatus = NewSubjectSuffixStatus + CListData.SubjectSuffix = NewSubjectSuffix + CListData.SubjectPrefixStatus = NewSubjectPrefixStatus + CListData.SubjectPrefix = NewSubjectPrefix + CListData.Owner = NewOwner + CListData.HelpMessageFileStatus = NewHelpMessageFileStatus + CListData.HelpMessageFile = NewHelpMessageFile + CListData.RemovalMessageFileStatus = NewRemovalMessageFileStatus + CListData.RemovalMessageFile = NewRemovalMessageFile + CListData.ReplyToMode = NewReplyToMode + CListData.MaxMessageSize = NewMaxMessageSize + CListData.PostingMode = NewPostingMode + CListData.SubScriptionMode = NewSubScriptionMode + CListData.AuthenticationMode = NewAuthenticationMode + CListData.Password = NewPassword + CListData.DigestMode = NewDigestMode + CListData.DigestMailbox = NewDigestMailbox + CListData.DigestAnnotationMode = NewDigestAnnotationMode + CListData.DigestAttachmentMode = NewDigestAttachmentMode + CListData.DigestMessageSeparationMode = NewDigestMessageSeparationMode + CListData.DigestSchedulingStatus = NewDigestSchedulingStatus + CListData.DigestSchedulingMode = NewDigestSchedulingMode + CListData.DigestSchedulingInterval = NewDigestSchedulingInterval + CListData.FromAddressMode = NewFromAddressMode + ' + ' Make the Call + ' + EditList = ListEdit(CList, CListData) + ListType = CListData.ListType + AccountName = CListData.AccountName + ListName = CListData.ListName + Description = CListData.Description + ListStatus = CList.ListStatus + HeaderAnnotationStatus = CList.HeaderAnnotationStatus + HeaderAnnotation = CList.HeaderAnnotation + FooterAnnotationStatus = CList.FooterAnnotationStatus + FooterAnnotation = CList.FooterAnnotation + ModeratorAddress = CList.ModeratorAddress + ListAddress = CList.ListAddress + SubscribeMessageFileStatus = CList.SubscribeMessageFileStatus + SubscribeMessageFile = CList.SubscribeMessageFile + UnsubscribeMessageFileStatus = CList.UnsubscribeMessageFileStatus + UnsubscribeMessageFile = CList.UnsubscribeMessageFile + SubjectSuffixStatus = CList.SubjectSuffixStatus + SubjectSuffix = CList.SubjectSuffix + SubjectPrefixStatus = CList.SubjectPrefixStatus + SubjectPrefix = CList.SubjectPrefix + Owner = CList.Owner + HelpMessageFileStatus = CList.HelpMessageFileStatus + HelpMessageFile = CList.HelpMessageFile + RemovalMessageFileStatus = CList.RemovalMessageFileStatus + RemovalMessageFile = CList.RemovalMessageFile + ReplyToMode = CList.ReplyToMode + MaxMessageSize = CList.MaxMessageSize + PostingMode = CList.PostingMode + SubScriptionMode = CList.SubScriptionMode + AuthenticationMode = CList.AuthenticationMode + Password = CList.Password + DigestMode = CList.DigestMode + DigestMailbox = CList.DigestMailbox + DigestAnnotationMode = CList.DigestAnnotationMode + DigestAttachmentMode = CList.DigestAttachmentMode + DigestMessageSeparationMode = CList.DigestMessageSeparationMode + DigestSchedulingStatus = CList.DigestSchedulingStatus + DigestSchedulingMode = CList.DigestSchedulingMode + DigestSchedulingInterval = CList.DigestSchedulingInterval + FromAddressMode = CList.FromAddressMode + End Function + ' + ' We need to wrapper these routines + ' + Function SetHeader(ByVal Postoffice As String, ByVal List As String, ByVal ListHeader As String) As Integer + + Dim CAnnotation As IANNOTATIONTYPE + + CAnnotation.AccountName = Postoffice + CAnnotation.AnnotationName = List & "-HEADER" + CAnnotation.AnnotationText = ListHeader + SetHeader = AnnotationAdd(CAnnotation) + + End Function + + Function GetHeader(ByVal Postoffice As String, ByVal List As String) As String + + Dim CAnnotation As IANNOTATIONTYPE + CAnnotation.AnnotationText = "" + + CAnnotation.AccountName = Postoffice + CAnnotation.AnnotationName = List & "-HEADER" + If (AnnotationGet(CAnnotation) = 1) Then + GetHeader = CAnnotation.AnnotationText + Else + GetHeader = "" + End If + + End Function + + Function SetFooter(ByVal Postoffice As String, ByVal List As String, ByVal ListFooter As String) As Integer + + Dim CAnnotation As IANNOTATIONTYPE + + CAnnotation.AccountName = Postoffice + CAnnotation.AnnotationName = List & "-FOOTER" + CAnnotation.AnnotationText = ListFooter + SetFooter = AnnotationAdd(CAnnotation) + + End Function + + Public Function GetFooter(ByVal Postoffice As String, ByVal List As String) As String + + Dim CAnnotation As IANNOTATIONTYPE + + CAnnotation.AccountName = Postoffice + CAnnotation.AnnotationName = List & "-FOOTER" + CAnnotation.AnnotationText = "" + + If (AnnotationGet(CAnnotation) = 1) Then + GetFooter = CAnnotation.AnnotationText + Else + GetFooter = "" + End If + + End Function + + Private Sub AddDataTableColumns(ByRef oTable As DataTable) + oTable.Columns.Add("ListName", GetType(String)) + oTable.Columns.Add("ListStatus", GetType(Long)) + oTable.Columns.Add("Description", GetType(String)) + oTable.Columns.Add("ListType", GetType(Long)) + End Sub + + + Public Property Description() As String + Get + Return Me.DescriptionVal + End Get + Set(ByVal value As String) + Me.DescriptionVal = value + End Set + End Property + + Public Property AccountName() As String + Get + Return Me.AccountNameVal + End Get + Set(ByVal value As String) + Me.AccountNameVal = value + End Set + End Property + + Public Property ListName() As String + Get + Return Me.ListNameVal + End Get + Set(ByVal value As String) + Me.ListNameVal = value + End Set + End Property + + Public Property ListType() As Long + Get + Return Me.ListTypeVal + End Get + Set(ByVal value As Long) + Me.ListTypeVal = value + End Set + End Property + + Public Property ListStatus() As Long + Get + Return Me.ListStatusVal + End Get + Set(ByVal value As Long) + Me.ListStatusVal = value + End Set + End Property + + Public Property ModeratorAddress() As String + Get + Return Me.ModeratorAddressVal + End Get + Set(ByVal value As String) + Me.ModeratorAddressVal = value + End Set + End Property + + Public Property HeaderAnnotationStatus() As Long + Get + Return Me.HeaderAnnotationStatusVal + End Get + Set(ByVal value As Long) + Me.HeaderAnnotationStatusVal = value + End Set + End Property + + Public Property HeaderAnnotation() As String + Get + Return Me.HeaderAnnotationVal + End Get + Set(ByVal value As String) + Me.HeaderAnnotationVal = value + End Set + End Property + + Public Property FooterAnnotationStatus() As Long + Get + Return Me.FooterAnnotationStatusVal + End Get + Set(ByVal value As Long) + Me.FooterAnnotationStatusVal = value + End Set + End Property + + Public Property FooterAnnotation() As String + Get + Return Me.FooterAnnotationVal + End Get + Set(ByVal value As String) + Me.FooterAnnotationVal = value + End Set + End Property + + Public Property ListAddress() As String + Get + Return Me.ListAddressVal + End Get + Set(ByVal value As String) + Me.ListAddressVal = value + End Set + End Property + + Public Property SubscribeMessageFileStatus() As Long + Get + Return Me.SubscribeMessageFileStatusVal + End Get + Set(ByVal value As Long) + Me.SubscribeMessageFileStatusVal = value + End Set + End Property + + Public Property SubscribeMessageFile() As String + Get + Return Me.SubscribeMessageFileVal + End Get + Set(ByVal value As String) + Me.SubscribeMessageFileVal = value + End Set + End Property + + Public Property UnsubscribeMessageFileStatus() As Long + Get + Return Me.UnsubscribeMessageFileStatusVal + End Get + Set(ByVal value As Long) + Me.UnsubscribeMessageFileStatusVal = value + End Set + End Property + + Public Property UnsubscribeMessageFile() As String + Get + Return Me.UnsubscribeMessageFileVal + End Get + Set(ByVal value As String) + Me.UnsubscribeMessageFileVal = value + End Set + End Property + + Public Property SubjectSuffixStatus() As Long + Get + Return Me.SubjectSuffixStatusVal + End Get + Set(ByVal value As Long) + Me.SubjectSuffixStatusVal = value + End Set + End Property + + Public Property SubjectSuffix() As String + Get + Return Me.SubjectSuffixVal + End Get + Set(ByVal value As String) + Me.SubjectSuffixVal = value + End Set + End Property + + Public Property SubjectPrefixStatus() As Long + Get + Return Me.SubjectPrefixStatusVal + End Get + Set(ByVal value As Long) + Me.SubjectPrefixStatusVal = value + End Set + End Property + + Public Property SubjectPrefix() As String + Get + Return Me.SubjectPrefixVal + End Get + Set(ByVal value As String) + Me.SubjectPrefixVal = value + End Set + End Property + + Public Property Owner() As String + Get + Return Me.OwnerVal + End Get + Set(ByVal value As String) + Me.OwnerVal = value + End Set + End Property + + Public Property HelpMessageFileStatus() As Long + Get + Return Me.HelpMessageFileStatusVal + End Get + Set(ByVal value As Long) + Me.HelpMessageFileStatusVal = value + End Set + End Property + + Public Property HelpMessageFile() As String + Get + Return Me.HelpMessageFileVal + End Get + Set(ByVal value As String) + Me.HelpMessageFileVal = value + End Set + End Property + + Public Property RemovalMessageFileStatus() As Long + Get + Return Me.RemovalMessageFileStatusVal + End Get + Set(ByVal value As Long) + Me.RemovalMessageFileStatusVal = value + End Set + End Property + + Public Property RemovalMessageFile() As String + Get + Return Me.RemovalMessageFileVal + End Get + Set(ByVal value As String) + Me.RemovalMessageFileVal = value + End Set + End Property + + Public Property ReplyToMode() As Long + Get + Return Me.ReplyToModeVal + End Get + Set(ByVal value As Long) + Me.ReplyToModeVal = value + End Set + End Property + + Public Property MaxMessageSize() As Long + Get + Return Me.MaxMessageSizeVal + End Get + Set(ByVal value As Long) + Me.MaxMessageSizeVal = value + End Set + End Property + + Public Property PostingMode() As Long + Get + Return Me.PostingModeVal + End Get + Set(ByVal value As Long) + Me.PostingModeVal = value + End Set + End Property + + Public Property SubScriptionMode() As Long + Get + Return Me.SubScriptionModeVal + End Get + Set(ByVal value As Long) + Me.SubScriptionModeVal = value + End Set + End Property + + Public Property AuthenticationMode() As Long + Get + Return Me.AuthenticationModeVal + End Get + Set(ByVal value As Long) + Me.AuthenticationModeVal = value + End Set + End Property + + Public Property Password() As String + Get + Return Me.PasswordVal + End Get + Set(ByVal value As String) + Me.PasswordVal = value + End Set + End Property + + Public Property DigestMode() As Long + Get + Return Me.DigestModeVal + End Get + Set(ByVal value As Long) + Me.DigestModeVal = value + End Set + End Property + + Public Property DigestMailbox() As String + Get + Return Me.DigestMailboxVal + End Get + Set(ByVal value As String) + Me.DigestMailboxVal = value + End Set + End Property + + Public Property DigestAnnotationMode() As Long + Get + Return Me.DigestAnnotationModeVal + End Get + Set(ByVal value As Long) + Me.DigestAnnotationModeVal = value + End Set + End Property + + Public Property DigestAttachmentMode() As Long + Get + Return Me.DigestAttachmentModeVal + End Get + Set(ByVal value As Long) + Me.DigestAttachmentModeVal = value + End Set + End Property + + Public Property DigestMessageSeparationMode() As Long + Get + Return Me.DigestMessageSeparationModeVal + End Get + Set(ByVal value As Long) + Me.DigestMessageSeparationModeVal = value + End Set + End Property + + Public Property DigestSchedulingStatus() As Long + Get + Return Me.DigestSchedulingStatusVal + End Get + Set(ByVal value As Long) + Me.DigestSchedulingStatusVal = value + End Set + End Property + + Public Property DigestSchedulingMode() As Long + Get + Return Me.DigestSchedulingModeVal + End Get + Set(ByVal value As Long) + Me.DigestSchedulingModeVal = value + End Set + End Property + + Public Property DigestSchedulingInterval() As Long + Get + Return Me.DigestSchedulingIntervalVal + End Get + Set(ByVal value As Long) + Me.DigestSchedulingIntervalVal = value + End Set + End Property + + Public Property FromAddressMode() As Long + Get + Return Me.FromAddressModeVal + End Get + Set(ByVal value As Long) + Me.FromAddressModeVal = value + End Set + End Property + + End Class + +End Namespace diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableListMember.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableListMember.vb new file mode 100644 index 00000000..95c2a416 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableListMember.vb @@ -0,0 +1,192 @@ +' Copyright (c) 2012, Outercurve Foundation. +' All rights reserved. +' +' Redistribution and use in source and binary forms, with or without modification, +' are permitted provided that the following conditions are met: +' +' - Redistributions of source code must retain the above copyright notice, this +' list of conditions and the following disclaimer. +' +' - Redistributions in binary form must reproduce the above copyright notice, +' this list of conditions and the following disclaimer in the documentation +' and/or other materials provided with the distribution. +' +' - Neither the name of the Outercurve Foundation nor the names of its +' contributors may be used to endorse or promote products derived from this +' software without specific prior written permission. +' +' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +' (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +' LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +' ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +' (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Namespace WebsitePanel.Providers.Mail + + Public Class MailEnableListMember + Inherits MarshalByRefObject + + Private AddressVal As String + Private AccountNameVal As String + Private ListNameVal As String + Private ListMemberTypeVal As Long + Private StatusVal As Long + Private HostVal As String + + + Private Structure ILISTMEMBERTYPE + Public Address As String + Public AccountName As String + Public ListName As String + Public Role As Integer + Public Status As Integer + End Structure + + + Private Declare Function ListMemberGet Lib "MEAILS.DLL" (ByRef lpListMember As ILISTMEMBERTYPE) As Integer + Private Declare Function ListMemberFindFirst Lib "MEAILS.DLL" (ByRef lpListMember As ILISTMEMBERTYPE) As Integer + Private Declare Function ListMemberFindNext Lib "MEAILS.DLL" (ByRef lpListMember As ILISTMEMBERTYPE) As Integer + Private Declare Function ListMemberAdd Lib "MEAILS.DLL" (ByRef lpListMember As ILISTMEMBERTYPE) As Integer + Private Declare Function ListMemberEdit Lib "MEAILS.DLL" (ByRef TargetListMember As ILISTMEMBERTYPE, ByRef NewListMember As ILISTMEMBERTYPE) As Integer + Private Declare Function ListMemberRemove Lib "MEAILS.DLL" (ByRef lpListMember As ILISTMEMBERTYPE) As Integer + Private Declare Function SetCurrentHost Lib "MEAILS.DLL" (ByVal CurrentHost As String) As Integer + + Public Function SetHost() As Integer + SetHost = SetCurrentHost(Host) + End Function + + + Public Function FindFirstListMember() As Integer + Dim CListMember As ILISTMEMBERTYPE + CListMember.Address = Address + CListMember.AccountName = AccountName + CListMember.ListName = ListName + FindFirstListMember = ListMemberFindFirst(CListMember) + Address = CListMember.Address + AccountName = CListMember.AccountName + ListName = CListMember.ListName + End Function + + Public Function FindNextListMember() As Integer + Dim CListMember As ILISTMEMBERTYPE + CListMember.Address = Address + CListMember.AccountName = AccountName + CListMember.ListName = ListName + FindNextListMember = ListMemberFindNext(CListMember) + Address = CListMember.Address + AccountName = CListMember.AccountName + ListName = CListMember.ListName + End Function + + Public Function AddListMember() As Integer + Dim CListMember As ILISTMEMBERTYPE + CListMember.Address = Address + CListMember.AccountName = AccountName + CListMember.ListName = ListName + AddListMember = ListMemberAdd(CListMember) + Address = CListMember.Address + AccountName = CListMember.AccountName + ListName = CListMember.ListName + End Function + + Public Function GetListMember() As Integer + Dim CListMember As ILISTMEMBERTYPE + CListMember.Address = Address + CListMember.AccountName = AccountName + CListMember.ListName = ListName + GetListMember = ListMemberGet(CListMember) + Address = CListMember.Address + AccountName = CListMember.AccountName + ListName = CListMember.ListName + End Function + Public Function RemoveListMember() As Integer + Dim CListMember As ILISTMEMBERTYPE + CListMember.Address = Address + CListMember.AccountName = AccountName + CListMember.ListName = ListName + RemoveListMember = ListMemberRemove(CListMember) + Address = CListMember.Address + AccountName = CListMember.AccountName + ListName = CListMember.ListName + End Function + + Public Function EditListMember(ByVal NewAddress, ByVal NewAccountName, ByVal NewListName, ByVal NewListMemberType, ByVal NewStatus) As Integer + Dim CListMember As ILISTMEMBERTYPE + Dim CListMemberData As ILISTMEMBERTYPE + ' Get the Find Stuff Set up + CListMember.Address = Address + CListMember.AccountName = AccountName + CListMember.ListName = ListName + ' Get the Data Set up + CListMemberData.Address = NewAddress + CListMemberData.AccountName = NewAccountName + CListMemberData.ListName = NewListName + EditListMember = ListMemberEdit(CListMember, CListMemberData) + + NewAddress = CListMemberData.Address + NewAccountName = CListMemberData.AccountName + NewListName = CListMemberData.ListName + End Function + + Public Property Address() As String + Get + Return Me.AddressVal + End Get + Set(ByVal value As String) + Me.AddressVal = value + End Set + End Property + + Public Property AccountName() As String + Get + Return Me.AccountNameVal + End Get + Set(ByVal value As String) + Me.AccountNameVal = value + End Set + End Property + + Public Property ListName() As String + Get + Return Me.ListNameVal + End Get + Set(ByVal value As String) + Me.ListNameVal = value + End Set + End Property + + Public Property ListMemberType() As Long + Get + Return Me.ListMemberTypeVal + End Get + Set(ByVal value As Long) + Me.ListMemberTypeVal = value + End Set + End Property + + Public Property Status() As Long + Get + Return Me.StatusVal + End Get + Set(ByVal value As Long) + Me.StatusVal = value + End Set + End Property + + Public Property Host() As String + Get + Return Me.HostVal + End Get + Set(ByVal value As String) + Me.HostVal = value + End Set + End Property + + End Class + +End Namespace diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableLogin.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableLogin.vb new file mode 100644 index 00000000..bc773a8f --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableLogin.vb @@ -0,0 +1,292 @@ +' Copyright (c) 2012, Outercurve Foundation. +' All rights reserved. +' +' Redistribution and use in source and binary forms, with or without modification, +' are permitted provided that the following conditions are met: +' +' - Redistributions of source code must retain the above copyright notice, this +' list of conditions and the following disclaimer. +' +' - Redistributions in binary form must reproduce the above copyright notice, +' this list of conditions and the following disclaimer in the documentation +' and/or other materials provided with the distribution. +' +' - Neither the name of the Outercurve Foundation nor the names of its +' contributors may be used to endorse or promote products derived from this +' software without specific prior written permission. +' +' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +' (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +' LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +' ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +' (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Namespace WebsitePanel.Providers.Mail + + Public Class MailEnableLogin + Inherits MarshalByRefObject + + Private UserNameVal As String + Private StatusVal As Long + Private PasswordVal As String + Private AccountVal As String + Private DescriptionVal As String + Private LoginAttemptsVal As Long + Private LastAttemptVal As Long + Private LastSuccessfulLoginVal As Long + Private RightsVal As String + Private HostVal As String + + Private Structure IAUTHENTRYTYPE + Public UserName As String + Public Status As Integer + Public Password As String + Public Account As String + Public Rights As String + Public Description As String + Public LoginAttempts As Integer + Public LastAttempt As Integer + Public LastSuccessfulLogin As Integer + End Structure + + Private Declare Function GetLastProviderErrorCode Lib "MEAIAU.DLL" Alias "GetLastErrorCode" () As Integer + Private Declare Function LoginGet Lib "MEAIAU.DLL" (ByRef lpLogin As IAUTHENTRYTYPE) As Integer + Private Declare Function LoginFindFirst Lib "MEAIAU.DLL" (ByRef lpLogin As IAUTHENTRYTYPE) As Integer + Private Declare Function LoginFindNext Lib "MEAIAU.DLL" (ByRef lpLogin As IAUTHENTRYTYPE) As Integer + Private Declare Function LoginAdd Lib "MEAIAU.DLL" (ByRef lpLogin As IAUTHENTRYTYPE) As Integer + Private Declare Function LoginEdit Lib "MEAIAU.DLL" (ByRef TargetLogin As IAUTHENTRYTYPE, ByRef NewLogin As IAUTHENTRYTYPE) As Integer + Private Declare Function LoginRemove Lib "MEAIAU.DLL" (ByRef lpLogin As IAUTHENTRYTYPE) As Integer + Private Declare Function SetCurrentHost Lib "MEAIAU.DLL" (ByVal CurrentHost As String) As Integer + + Public Function GetLastErrorCode() As Integer + Return GetLastProviderErrorCode() + End Function + + Public Function SetHost() As Integer + SetHost = SetCurrentHost(Host) + End Function + + Public Function GetLogin() As Integer + Dim CLogin As IAUTHENTRYTYPE + CLogin.UserName = UserName + CLogin.Password = Password + CLogin.Status = Status + CLogin.Account = Account + CLogin.Description = Description + CLogin.Rights = Rights + GetLogin = LoginGet(CLogin) + UserName = CLogin.UserName + Password = CLogin.Password + Status = CLogin.Status + Account = CLogin.Account + Description = CLogin.Description + Rights = CLogin.Rights + End Function + + Public Function FindFirstLogin() As Integer + + Dim CLogin As IAUTHENTRYTYPE + + CLogin.UserName = UserName + CLogin.Password = Password + CLogin.Status = Status + CLogin.Account = Account + CLogin.Description = Description + CLogin.Rights = Rights + FindFirstLogin = LoginFindFirst(CLogin) + UserName = CLogin.UserName + Password = CLogin.Password + Status = CLogin.Status + Account = CLogin.Account + Description = CLogin.Description + Rights = CLogin.Rights + End Function + + Public Function FindNextLogin() As Integer + Dim CLogin As IAUTHENTRYTYPE + CLogin.UserName = UserName + CLogin.Password = Password + CLogin.Status = Status + CLogin.Account = Account + CLogin.Description = Description + CLogin.Rights = Rights + FindNextLogin = LoginFindNext(CLogin) + UserName = CLogin.UserName + Password = CLogin.Password + Status = CLogin.Status + Account = CLogin.Account + Description = CLogin.Description + Rights = CLogin.Rights + End Function + + Public Function AddLogin() As Integer + Dim CLogin As IAUTHENTRYTYPE + CLogin.UserName = UserName + CLogin.Password = Password + CLogin.Status = Status + CLogin.Account = Account + CLogin.Description = Description + CLogin.Rights = Rights + AddLogin = LoginAdd(CLogin) + UserName = CLogin.UserName + Password = CLogin.Password + Status = CLogin.Status + Account = CLogin.Account + Description = CLogin.Description + Rights = CLogin.Rights + End Function + + Public Function RemoveLogin() As Integer + Dim CLogin As IAUTHENTRYTYPE + CLogin.UserName = UserName + CLogin.Password = Password + CLogin.Status = Status + CLogin.Account = Account + CLogin.Description = Description + CLogin.Rights = Rights + RemoveLogin = LoginRemove(CLogin) + End Function + + Public Function EditLogin(ByVal NewUserName As String, ByVal NewStatus As Long, ByVal NewPassword As String, ByVal NewAccount As String, ByVal NewDescription As String, ByVal NewLoginAttempts As Long, ByVal NewLastAttempt As Long, ByVal NewLastSuccessfulLogin As Long, ByVal NewRights As String) As Integer + Dim CLogin As IAUTHENTRYTYPE + Dim CLoginData As IAUTHENTRYTYPE + CLogin.UserName = UserName + CLogin.Password = Password + CLogin.Status = Status + CLogin.Account = Account + CLogin.Description = Description + CLogin.Rights = Rights + ' + CLoginData.UserName = NewUserName + CLoginData.Password = NewPassword + CLoginData.Status = NewStatus + CLoginData.Account = NewAccount + CLoginData.Description = NewDescription + CLoginData.Rights = NewRights + EditLogin = LoginEdit(CLogin, CLoginData) + End Function + + Private Function CString(ByVal InString As String) As String + CString = InString & Chr(0) + End Function + + Private Function NonCString(ByVal InString As String) As String + Dim NTPos As Integer + NTPos = InStr(1, InString, Chr(0), CompareMethod.Binary) + If NTPos > 0 Then + NonCString = Left(InString, NTPos - 1) + Else + NonCString = InString + End If + + End Function + + Public Function Exists(ByVal sUsername As String) As Boolean + Dim CLogin As IAUTHENTRYTYPE + CLogin.UserName = CString(sUsername) + CLogin.Password = CString("") + CLogin.Status = -1 + CLogin.Account = CString("") + CLogin.Description = CString("") + CLogin.Rights = CString("") + Exists = (LoginGet(CLogin) = 1) + End Function + + + Public Property UserName() As String + Get + Return Me.UserNameVal + End Get + Set(ByVal value As String) + Me.UserNameVal = value + End Set + End Property + + Public Property Status() As Long + Get + Return Me.StatusVal + End Get + Set(ByVal value As Long) + Me.StatusVal = value + End Set + End Property + + Public Property Password() As String + Get + Return Me.PasswordVal + End Get + Set(ByVal value As String) + Me.PasswordVal = value + End Set + End Property + + Public Property Account() As String + Get + Return Me.AccountVal + End Get + Set(ByVal value As String) + Me.AccountVal = value + End Set + End Property + + Public Property Description() As String + Get + Return Me.DescriptionVal + End Get + Set(ByVal value As String) + Me.DescriptionVal = value + End Set + End Property + + Public Property LoginAttempts() As Long + Get + Return Me.LoginAttemptsVal + End Get + Set(ByVal value As Long) + Me.LoginAttemptsVal = value + End Set + End Property + + Public Property LastAttempt() As Long + Get + Return Me.LastAttemptVal + End Get + Set(ByVal value As Long) + Me.LastAttemptVal = value + End Set + End Property + + Public Property LastSuccessfulLogin() As Long + Get + Return Me.LastSuccessfulLoginVal + End Get + Set(ByVal value As Long) + Me.LastSuccessfulLoginVal = value + End Set + End Property + + Public Property Rights() As String + Get + Return Me.RightsVal + End Get + Set(ByVal value As String) + Me.RightsVal = value + End Set + End Property + + Public Property Host() As String + Get + Return Me.HostVal + End Get + Set(ByVal value As String) + Me.HostVal = value + End Set + End Property + End Class + +End Namespace diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableMailbox.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableMailbox.vb new file mode 100644 index 00000000..cfc688b2 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableMailbox.vb @@ -0,0 +1,476 @@ +' Copyright (c) 2012, Outercurve Foundation. +' All rights reserved. +' +' Redistribution and use in source and binary forms, with or without modification, +' are permitted provided that the following conditions are met: +' +' - Redistributions of source code must retain the above copyright notice, this +' list of conditions and the following disclaimer. +' +' - Redistributions in binary form must reproduce the above copyright notice, +' this list of conditions and the following disclaimer in the documentation +' and/or other materials provided with the distribution. +' +' - Neither the name of the Outercurve Foundation nor the names of its +' contributors may be used to endorse or promote products derived from this +' software without specific prior written permission. +' +' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +' (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +' LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +' ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +' (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Imports System.IO +Imports Microsoft.Win32 + +Namespace WebsitePanel.Providers.Mail + + Public Class MailEnableMailbox + Inherits MarshalByRefObject + + Private PostofficeVal As String + Private MailboxNameVal As String + Private RedirectAddressVal As String + Private RedirectStatusVal As Long + Private StatusVal As Long + Private LimitVal As Long + Private SizeVal As Long + Private HostVal As String + + + Private Structure IMAILBOXTYPE + Public Postoffice As String + Public Mailbox As String + Public RedirectAddress As String + Public RedirectStatus As Integer + Public Status As Integer + Public Limit As Integer + Public Size As Integer + End Structure + + + Private Declare Function MailboxGet Lib "MEAIPO.DLL" (ByRef lpMailbox As IMAILBOXTYPE) As Integer + Private Declare Function MailboxGetLength Lib "MEAIPO.DLL" (ByRef lpMailbox As IMAILBOXTYPE) As Integer + Private Declare Function MailboxFindFirst Lib "MEAIPO.DLL" (ByRef lpMailbox As IMAILBOXTYPE) As Integer + Private Declare Function MailboxFindNext Lib "MEAIPO.DLL" (ByRef lpMailbox As IMAILBOXTYPE) As Integer + Private Declare Function MailboxAdd Lib "MEAIPO.DLL" (ByRef lpMailbox As IMAILBOXTYPE) As Integer + Private Declare Function MailboxEdit Lib "MEAIPO.DLL" (ByRef TargetMailbox As IMAILBOXTYPE, ByRef NewMailbox As IMAILBOXTYPE) As Integer + Private Declare Function MailboxRemove Lib "MEAIPO.DLL" (ByRef lpMailbox As IMAILBOXTYPE) As Integer + + Private Declare Function SetCurrentHost Lib "MEAIPO.DLL" (ByVal CurrentHost As String) As Integer + + Private Structure IANNOTATIONTYPE + Public AnnotationName As String + Public AccountName As String + Public AnnotationText As String + End Structure + + Private Declare Function AnnotationGet Lib "MEAILS.DLL" (ByRef lpAnnotation As IANNOTATIONTYPE) As Integer + Private Declare Function AnnotationAdd Lib "MEAILS.DLL" (ByRef lpAnnotation As IANNOTATIONTYPE) As Integer + Private Declare Function AnnotationRemove Lib "MEAILS.DLL" (ByRef lpAnnotation As IANNOTATIONTYPE) As Integer + + + Public Function SetHost() As Integer + SetHost = SetCurrentHost(Host) + End Function + + Public Function FindFirstMailbox() As Integer + Dim CMailBox As IMAILBOXTYPE + CMailBox.Mailbox = MailboxName + CMailBox.Postoffice = Postoffice + CMailBox.RedirectAddress = RedirectAddress + CMailBox.RedirectStatus = RedirectStatus + CMailBox.Status = Status + CMailBox.Limit = Limit + CMailBox.Size = Size + FindFirstMailbox = MailboxFindFirst(CMailBox) + MailboxName = CMailBox.Mailbox + Postoffice = CMailBox.Postoffice + RedirectAddress = CMailBox.RedirectAddress + RedirectStatus = CMailBox.RedirectStatus + Status = CMailBox.Status + Limit = CMailBox.Limit + Size = CMailBox.Size + End Function + + + Public Function FindNextMailbox() As Integer + Dim CMailBox As IMAILBOXTYPE + CMailBox.Mailbox = MailboxName + CMailBox.Postoffice = Postoffice + CMailBox.RedirectAddress = RedirectAddress + CMailBox.RedirectStatus = RedirectStatus + CMailBox.Status = Status + CMailBox.Limit = Limit + CMailBox.Size = Size + FindNextMailbox = MailboxFindNext(CMailBox) + MailboxName = CMailBox.Mailbox + Postoffice = CMailBox.Postoffice + RedirectAddress = CMailBox.RedirectAddress + RedirectStatus = CMailBox.RedirectStatus + Status = CMailBox.Status + Limit = CMailBox.Limit + Size = CMailBox.Size + End Function + + Public Function AddMailbox() As Integer + Dim CMailBox As IMAILBOXTYPE + CMailBox.Mailbox = MailboxName + CMailBox.Postoffice = Postoffice + CMailBox.RedirectAddress = RedirectAddress + CMailBox.RedirectStatus = RedirectStatus + CMailBox.Status = Status + CMailBox.Limit = Limit + CMailBox.Size = Size + AddMailbox = MailboxAdd(CMailBox) + MailboxName = CMailBox.Mailbox + Postoffice = CMailBox.Postoffice + RedirectAddress = CMailBox.RedirectAddress + RedirectStatus = CMailBox.RedirectStatus + Status = CMailBox.Status + Limit = CMailBox.Limit + Size = CMailBox.Size + End Function + + Public Function GetMailbox() As Integer + Dim CMailBox As IMAILBOXTYPE + CMailBox.Mailbox = MailboxName + CMailBox.Postoffice = Postoffice + CMailBox.RedirectAddress = RedirectAddress + CMailBox.RedirectStatus = RedirectStatus + CMailBox.Status = Status + CMailBox.Limit = Limit + CMailBox.Size = Size + GetMailbox = MailboxGet(CMailBox) + MailboxName = CMailBox.Mailbox + Postoffice = CMailBox.Postoffice + RedirectAddress = CMailBox.RedirectAddress + RedirectStatus = CMailBox.RedirectStatus + Status = CMailBox.Status + Limit = CMailBox.Limit + Size = CMailBox.Size + End Function + + + Public Function RemoveMailbox() As Integer + Dim CMailBox As IMAILBOXTYPE + CMailBox.Mailbox = MailboxName + CMailBox.Postoffice = Postoffice + CMailBox.RedirectAddress = RedirectAddress + CMailBox.RedirectStatus = RedirectStatus + CMailBox.Status = Status + CMailBox.Limit = Limit + CMailBox.Size = Size + RemoveMailbox = MailboxRemove(CMailBox) + MailboxName = CMailBox.Mailbox + Postoffice = CMailBox.Postoffice + RedirectAddress = CMailBox.RedirectAddress + RedirectStatus = CMailBox.RedirectStatus + Status = CMailBox.Status + Limit = CMailBox.Limit + Size = CMailBox.Size + End Function + + + Public Function EditMailbox(ByVal NewPostoffice As String, ByVal NewMailbox As String, ByVal NewRedirectAddress As String, ByVal NewRedirectStatus As Long, ByVal NewStatus As Long, ByVal NewLimit As Long, ByVal NewSize As Long) As Integer + Dim CMailBox As IMAILBOXTYPE + Dim CMailBoxData As IMAILBOXTYPE + ' Get the Find Stuff Set up + CMailBox.Mailbox = MailboxName + CMailBox.Postoffice = Postoffice + CMailBox.RedirectAddress = RedirectAddress + CMailBox.RedirectStatus = RedirectStatus + CMailBox.Status = Status + CMailBox.Limit = Limit + CMailBox.Size = Size + ' Get the Data Set up + CMailBoxData.Mailbox = NewMailbox + CMailBoxData.Postoffice = NewPostoffice + CMailBoxData.RedirectAddress = NewRedirectAddress + CMailBoxData.RedirectStatus = NewRedirectStatus + CMailBoxData.Status = NewStatus + CMailBoxData.Limit = NewLimit + CMailBoxData.Size = NewSize + EditMailbox = MailboxEdit(CMailBox, CMailBoxData) + MailboxName = CMailBox.Mailbox + Postoffice = CMailBox.Postoffice + RedirectAddress = CMailBox.RedirectAddress + RedirectStatus = CMailBox.RedirectStatus + + End Function + + Public Function GetLength() As Integer + Dim CMailBox As IMAILBOXTYPE + CMailBox.Mailbox = MailboxName + CMailBox.Postoffice = Postoffice + CMailBox.RedirectAddress = RedirectAddress + CMailBox.RedirectStatus = RedirectStatus + CMailBox.Status = Status + CMailBox.Limit = Limit + CMailBox.Size = Size + Return MailboxGetLength(CMailBox) + End Function + + + Public Function SetAutoResponderStatus(ByVal bEnabled As Boolean) As Integer + Return SetAutoResponderStatus(Me.Postoffice, Me.MailboxName, bEnabled) + End Function + + Public Shared Function SetAutoResponderStatus(ByVal sPostoffice As String, ByVal sMailbox As String, ByVal bEnabled As Boolean) As Integer + ' + ' This function copies the Auto Responder Config File to indicate Enabled. + ' It deletes the CFG file to Disable + ' + Dim SourcePath As String + Dim TargetPath As String + + On Error Resume Next + + If (bEnabled) Then + ' + ' Copy AUTORESPOND.CF_ to AUTORESPOND.CFG + ' + SourcePath = MailEnable.GetPostofficesPath() & "\" & sPostoffice & "\MAILROOT\" & sMailbox & "\AUTORESPOND.CF_" + TargetPath = MailEnable.GetPostofficesPath() & "\" & sPostoffice & "\MAILROOT\" & sMailbox & "\AUTORESPOND.CFG" + + If Not File.Exists(SourcePath) Then + Return 1 + End If + + File.Copy(SourcePath, TargetPath, True) + SetAutoResponderStatus = 1 + Else + SourcePath = MailEnable.GetPostofficesPath() & "\" & sPostoffice & "\MAILROOT\" & sMailbox & "\AUTORESPOND.CFG" + + If Not File.Exists(SourcePath) Then + Return 1 + End If + + File.Delete(SourcePath) + SetAutoResponderStatus = 1 + End If + + End Function + + + Public Function SetAutoResponderContents(ByVal Headers As String, ByVal MessageBody As String) As Integer + Return SetAutoResponderContents(Me.Postoffice, Me.MailboxName, Headers, MessageBody) + End Function + + Public Shared Function SetAutoResponderContents(ByVal sPostoffice As String, ByVal sMailbox As String, ByVal Headers As String, ByVal MessageBody As String) As Integer + ' + ' This function sets the contents of the autoresponse. + ' The SetAutoResponderStatus routine must be called after this to make the changes effective + ' + Dim SourcePath As String + + SourcePath = MailEnable.GetPostofficesPath() & "\" & sPostoffice & "\MAILROOT\" & sMailbox & "\AUTORESPOND.CF_" + + On Error Resume Next + + Dim oTS As StreamWriter = New StreamWriter(SourcePath, False) + + If Err.Number = 0 Then + oTS.Write(Headers & vbCrLf & vbCrLf & MessageBody) + oTS.Close() + SetAutoResponderContents = 1 + Else + SetAutoResponderContents = 0 + End If + + End Function + + Public Function GetAutoResponderSubject() As String + ' + ' This Routine returns the current AutoResponder Subject + ' + Dim FileContents As String + Dim DelimiterPos As Long + Dim StartPos As Long + Dim EndPos As Long + Dim SubjectOffset As Long + Dim SourcePath As String + + SourcePath = MailEnable.GetPostofficesPath() & "\" & Me.Postoffice & "\MAILROOT\" & Me.MailboxName & "\AUTORESPOND.CF_" + + On Error Resume Next + + If Not File.Exists(SourcePath) Then + Return "" + End If + + Dim oTS As StreamReader = New StreamReader(SourcePath) + + FileContents = oTS.ReadToEnd + oTS.Close() + + DelimiterPos = InStr(1, FileContents, "Subject:") + + If DelimiterPos > 0 Then + SubjectOffset = Len("Subject: ") + StartPos = DelimiterPos + SubjectOffset + EndPos = InStr(DelimiterPos, FileContents, vbCrLf, ) + GetAutoResponderSubject = Mid(FileContents, StartPos, (EndPos - StartPos)) + Else + GetAutoResponderSubject = FileContents + End If + + End Function + + Public Function GetAutoResponderContents() As String + ' + ' This Routine returns the current AutoResponder Message + ' + Dim FileContents As String + Dim DelimiterPos As Long + Dim SourcePath As String + + SourcePath = MailEnable.GetPostofficesPath() & "\" & Me.Postoffice & "\MAILROOT\" & Me.MailboxName & "\AUTORESPOND.CF_" + + On Error Resume Next + + If Not File.Exists(SourcePath) Then + Return "" + End If + + Dim oTS As StreamReader = New StreamReader(SourcePath) + + FileContents = oTS.ReadToEnd + oTS.Close() + + DelimiterPos = InStr(1, FileContents, vbCrLf & vbCrLf) + + If DelimiterPos > 0 Then + ' It has headers + ' Headers = Mid(FileContents, 1, DelimiterPos + Len(vbCrLf & vbCrLf)) + GetAutoResponderContents = Mid$(FileContents, DelimiterPos + Len(vbCrLf & vbCrLf)) + Else + 'Headers = "" + GetAutoResponderContents = FileContents + End If + + End Function + + Public Function GetAutoResponderStatus() As Boolean + ' + ' This Routine returns the current AutoResponder Status + ' + Dim SourcePath As String + + SourcePath = MailEnable.GetPostofficesPath() & "\" & Me.Postoffice & "\MAILROOT\" & Me.MailboxName & "\AUTORESPOND.CFG" + + On Error Resume Next + + GetAutoResponderStatus = System.IO.File.Exists(SourcePath) + + End Function + + + + Function SetSignature(ByVal Postoffice As String, ByVal Mailbox As String, ByVal SignitureText As String) As Integer + Dim CAnnotation As IANNOTATIONTYPE + CAnnotation.AccountName = Postoffice + CAnnotation.AnnotationName = Mailbox & "-AUTOSIG" + CAnnotation.AnnotationText = SignitureText + SetSignature = AnnotationAdd(CAnnotation) + End Function + + Function GetSignature(ByVal Postoffice As String, ByVal Mailbox As String) As String + + Dim CAnnotation As IANNOTATIONTYPE + + CAnnotation.AccountName = Postoffice + CAnnotation.AnnotationName = Mailbox & "-AUTOSIG" + CAnnotation.AnnotationText = "" + + If (AnnotationGet(CAnnotation) = 1) Then + GetSignature = CAnnotation.AnnotationText + Else + GetSignature = "" + End If + End Function + + + Public Property Postoffice() As String + Get + Return Me.PostofficeVal + End Get + Set(ByVal value As String) + Me.PostofficeVal = value + End Set + End Property + + Public Property MailboxName() As String + Get + Return Me.MailboxNameVal + End Get + Set(ByVal value As String) + Me.MailboxNameVal = value + End Set + End Property + + Public Property RedirectAddress() As String + Get + Return Me.RedirectAddressVal + End Get + Set(ByVal value As String) + Me.RedirectAddressVal = value + End Set + End Property + + Public Property RedirectStatus() As Long + Get + Return Me.RedirectStatusVal + End Get + Set(ByVal value As Long) + Me.RedirectStatusVal = value + End Set + End Property + + Public Property Status() As Long + Get + Return Me.StatusVal + End Get + Set(ByVal value As Long) + Me.StatusVal = value + End Set + End Property + + Public Property Limit() As Long + Get + Return Me.LimitVal + End Get + Set(ByVal value As Long) + Me.LimitVal = value + End Set + End Property + + Public Property Size() As Long + Get + Return Me.SizeVal + End Get + Set(ByVal value As Long) + Me.SizeVal = value + End Set + End Property + + Public Property Host() As String + Get + Return Me.HostVal + End Get + Set(ByVal value As String) + Me.HostVal = value + End Set + End Property + + + + End Class + +End Namespace \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableOption.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableOption.vb new file mode 100644 index 00000000..bc8cfe45 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnableOption.vb @@ -0,0 +1,194 @@ +' Copyright (c) 2012, Outercurve Foundation. +' All rights reserved. +' +' Redistribution and use in source and binary forms, with or without modification, +' are permitted provided that the following conditions are met: +' +' - Redistributions of source code must retain the above copyright notice, this +' list of conditions and the following disclaimer. +' +' - Redistributions in binary form must reproduce the above copyright notice, +' this list of conditions and the following disclaimer in the documentation +' and/or other materials provided with the distribution. +' +' - Neither the name of the Outercurve Foundation nor the names of its +' contributors may be used to endorse or promote products derived from this +' software without specific prior written permission. +' +' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +' (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +' LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +' ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +' (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Namespace WebsitePanel.Providers.Mail + + Public Class MailEnableOption + Inherits MarshalByRefObject + + Private ScopeVal As Integer + Private QueryVal As String + Private ValueNameVal As String + Private ValueVal As String + Private HostVal As String + + Private Declare Function SystemGetOption Lib "MEAISO.DLL" Alias "GetOption" (ByVal Scope As Integer, ByVal Query As String, ByVal ValueName As String, ByVal ReturnValue As String) As Int32 + Private Declare Function SystemSetOption Lib "MEAISO.DLL" Alias "SetOption" (ByVal Scope As Integer, ByVal Query As String, ByVal ValueName As String, ByVal ReturnValue As String) As Int32 + Private Declare Function SetCurrentHost Lib "MEAISO.DLL" (ByVal CurrentHost As String) As Int32 + + Private Shared Function NonCString(ByVal InString As String) As String + Dim NTPos As Integer + NTPos = InStr(1, InString, Chr(0), CompareMethod.Binary) + If NTPos > 0 Then + NonCString = Left(InString, NTPos - 1) + Else + NonCString = InString + End If + End Function + + Private Shared Function CString(ByVal InString As String) As String + CString = InString & Chr(0) + End Function + + Public Function SetHost() As Integer + SetHost = SetCurrentHost(Host) + End Function + + Private Function ValidData() As Boolean + If Len(Query) >= 1024 Then ValidData = False : Exit Function + If Len(ValueName) >= 1024 Then ValidData = False : Exit Function + If Len(Value) >= 1024 Then ValidData = False : Exit Function + ValidData = True + End Function + + + Public Function GetOption() As Integer + If Not ValidData() Then GetOption = 0 : Exit Function + + Value = Space(2048) + Try + GetOption = SystemGetOption(Scope, Query, ValueName, Value) + Value = NonCString(Value) + Catch ex As Exception + GetOption = 0 + Value = String.Empty + End Try + End Function + + Public Function SetOption() As Integer + If Not ValidData() Then SetOption = 0 : Exit Function + + SetOption = SystemSetOption(Scope, Query, ValueName, Value) + End Function + + + Public Property Scope() As Integer + Get + Return Me.ScopeVal + End Get + Set(ByVal value As Integer) + Me.ScopeVal = value + End Set + End Property + + Public Property Query() As String + Get + Return Me.QueryVal + End Get + Set(ByVal value As String) + Me.QueryVal = value + End Set + End Property + + Public Property ValueName() As String + Get + Return Me.ValueNameVal + End Get + Set(ByVal value As String) + Me.ValueNameVal = value + End Set + End Property + + Public Property Value() As String + Get + Return Me.ValueVal + End Get + Set(ByVal value As String) + Me.ValueVal = value + End Set + End Property + + Public Property Host() As String + Get + Return Me.HostVal + End Get + Set(ByVal value As String) + Me.HostVal = value + End Set + End Property + + + Public Shared Function GetSystemOption(ByRef lScope As String, ByRef sQuery As String, ByRef sValueName As String, Optional ByVal DefaultValue As String = "") As String + + Dim oMEAOSO As New MailEnableOption + + On Error Resume Next + oMEAOSO.Scope = lScope + oMEAOSO.Query = sQuery + oMEAOSO.ValueName = sValueName + If oMEAOSO.GetOption() <> 0 Then + GetSystemOption = oMEAOSO.Value + Else + GetSystemOption = DefaultValue + End If + oMEAOSO = Nothing + + End Function + + Public Shared Function SetSystemOption(ByRef lScope As String, ByRef sQuery As String, ByRef sValueName As String, ByRef sValue As String) As Integer + + On Error Resume Next + + If Not IsNothing(sValue) Then + Dim oMEAOSO As New MailEnableOption + + oMEAOSO.Scope = lScope + oMEAOSO.Query = sQuery + oMEAOSO.ValueName = sValueName + oMEAOSO.Value = sValue + oMEAOSO.SetOption() + SetSystemOption = True + + oMEAOSO = Nothing + Return 1 + End If + + Return 0 + + End Function + + Public Shared Function GetRemoteRegistryString(ByVal HostName As String, ByVal ParentKey As String, ByVal RegistryKey As String, ByRef KeyValue As String) As Integer + If HostName Is Nothing Then + HostName = "" + End If + Dim LocalValue As String = Space(4096) + Dim Result As Integer = _GetRemoteRegistryString(HostName, ParentKey, RegistryKey, LocalValue) + If Result = 1 Then + KeyValue = NonCString(LocalValue) + End If + Return Result + End Function + + Private Declare Function GetRemoteRegistryWord Lib "MEAISO.DLL" (ByVal HostName As String, ByVal ParentKey As String, ByVal RegistryKey As String, ByVal KeyValue As Integer) As Integer + Private Declare Function SetRemoteRegistryWord Lib "MEAISO.DLL" (ByVal HostName As String, ByVal ParentKey As String, ByVal RegistryKey As String, ByVal KeyValue As Integer) As Integer + Private Declare Function SetRemoteRegistryString Lib "MEAISO.DLL" (ByVal HostName As String, ByVal ParentKey As String, ByVal RegistryKey As String, ByVal KeyValue As String) As Integer + Private Declare Function _GetRemoteRegistryString Lib "MEAISO.DLL" Alias "GetRemoteRegistryString" (ByVal HostName As String, ByVal ParentKey As String, ByVal RegistryKey As String, ByVal KeyValue As String) As Integer + + End Class + +End Namespace diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnablePostoffice.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnablePostoffice.vb new file mode 100644 index 00000000..c43f2a88 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/MailEnablePostoffice.vb @@ -0,0 +1,172 @@ +' Copyright (c) 2012, Outercurve Foundation. +' All rights reserved. +' +' Redistribution and use in source and binary forms, with or without modification, +' are permitted provided that the following conditions are met: +' +' - Redistributions of source code must retain the above copyright notice, this +' list of conditions and the following disclaimer. +' +' - Redistributions in binary form must reproduce the above copyright notice, +' this list of conditions and the following disclaimer in the documentation +' and/or other materials provided with the distribution. +' +' - Neither the name of the Outercurve Foundation nor the names of its +' contributors may be used to endorse or promote products derived from this +' software without specific prior written permission. +' +' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +' WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +' DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +' (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +' LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +' ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +' (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +' SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Namespace WebsitePanel.Providers.Mail + + Public Class MailEnablePostoffice + Inherits MarshalByRefObject + + Private NameVal As String + Private StatusVal As Long + Private AccountVal As String + Private HostVal As String + + Private Structure IPOSTOFFICETYPE + Public Name As String + Public Status As Integer + Public Account As String + End Structure + + + Private Declare Function PostofficeGet Lib "MEAIPO.DLL" (ByRef lpPostoffice As IPOSTOFFICETYPE) As Integer + Private Declare Function PostofficeFindFirst Lib "MEAIPO.DLL" (ByRef lpPostoffice As IPOSTOFFICETYPE) As Integer + Private Declare Function PostofficeFindNext Lib "MEAIPO.DLL" (ByRef lpPostoffice As IPOSTOFFICETYPE) As Integer + Private Declare Function PostofficeAdd Lib "MEAIPO.DLL" (ByRef lpPostoffice As IPOSTOFFICETYPE) As Integer + Private Declare Function PostofficeEdit Lib "MEAIPO.DLL" (ByRef TargetPostoffice As IPOSTOFFICETYPE, ByRef NewPostoffice As IPOSTOFFICETYPE) As Integer + Private Declare Function PostofficeRemove Lib "MEAIPO.DLL" (ByRef lpPostoffice As IPOSTOFFICETYPE) As Integer + Private Declare Function SetCurrentHost Lib "MEAIPO.DLL" (ByVal CurrentHost As String) As Integer + + Public Function SetHost() As Integer + SetHost = SetCurrentHost(Host) + End Function + + + Public Function FindFirstPostoffice() As Integer + Dim CPostoffice As IPOSTOFFICETYPE + CPostoffice.Account = Account + CPostoffice.Name = Name + CPostoffice.Status = Status + FindFirstPostoffice = PostofficeFindFirst(CPostoffice) + Account = CPostoffice.Account + Name = CPostoffice.Name + Status = CPostoffice.Status + End Function + Public Function FindNextPostoffice() As Integer + Dim CPostoffice As IPOSTOFFICETYPE + CPostoffice.Account = Account + CPostoffice.Name = Name + CPostoffice.Status = Status + FindNextPostoffice = PostofficeFindNext(CPostoffice) + Account = CPostoffice.Account + Name = CPostoffice.Name + Status = CPostoffice.Status + End Function + + Public Function AddPostoffice() As Integer + Dim CPostoffice As IPOSTOFFICETYPE + CPostoffice.Account = Account + CPostoffice.Name = Name + CPostoffice.Status = Status + AddPostoffice = PostofficeAdd(CPostoffice) + Account = CPostoffice.Account + Name = CPostoffice.Name + Status = CPostoffice.Status + End Function + + Public Function GetPostoffice() As Integer + Dim CPostoffice As IPOSTOFFICETYPE + CPostoffice.Account = Account + CPostoffice.Name = Name + CPostoffice.Status = Status + GetPostoffice = PostofficeGet(CPostoffice) + Account = CPostoffice.Account + Name = CPostoffice.Name + Status = CPostoffice.Status + End Function + Public Function RemovePostoffice() As Integer + Dim CPostoffice As IPOSTOFFICETYPE + CPostoffice.Account = Account + CPostoffice.Name = Name + CPostoffice.Status = Status + RemovePostoffice = PostofficeRemove(CPostoffice) + Account = CPostoffice.Account + Name = CPostoffice.Name + Status = CPostoffice.Status + End Function + + + Public Function EditPostoffice(ByVal NewName As String, ByVal NewStatus As Long, ByVal NewAccount As String) As Integer + + Dim CPostoffice As IPOSTOFFICETYPE + Dim CPostofficeData As IPOSTOFFICETYPE + + ' Get the Find Stuff Set up + CPostoffice.Account = Account + CPostoffice.Name = Name + CPostoffice.Status = Status + ' Get the Data Set up + CPostofficeData.Account = NewAccount + CPostofficeData.Name = NewName + CPostofficeData.Status = NewStatus + EditPostoffice = PostofficeEdit(CPostoffice, CPostofficeData) + Account = CPostoffice.Account + Name = CPostoffice.Name + Status = CPostoffice.Status + + End Function + + + Public Property Name() As String + Get + Return Me.NameVal + End Get + Set(ByVal value As String) + Me.NameVal = value + End Set + End Property + + Public Property Status() As Long + Get + Return Me.StatusVal + End Get + Set(ByVal value As Long) + Me.StatusVal = value + End Set + End Property + + Public Property Account() As String + Get + Return Me.AccountVal + End Get + Set(ByVal value As String) + Me.AccountVal = value + End Set + End Property + + Public Property Host() As String + Get + Return Me.HostVal + End Get + Set(ByVal value As String) + Me.HostVal = value + End Set + End Property + + End Class + +End Namespace diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/WebsitePanel.Providers.Mail.MailEnable.vbproj b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/WebsitePanel.Providers.Mail.MailEnable.vbproj index 0a3e858d..755a2804 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/WebsitePanel.Providers.Mail.MailEnable.vbproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.MailEnable/WebsitePanel.Providers.Mail.MailEnable.vbproj @@ -73,6 +73,17 @@ VersionInfo.vb + + + + + + + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.Merak/Merak.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.Merak/Merak.vb index 60f63274..a5ec3a3b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.Merak/Merak.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.Merak/Merak.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.Merak10/Merak10.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.Merak10/Merak10.vb index e0b2e227..aea4180f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.Merak10/Merak10.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.Merak10/Merak10.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail2/SmarterMail2.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail2/SmarterMail2.cs index 1c336f46..ebe32be1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail2/SmarterMail2.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail2/SmarterMail2.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail2/SmarterMailProxies.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail2/SmarterMailProxies.cs index 4773c68a..085aa202 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail2/SmarterMailProxies.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail2/SmarterMailProxies.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail3/SmarterMail3.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail3/SmarterMail3.cs index 9bc4b0cf..0e79a904 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail3/SmarterMail3.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail3/SmarterMail3.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail5/SmartelMail5Proxies.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail5/SmartelMail5Proxies.cs index c9421d46..68aad3c2 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail5/SmartelMail5Proxies.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail5/SmartelMail5Proxies.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail5/SmarterMail5.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail5/SmarterMail5.cs index 02927487..56e8cb21 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail5/SmarterMail5.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail5/SmarterMail5.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail6/SmarterMail6.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail6/SmarterMail6.cs index 587e14a6..cfa88210 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail6/SmarterMail6.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail6/SmarterMail6.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail6/SmarterMail6Proxies.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail6/SmarterMail6Proxies.cs index f57a30ff..53fed906 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail6/SmarterMail6Proxies.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail6/SmarterMail6Proxies.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail7/Extensions.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail7/Extensions.cs index 861c1d9e..ba2a2c22 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail7/Extensions.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail7/Extensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail7/SmarterMail7.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail7/SmarterMail7.cs index f0766ca6..19031afa 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail7/SmarterMail7.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail7/SmarterMail7.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail9/Extensions.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail9/Extensions.cs index 90a62b86..d06d5904 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail9/Extensions.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail9/Extensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail9/SmarterMail9.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail9/SmarterMail9.cs index c5d043de..3ce85581 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail9/SmarterMail9.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail9/SmarterMail9.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMail5/WebsitePanel.Providers.Mail.hMailServer5.vbproj b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMail5/WebsitePanel.Providers.Mail.hMailServer5.vbproj index 3a556d7c..bd9f74f1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMail5/WebsitePanel.Providers.Mail.hMailServer5.vbproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMail5/WebsitePanel.Providers.Mail.hMailServer5.vbproj @@ -117,10 +117,6 @@ {684C932A-6C75-46AC-A327-F3689D89EB42} WebsitePanel.Providers.Base - - {67EEA793-8621-4AD2-AE1D-4D975A8DA059} - WebsitePanel.Providers.Mail.hMailServer - {E91E52F3-9555-4D00-B577-2B1DBDD87CA7} WebsitePanel.Server.Utils diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMail5/hMailServer5.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMail5/hMailServer5.vb index 5298fd30..91ea5b65 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMail5/hMailServer5.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMail5/hMailServer5.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, @@ -36,7 +36,13 @@ Imports Microsoft.Win32 Imports WebsitePanel.Server.Utils Public Class hMailServer5 - Inherits hMailServer + Inherits HostingServiceProviderBase + Implements IMailServer + + Private Const APPLICATION_PROG_ID As String = "hMailServer.Application" + Private Const WEBSITEPANEL_RULE_NAME As String = "WebsitePanel" + Private Const MAIL_GROUP_RULE As String = "Mail Group Rule" + Private Const FORWARDING_RULE As String = "Forwarding Rule" #Region "Public Properties" Public ReadOnly Property AdminUsername() As String @@ -52,9 +58,9 @@ Public Class hMailServer5 End Property #End Region - Protected Overrides ReadOnly Property hMailServer() As Object + Protected ReadOnly Property hMailServer() As Object Get - Dim svc As Object = MyBase.hMailServer + Dim svc As Object = CreateObject(APPLICATION_PROG_ID) ' Authenticate API Dim account As Object = svc.Authenticate(AdminUsername, AdminPassword) @@ -66,6 +72,1261 @@ Public Class hMailServer5 End Get End Property + Class Service + Public ComObject As Object + Public Succeed As Boolean + End Class + +#Region "Private Helper methods" + Private Function CheckAccountIsGroup(ByVal objAccount As Object) As Boolean + If objAccount.Rules.Count > 0 Then + ' check rule actions + Dim objRule As Object = objAccount.Rules.Item(0) + ' first read rule name + If String.Compare(objRule.Name, MAIL_GROUP_RULE, True) = 0 Then + Return True + Else ' read rule actions + For j As Integer = 0 To objRule.Actions.Count - 1 + If objRule.Actions.Item(j).Type = 1 Then 'eRADeleteEmail + Return True + End If + Next + End If + End If + Return False + End Function + + Private Function GetAccountForwardings(ByVal objAccount As Object) As String() + Dim forwardings As List(Of String) = New List(Of String) + If objAccount.Rules.Count > 0 Then + ' check rule actions + Dim objRule As Object = objAccount.Rules.Item(0) + Dim j As Integer + For j = 0 To objRule.Actions.Count - 1 + If objRule.Actions.Item(j).Type = 2 Then 'eRAForwardEmail + forwardings.Add(objRule.Actions.Item(j).To) + End If + Next + End If + Return forwardings.ToArray() + End Function + + Private Function GetMailboxName(ByVal email As String) As String + If (email.IndexOf("@") = -1) Then + Return email + End If + Return email.Substring(0, email.IndexOf("@")) + End Function + + Private Function GetDomainName(ByVal email As String) As String + Return email.Substring(email.IndexOf("@") + 1) + End Function + + Private Function GetUtilitiesObject() As Service + ' find existing domain + Dim objDomain As New Service() + objDomain.Succeed = False + + Try + objDomain.ComObject = hMailServer.Utilities + objDomain.Succeed = True + Catch ex As Exception + Log.WriteError("Couldn't create hMailServer.Application Utilities ActiveX object.", ex) + End Try + + Return objDomain + End Function + + Private Function GetSettingsObject() As Service + Dim objSettings As New Service() + objSettings.Succeed = False + + Try + objSettings.ComObject = hMailServer.Settings + objSettings.Succeed = True + Catch ex As Exception + Log.WriteError("Couldn't create hMailServer.Application Settings ActiveX object.", ex) + End Try + + Return objSettings + End Function + + Private Function GetDomainObject(ByVal domainName As String) As Service + ' find existing domain + Dim objDomain As New Service() + objDomain.Succeed = False + + Try + objDomain.ComObject = hMailServer.Domains.ItemByName(domainName) + objDomain.Succeed = True + Catch ex As Exception + Log.WriteError("Couldn't create hMailServer.Application Domain ActiveX object.", ex) + End Try + + Return objDomain + End Function + + Private Function GetDomainsObject() As Service + ' find existing domain + Dim objDomain As New Service() + objDomain.Succeed = False + + Try + objDomain.ComObject = hMailServer.Domains + objDomain.Succeed = True + Catch ex As Exception + Log.WriteError("Couldn't create hMailServer.Application ActiveX object.", ex) + End Try + + Return objDomain + End Function + + Protected Overridable Function ConvertToMailList(ByRef objMailList As Object) As MailList + Dim mailList As New MailList() + + mailList.Enabled = objMailList.Active + mailList.Name = objMailList.Address + mailList.RequireSmtpAuthentication = objMailList.RequireSMTPAuth + + 'If objMailList.RequireSMTPAuth Then + 'mailList.PostingMode = PostingMode.MembersCanPost + 'ElseIf Not String.IsNullOrEmpty(objMailList.RequireSenderAddress) Then + 'mailList.PostingMode = PostingMode.ModeratorCanPost + 'mailList.ModeratorAddress = objMailList.RequireSenderAddress + 'Else + 'mailList.PostingMode = PostingMode.AnyoneCanPost + 'End If + + If objMailList.Mode = 1 Then + mailList.PostingMode = PostingMode.MembersCanPost + ElseIf Not String.IsNullOrEmpty(objMailList.RequireSenderAddress) And (objMailList.Mode = 2) Then + mailList.PostingMode = PostingMode.ModeratorCanPost + mailList.ModeratorAddress = objMailList.RequireSenderAddress + Else + mailList.PostingMode = PostingMode.AnyoneCanPost + End If + + ' load list members + Dim membersCount As Integer = objMailList.Recipients.Count - 1 + + Dim objRecipient As Object + If membersCount > 0 Then + mailList.Members = New String(membersCount) {} + For index As Integer = 0 To membersCount + objRecipient = objMailList.Recipients.Item(index) + mailList.Members(index) = objRecipient.RecipientAddress + Next index + Else + 'case when list has one member + If membersCount = 0 Then + mailList.Members = New String(1) {} + objRecipient = objMailList.Recipients.Item(0) + mailList.Members(0) = objRecipient.RecipientAddress + End If + End If + 'membersCount = -1 - list does not have members + + Return mailList + End Function + + Protected Overridable Function ConvertToMailGroup(ByRef objMailGroup As Object) As MailGroup + Dim mailGroup As New MailGroup() + + mailGroup.Name = objMailGroup.Address + mailGroup.Enabled = objMailGroup.Active + 'mailGroup.DiskSpace = objMailGroup.MaxSize + + Dim objGroupRules As Object = objMailGroup.Rules + Dim rulesCount As Integer = objGroupRules.Count - 1 + + Dim objGroupRule As Object = Nothing + ' find mail group rule + For i As Integer = 0 To rulesCount + objGroupRule = objMailGroup.Rules.Item(i) + If String.Compare(objGroupRule.Name, MAIL_GROUP_RULE, True) = 0 Then + Exit For + End If + Next i + + If Not objGroupRule Is Nothing Then + Dim groupMembers As New List(Of String) + Dim actionsCount As Integer = objGroupRule.Actions.Count - 1 + + ' copy group members + For i As Integer = 0 To actionsCount + Dim objRuleAction As Object = objGroupRule.Actions.Item(i) + If objRuleAction.Type = 2 Then 'eRAForwardEmail + groupMembers.Add(objRuleAction.To) + End If + Next i + + mailGroup.Members = New String(groupMembers.Count) {} + groupMembers.CopyTo(mailGroup.Members) + End If + + Return mailGroup + End Function + + Private Function GetDailyStatistics(ByVal since As DateTime, ByVal mailDomainName As String, ByVal logpath As String) As DailyStatistics() + Dim days As New ArrayList() + Dim now As DateTime = DateTime.Now + Dim [date] As DateTime = since + Dim mailDomainBytesReceived As Long = 0 + Dim mailDomainBytesSent As Long = 0 + + Try + While [date] < now + If File.Exists(logpath) Then + + Using r As StreamReader = New StreamReader(logpath) + Dim line As String + ' Read first line. + line = r.ReadLine + + Do While (Not line Is Nothing) + Dim vals As String() = line.Split(vbTab) + If vals.Length = 9 Then + Dim logDate As DateTime = CType(vals(0), DateTime) + If logDate >= [date] Then + 'get sent bytes + If InStr(vals(1), mailDomainName) Then + mailDomainBytesSent += Int32.Parse(vals(8)) + End If + + 'get received bytes + If InStr(vals(2), mailDomainName) Then + mailDomainBytesReceived += Int32.Parse(vals(8)) + End If + End If + If logDate.Date > [date].Date Then + Exit Do + End If + + End If + + line = r.ReadLine + + Loop + End Using + End If + + If mailDomainBytesReceived <> 0 Or mailDomainBytesSent <> 0 Then + Dim dailyStats As New DailyStatistics() + dailyStats.Year = [date].Year + dailyStats.Month = [date].Month + dailyStats.Day = [date].Day + dailyStats.BytesSent = mailDomainBytesSent + dailyStats.BytesReceived = mailDomainBytesReceived + days.Add(dailyStats) + End If + + ' advance day + [date] = [date].AddDays(1) + mailDomainBytesReceived = 0 + mailDomainBytesSent = 0 + End While + Catch ex As Exception + Log.WriteError("Could't parse hMailServer Awstats Log", ex) + End Try + Return DirectCast(days.ToArray(GetType(DailyStatistics)), DailyStatistics()) + End Function +#End Region + +#Region "IMailServer members" + Public Function AccountExists(ByVal mailboxName As String) As Boolean Implements IMailServer.AccountExists + ' find existing domain + Dim objDomain As Service = GetDomainObject(GetDomainName(mailboxName)) + + If objDomain.Succeed Then + ' find existing account + Dim i As Integer + For i = 0 To objDomain.ComObject.Accounts.Count - 1 + If String.Compare(objDomain.ComObject.Accounts.Item(i).Address, mailboxName, True) = 0 Then + Return True + End If + Next + End If + + Return False + End Function + + Public Sub AddDomainAlias(ByVal domainName As String, ByVal aliasName As String) Implements IMailServer.AddDomainAlias + ' find existing domain + Dim objDomain As Service = GetDomainObject(domainName) + + If objDomain.Succeed Then + ' add domain alias + Dim objAlias As Object = objDomain.ComObject.DomainAliases.Add() + objAlias.DomainID = objDomain.ComObject.ID + objAlias.AliasName = aliasName + objAlias.Save() + objDomain.ComObject.DomainAliases.Refresh() + End If + End Sub + + Public Sub CreateAccount(ByVal mailbox As MailAccount) Implements IMailServer.CreateAccount + ' find existing domain + Dim objDomain As Service = GetDomainObject(GetDomainName(mailbox.Name)) + + If objDomain.Succeed Then + ' add account + Dim objAccount As Object = objDomain.ComObject.Accounts.Add() + objAccount.DomainID = objDomain.ComObject.ID + objAccount.Address = mailbox.Name + objAccount.Active = mailbox.Enabled + objAccount.Password = mailbox.Password + objAccount.MaxSize = mailbox.MaxMailboxSize + objAccount.PersonFirstName = mailbox.FirstName + objAccount.PersonLastName = mailbox.FirstName + objAccount.SignatureEnabled = mailbox.SignatureEnabled + objAccount.SignaturePlainText = mailbox.Signature + objAccount.SignatureHTML = mailbox.SignatureHTML + + If mailbox.ResponderEnabled Then + objAccount.VacationMessageIsOn = True + objAccount.VacationSubject = mailbox.ResponderSubject + objAccount.VacationMessage = mailbox.ResponderMessage + objAccount.VacationMessageExpires = False + If mailbox.ResponderExpires Then + If IsDate(mailbox.ResponderExpirationDate) Then + objAccount.VacationMessageExpires = True + objAccount.VacationMessageExpiresDate = mailbox.ResponderExpirationDate.Substring(0, 10) + End If + End If + End If + + 'set forwarding address + If mailbox.ForwardingEnabled Then + objAccount.ForwardAddress = mailbox.ForwardingAddresses(0) + objAccount.ForwardEnabled = True + objAccount.ForwardKeepOriginal = mailbox.RetainLocalCopy + End If + + objAccount.Save() + + ' set account rules + SetAccountRules(mailbox, objAccount) + + + End If + End Sub + + Private Sub SetAccountRules(ByVal mailbox As MailAccount, ByVal objAccount As Object) + ' check for default WebsitePanel rule + Dim ruleExists As Boolean = False + Dim objRule As Object = Nothing + + For i As Integer = 0 To objAccount.Rules.Count - 1 + objRule = objAccount.Rules.Item(i) + If String.Compare(objRule.Name, WEBSITEPANEL_RULE_NAME, True) = 0 Then + ruleExists = True + Exit For + End If + Next i + + If ruleExists Then + ' delete forwarding rule + objAccount.Rules.DeleteByDBID(objRule.ID) + End If + End Sub + + Public Sub CreateDomain(ByVal domain As MailDomain) Implements IMailServer.CreateDomain + Dim objDomain As New Service() + + objDomain.ComObject = hMailServer.Domains.Add() + objDomain.ComObject.Name = domain.Name + objDomain.ComObject.Active = domain.Enabled + objDomain.ComObject.Postmaster = domain.CatchAllAccount + objDomain.ComObject.Save() + End Sub + + Public Sub CreateGroup(ByVal group As MailGroup) Implements IMailServer.CreateGroup + Dim objDomain As Service = GetDomainObject(GetDomainName(group.Name)) + Dim objGroup As Object = Nothing + + If objDomain.Succeed Then + Dim Length As Integer = objDomain.ComObject.Accounts.Count - 1 + + ' check whether a group is already created + For index As Integer = 0 To Length + Dim objAccount As Object = objDomain.ComObject.Accounts.Item(index) + If CheckAccountIsGroup(objAccount) Then + If String.Compare(objAccount.Address, group.Name, True) = 0 Then + objGroup = objAccount + Exit For + End If + End If + Next index + + ' throw an exception + If Not objGroup Is Nothing Then + Throw New Exception("Group is already exsists.") + End If + + objGroup = objDomain.ComObject.Accounts.Add() + objGroup.DomainID = objDomain.ComObject.ID + objGroup.Address = group.Name + objGroup.Active = group.Enabled + objGroup.AdminLevel = 0 ' hAdminLevelNormal + + ' group should be empty + 'objGroup.MaxSize = group.DiskSpace + objGroup.VacationMessageIsOn = False + objGroup.VacationSubject = String.Empty + objGroup.VacationMessage = String.Empty + objGroup.Save() + + ' Create mail group rule + Dim objRule As Object = objGroup.Rules.Add() + objRule.AccountID = objGroup.ID + objRule.Active = True + objRule.Name = MAIL_GROUP_RULE + objRule.Save() + + ' Add criteria + Dim objCriteria As Object = objRule.Criterias.Add() + objCriteria.RuleID = objRule.ID + objCriteria.PredefinedField = 6 ' hMailServer.eRulePredefinedField.eFTMessageSize + objCriteria.MatchType = 4 ' hMailServer.eRuleMatchType.eMTGreaterThan + objCriteria.MatchValue = "0" + objCriteria.Save() + + ' create group members + If Not group.Members Is Nothing Then + For Each member As String In group.Members + Dim objGroupMemberAction As Object = objRule.Actions.Add() + objGroupMemberAction.RuleID = objRule.ID + objGroupMemberAction.Type = 2 'eRAForwardEmail + objGroupMemberAction.To = member + objGroupMemberAction.Save() + Next member + End If + + ' Add delete mail action + Dim objGroupAction As Object = objRule.Actions.Add() + objGroupAction.RuleID = objRule.ID + objGroupAction.Type = 1 'eRADeleteEmail + objGroupAction.Save() + + End If + End Sub + + Public Sub CreateList(ByVal maillist As MailList) Implements IMailServer.CreateList + Dim objDomain As Service = GetDomainObject(GetDomainName(maillist.Name)) + + If objDomain.Succeed Then + Dim objMailList As Object = objDomain.ComObject.DistributionLists.Add() + objMailList.Active = maillist.Enabled + objMailList.Address = maillist.Name + + Select Case maillist.PostingMode + Case PostingMode.MembersCanPost + objMailList.RequireSMTPAuth = True + Case PostingMode.ModeratorCanPost + If String.IsNullOrEmpty(maillist.ModeratorAddress) Then + Throw New Exception("List moderator address doesn't specified.") + End If + objMailList.RequireSenderAddress = maillist.ModeratorAddress + End Select + + objMailList.Save() + + ' save list members + If Not maillist.Members Is Nothing Then + For Each member As String In maillist.Members + Dim objRecipient As Object = objMailList.Recipients.Add() + objRecipient.RecipientAddress = member + objRecipient.Save() + Next member + End If + End If + End Sub + + Public Sub DeleteAccount(ByVal mailboxName As String) Implements IMailServer.DeleteAccount + Dim objDomain As Service = GetDomainObject(GetDomainName(mailboxName)) + + If objDomain.Succeed Then + Dim index As Integer + + ' find and remove account if exists + For index = 0 To objDomain.ComObject.Accounts.Count - 1 + Dim objAccount As Object = objDomain.ComObject.Accounts.Item(index) + If String.Compare(objAccount.Address, mailboxName, True) = 0 Then + objDomain.ComObject.Accounts.Delete(index) + Exit For + End If + Next + + ' find and remove alias if exists + For index = 0 To objDomain.ComObject.Aliases.Count - 1 + Dim objAlias As Object = objDomain.ComObject.Aliases.Item(index) + If String.Compare(objAlias.Name, mailboxName, True) = 0 Then + objDomain.ComObject.Aliases.Delete(index) + Exit For + End If + Next + End If + End Sub + + Public Function MailAliasExists(ByVal mailAliasName As String) As Boolean Implements IMailServer.MailAliasExists + ' find existing domain + Dim objDomain As Service = GetDomainObject(GetDomainName(mailAliasName)) + + If objDomain.Succeed Then + Try + ' find existing account + Dim i As Integer + For i = 0 To objDomain.ComObject.Aliases.Count - 1 + If String.Compare(objDomain.ComObject.Aliases.Item(i).Address, mailAliasName, True) = 0 Then + Return True + End If + Next + Catch ex As Exception + Log.WriteError("Couldn't determine if mail alias exists.", ex) + End Try + End If + + Return False + End Function + + Public Function GetMailAliases(ByVal domainName As String) As MailAlias() Implements IMailServer.GetMailAliases + Dim aliases As New List(Of MailAlias) + + ' find existing domain + Dim objDomain As Service = GetDomainObject(domainName) + + If objDomain.Succeed Then + Try + ' get all domain accounts + Dim i As Integer + For i = 0 To objDomain.ComObject.Aliases.Count - 1 + Dim objAccount As Object = objDomain.ComObject.Aliases.Item(i) + + + ' get account details + Dim mailAlias As MailAlias = New MailAlias() + mailAlias.Name = objAccount.Name + mailAlias.Enabled = objAccount.Active + mailAlias.ForwardTo = objAccount.Value + aliases.Add(mailAlias) + Next + Catch ex As Exception + Log.WriteError("Couldn't get mail aliases.", ex) + End Try + End If + + Return aliases.ToArray() + End Function + + Public Function GetMailAlias(ByVal mailAliasName As String) As MailAlias Implements IMailServer.GetMailAlias + 'recreate alias if it was created incorrectly before + Dim mailAlias As New MailAlias + Dim newMailAlias As New MailAlias + + If AccountExists(mailAliasName) Then + Dim mailAccount As MailAccount = GetAccount(mailAliasName) + newMailAlias.Name = mailAccount.Name + newMailAlias.ForwardTo = mailAccount.ForwardingAddresses(0) + 'delete incorrect account + DeleteAccount(mailAliasName) + 'recreate mail alias + CreateMailAlias(newMailAlias) + Return newMailAlias + End If + + ' find existing domain + Dim objDomain As Service = GetDomainObject(GetDomainName(mailAliasName)) + + If objDomain.Succeed Then + Try + ' find through all domain accounts + For i As Integer = 0 To objDomain.ComObject.Aliases.Count - 1 + Dim objAccount As Object = objDomain.ComObject.Aliases.Item(i) + + If String.Compare(objAccount.Name, mailAliasName, True) = 0 Then + ' check if this is a Group + 'If CheckAccountIsGroup(objAccount) Then + 'Continue For + 'End If + + ' get account details + mailAlias.Name = objAccount.Name + mailAlias.Enabled = objAccount.Active + mailAlias.ForwardTo = objAccount.Value + Return mailAlias + End If + Next + Catch ex As Exception + Log.WriteError("Couldn't get mail alias.", ex) + End Try + End If + + Return Nothing + End Function + + Public Sub CreateMailAlias(ByVal mailAlias As MailAlias) Implements IMailServer.CreateMailAlias + Dim objDomain As Service = GetDomainObject(GetDomainName(mailAlias.Name)) + If objDomain.Succeed Then + Try + ' add alias + Dim objAlias As Object = objDomain.ComObject.Aliases.Add() + objAlias.DomainID = objDomain.ComObject.ID + objAlias.Name = mailAlias.Name + objAlias.Active = True + objAlias.Value = mailAlias.ForwardTo + objAlias.Save() + Catch ex As Exception + Log.WriteError("Couldn't create mail alias.", ex) + End Try + End If + End Sub + + Public Sub UpdateMailAlias(ByVal mailAlias As MailAlias) Implements IMailServer.UpdateMailAlias + ' find existing domain + Dim objDomain As Service = GetDomainObject(GetDomainName(mailAlias.Name)) + + If objDomain.Succeed Then + Try + ' find through all domain accounts + For i As Integer = 0 To objDomain.ComObject.Aliases.Count - 1 + Dim objAccount As Object = objDomain.ComObject.Aliases.Item(i) + + If String.Compare(objAccount.Name, mailAlias.Name, True) = 0 Then + 'Fix mail alias is disabled in hMail Server when update it in WSP + objAccount.Active = True + objAccount.Value = mailAlias.ForwardTo + objAccount.Save() + End If + Next + Catch ex As Exception + Log.WriteError("Couldn't update mail alias.", ex) + End Try + End If + End Sub + + Public Sub DeleteMailAlias(ByVal mailAliasName As String) Implements IMailServer.DeleteMailAlias + Dim objDomain As Service = GetDomainObject(GetDomainName(mailAliasName)) + If objDomain.Succeed Then + Try + Dim index As Integer + ' find and remove alias if exists + For index = 0 To objDomain.ComObject.Aliases.Count - 1 + Dim objAlias As Object = objDomain.ComObject.Aliases.Item(index) + If String.Compare(objAlias.Name, mailAliasName, True) = 0 Then + objDomain.ComObject.Aliases.Delete(index) + Exit For + End If + Next + Catch ex As Exception + Log.WriteError("Couldn't delete mail alias.", ex) + End Try + End If + End Sub + + Public Sub DeleteDomain(ByVal domainName As String) Implements IMailServer.DeleteDomain + ' find existing domain + Dim objDomain As Object + Try + objDomain = hMailServer.Domains.ItemByName(domainName) + Catch + Throw New Exception("Specified mail domain does not exists") + End Try + + ' delete domain + objDomain.Delete() + End Sub + + Public Sub DeleteDomainAlias(ByVal domainName As String, ByVal aliasName As String) Implements IMailServer.DeleteDomainAlias + ' find existing domain + Dim objDomain As Service = GetDomainObject(domainName) + + If objDomain.Succeed Then + Dim i As Integer + For i = 0 To objDomain.ComObject.DomainAliases.Count - 1 + If String.Compare(objDomain.ComObject.DomainAliases.Item(i).AliasName, aliasName, True) = 0 Then + objDomain.ComObject.DomainAliases.Delete(i) + Return + End If + Next + End If + End Sub + + Public Sub DeleteGroup(ByVal groupName As String) Implements IMailServer.DeleteGroup + DeleteAccount(groupName) + End Sub + + Public Sub DeleteList(ByVal maillistName As String) Implements IMailServer.DeleteList + Dim objDomain As Service = GetDomainObject(GetDomainName(maillistName)) + + If objDomain.Succeed Then + Dim objMailList = objDomain.ComObject.DistributionLists.ItemByAddress(maillistName) + + If Not objMailList Is Nothing Then + objMailList.Delete() + End If + End If + End Sub + + Public Function DomainAliasExists(ByVal domainName As String, ByVal aliasName As String) As Boolean Implements IMailServer.DomainAliasExists + ' find existing domain + Dim objDomain As Service = GetDomainObject(domainName) + + If objDomain.Succeed Then + ' check aliases + Dim i As Integer + For i = 0 To objDomain.ComObject.DomainAliases.Count - 1 + If String.Compare(objDomain.ComObject.DomainAliases.Item(i).AliasName, aliasName, True) = 0 Then + Return True + End If + Next + End If + + Return False + End Function + + Public Function DomainExists(ByVal domainName As String) As Boolean Implements IMailServer.DomainExists + Dim objDomain As Service = GetDomainObject(domainName) + + Return objDomain.Succeed + End Function + + Public Function GetAccount(ByVal mailboxName As String) As MailAccount Implements IMailServer.GetAccount + ' find existing domain + Dim objDomain As Service = GetDomainObject(GetDomainName(mailboxName)) + + If objDomain.Succeed Then + ' find through all domain accounts + For i As Integer = 0 To objDomain.ComObject.Accounts.Count - 1 + Dim objAccount As Object = objDomain.ComObject.Accounts.Item(i) + + If String.Compare(objAccount.Address, mailboxName, True) = 0 Then + ' check if this is a Group + If CheckAccountIsGroup(objAccount) Then + Continue For + End If + + ' get account details + Dim account As MailAccount = New MailAccount() + account.Name = objAccount.Address + account.FirstName = objAccount.PersonFirstName + account.LastName = objAccount.PersonLastName + account.Enabled = objAccount.Active + account.MaxMailboxSize = objAccount.MaxSize + account.Password = objAccount.Password + account.Size = objAccount.Size() + account.QuotaUsed = objAccount.QuotaUsed() + account.LastLogonTime = CType(objAccount.LastLogonTime(), DateTime) + 'auto-responder + account.ResponderEnabled = objAccount.VacationMessageIsOn + account.ResponderSubject = objAccount.VacationSubject + account.ResponderMessage = objAccount.VacationMessage + account.ResponderExpires = objAccount.VacationMessageExpires + account.ResponderExpirationDate = objAccount.VacationMessageExpiresDate + 'forwarding + account.ForwardingEnabled = objAccount.ForwardEnabled + Dim forwardings As List(Of String) = New List(Of String) + forwardings.Add(objAccount.ForwardAddress) + account.ForwardingAddresses = forwardings.ToArray + account.RetainLocalCopy = objAccount.ForwardKeepOriginal + 'Signature + account.SignatureEnabled = objAccount.SignatureEnabled + account.Signature = objAccount.SignaturePlainText + account.SignatureHTML = objAccount.SignatureHTML + Return account + End If + Next + + ' find through forwardings (hMail aliases) + For i As Integer = 0 To objDomain.ComObject.Aliases.Count - 1 + Dim objAlias As Object = objDomain.ComObject.Aliases.Item(i) + If String.Compare(objAlias.Name, mailboxName, True) = 0 Then + Dim account As MailAccount = New MailAccount() + account.Name = objAlias.Name + account.Enabled = objAlias.Active + account.ForwardingAddresses = New String() {objAlias.Value} + account.DeleteOnForward = True + Return account + End If + Next + End If + + Return Nothing + End Function + + Public Function GetAccounts(ByVal domainName As String) As MailAccount() Implements IMailServer.GetAccounts + Dim accounts As New List(Of MailAccount) + + ' find existing domain + Dim objDomain As Service = GetDomainObject(domainName) + + If objDomain.Succeed Then + ' get all domain accounts + Dim i As Integer + For i = 0 To objDomain.ComObject.Accounts.Count - 1 + Dim objAccount As Object = objDomain.ComObject.Accounts.Item(i) + + If CheckAccountIsGroup(objAccount) Then + Continue For + End If + + ' get account details + Dim account As MailAccount = New MailAccount() + account.Name = objAccount.Address + account.FirstName = objAccount.PersonFirstName + account.LastName = objAccount.PersonLastName + account.Enabled = objAccount.Active + account.MaxMailboxSize = objAccount.MaxSize + account.Password = objAccount.Password + account.Size = objAccount.Size() + account.QuotaUsed = objAccount.QuotaUsed() + account.LastLogonTime = CType(objAccount.LastLogonTime(), DateTime) + 'auto-responder + account.ResponderEnabled = objAccount.VacationMessageIsOn + account.ResponderSubject = objAccount.VacationSubject + account.ResponderMessage = objAccount.VacationMessage + account.ResponderExpires = objAccount.VacationMessageExpires + account.ResponderExpirationDate = objAccount.VacationMessageExpiresDate + 'forwarding + account.ForwardingEnabled = objAccount.ForwardEnabled + Dim forwardings As List(Of String) = New List(Of String) + forwardings.Add(objAccount.ForwardAddress) + account.ForwardingAddresses = forwardings.ToArray + account.RetainLocalCopy = objAccount.ForwardKeepOriginal + 'Signature + account.SignatureEnabled = objAccount.SignatureEnabled + account.Signature = objAccount.SignaturePlainText + account.SignatureHTML = objAccount.SignatureHTML + accounts.Add(account) + Next + End If + + Return accounts.ToArray() + End Function + + Public Overridable Function GetDomains() As String() Implements IMailServer.GetDomains + Dim objDomains As Service = GetDomainsObject() + + If objDomains.Succeed Then + Dim domains As New List(Of String) + + For Index As Integer = 0 To objDomains.ComObject.Count - 1 + domains.Add(objDomains.ComObject.Item(Index).Name) + Next + + Return domains.ToArray() + End If + + Return Nothing + End Function + + Public Function GetDomain(ByVal domainName As String) As MailDomain Implements IMailServer.GetDomain + Dim objDomain As Service = GetDomainObject(domainName) + + If objDomain.Succeed Then + Dim domain As MailDomain = New MailDomain() + domain.Name = objDomain.ComObject.Name + domain.Enabled = objDomain.ComObject.Active + domain.CatchAllAccount = GetMailboxName(objDomain.ComObject.Postmaster) + Return domain + End If + + Return Nothing + End Function + + Public Function GetDomainAliases(ByVal domainName As String) As String() Implements IMailServer.GetDomainAliases + ' find existing domain + Dim objDomain As Service = GetDomainObject(domainName) + Dim aliases As New List(Of String) + + If objDomain.Succeed Then + For i As Integer = 0 To objDomain.ComObject.DomainAliases.Count - 1 + aliases.Add(objDomain.ComObject.DomainAliases.Item(i).AliasName) + Next + End If + + Return aliases.ToArray() + End Function + + Public Function GetGroup(ByVal groupName As String) As MailGroup Implements IMailServer.GetGroup + Dim objDomain As Service = GetDomainObject(GetDomainName(groupName)) + Dim mailGroup As MailGroup = Nothing + + If objDomain.Succeed Then + Dim mailboxCount As Integer = objDomain.ComObject.Accounts.Count - 1 + + For i As Integer = 0 To mailboxCount + Dim objAccount As Object = objDomain.ComObject.Accounts.Item(i) + + If String.Compare(objAccount.Address, groupName, True) = 0 Then + If CheckAccountIsGroup(objAccount) Then + mailGroup = ConvertToMailGroup(objAccount) + Exit For + End If + End If + Next i + End If + + Return mailGroup + End Function + + Public Function GetGroups(ByVal domainName As String) As MailGroup() Implements IMailServer.GetGroups + Dim objDomain As Service = GetDomainObject(domainName) + Dim mailGroups As New List(Of MailGroup) + + If objDomain.Succeed Then + Dim Count As Integer = objDomain.ComObject.Accounts.Count - 1 + For I As Integer = 0 To Count + Dim objAccount As Object = objDomain.ComObject.Accounts.Item(I) + If CheckAccountIsGroup(objAccount) Then + mailGroups.Add(ConvertToMailGroup(objAccount)) + End If + Next I + End If + + Return mailGroups.ToArray() + End Function + + Public Function GetList(ByVal maillistName As String) As MailList Implements IMailServer.GetList + Dim objDomain As Service = GetDomainObject(GetDomainName(maillistName)) + Dim mailList As MailList = Nothing + + If objDomain.Succeed Then + Dim objMailList As Object = objDomain.ComObject.DistributionLists.ItemByAddress(maillistName) + + If Not objMailList Is Nothing Then + mailList = ConvertToMailList(objMailList) + End If + End If + + Return mailList + End Function + + Public Function GetLists(ByVal domainName As String) As MailList() Implements IMailServer.GetLists + Dim objDomain As Service = GetDomainObject(domainName) + + Dim lists As New List(Of MailList) + + If objDomain.Succeed Then + Dim mailListCount As Integer = objDomain.ComObject.DistributionLists.Count - 1 + + For index As Integer = 0 To mailListCount + Dim objMailList As Object = objDomain.ComObject.DistributionLists.Item(index) + lists.Add(ConvertToMailList(objMailList)) + Next index + End If + + Return lists.ToArray() + End Function + + Public Function GroupExists(ByVal groupName As String) As Boolean Implements IMailServer.GroupExists + Dim objDomain As Service = GetDomainObject(GetDomainName(groupName)) + Dim exists As Boolean = False + + If objDomain.Succeed Then + Try + Dim objAccount As Object = objDomain.ComObject.Accounts.ItemByAddress(groupName) + exists = CheckAccountIsGroup(objAccount) + Catch ex As Exception + Log.WriteError("Couldn't find mail group.", ex) + End Try + End If + + Return exists + End Function + + Public Function ListExists(ByVal maillistName As String) As Boolean Implements IMailServer.ListExists + Dim objDomain As Service = GetDomainObject(GetDomainName(maillistName)) + Dim exists As Boolean = False + + If objDomain.Succeed Then + Try + Dim objMailList As Object = objDomain.ComObject.DistributionLists.ItemByAddress(maillistName) + exists = True + Catch ex As Exception + Log.WriteError("Couldn't find mail list.", ex) + End Try + End If + + Return exists + End Function + + Public Sub UpdateAccount(ByVal mailbox As MailAccount) Implements IMailServer.UpdateAccount + Dim objDomain As Service = GetDomainObject(GetDomainName(mailbox.Name)) + + If objDomain.Succeed Then + Try + ' update account + Dim objAccount As Object = objDomain.ComObject.Accounts.ItemByAddress(mailbox.Name) + objAccount.Active = mailbox.Enabled + objAccount.Password = mailbox.Password + objAccount.MaxSize = mailbox.MaxMailboxSize + 'Auto-Responder + objAccount.VacationMessageIsOn = mailbox.ResponderEnabled + objAccount.VacationSubject = mailbox.ResponderSubject + objAccount.VacationMessage = mailbox.ResponderMessage + objAccount.VacationMessageExpires = False + If mailbox.ResponderExpires Then + If IsDate(mailbox.ResponderExpirationDate) Then + objAccount.VacationMessageExpires = True + objAccount.VacationMessageExpiresDate = mailbox.ResponderExpirationDate.Substring(0, 10) + End If + End If + 'Personal Information + objAccount.PersonFirstName = mailbox.FirstName + objAccount.PersonLastName = mailbox.LastName + 'Signature + objAccount.SignatureEnabled = mailbox.SignatureEnabled + objAccount.SignaturePlainText = mailbox.Signature + objAccount.SignatureHTML = mailbox.SignatureHTML + 'Forwarding + If mailbox.ForwardingEnabled Then + If mailbox.ForwardingAddresses.Length > 0 Then + objAccount.ForwardAddress = mailbox.ForwardingAddresses(0) + objAccount.ForwardKeepOriginal = mailbox.RetainLocalCopy + objAccount.ForwardEnabled = True + End If + Else + objAccount.ForwardEnabled = False + End If + objAccount.Save() + + ' set account rules + SetAccountRules(mailbox, objAccount) + + Catch ex As Exception + Log.WriteError("Couldn't update an account.", ex) + End Try + End If + End Sub + + Public Sub UpdateDomain(ByVal domain As MailDomain) Implements IMailServer.UpdateDomain + ' find existing domain + Dim objDomain As Service = GetDomainObject(domain.Name) + + If objDomain.Succeed Then + ' update domain + objDomain.ComObject.Name = domain.Name + objDomain.ComObject.Active = domain.Enabled + objDomain.ComObject.Postmaster = String.Concat(domain.CatchAllAccount, "@", domain.Name) + objDomain.ComObject.Save() + End If + End Sub + + Public Sub UpdateGroup(ByVal group As MailGroup) Implements IMailServer.UpdateGroup + Dim objDomain As Service = GetDomainObject(GetDomainName(group.Name)) + + If objDomain.Succeed Then + Try + Dim objGroup As Object = objDomain.ComObject.Accounts.ItemByAddress(group.Name) + If CheckAccountIsGroup(objGroup) Then + objGroup.Active = group.Enabled + + ' group should be empty + 'objGroup.MaxSize = group.DiskSpace + objGroup.VacationMessageIsOn = False + objGroup.VacationSubject = String.Empty + objGroup.VacationMessage = String.Empty + objGroup.Save() + + Dim groupRuleExists As Boolean = False + Dim objRule As Object = Nothing + + For i As Integer = 0 To objGroup.Rules.Count - 1 + objRule = objGroup.Rules.Item(i) + If String.Compare(objRule.Name, MAIL_GROUP_RULE, True) = 0 Then + groupRuleExists = True + Exit For + End If + Next i + + If Not groupRuleExists Then + ' Create mail group rule + objRule = objGroup.Rules.Add() + objRule.AccountID = objGroup.ID + objRule.Active = True + objRule.Name = MAIL_GROUP_RULE + objRule.Save() + End If + + Dim criteriaExists As Boolean = False + Dim objCriteria As Object + ' Check for the criteria + For i As Integer = 0 To objRule.Criterias.Count - 1 + objCriteria = objRule.Criterias.Item(i) + + If objCriteria.PredefinedField = 6 And objCriteria.MatchType = 4 And objCriteria.MatchValue = "0" Then + criteriaExists = True + Exit For + End If + Next i + + If Not criteriaExists Then + ' Add criteria + objCriteria = objRule.Criterias.Add() + objCriteria.RuleID = objRule.ID + objCriteria.PredefinedField = 6 ' hMailServer.eRulePredefinedField.eFTMessageSize + objCriteria.MatchType = 4 ' hMailServer.eRuleMatchType.eMTGreaterThan + objCriteria.MatchValue = "0" + objCriteria.Save() + End If + + ' cleanup previous rule actions + Do + objRule.Actions.Delete(0) + Loop While objRule.Actions.Count > 0 + + + ' create group members + If Not group.Members Is Nothing Then + For Each member As String In group.Members + Dim objGroupMemberAction As Object = objRule.Actions.Add() + objGroupMemberAction.RuleID = objRule.ID + objGroupMemberAction.Type = 2 'eRAForwardEmail + objGroupMemberAction.To = member + objGroupMemberAction.Save() + Next member + End If + + ' Add delete mail action + Dim objGroupAction As Object = objRule.Actions.Add() + objGroupAction.RuleID = objRule.ID + objGroupAction.Type = 1 'eRADeleteEmail + objGroupAction.Save() + End If + Catch ex As Exception + Log.WriteError("Couldn't update specified mail group.", ex) + End Try + End If + End Sub + + Public Sub UpdateList(ByVal maillist As MailList) Implements IMailServer.UpdateList + Dim objDomain As Service = GetDomainObject(GetDomainName(maillist.Name)) + + If objDomain.Succeed Then + Try + Dim objMailList As Object = objDomain.ComObject.DistributionLists.ItemByAddress(maillist.Name) + objMailList.Active = maillist.Enabled + + objMailList.RequireSMTPAuth = maillist.RequireSmtpAuthentication + + Select Case maillist.PostingMode + Case PostingMode.MembersCanPost + objMailList.Mode = 1 + Case PostingMode.ModeratorCanPost + If String.IsNullOrEmpty(maillist.ModeratorAddress) Then + Throw New Exception("List moderator address doesn't specified.") + End If + objMailList.RequireSenderAddress = maillist.ModeratorAddress + objMailList.Mode = 2 + Case PostingMode.AnyoneCanPost + objMailList.Mode = 3 + End Select + + objMailList.Save() + + Dim count As Integer = objMailList.Recipients.Count + + ' cleanup list members + ' check if list has members to avoid Invalid Index exception + If objMailList.Recipients.Count > 0 Then + For i As Integer = 0 To objMailList.Recipients.Count - 1 + Dim objRecipient As Object = objMailList.Recipients.Item(0) + objRecipient.Delete() + Next i + End If + + + ' save list members + If Not maillist.Members Is Nothing Then + For Each member As String In maillist.Members + Dim objRecipient As Object = objMailList.Recipients.Add() + objRecipient.RecipientAddress = member + objRecipient.Save() + Next member + End If + + Catch ex As Exception + Log.WriteError("Couldn't update a mail list.", ex) + End Try + End If + End Sub +#End Region + +#Region "HostingServiceProviderBase" + + Public Overrides Sub ChangeServiceItemsState(ByVal items() As ServiceProviderItem, ByVal enabled As Boolean) + For Each item As ServiceProviderItem In items + If TypeOf item Is MailDomain Then + Try + Dim domain As MailDomain = GetDomain(item.Name) + domain.Enabled = enabled + UpdateDomain(domain) + Catch ex As Exception + Log.WriteError(String.Format("Error switching '{0}' mail domain", item.Name), ex) + End Try + End If + Next + End Sub + + Public Overrides Sub DeleteServiceItems(ByVal items() As ServiceProviderItem) + For Each item As ServiceProviderItem In items + If TypeOf item Is MailDomain Then + Try + DeleteDomain(item.Name) + Catch ex As Exception + Log.WriteError(String.Format("Error deleting '{0}' mail domain", item.Name), ex) + End Try + End If + Next + End Sub + + Public Overrides Function GetServiceItemsDiskSpace(ByVal items() As ServiceProviderItem) As ServiceProviderItemDiskSpace() + Dim itemsDiskspace As List(Of ServiceProviderItemDiskSpace) = New List(Of ServiceProviderItemDiskSpace) + Dim item As ServiceProviderItem + For Each item In items + If TypeOf item Is MailAccount Then + Try + Dim objDomain As Service = GetDomainObject(GetDomainName(item.Name)) + Dim objAccount = objDomain.ComObject.Accounts.ItemByAddress(item.Name) + Dim objAccountSize As Long = objAccount.Size() * 1048576 + Dim diskspace As New ServiceProviderItemDiskSpace() + diskspace.ItemId = item.Id + diskspace.DiskSpace = objAccountSize + itemsDiskspace.Add(diskspace) + Catch ex As Exception + Log.WriteError("Error calculating disk space for mail account: " + item.Name, ex) + End Try + End If + Next item + Return itemsDiskspace.ToArray() + End Function + + Public Overrides Function GetServiceItemsBandwidth(ByVal items() As ServiceProviderItem, ByVal since As Date) As ServiceProviderItemBandwidth() + Dim itemsBandwidth(items.Length) As ServiceProviderItemBandwidth + Dim objSets As Service = GetSettingsObject() + If objSets.ComObject.Logging.AWStatsEnabled Then + Dim logsPath As String = objSets.ComObject.Logging.CurrentAwstatsLog() + + For i As Integer = 0 To items.Length - 1 + Dim item As ServiceProviderItem = items(i) + + itemsBandwidth(i) = New ServiceProviderItemBandwidth() + itemsBandwidth(i).ItemId = item.Id + itemsBandwidth(i).Days = New DailyStatistics(0) {} + + If TypeOf item Is MailDomain Then + Try + itemsBandwidth(i).Days = GetDailyStatistics(since, item.Name, logsPath) + Catch ex As Exception + Log.WriteError("Error calculating bandwidth for mail domain: " + item.Name, ex) + End Try + End If + Next i + End If + Return itemsBandwidth + End Function +#End Region + Public Overrides Function IsInstalled() As Boolean Dim displayName As String = "" Dim version As String = "" @@ -93,5 +1354,4 @@ Public Class hMailServer5 End If End Function - -End Class +End Class \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMailServer/hMailServer.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMailServer/hMailServer.vb index fb0a85fc..18cf3150 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMailServer/hMailServer.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMailServer/hMailServer.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMailServer43/hMailServer43.vb b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMailServer43/hMailServer43.vb index f805a921..41adf5f7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMailServer43/hMailServer43.vb +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.hMailServer43/hMailServer43.vb @@ -1,4 +1,4 @@ -' Copyright (c) 2011, Outercurve Foundation. +' Copyright (c) 2012, Outercurve Foundation. ' All rights reserved. ' ' Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.OS.Windows2003/Windows2003.cs b/WebsitePanel/Sources/WebsitePanel.Providers.OS.Windows2003/Windows2003.cs index 2b943866..f251bd66 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.OS.Windows2003/Windows2003.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.OS.Windows2003/Windows2003.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.OS.Windows2008/Windows2008.cs b/WebsitePanel/Sources/WebsitePanel.Providers.OS.Windows2008/Windows2008.cs index ca3bade0..ece1d802 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.OS.Windows2008/Windows2008.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.OS.Windows2008/Windows2008.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.SharePoint.Sps20/Sps20.cs b/WebsitePanel/Sources/WebsitePanel.Providers.SharePoint.Sps20/Sps20.cs index 580796fc..0c9487d4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.SharePoint.Sps20/Sps20.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.SharePoint.Sps20/Sps20.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.SharePoint.Sps30/Sps30.cs b/WebsitePanel/Sources/WebsitePanel.Providers.SharePoint.Sps30/Sps30.cs index 7ef87072..a2f89516 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.SharePoint.Sps30/Sps30.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.SharePoint.Sps30/Sps30.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.SharePoint.Sps30/Sps30Remote.cs b/WebsitePanel/Sources/WebsitePanel.Providers.SharePoint.Sps30/Sps30Remote.cs index b34b59b7..595f4d30 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.SharePoint.Sps30/Sps30Remote.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.SharePoint.Sps30/Sps30Remote.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.AWStats/AWStats.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.AWStats/AWStats.cs index a923092d..94d86761 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.AWStats/AWStats.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.AWStats/AWStats.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -343,7 +343,7 @@ namespace WebsitePanel.Providers.Statistics string[] split = versionNumber.Split(new char[] { '.' }); - return split[0].Equals("6"); + return split[0].Equals("6") || split[0].Equals("7"); } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStats.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStats.cs index 8869e015..ab13bf65 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStats.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStats.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStats4.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStats4.cs index 96faf4c9..a9df7910 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStats4.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStats4.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStats5.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStats5.cs index 34edff4d..99ed9eba 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStats5.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStats5.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStatsProxies.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStatsProxies.cs index 674fc21b..70d49016 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStatsProxies.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Statistics.SmarterStats/SmarterStatsProxies.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV/HyperV.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV/HyperV.cs index 7ac474f5..a2458255 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV/HyperV.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV/HyperV.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV/Wmi.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV/Wmi.cs index bdb44a7d..fa14e05e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV/Wmi.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV/Wmi.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperVForPC/HyperVForPC.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperVForPC/HyperVForPC.cs index e901dbd9..c63b9d4c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperVForPC/HyperVForPC.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperVForPC/HyperVForPC.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/AnonymAuthModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/AnonymAuthModuleService.cs index 36083d3b..ebdffa5c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/AnonymAuthModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/AnonymAuthModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/AuthenticationGlobals.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/AuthenticationGlobals.cs index b4162e21..c34c2802 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/AuthenticationGlobals.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/AuthenticationGlobals.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/BasicAuthModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/BasicAuthModuleService.cs index ac0c2fa6..38f08a78 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/BasicAuthModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/BasicAuthModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/WindowsAuthenticationModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/WindowsAuthenticationModuleService.cs index 4e38e096..e4a3494d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/WindowsAuthenticationModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Authentication/WindowsAuthenticationModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/ClassicAsp/ClassicAspGlobals.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/ClassicAsp/ClassicAspGlobals.cs index a2012b53..bdf16fa8 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/ClassicAsp/ClassicAspGlobals.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/ClassicAsp/ClassicAspGlobals.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/ClassicAsp/ClassicAspModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/ClassicAsp/ClassicAspModuleService.cs index 81429281..b562ce22 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/ClassicAsp/ClassicAspModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/ClassicAsp/ClassicAspModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/ConfigurationModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/ConfigurationModuleService.cs index a087b946..6a86b105 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/ConfigurationModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/ConfigurationModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/FastCgiApplication.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/FastCgiApplication.cs index c4c2f6c2..c0a919d0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/FastCgiApplication.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/FastCgiApplication.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/FastCgiApplicationCollection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/FastCgiApplicationCollection.cs index 5336da9e..d9b62444 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/FastCgiApplicationCollection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/FastCgiApplicationCollection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/FastCgiSection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/FastCgiSection.cs index e8ece9f0..23503e72 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/FastCgiSection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/FastCgiSection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/HttpErrorResponseMode.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/HttpErrorResponseMode.cs index c55bc7ba..a8378c19 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/HttpErrorResponseMode.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/HttpErrorResponseMode.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/IsapiCgiRestrictionCollection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/IsapiCgiRestrictionCollection.cs index 28e3872e..27554857 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/IsapiCgiRestrictionCollection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/IsapiCgiRestrictionCollection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/IsapiCgiRestrictionElement.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/IsapiCgiRestrictionElement.cs index 41e973cf..618a6c1f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/IsapiCgiRestrictionElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/IsapiCgiRestrictionElement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/IsapiCgiRestrictionSection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/IsapiCgiRestrictionSection.cs index d24f9552..c0770227 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/IsapiCgiRestrictionSection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Common/IsapiCgiRestrictionSection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DefaultDocuments/DefaultDocumentModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DefaultDocuments/DefaultDocumentModuleService.cs index afba44a2..b0a2f3f4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DefaultDocuments/DefaultDocumentModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DefaultDocuments/DefaultDocumentModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseGlobals.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseGlobals.cs index a99c38db..f2521466 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseGlobals.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseGlobals.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseModuleService.cs index ab69354f..417afe4a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseSection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseSection.cs index d86a638f..59872767 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseSection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseSection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseShowFlags.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseShowFlags.cs index 25d32fd2..09eb75ea 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseShowFlags.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/DirectoryBrowse/DirectoryBrowseShowFlags.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Extensions/ExtensionsModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Extensions/ExtensionsModuleService.cs index ab42e310..f7cc721e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Extensions/ExtensionsModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Extensions/ExtensionsModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerAccessPolicy.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerAccessPolicy.cs index b27cec14..b5eccd2f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerAccessPolicy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerAccessPolicy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerAction.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerAction.cs index 0d3c0a9b..cc41e148 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerAction.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerAction.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerActionCollection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerActionCollection.cs index 02ae0248..546a7d84 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerActionCollection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerActionCollection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerRequiredAccess.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerRequiredAccess.cs index 39f7b5de..a8784c4d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerRequiredAccess.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlerRequiredAccess.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlersModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlersModuleService.cs index 86dd2b1c..85abd7db 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlersModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlersModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlersSection.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlersSection.cs index 5dc3a4b4..7fb6f5a0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlersSection.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/HandlersSection.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/ResourceType.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/ResourceType.cs index 590c3101..624d0854 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/ResourceType.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Handlers/ResourceType.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/HttpRedirect/HttpRedirectModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/HttpRedirect/HttpRedirectModuleService.cs index 973c44b6..6fa5f7fe 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/HttpRedirect/HttpRedirectModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/HttpRedirect/HttpRedirectModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs index 807c2e1e..b8a89893 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -59,6 +59,7 @@ using WebsitePanel.Providers.Web.WebObjects; using WebsitePanel.Providers.Web.Iis.Common; using WebsitePanel.Providers.Web.Iis; using Ionic.Zip; +using WebsitePanel.Providers.WebAppGallery; using WebsitePanel.Server.Utils; using WebsitePanel.Providers.Web.Delegation; @@ -325,6 +326,7 @@ namespace WebsitePanel.Providers.Web public class WebManagementServiceSettings { public string Port { get; set; } + public string NETBIOS { get; set; } public string ServiceUrl { get; set; } public int RequiresWindowsCredentials { get; set; } } @@ -3175,7 +3177,7 @@ namespace WebsitePanel.Providers.Web public const string WDeployAppPoolConfigEditor = "WDeployAppPoolConfigEditor"; - private void SetupWebDeployPublishingOnServer(List messages) + private void SetupWebDeployPublishingOnServer(List messages) { if (IsWebDeployInstalled() == false || String.IsNullOrEmpty(ProviderSettings[WDeployEnabled])) @@ -3500,7 +3502,7 @@ namespace WebsitePanel.Providers.Web bool adEnabled = ServerSettings.ADEnabled; // !!! Bypass AD for WMSVC as it requires full-qualified username to authenticate user // against the web server - ServerSettings.ADEnabled = false; + //ServerSettings.ADEnabled = false; if (IdentityCredentialsMode == "IISMNGR") { @@ -3521,7 +3523,7 @@ namespace WebsitePanel.Providers.Web bool adEnabled = ServerSettings.ADEnabled; // !!! Bypass AD for WMSVC as it requires full-qualified username to authenticate user // against the web server - ServerSettings.ADEnabled = false; + //ServerSettings.ADEnabled = false; // ResultObject result = new ResultObject { IsSuccess = true }; @@ -3556,7 +3558,7 @@ namespace WebsitePanel.Providers.Web bool adEnabled = ServerSettings.ADEnabled; // !!! Bypass AD for WMSVC as it requires full-qualified username to authenticate user // against the web server - ServerSettings.ADEnabled = false; + //ServerSettings.ADEnabled = false; // string fqWebPath = String.Format("/{0}", siteName); @@ -3565,6 +3567,32 @@ namespace WebsitePanel.Providers.Web Log.WriteInfo("Site Name: {0}; Account Name: {1}; Account Password: {2}; FqWebPath: {3};", siteName, accountName, accountPassword, fqWebPath); + + string contentPath = string.Empty; + using (ServerManager srvman = webObjectsSvc.GetServerManager()) + { + WebSite site = webObjectsSvc.GetWebSiteFromIIS(srvman, siteName); + // + contentPath = webObjectsSvc.GetPhysicalPath(srvman, site); + // + Log.WriteInfo("Site Content Path: {0};", contentPath); + } + + string FTPRoot = string.Empty; + string FTPDir = string.Empty; + + + if (contentPath.IndexOf("\\\\") != -1) + { + string[] Tmp = contentPath.Split('\\'); + FTPRoot = "\\\\" + Tmp[2] + "\\" + Tmp[3]; + FTPDir = contentPath.Replace(FTPRoot, ""); + } + + // + string accountNameSid = string.Empty; + + // if (IdentityCredentialsMode == "IISMNGR") { @@ -3583,40 +3611,33 @@ namespace WebsitePanel.Providers.Web PasswordNeverExpires = true, AccountDisabled = false, Password = accountPassword, - System = true + System = true, + MsIIS_FTPDir = FTPDir, + MsIIS_FTPRoot = FTPRoot }, ServerSettings, - String.Empty, - String.Empty); + UsersOU, + GroupsOU); // Convert account name to the full-qualified one - accountName = GetFullQualifiedAccountName(accountName); + accountName = GetFullQualifiedAccountName(accountName); + accountNameSid = GetFullQualifiedAccountNameSid(accountName); // Log.WriteInfo("FQ Account Name: {0};", accountName); } - using (ServerManager srvman = webObjectsSvc.GetServerManager()) + + ManagementAuthorization.Grant(accountName, fqWebPath, false); + // + + if (IdentityCredentialsMode == "IISMNGR") { - // - ManagementAuthorization.Grant(accountName, fqWebPath, false); - // - WebSite site = webObjectsSvc.GetWebSiteFromIIS(srvman, siteName); - // - string contentPath = webObjectsSvc.GetPhysicalPath(srvman, site); - // - Log.WriteInfo("Site Content Path: {0};", contentPath); - // - if (IdentityCredentialsMode == "IISMNGR") - { - SecurityUtils.GrantNtfsPermissionsBySid(contentPath, SystemSID.LOCAL_SERVICE, permissions, true, true); - } - else - { - SecurityUtils.GrantNtfsPermissions(contentPath, accountName, permissions, true, true, ServerSettings, String.Empty, String.Empty); - } - // Restore setting back - ServerSettings.ADEnabled = adEnabled; + SecurityUtils.GrantNtfsPermissionsBySid(contentPath, SystemSID.LOCAL_SERVICE, permissions, true, true); } - } + else + { + SecurityUtils.GrantNtfsPermissions(contentPath, accountNameSid, NTFSPermission.Modify, true, true, ServerSettings, UsersOU, GroupsOU); + } + } public override void ChangeWebManagementAccessPassword(string accountName, string accountPassword) @@ -3625,7 +3646,7 @@ namespace WebsitePanel.Providers.Web bool adEnabled = ServerSettings.ADEnabled; // !!! Bypass AD for WMSVC as it requires full-qualified username to authenticate user // against the web server - ServerSettings.ADEnabled = false; + //ServerSettings.ADEnabled = false; // Trace input parameters Log.WriteInfo("Account Name: {0}; Account Password: {1};", accountName, accountPassword); @@ -3653,7 +3674,7 @@ namespace WebsitePanel.Providers.Web bool adEnabled = ServerSettings.ADEnabled; // !!! Bypass AD for WMSVC as it requires full-qualified username to authenticate user // against the web server - ServerSettings.ADEnabled = false; + //ServerSettings.ADEnabled = false; // string fqWebPath = String.Format("/{0}", siteName); // Trace input parameters @@ -3677,9 +3698,18 @@ namespace WebsitePanel.Providers.Web } else { - ManagementAuthorization.Revoke(GetFullQualifiedAccountName(accountName), fqWebPath); - SecurityUtils.RemoveNtfsPermissions(contentPath, accountName, ServerSettings, String.Empty, String.Empty); - SecurityUtils.DeleteUser(accountName, ServerSettings, String.Empty); + if (adEnabled) + { + ManagementAuthorization.Revoke(GetFullQualifiedAccountName(accountName), fqWebPath); + SecurityUtils.RemoveNtfsPermissions(contentPath, accountName, ServerSettings, UsersOU, GroupsOU); + SecurityUtils.DeleteUser(accountName, ServerSettings, UsersOU); + } + else + { + ManagementAuthorization.Revoke(GetFullQualifiedAccountName(accountName), fqWebPath); + SecurityUtils.RemoveNtfsPermissions(contentPath, accountName, ServerSettings, String.Empty, String.Empty); + SecurityUtils.DeleteUser(accountName, ServerSettings, String.Empty); + } } // Restore setting back ServerSettings.ADEnabled = adEnabled; @@ -3749,10 +3779,14 @@ namespace WebsitePanel.Providers.Web // Retrieve account name if (scopeCollection.Count > 0) { - iisObject.SetValue( + /* + iisObject.SetValue( WebSite.WmSvcAccountName, GetNonQualifiedAccountName((String)scopeCollection[0]["name"])); - // + */ + iisObject.SetValue( + WebSite.WmSvcAccountName, (String)scopeCollection[0]["name"]); + // iisObject.SetValue( WebSite.WmSvcServiceUrl, ProviderSettings["WmSvc.ServiceUrl"]); // @@ -3906,6 +3940,31 @@ namespace WebsitePanel.Providers.Web return domainName != null ? domainName + "\\" + accountName : accountName; } + + protected string GetFullQualifiedAccountNameSid(string accountName) + { + // + if (!ServerSettings.ADEnabled) + return String.Format(@"{0}\{1}", Environment.MachineName, accountName); + + if (accountName.IndexOf("\\") != -1) + return accountName; // already has domain information + + // DO IT FOR ACTIVE DIRECTORY MODE ONLY + string domainName = null; + try + { + DirectoryContext objContext = new DirectoryContext(DirectoryContextType.Domain, ServerSettings.ADRootDomain); + Domain objDomain = Domain.GetDomain(objContext); + domainName = objDomain.Name; + } + catch (Exception ex) + { + Log.WriteError("Get domain name error", ex); + } + + return domainName != null ? domainName + "\\" + accountName : accountName; + } #endregion #region SSL @@ -3968,5 +4027,11 @@ namespace WebsitePanel.Providers.Web return sslObjectService.CheckCertificate(webSite); } #endregion + + #region Web Platform Installer Application Gallery + + // moved down to IIs60 + + #endregion } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/MimeTypes/MimeTypesModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/MimeTypes/MimeTypesModuleService.cs index a9496bd8..25cdd5e5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/MimeTypes/MimeTypesModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/MimeTypes/MimeTypesModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/SSL/SSLModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/SSL/SSLModuleService.cs index e38a34d7..9ba9604a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/SSL/SSLModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/SSL/SSLModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Utility/ConfigurationUtility.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Utility/ConfigurationUtility.cs index 7165d75e..bf258d30 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Utility/ConfigurationUtility.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/Utility/ConfigurationUtility.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/CustomHttpErrorsModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/CustomHttpErrorsModuleService.cs index 7cac48ad..de3a4c32 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/CustomHttpErrorsModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/CustomHttpErrorsModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/CustomHttpHeadersModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/CustomHttpHeadersModuleService.cs index e08132d1..faecef93 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/CustomHttpHeadersModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/CustomHttpHeadersModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/WebObjectsModuleService.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/WebObjectsModuleService.cs index 9919e630..3a8cae98 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/WebObjectsModuleService.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebObjects/WebObjectsModuleService.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebsitePanel.Providers.Web.IIs70.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebsitePanel.Providers.Web.IIs70.csproj index a99e0d31..370f612d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebsitePanel.Providers.Web.IIs70.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/WebsitePanel.Providers.Web.IIs70.csproj @@ -59,6 +59,7 @@ False ..\..\Lib\Ionic.Zip.Reduced.dll + False ..\..\Lib\References\Microsoft\Microsoft.Web.Administration.dll @@ -67,6 +68,10 @@ False ..\..\Lib\References\Microsoft\Microsoft.Web.Management.dll + + False + ..\..\Lib\Microsoft.Web.PlatformInstaller.dll + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/IIs60.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/IIs60.cs index 0862cd2d..461a5344 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/IIs60.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/IIs60.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -43,6 +43,7 @@ using System.IO; using Microsoft.Win32; using Microsoft.Web.Deployment; using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Providers.Web.WPIWebApplicationGallery; using WebsitePanel.Server.Utils; using WebsitePanel.Providers.OS; using WebsitePanel.Providers.Utils; @@ -283,7 +284,7 @@ namespace WebsitePanel.Providers.Web get { string ret = ProviderSettings["GalleryXmlFeedUrl"]; - if (string.IsNullOrEmpty(ret)) + if (String.IsNullOrEmpty(ret)) ret = WebApplicationGallery.WAG_DEFAULT_FEED_URL; return ret; } @@ -3386,246 +3387,209 @@ namespace WebsitePanel.Providers.Web return IsIISInstalled(); } - #region Microsoft Web Application Gallery + + #region Microsoft Web Application Gallery - public GalleryCategoriesResult GetGalleryCategories() - { - GalleryCategoriesResult result = new GalleryCategoriesResult(); + private const string MS_DEPLOY_ASSEMBLY_NAME = "Microsoft.Web.Deployment"; + private const string WPI_INSTANCE_VIEWER = "viewer"; + private const string WPI_INSTANCE_INSTALLER = "installer"; - try - { - WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl); - // - result.Value = module.GetCategories(); - result.IsSuccess = true; - } - catch (Exception ex) - { - result.IsSuccess = false; - result.AddError(GalleryErrors.ProcessingFeedXMLError, ex); - } - // - return result; - } + public void InitFeeds(int UserId, string[] feeds) + { + //need to call InitFeeds() before any operation with WPIApplicationGallery() + WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER); + module.InitFeeds(UserId, feeds); + } - public GalleryApplicationsResult GetGalleryApplications(string categoryId) - { - GalleryApplicationsResult result = new GalleryApplicationsResult(); + public void SetResourceLanguage(int UserId, string resourceLanguage) + { + WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER); + module.SetResourceLanguage(UserId, resourceLanguage); + } - try - { - WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl); - // - result.Value = module.GetApplications(categoryId); - result.IsSuccess = true; - } - catch (Exception ex) - { - result.IsSuccess = false; - result.AddError(GalleryErrors.ProcessingFeedXMLError, ex); - } - // - return result; - } + public bool IsMsDeployInstalled() + { + // project has reference to Microsoft.Web.Deployment, so + return true; + /* + try + { + Assembly.Load(MS_DEPLOY_ASSEMBLY_NAME); + return true; + } + catch + { + // type could not be instantiated + return false; + } + */ + } - public GalleryApplicationResult GetGalleryApplication(string id) - { - GalleryApplicationResult result = new GalleryApplicationResult(); - // - try - { - WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl); - // - result.Value = module.GetApplicationByProductId(id); - result.IsSuccess = true; - } - catch (Exception ex) - { - result.IsSuccess = false; - result.AddError(GalleryErrors.ProcessingFeedXMLError, ex); - } - // - return result; - } + public GalleryLanguagesResult GetGalleryLanguages(int UserId) + { + GalleryLanguagesResult result = new GalleryLanguagesResult(); + WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER); + try + { + result.Value = module.GetLanguages(UserId); + result.IsSuccess = true; + } + catch (Exception ex) + { + result.IsSuccess = false; + result.AddError(GalleryErrors.GetLanguagesError, ex); + } - public GalleryWebAppStatus GetGalleryApplicationStatus(string id) - { - GalleryWebAppStatus status = GalleryWebAppStatus.NotDownloaded; - // - try - { - WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl); - // - GalleryApplication appObject = module.GetApplicationByProductId(id); - // - if (appObject == null) - return GalleryWebAppStatus.Failed; - // - string appPackageDistr = module.GetApplicationPackagePath(appObject); - // Check whether distributive exists locally - if (!File.Exists(appPackageDistr)) - return GalleryWebAppStatus.NotDownloaded; - // Check whether distributive is in download queue - if (AppPackagesDownloader.IsApplicationInDownloadQueue(id)) - return GalleryWebAppStatus.Downloading; - // From this point distibutive is considered as existed locally and it's not in download queue, - // so lets ensure the downloaded file either is not corrupted during the download process - #region Atom Feed Version 0.2 - if (appObject.InstallerItems.Count > 0) - { - string md5CheckSum = appObject.InstallerItems[0].InstallerFile.MD5; - // Check MD5 check sum of the distributive - if (AppPackagesDownloader.CheckApplicationPackageHashSum_MD5(appPackageDistr, md5CheckSum)) - status = GalleryWebAppStatus.Downloaded; - } - #endregion + return result; + } - #region Atom Feed Version 2.0.1.0 - else if (appObject.Installers.Count > 0) - { - string sha1CheckSum = appObject.Installers[0].InstallerFile.SHA1; - // Check SHA1 check sum of the distributive - if (AppPackagesDownloader.CheckApplicationPackageHashSum_SHA1(appPackageDistr, sha1CheckSum)) - status = GalleryWebAppStatus.Downloaded; - } - #endregion - // If MD5 check sum is failed then we have to resume distibutive download - else - status = GalleryWebAppStatus.NotDownloaded; - } - catch (Exception ex) - { - Log.WriteError(ex); - // - return GalleryWebAppStatus.Failed; - } - // - return status; - } + public GalleryCategoriesResult GetGalleryCategories(int UserId) + { + GalleryCategoriesResult result = new GalleryCategoriesResult(); - public GalleryWebAppStatus DownloadGalleryApplication(string id) - { - WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl); - // - GalleryApplication appObject = module.GetApplicationByProductId(id); - if (appObject == null) - return GalleryWebAppStatus.Failed; - // - string localAppDistr = module.GetApplicationPackagePath(appObject); - // - InstallerFile installerFile = null; + //try + //{ + WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER); + // + result.Value = module.GetCategories(UserId); + result.IsSuccess = true; + //} + //catch (Exception ex) + //{ + // result.IsSuccess = false; + // result.AddError(GalleryErrors.ProcessingFeedXMLError, ex); + //} + //// + return result; + } - #region Atom Feed Version 0.2 - // - if (appObject.InstallerItems.Count > 0) - { - InstallerItem installerItem_0 = appObject.InstallerItems[0]; - // - if (installerItem_0 == null) - { - Log.WriteWarning(WEB_PI_APP_PACK_ROOT_INSTALLER_ITEM_MISSING, appObject.Title); - return GalleryWebAppStatus.Failed; - } - // - installerFile = installerItem_0.InstallerFile; - } - #endregion + public GalleryApplicationsResult GetGalleryApplications(int UserId, string categoryId) + { + GalleryApplicationsResult result = new GalleryApplicationsResult(); - #region Atom Feed Version 2.0.1.0 - // - if (appObject.Installers.Count > 0) - { - Installer installerItem_0 = appObject.Installers[0]; - // - if (installerItem_0 == null) - { - Log.WriteWarning(WEB_PI_APP_PACK_ROOT_INSTALLER_ITEM_MISSING, appObject.Title); - return GalleryWebAppStatus.Failed; - } - // - installerFile = installerItem_0.InstallerFile; - } - #endregion + try + { + WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER); + // + result.Value = module.GetApplications(UserId, categoryId); + result.IsSuccess = true; + } + catch (Exception ex) + { + result.IsSuccess = false; + result.AddError(GalleryErrors.ProcessingFeedXMLError, ex); + } + // + return result; + } - // - if (installerFile == null || String.IsNullOrEmpty(installerFile.InstallerUrl)) - { - Log.WriteWarning(WEB_PI_APP_PACK_DISPLAY_URL_MISSING, appObject.Title); - return GalleryWebAppStatus.Failed; - } + public GalleryApplicationsResult GetGalleryApplicationsFiltered(int UserId, string pattern) + { + GalleryApplicationsResult result = new GalleryApplicationsResult(); - // - try - { - string appCacheRoot = Path.GetDirectoryName(localAppDistr); - // - if (!Directory.Exists(appCacheRoot)) - Directory.CreateDirectory(appCacheRoot); - // - Log.WriteInfo("Local distributive path: {0}", localAppDistr); - AppPackagesDownloader.StartApplicationDownload(id, installerFile.InstallerUrl, localAppDistr); - } - catch (Exception ex) - { - Log.WriteError(ex); - // - return GalleryWebAppStatus.Failed; - } - // - return GalleryWebAppStatus.Downloading; - } + try + { + WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER); - public bool IsMsDeployInstalled() - { - WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl); - // - return module.IsMsDeployInstalled(); - } + result.Value = module.GetGalleryApplicationsFiltered(UserId, pattern); + result.IsSuccess = true; + } + catch (Exception ex) + { + result.IsSuccess = false; + result.AddError(ex.Message, ex); + } - public DeploymentParametersResult GetGalleryApplicationParameters(string id) - { - DeploymentParametersResult result = new DeploymentParametersResult(); - try - { - WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl); - // - result.Value = module.GetApplicationParameters(id); - result.IsSuccess = true; - } - catch (Exception ex) - { - result.IsSuccess = false; - result.AddError(GalleryErrors.ProcessingPackageError, ex); - } - // - return result; - } + return result; + } - public StringResultObject InstallGalleryApplication(string webAppId, List updatedValues) - { - StringResultObject result = new StringResultObject(); - try - { - WebApplicationGallery module = new WebApplicationGallery(GalleryXmlFeedUrl); - // - string applicationPath = module.InstallApplication(webAppId, updatedValues); - // - if (!String.IsNullOrEmpty(applicationPath)) - { - result.Value = applicationPath; - result.IsSuccess = true; - } - } - catch (Exception ex) - { - result.IsSuccess = false; - result.AddError(GalleryErrors.PackageInstallationError, ex); - } - // - return result; - } + public GalleryApplicationResult GetGalleryApplication(int UserId, string id) + { + GalleryApplicationResult result = new GalleryApplicationResult(); + // + try + { + WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_VIEWER); + // + result.Value = module.GetApplicationByProductId(UserId, id); + result.IsSuccess = true; + result.ErrorCodes.AddRange(module.GetMissingDependenciesForApplicationById(UserId, id)); + } + catch (Exception ex) + { + result.IsSuccess = false; + result.AddError(GalleryErrors.ProcessingFeedXMLError, ex); + } + // + return result; + } + + public GalleryWebAppStatus DownloadGalleryApplication(int UserId, string id) + { + return GetGalleryApplicationStatus(UserId, id); + } + + public GalleryWebAppStatus GetGalleryApplicationStatus(int UserId, string id) + { + try + { + WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_INSTALLER); + + return module.DownloadAppAndGetStatus(UserId, id); + } + catch (Exception ex) + { + Log.WriteError(ex); + return GalleryWebAppStatus.Failed; + } + } + + public DeploymentParametersResult GetGalleryApplicationParameters(int UserId, string id) + { + DeploymentParametersResult result = new DeploymentParametersResult(); + + try + { + WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_INSTALLER); + // + result.Value = module.GetApplicationParameters(UserId, id); + result.IsSuccess = true; + } + catch (Exception ex) + { + result.IsSuccess = false; + result.AddError(GalleryErrors.ProcessingPackageError, ex); + } + // + return result; + } + + + public StringResultObject InstallGalleryApplication(int UserId, string webAppId, List updatedValues, string languageId) + { + StringResultObject result = new StringResultObject(); + + try + { + WPIApplicationGallery module = new WPIApplicationGallery(WPI_INSTANCE_INSTALLER); + // + module.InstallApplication(UserId, webAppId, updatedValues, languageId, ref result); + + if (result.IsSuccess) + { + module.DeleteWpiHelper(UserId); + } + } + catch (Exception ex) + { + result.IsSuccess = false; + result.AddError(GalleryErrors.PackageInstallationError, ex); + } + // + return result; + } #endregion diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WPIWebApplicationGallery/WPIApplicationGallery.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WPIWebApplicationGallery/WPIApplicationGallery.cs new file mode 100644 index 00000000..6e19a004 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WPIWebApplicationGallery/WPIApplicationGallery.cs @@ -0,0 +1,438 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System; +using System.Collections.Generic; +using System.IO; +using System.Security; +using System.Text; +using Microsoft.Practices.EnterpriseLibrary.Caching; +using Microsoft.Web.Deployment; +using Microsoft.Web.PlatformInstaller; +using WebsitePanel.Providers.ResultObjects; +using WebsitePanel.Providers.Utils; +using WebsitePanel.Providers.WebAppGallery; +using WebsitePanel.Server.Code; +using WebsitePanel.Server.Utils; +using System.Web; +using System.Diagnostics; +using Microsoft.Practices.EnterpriseLibrary.Caching.Expirations; + +namespace WebsitePanel.Providers.Web.WPIWebApplicationGallery +{ + internal class WPIApplicationGallery + { + + private CacheManager _cache; + private const int LIVE_IN_CACHE_MINUTES = 20; + private string _sufix=""; + + public WPIApplicationGallery(string sufix) + { + _sufix = sufix; + //_feeds = new[] + // { + // "https://www.microsoft.com/web/webpi/3.0/webproductlist.xml", + // "http://www.helicontech.com/zoo/feed/wsp" + // }; + _cache = CacheFactory.GetCacheManager(); + //_wpi = GetWpiHelper(); + } + + + + private string GetKey_Feeds(int UserId) + { + return "WPIHELPER_CACHE_FEEDS" + UserId.ToString(); + } + + private string GetKey_object(int UserId) + { + return "WPIHELPER_CACHE_OBJECTS" + UserId.ToString() + _sufix; + } + + public void InitFeeds(int UserId, string[] feeds) + { + //Log.WriteInfo("InitFeeds {0} ", UserId); + + string CACHE_KEY = GetKey_Feeds(UserId); + + if (_cache.Contains(CACHE_KEY)) + { + string[] oldfeeds = (string[])_cache[CACHE_KEY]; + + if (!ArraysEqual(feeds, oldfeeds)) + { + //Feeeds have been changed + ICacheItemExpiration exp = new SlidingTime(TimeSpan.FromMinutes(LIVE_IN_CACHE_MINUTES*2)); + _cache.Add(CACHE_KEY, feeds, CacheItemPriority.Normal, null, exp ); + + DeleteWpiHelper(UserId); + } + + } + else + { + //add to cache + ICacheItemExpiration exp = new SlidingTime(TimeSpan.FromMinutes(LIVE_IN_CACHE_MINUTES*2)); + _cache.Add(CACHE_KEY, feeds, CacheItemPriority.Normal, null, exp); + + } + + } + + private WpiHelper GetWpiHelper(int UserId) + { + string CACHE_KEY = GetKey_object(UserId); + + if (_cache.Contains(CACHE_KEY)) + { + WpiHelper result = (WpiHelper)_cache[CACHE_KEY]; + + if (result != null) + { + return result; + } + + } + + string[] feeds = (string[])_cache[GetKey_Feeds(UserId)]; + if (null == feeds) + { + throw new Exception("BUG:No feeds in cache."); + } + + WpiHelper wpi = new WpiHelper(feeds); + ICacheItemExpiration exp = new SlidingTime(TimeSpan.FromMinutes(LIVE_IN_CACHE_MINUTES)); + + _cache.Add(CACHE_KEY, wpi, CacheItemPriority.Normal, null, exp); + //Debug.WriteLine(string.Format("GetWpiHelper: put in cache. User {0}", UserId)); + + return wpi; + } + + public void DeleteWpiHelper(int UserId) + { + _cache.Remove(GetKey_object(UserId)); + } + + + #region Public methods + + public void SetResourceLanguage(int UserId, string resourceLanguage) + { + WpiHelper wpi = GetWpiHelper(UserId); + wpi.SetResourceLanguage(resourceLanguage); + } + + + public List GetLanguages(int UserId) + { + List langs = new List(); + WpiHelper wpi = GetWpiHelper(UserId); + foreach (Language lang in wpi.GetLanguages()) + { + langs.Add(new SettingPair(lang.Id, lang.Name)); + } + + return langs; + } + + public List GetCategories(int UserId) + { + WpiHelper wpi = GetWpiHelper(UserId); + + List categories = new List(); + + foreach (Keyword keyword in wpi.GetKeywords()) + { + + if (wpi.IsKeywordApplication(keyword)) + { + categories.Add(new GalleryCategory + { + Id = keyword.Id, + Name = keyword.Text + }); + + } + } + + return categories; + } + + public List GetApplications(int UserId, string categoryId) + { + WpiHelper wpi = GetWpiHelper(UserId); + + List products = wpi.GetApplications(categoryId); + List applications = new List(); + + foreach (Product product in products) + { + applications.Add(MakeGalleryApplicationFromProduct(product)); + } + + return applications; + } + + + + public List GetGalleryApplicationsFiltered(int UserId, string pattern) + { + WpiHelper wpi = GetWpiHelper(UserId); + + List products = wpi.GetApplications(null); + List applications = new List(); + + foreach (Product product in products) + { + if (product.Title.ToLower().Contains(pattern.ToLower())) + { + applications.Add(MakeGalleryApplicationFromProduct(product)); + } + + } + + return applications; + } + + + + public GalleryApplication GetApplicationByProductId(int UserId, string id) + { + WpiHelper wpi = GetWpiHelper(UserId); + + return MakeGalleryApplicationFromProduct(wpi.GetProduct(id)); + } + + public List GetMissingDependenciesForApplicationById(int UserId, string id) + { + WpiHelper wpi = GetWpiHelper(UserId); + + List missingDeps = new List(); + foreach (Product product in wpi.GetProductsWithDependencies(new string[] { id })) + { + if (product.ProductId != id) + { + missingDeps.Add(product.Title); + } + } + + return missingDeps; + } + + public GalleryWebAppStatus DownloadAppAndGetStatus(int UserId, string id) + { + WpiHelper wpi = GetWpiHelper(UserId); + wpi.InstallProducts(new[] { id }, null, null, null); + + return GalleryWebAppStatus.Downloaded; + } + + public List GetApplicationParameters(int UserId, string id) + { + WpiHelper wpi = GetWpiHelper(UserId); + + Product product = wpi.GetProduct(id); + List deploymentParameters = new List(); + IList appDecalredParameters = wpi.GetAppDecalredParameters(id); + foreach (DeclaredParameter declaredParameter in appDecalredParameters) + { + deploymentParameters.Add(MakeDeploymentParameterFromDecalredParameter(declaredParameter)); + } + + return deploymentParameters; + + } + + public void InstallApplication( + int UserId, + string webAppId, + List updatedParameters, + string languageId, + ref StringResultObject result) + { + WpiHelper wpi = GetWpiHelper(UserId); + + // convert list of DeploymentParameter to list of WpiUpdatedDeploymentParameter + List updatedWpiParameters = new List(); + foreach (DeploymentParameter updatedParameter in updatedParameters) + { + updatedWpiParameters.Add( + new WpiUpdatedDeploymentParameter + { + Name = updatedParameter.Name, + Value = updatedParameter.Value, + WellKnownTags = (DeploymentWellKnownTag)updatedParameter.WellKnownTags + } + ); + } + + Log.WriteStart("Application installation starting"); + string log; + string failedMessage; + bool success = wpi.InstallApplication( + webAppId, + updatedWpiParameters, + languageId, + InstallStatusUpdatedHandler, InstallCompleteHandler, + out log, + out failedMessage); + + result.Value = log; + result.IsSuccess = success; + + // add log files to result value + try + { + StringBuilder sb = new StringBuilder(); + string[] filePaths = Directory.GetFiles(wpi.GetLogFileDirectory()); + foreach (string filePath in filePaths) + { + using (StreamReader streamReader = new StreamReader(filePath)) + { + string fileContent = + SecurityElement.Escape(StringUtils.CleanupASCIIControlCharacters(streamReader.ReadToEnd())); + sb.AppendLine().AppendLine(filePath).AppendLine(fileContent); + } + + } + + result.Value += sb.ToString(); + } + catch(Exception) + { + } + + + if (!success) + { + result.AddError(failedMessage, null); + } + + // don`t reuse wpi helper after installation + DeleteWpiHelper(UserId); + } + + #endregion + + #region installaton events + + private void InstallStatusUpdatedHandler(object sender, InstallStatusEventArgs installStatusEventArgs) + { + Log.WriteInfo("Application {0} installation status: {1}, return code: {0}", + installStatusEventArgs.InstallerContext.ProductName, + installStatusEventArgs.InstallerContext.InstallationState, + installStatusEventArgs.InstallerContext.ReturnCode); + } + + private void InstallCompleteHandler(object sender, EventArgs eventArgs) + { + Log.WriteEnd("Application installation completed"); + } + + #endregion + + + #region static helpers + + protected static GalleryApplication MakeGalleryApplicationFromProduct(Product product) + { + if (null == product) + { + return null; + } + + int size = 0; + if (null != product.Installers && product.Installers.Count > 0 && null != product.Installers[0].InstallerFile) + { + size = product.Installers[0].InstallerFile.FileSize; + } + + return new GalleryApplication + { + Id = product.ProductId, + Title = product.Title, + Author = new Author {Name = product.Author, Uri = product.AuthorUri.ToString()}, + IconUrl = product.IconUrl.ToString(), + Version = product.Version, + Description = product.LongDescription, + Summary = product.Summary, + LastUpdated = product.Published, + Published = product.Published, + Link = product.Link.ToString(), + InstallerFileSize = size + }; + } + + protected static DeploymentParameter MakeDeploymentParameterFromDecalredParameter(DeclaredParameter d) + { + DeploymentParameter r = new DeploymentParameter(); + r.Name = d.Name; + r.FriendlyName = d.FriendlyName; + r.DefaultValue = d.DefaultValue; + r.Description = d.Description; + r.WellKnownTags = (DeploymentParameterWellKnownTag) d.Tags; + if (null != d.Validation) + { + r.ValidationKind = (DeploymentParameterValidationKind) d.Validation.Kind; + r.ValidationString = d.Validation.ValidationString; + } + else + { + r.ValidationKind = DeploymentParameterValidationKind.None; + } + + return r; + } + + protected static bool ArraysEqual(T[] a1, T[] a2) + { + if (ReferenceEquals(a1, a2)) + return true; + + if (a1 == null || a2 == null) + return false; + + if (a1.Length != a2.Length) + return false; + + EqualityComparer comparer = EqualityComparer.Default; + for (int i = 0; i < a1.Length; i++) + { + if (!comparer.Equals(a1[i], a2[i])) return false; + } + return true; + } + + + #endregion + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WebApplicationGallery.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WebApplicationGallery.cs index c0b7d363..ed925e7a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WebApplicationGallery.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WebApplicationGallery.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -51,7 +51,8 @@ using System.Linq; namespace WebsitePanel.Providers.Web { - public sealed class WebApplicationGallery + [Obsolete] + public sealed class WebApplicationGallery { // MS Deploy library private const string MS_DEPLOY_ASSEMBLY_NAME = "Microsoft.Web.Deployment"; @@ -121,6 +122,13 @@ namespace WebsitePanel.Providers.Web Array.ForEach(versionKeys, (x) => { Log.WriteInfo("MSDeploy version key found: {0}", x); }); // Determine appropriate key name to query for var installPathKey = (IntPtr.Size == 8) ? "InstallPath" : "InstallPath_x86"; + + // Check if running in 32bit mode under 64bit Windows (WOW64) - works with .NET 2.0+ + if (Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432") == "AMD64") + { + installPathKey = "InstallPath_x64"; + } + var fileVersion = String.Empty; // var libPath = String.Empty; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WebsitePanel.Providers.Web.IIs60.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WebsitePanel.Providers.Web.IIs60.csproj index 5fdf4a1b..79f48e11 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WebsitePanel.Providers.Web.IIs60.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIs60/WebsitePanel.Providers.Web.IIs60.csproj @@ -67,10 +67,14 @@ False ..\..\Lib\Microsoft.Practices.ObjectBuilder.dll - + False ..\..\Lib\References\Microsoft\Microsoft.Web.Deployment.dll + + False + ..\..\Lib\Microsoft.Web.PlatformInstaller.dll + @@ -82,9 +86,13 @@ VersionInfo.cs + + WPIWebApplicationGallery\WPIHelper.cs + + diff --git a/WebsitePanel/Sources/WebsitePanel.Registrars.Enom/EnomRegistrar.cs b/WebsitePanel/Sources/WebsitePanel.Registrars.Enom/EnomRegistrar.cs index d3d5eadc..818904f4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Registrars.Enom/EnomRegistrar.cs +++ b/WebsitePanel/Sources/WebsitePanel.Registrars.Enom/EnomRegistrar.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Registrars.OfflineRegistrar/OfflineRegistrar.cs b/WebsitePanel/Sources/WebsitePanel.Registrars.OfflineRegistrar/OfflineRegistrar.cs index 460607f7..64181081 100644 --- a/WebsitePanel/Sources/WebsitePanel.Registrars.OfflineRegistrar/OfflineRegistrar.cs +++ b/WebsitePanel/Sources/WebsitePanel.Registrars.OfflineRegistrar/OfflineRegistrar.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/AutoDiscoveryProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/AutoDiscoveryProxy.cs index 57f69758..cfe0b732 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/AutoDiscoveryProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/AutoDiscoveryProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/BlackBerryProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/BlackBerryProxy.cs index 705c9dab..f2ff8d65 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/BlackBerryProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/BlackBerryProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/CRMProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/CRMProxy.cs index bb119303..1d98cbc3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/CRMProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/CRMProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/Common/ServerProxyConfigurator.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/Common/ServerProxyConfigurator.cs index 86385191..404a5f2b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/Common/ServerProxyConfigurator.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/Common/ServerProxyConfigurator.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/Common/ServerUsernameAssertion.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/Common/ServerUsernameAssertion.cs index f07eb541..cbd802a0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/Common/ServerUsernameAssertion.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/Common/ServerUsernameAssertion.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/DatabaseServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/DatabaseServerProxy.cs index 7f33f546..78667dc9 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/DatabaseServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/DatabaseServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/DnsServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/DnsServerProxy.cs index 407e7334..66950b94 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/DnsServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/DnsServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -39,324 +39,373 @@ // // This source code was auto-generated by wsdl, Version=2.0.50727.42. // -namespace WebsitePanel.Providers.DNS { +namespace WebsitePanel.Providers.DNS +{ using System.Diagnostics; using System.Web.Services; using System.ComponentModel; using System.Web.Services.Protocols; using System; using System.Xml.Serialization; - - + + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name="DNSServerSoap", Namespace="http://smbsaas/websitepanel/server/")] - public partial class DNSServer : Microsoft.Web.Services3.WebServicesClientProtocol { - + [System.Web.Services.WebServiceBindingAttribute(Name = "DNSServerSoap", Namespace = "http://smbsaas/websitepanel/server/")] + public partial class DNSServer : Microsoft.Web.Services3.WebServicesClientProtocol + { + public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue; - + private System.Threading.SendOrPostCallback ZoneExistsOperationCompleted; - + private System.Threading.SendOrPostCallback GetZonesOperationCompleted; - + private System.Threading.SendOrPostCallback AddPrimaryZoneOperationCompleted; - + private System.Threading.SendOrPostCallback AddSecondaryZoneOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteZoneOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateSoaRecordOperationCompleted; - + private System.Threading.SendOrPostCallback GetZoneRecordsOperationCompleted; - + private System.Threading.SendOrPostCallback AddZoneRecordOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteZoneRecordOperationCompleted; - + private System.Threading.SendOrPostCallback AddZoneRecordsOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteZoneRecordsOperationCompleted; - + /// - public DNSServer() { + public DNSServer() + { this.Url = "http://localhost/WebsitePanelServer11/DnsServer.asmx"; } - + /// public event ZoneExistsCompletedEventHandler ZoneExistsCompleted; - + /// public event GetZonesCompletedEventHandler GetZonesCompleted; - + /// public event AddPrimaryZoneCompletedEventHandler AddPrimaryZoneCompleted; - + /// public event AddSecondaryZoneCompletedEventHandler AddSecondaryZoneCompleted; - + /// public event DeleteZoneCompletedEventHandler DeleteZoneCompleted; - + /// public event UpdateSoaRecordCompletedEventHandler UpdateSoaRecordCompleted; - + /// public event GetZoneRecordsCompletedEventHandler GetZoneRecordsCompleted; - + /// public event AddZoneRecordCompletedEventHandler AddZoneRecordCompleted; - + /// public event DeleteZoneRecordCompletedEventHandler DeleteZoneRecordCompleted; - + /// public event AddZoneRecordsCompletedEventHandler AddZoneRecordsCompleted; - + /// public event DeleteZoneRecordsCompletedEventHandler DeleteZoneRecordsCompleted; - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ZoneExists", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool ZoneExists(string zoneName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ZoneExists", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool ZoneExists(string zoneName) + { object[] results = this.Invoke("ZoneExists", new object[] { zoneName}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginZoneExists(string zoneName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginZoneExists(string zoneName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("ZoneExists", new object[] { zoneName}, callback, asyncState); } - + /// - public bool EndZoneExists(System.IAsyncResult asyncResult) { + public bool EndZoneExists(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void ZoneExistsAsync(string zoneName) { + public void ZoneExistsAsync(string zoneName) + { this.ZoneExistsAsync(zoneName, null); } - + /// - public void ZoneExistsAsync(string zoneName, object userState) { - if ((this.ZoneExistsOperationCompleted == null)) { + public void ZoneExistsAsync(string zoneName, object userState) + { + if ((this.ZoneExistsOperationCompleted == null)) + { this.ZoneExistsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnZoneExistsOperationCompleted); } this.InvokeAsync("ZoneExists", new object[] { zoneName}, this.ZoneExistsOperationCompleted, userState); } - - private void OnZoneExistsOperationCompleted(object arg) { - if ((this.ZoneExistsCompleted != null)) { + + private void OnZoneExistsOperationCompleted(object arg) + { + if ((this.ZoneExistsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ZoneExistsCompleted(this, new ZoneExistsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetZones", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string[] GetZones() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetZones", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetZones() + { object[] results = this.Invoke("GetZones", new object[0]); return ((string[])(results[0])); } - + /// - public System.IAsyncResult BeginGetZones(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetZones(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetZones", new object[0], callback, asyncState); } - + /// - public string[] EndGetZones(System.IAsyncResult asyncResult) { + public string[] EndGetZones(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string[])(results[0])); } - + /// - public void GetZonesAsync() { + public void GetZonesAsync() + { this.GetZonesAsync(null); } - + /// - public void GetZonesAsync(object userState) { - if ((this.GetZonesOperationCompleted == null)) { + public void GetZonesAsync(object userState) + { + if ((this.GetZonesOperationCompleted == null)) + { this.GetZonesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetZonesOperationCompleted); } this.InvokeAsync("GetZones", new object[0], this.GetZonesOperationCompleted, userState); } - - private void OnGetZonesOperationCompleted(object arg) { - if ((this.GetZonesCompleted != null)) { + + private void OnGetZonesOperationCompleted(object arg) + { + if ((this.GetZonesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetZonesCompleted(this, new GetZonesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddPrimaryZone", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void AddPrimaryZone(string zoneName, string[] secondaryServers) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddPrimaryZone", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void AddPrimaryZone(string zoneName, string[] secondaryServers) + { this.Invoke("AddPrimaryZone", new object[] { zoneName, secondaryServers}); } - + /// - public System.IAsyncResult BeginAddPrimaryZone(string zoneName, string[] secondaryServers, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddPrimaryZone(string zoneName, string[] secondaryServers, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddPrimaryZone", new object[] { zoneName, secondaryServers}, callback, asyncState); } - + /// - public void EndAddPrimaryZone(System.IAsyncResult asyncResult) { + public void EndAddPrimaryZone(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void AddPrimaryZoneAsync(string zoneName, string[] secondaryServers) { + public void AddPrimaryZoneAsync(string zoneName, string[] secondaryServers) + { this.AddPrimaryZoneAsync(zoneName, secondaryServers, null); } - + /// - public void AddPrimaryZoneAsync(string zoneName, string[] secondaryServers, object userState) { - if ((this.AddPrimaryZoneOperationCompleted == null)) { + public void AddPrimaryZoneAsync(string zoneName, string[] secondaryServers, object userState) + { + if ((this.AddPrimaryZoneOperationCompleted == null)) + { this.AddPrimaryZoneOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddPrimaryZoneOperationCompleted); } this.InvokeAsync("AddPrimaryZone", new object[] { zoneName, secondaryServers}, this.AddPrimaryZoneOperationCompleted, userState); } - - private void OnAddPrimaryZoneOperationCompleted(object arg) { - if ((this.AddPrimaryZoneCompleted != null)) { + + private void OnAddPrimaryZoneOperationCompleted(object arg) + { + if ((this.AddPrimaryZoneCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddPrimaryZoneCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddSecondaryZone", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void AddSecondaryZone(string zoneName, string[] masterServers) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddSecondaryZone", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void AddSecondaryZone(string zoneName, string[] masterServers) + { this.Invoke("AddSecondaryZone", new object[] { zoneName, masterServers}); } - + /// - public System.IAsyncResult BeginAddSecondaryZone(string zoneName, string[] masterServers, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddSecondaryZone(string zoneName, string[] masterServers, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddSecondaryZone", new object[] { zoneName, masterServers}, callback, asyncState); } - + /// - public void EndAddSecondaryZone(System.IAsyncResult asyncResult) { + public void EndAddSecondaryZone(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void AddSecondaryZoneAsync(string zoneName, string[] masterServers) { + public void AddSecondaryZoneAsync(string zoneName, string[] masterServers) + { this.AddSecondaryZoneAsync(zoneName, masterServers, null); } - + /// - public void AddSecondaryZoneAsync(string zoneName, string[] masterServers, object userState) { - if ((this.AddSecondaryZoneOperationCompleted == null)) { + public void AddSecondaryZoneAsync(string zoneName, string[] masterServers, object userState) + { + if ((this.AddSecondaryZoneOperationCompleted == null)) + { this.AddSecondaryZoneOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSecondaryZoneOperationCompleted); } this.InvokeAsync("AddSecondaryZone", new object[] { zoneName, masterServers}, this.AddSecondaryZoneOperationCompleted, userState); } - - private void OnAddSecondaryZoneOperationCompleted(object arg) { - if ((this.AddSecondaryZoneCompleted != null)) { + + private void OnAddSecondaryZoneOperationCompleted(object arg) + { + if ((this.AddSecondaryZoneCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddSecondaryZoneCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteZone", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void DeleteZone(string zoneName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteZone", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void DeleteZone(string zoneName) + { this.Invoke("DeleteZone", new object[] { zoneName}); } - + /// - public System.IAsyncResult BeginDeleteZone(string zoneName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteZone(string zoneName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteZone", new object[] { zoneName}, callback, asyncState); } - + /// - public void EndDeleteZone(System.IAsyncResult asyncResult) { + public void EndDeleteZone(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void DeleteZoneAsync(string zoneName) { + public void DeleteZoneAsync(string zoneName) + { this.DeleteZoneAsync(zoneName, null); } - + /// - public void DeleteZoneAsync(string zoneName, object userState) { - if ((this.DeleteZoneOperationCompleted == null)) { + public void DeleteZoneAsync(string zoneName, object userState) + { + if ((this.DeleteZoneOperationCompleted == null)) + { this.DeleteZoneOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteZoneOperationCompleted); } this.InvokeAsync("DeleteZone", new object[] { zoneName}, this.DeleteZoneOperationCompleted, userState); } - - private void OnDeleteZoneOperationCompleted(object arg) { - if ((this.DeleteZoneCompleted != null)) { + + private void OnDeleteZoneOperationCompleted(object arg) + { + if ((this.DeleteZoneCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteZoneCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/UpdateSoaRecord", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void UpdateSoaRecord(string zoneName, string host, string primaryNsServer, string primaryPerson) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/UpdateSoaRecord", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void UpdateSoaRecord(string zoneName, string host, string primaryNsServer, string primaryPerson) + { this.Invoke("UpdateSoaRecord", new object[] { zoneName, host, primaryNsServer, primaryPerson}); } - + /// - public System.IAsyncResult BeginUpdateSoaRecord(string zoneName, string host, string primaryNsServer, string primaryPerson, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateSoaRecord(string zoneName, string host, string primaryNsServer, string primaryPerson, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateSoaRecord", new object[] { zoneName, host, primaryNsServer, primaryPerson}, callback, asyncState); } - + /// - public void EndUpdateSoaRecord(System.IAsyncResult asyncResult) { + public void EndUpdateSoaRecord(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void UpdateSoaRecordAsync(string zoneName, string host, string primaryNsServer, string primaryPerson) { + public void UpdateSoaRecordAsync(string zoneName, string host, string primaryNsServer, string primaryPerson) + { this.UpdateSoaRecordAsync(zoneName, host, primaryNsServer, primaryPerson, null); } - + /// - public void UpdateSoaRecordAsync(string zoneName, string host, string primaryNsServer, string primaryPerson, object userState) { - if ((this.UpdateSoaRecordOperationCompleted == null)) { + public void UpdateSoaRecordAsync(string zoneName, string host, string primaryNsServer, string primaryPerson, object userState) + { + if ((this.UpdateSoaRecordOperationCompleted == null)) + { this.UpdateSoaRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateSoaRecordOperationCompleted); } this.InvokeAsync("UpdateSoaRecord", new object[] { @@ -365,340 +414,395 @@ namespace WebsitePanel.Providers.DNS { primaryNsServer, primaryPerson}, this.UpdateSoaRecordOperationCompleted, userState); } - - private void OnUpdateSoaRecordOperationCompleted(object arg) { - if ((this.UpdateSoaRecordCompleted != null)) { + + private void OnUpdateSoaRecordOperationCompleted(object arg) + { + if ((this.UpdateSoaRecordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateSoaRecordCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetZoneRecords", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public DnsRecord[] GetZoneRecords(string zoneName) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetZoneRecords", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public DnsRecord[] GetZoneRecords(string zoneName) + { object[] results = this.Invoke("GetZoneRecords", new object[] { zoneName}); return ((DnsRecord[])(results[0])); } - + /// - public System.IAsyncResult BeginGetZoneRecords(string zoneName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetZoneRecords(string zoneName, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetZoneRecords", new object[] { zoneName}, callback, asyncState); } - + /// - public DnsRecord[] EndGetZoneRecords(System.IAsyncResult asyncResult) { + public DnsRecord[] EndGetZoneRecords(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((DnsRecord[])(results[0])); } - + /// - public void GetZoneRecordsAsync(string zoneName) { + public void GetZoneRecordsAsync(string zoneName) + { this.GetZoneRecordsAsync(zoneName, null); } - + /// - public void GetZoneRecordsAsync(string zoneName, object userState) { - if ((this.GetZoneRecordsOperationCompleted == null)) { + public void GetZoneRecordsAsync(string zoneName, object userState) + { + if ((this.GetZoneRecordsOperationCompleted == null)) + { this.GetZoneRecordsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetZoneRecordsOperationCompleted); } this.InvokeAsync("GetZoneRecords", new object[] { zoneName}, this.GetZoneRecordsOperationCompleted, userState); } - - private void OnGetZoneRecordsOperationCompleted(object arg) { - if ((this.GetZoneRecordsCompleted != null)) { + + private void OnGetZoneRecordsOperationCompleted(object arg) + { + if ((this.GetZoneRecordsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetZoneRecordsCompleted(this, new GetZoneRecordsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddZoneRecord", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void AddZoneRecord(string zoneName, DnsRecord record) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddZoneRecord", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void AddZoneRecord(string zoneName, DnsRecord record) + { this.Invoke("AddZoneRecord", new object[] { zoneName, record}); } - + /// - public System.IAsyncResult BeginAddZoneRecord(string zoneName, DnsRecord record, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddZoneRecord(string zoneName, DnsRecord record, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddZoneRecord", new object[] { zoneName, record}, callback, asyncState); } - + /// - public void EndAddZoneRecord(System.IAsyncResult asyncResult) { + public void EndAddZoneRecord(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void AddZoneRecordAsync(string zoneName, DnsRecord record) { + public void AddZoneRecordAsync(string zoneName, DnsRecord record) + { this.AddZoneRecordAsync(zoneName, record, null); } - + /// - public void AddZoneRecordAsync(string zoneName, DnsRecord record, object userState) { - if ((this.AddZoneRecordOperationCompleted == null)) { + public void AddZoneRecordAsync(string zoneName, DnsRecord record, object userState) + { + if ((this.AddZoneRecordOperationCompleted == null)) + { this.AddZoneRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddZoneRecordOperationCompleted); } this.InvokeAsync("AddZoneRecord", new object[] { zoneName, record}, this.AddZoneRecordOperationCompleted, userState); } - - private void OnAddZoneRecordOperationCompleted(object arg) { - if ((this.AddZoneRecordCompleted != null)) { + + private void OnAddZoneRecordOperationCompleted(object arg) + { + if ((this.AddZoneRecordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddZoneRecordCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteZoneRecord", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void DeleteZoneRecord(string zoneName, DnsRecord record) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteZoneRecord", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void DeleteZoneRecord(string zoneName, DnsRecord record) + { this.Invoke("DeleteZoneRecord", new object[] { zoneName, record}); } - + /// - public System.IAsyncResult BeginDeleteZoneRecord(string zoneName, DnsRecord record, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteZoneRecord(string zoneName, DnsRecord record, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteZoneRecord", new object[] { zoneName, record}, callback, asyncState); } - + /// - public void EndDeleteZoneRecord(System.IAsyncResult asyncResult) { + public void EndDeleteZoneRecord(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void DeleteZoneRecordAsync(string zoneName, DnsRecord record) { + public void DeleteZoneRecordAsync(string zoneName, DnsRecord record) + { this.DeleteZoneRecordAsync(zoneName, record, null); } - + /// - public void DeleteZoneRecordAsync(string zoneName, DnsRecord record, object userState) { - if ((this.DeleteZoneRecordOperationCompleted == null)) { + public void DeleteZoneRecordAsync(string zoneName, DnsRecord record, object userState) + { + if ((this.DeleteZoneRecordOperationCompleted == null)) + { this.DeleteZoneRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteZoneRecordOperationCompleted); } this.InvokeAsync("DeleteZoneRecord", new object[] { zoneName, record}, this.DeleteZoneRecordOperationCompleted, userState); } - - private void OnDeleteZoneRecordOperationCompleted(object arg) { - if ((this.DeleteZoneRecordCompleted != null)) { + + private void OnDeleteZoneRecordOperationCompleted(object arg) + { + if ((this.DeleteZoneRecordCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteZoneRecordCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddZoneRecords", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void AddZoneRecords(string zoneName, DnsRecord[] records) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddZoneRecords", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void AddZoneRecords(string zoneName, DnsRecord[] records) + { this.Invoke("AddZoneRecords", new object[] { zoneName, records}); } - + /// - public System.IAsyncResult BeginAddZoneRecords(string zoneName, DnsRecord[] records, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddZoneRecords(string zoneName, DnsRecord[] records, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AddZoneRecords", new object[] { zoneName, records}, callback, asyncState); } - + /// - public void EndAddZoneRecords(System.IAsyncResult asyncResult) { + public void EndAddZoneRecords(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void AddZoneRecordsAsync(string zoneName, DnsRecord[] records) { + public void AddZoneRecordsAsync(string zoneName, DnsRecord[] records) + { this.AddZoneRecordsAsync(zoneName, records, null); } - + /// - public void AddZoneRecordsAsync(string zoneName, DnsRecord[] records, object userState) { - if ((this.AddZoneRecordsOperationCompleted == null)) { + public void AddZoneRecordsAsync(string zoneName, DnsRecord[] records, object userState) + { + if ((this.AddZoneRecordsOperationCompleted == null)) + { this.AddZoneRecordsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddZoneRecordsOperationCompleted); } this.InvokeAsync("AddZoneRecords", new object[] { zoneName, records}, this.AddZoneRecordsOperationCompleted, userState); } - - private void OnAddZoneRecordsOperationCompleted(object arg) { - if ((this.AddZoneRecordsCompleted != null)) { + + private void OnAddZoneRecordsOperationCompleted(object arg) + { + if ((this.AddZoneRecordsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AddZoneRecordsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteZoneRecords", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void DeleteZoneRecords(string zoneName, DnsRecord[] records) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteZoneRecords", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void DeleteZoneRecords(string zoneName, DnsRecord[] records) + { this.Invoke("DeleteZoneRecords", new object[] { zoneName, records}); } - + /// - public System.IAsyncResult BeginDeleteZoneRecords(string zoneName, DnsRecord[] records, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteZoneRecords(string zoneName, DnsRecord[] records, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteZoneRecords", new object[] { zoneName, records}, callback, asyncState); } - + /// - public void EndDeleteZoneRecords(System.IAsyncResult asyncResult) { + public void EndDeleteZoneRecords(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void DeleteZoneRecordsAsync(string zoneName, DnsRecord[] records) { + public void DeleteZoneRecordsAsync(string zoneName, DnsRecord[] records) + { this.DeleteZoneRecordsAsync(zoneName, records, null); } - + /// - public void DeleteZoneRecordsAsync(string zoneName, DnsRecord[] records, object userState) { - if ((this.DeleteZoneRecordsOperationCompleted == null)) { + public void DeleteZoneRecordsAsync(string zoneName, DnsRecord[] records, object userState) + { + if ((this.DeleteZoneRecordsOperationCompleted == null)) + { this.DeleteZoneRecordsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteZoneRecordsOperationCompleted); } this.InvokeAsync("DeleteZoneRecords", new object[] { zoneName, records}, this.DeleteZoneRecordsOperationCompleted, userState); } - - private void OnDeleteZoneRecordsOperationCompleted(object arg) { - if ((this.DeleteZoneRecordsCompleted != null)) { + + private void OnDeleteZoneRecordsOperationCompleted(object arg) + { + if ((this.DeleteZoneRecordsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteZoneRecordsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - public new void CancelAsync(object userState) { + public new void CancelAsync(object userState) + { base.CancelAsync(userState); } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void ZoneExistsCompletedEventHandler(object sender, ZoneExistsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class ZoneExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class ZoneExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal ZoneExistsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal ZoneExistsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public bool Result { - get { + public bool Result + { + get + { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetZonesCompletedEventHandler(object sender, GetZonesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetZonesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetZonesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetZonesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetZonesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public string[] Result { - get { + public string[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((string[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddPrimaryZoneCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddSecondaryZoneCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteZoneCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateSoaRecordCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetZoneRecordsCompletedEventHandler(object sender, GetZoneRecordsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetZoneRecordsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetZoneRecordsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetZoneRecordsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetZoneRecordsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public DnsRecord[] Result { - get { + public DnsRecord[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((DnsRecord[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddZoneRecordCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteZoneRecordCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddZoneRecordsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteZoneRecordsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerHostedEditionProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerHostedEditionProxy.cs deleted file mode 100644 index 54257b39..00000000 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerHostedEditionProxy.cs +++ /dev/null @@ -1,574 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4952 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// -// This source code was auto-generated by wsdl, Version=2.0.50727.42. -// -namespace WebsitePanel.Providers.ExchangeHostedEdition { - using System.Xml.Serialization; - using System.Web.Services; - using System.ComponentModel; - using System.Web.Services.Protocols; - using System; - using System.Diagnostics; - - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name="ExchangeServerHostedEditionSoap", Namespace="http://smbsaas/websitepanel/server/")] - [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] - public partial class ExchangeServerHostedEdition : Microsoft.Web.Services3.WebServicesClientProtocol { - - public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue; - - private System.Threading.SendOrPostCallback CreateOrganizationOperationCompleted; - - private System.Threading.SendOrPostCallback GetOrganizationDomainsOperationCompleted; - - private System.Threading.SendOrPostCallback AddOrganizationDomainOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteOrganizationDomainOperationCompleted; - - private System.Threading.SendOrPostCallback GetOrganizationDetailsOperationCompleted; - - private System.Threading.SendOrPostCallback UpdateOrganizationQuotasOperationCompleted; - - private System.Threading.SendOrPostCallback UpdateOrganizationCatchAllAddressOperationCompleted; - - private System.Threading.SendOrPostCallback UpdateOrganizationServicePlanOperationCompleted; - - private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; - - /// - public ExchangeServerHostedEdition() { - this.Url = "http://localhost:9003/ExchangeServerHostedEdition.asmx"; - } - - /// - public event CreateOrganizationCompletedEventHandler CreateOrganizationCompleted; - - /// - public event GetOrganizationDomainsCompletedEventHandler GetOrganizationDomainsCompleted; - - /// - public event AddOrganizationDomainCompletedEventHandler AddOrganizationDomainCompleted; - - /// - public event DeleteOrganizationDomainCompletedEventHandler DeleteOrganizationDomainCompleted; - - /// - public event GetOrganizationDetailsCompletedEventHandler GetOrganizationDetailsCompleted; - - /// - public event UpdateOrganizationQuotasCompletedEventHandler UpdateOrganizationQuotasCompleted; - - /// - public event UpdateOrganizationCatchAllAddressCompletedEventHandler UpdateOrganizationCatchAllAddressCompleted; - - /// - public event UpdateOrganizationServicePlanCompletedEventHandler UpdateOrganizationServicePlanCompleted; - - /// - public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganization", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void CreateOrganization(string organizationId, string programId, string offerId, string domain, string adminName, string adminEmail, string adminPassword) { - this.Invoke("CreateOrganization", new object[] { - organizationId, - programId, - offerId, - domain, - adminName, - adminEmail, - adminPassword}); - } - - /// - public System.IAsyncResult BeginCreateOrganization(string organizationId, string programId, string offerId, string domain, string adminName, string adminEmail, string adminPassword, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("CreateOrganization", new object[] { - organizationId, - programId, - offerId, - domain, - adminName, - adminEmail, - adminPassword}, callback, asyncState); - } - - /// - public void EndCreateOrganization(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void CreateOrganizationAsync(string organizationId, string programId, string offerId, string domain, string adminName, string adminEmail, string adminPassword) { - this.CreateOrganizationAsync(organizationId, programId, offerId, domain, adminName, adminEmail, adminPassword, null); - } - - /// - public void CreateOrganizationAsync(string organizationId, string programId, string offerId, string domain, string adminName, string adminEmail, string adminPassword, object userState) { - if ((this.CreateOrganizationOperationCompleted == null)) { - this.CreateOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationOperationCompleted); - } - this.InvokeAsync("CreateOrganization", new object[] { - organizationId, - programId, - offerId, - domain, - adminName, - adminEmail, - adminPassword}, this.CreateOrganizationOperationCompleted, userState); - } - - private void OnCreateOrganizationOperationCompleted(object arg) { - if ((this.CreateOrganizationCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.CreateOrganizationCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetOrganizationDomains", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeOrganizationDomain[] GetOrganizationDomains(string organizationId) { - object[] results = this.Invoke("GetOrganizationDomains", new object[] { - organizationId}); - return ((ExchangeOrganizationDomain[])(results[0])); - } - - /// - public System.IAsyncResult BeginGetOrganizationDomains(string organizationId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetOrganizationDomains", new object[] { - organizationId}, callback, asyncState); - } - - /// - public ExchangeOrganizationDomain[] EndGetOrganizationDomains(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeOrganizationDomain[])(results[0])); - } - - /// - public void GetOrganizationDomainsAsync(string organizationId) { - this.GetOrganizationDomainsAsync(organizationId, null); - } - - /// - public void GetOrganizationDomainsAsync(string organizationId, object userState) { - if ((this.GetOrganizationDomainsOperationCompleted == null)) { - this.GetOrganizationDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationDomainsOperationCompleted); - } - this.InvokeAsync("GetOrganizationDomains", new object[] { - organizationId}, this.GetOrganizationDomainsOperationCompleted, userState); - } - - private void OnGetOrganizationDomainsOperationCompleted(object arg) { - if ((this.GetOrganizationDomainsCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetOrganizationDomainsCompleted(this, new GetOrganizationDomainsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddOrganizationDomain", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void AddOrganizationDomain(string organizationId, string domain) { - this.Invoke("AddOrganizationDomain", new object[] { - organizationId, - domain}); - } - - /// - public System.IAsyncResult BeginAddOrganizationDomain(string organizationId, string domain, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("AddOrganizationDomain", new object[] { - organizationId, - domain}, callback, asyncState); - } - - /// - public void EndAddOrganizationDomain(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void AddOrganizationDomainAsync(string organizationId, string domain) { - this.AddOrganizationDomainAsync(organizationId, domain, null); - } - - /// - public void AddOrganizationDomainAsync(string organizationId, string domain, object userState) { - if ((this.AddOrganizationDomainOperationCompleted == null)) { - this.AddOrganizationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddOrganizationDomainOperationCompleted); - } - this.InvokeAsync("AddOrganizationDomain", new object[] { - organizationId, - domain}, this.AddOrganizationDomainOperationCompleted, userState); - } - - private void OnAddOrganizationDomainOperationCompleted(object arg) { - if ((this.AddOrganizationDomainCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.AddOrganizationDomainCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteOrganizationDomain", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void DeleteOrganizationDomain(string organizationId, string domain) { - this.Invoke("DeleteOrganizationDomain", new object[] { - organizationId, - domain}); - } - - /// - public System.IAsyncResult BeginDeleteOrganizationDomain(string organizationId, string domain, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("DeleteOrganizationDomain", new object[] { - organizationId, - domain}, callback, asyncState); - } - - /// - public void EndDeleteOrganizationDomain(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void DeleteOrganizationDomainAsync(string organizationId, string domain) { - this.DeleteOrganizationDomainAsync(organizationId, domain, null); - } - - /// - public void DeleteOrganizationDomainAsync(string organizationId, string domain, object userState) { - if ((this.DeleteOrganizationDomainOperationCompleted == null)) { - this.DeleteOrganizationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationDomainOperationCompleted); - } - this.InvokeAsync("DeleteOrganizationDomain", new object[] { - organizationId, - domain}, this.DeleteOrganizationDomainOperationCompleted, userState); - } - - private void OnDeleteOrganizationDomainOperationCompleted(object arg) { - if ((this.DeleteOrganizationDomainCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.DeleteOrganizationDomainCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetOrganizationDetails", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ExchangeOrganization GetOrganizationDetails(string organizationId) { - object[] results = this.Invoke("GetOrganizationDetails", new object[] { - organizationId}); - return ((ExchangeOrganization)(results[0])); - } - - /// - public System.IAsyncResult BeginGetOrganizationDetails(string organizationId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetOrganizationDetails", new object[] { - organizationId}, callback, asyncState); - } - - /// - public ExchangeOrganization EndGetOrganizationDetails(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((ExchangeOrganization)(results[0])); - } - - /// - public void GetOrganizationDetailsAsync(string organizationId) { - this.GetOrganizationDetailsAsync(organizationId, null); - } - - /// - public void GetOrganizationDetailsAsync(string organizationId, object userState) { - if ((this.GetOrganizationDetailsOperationCompleted == null)) { - this.GetOrganizationDetailsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationDetailsOperationCompleted); - } - this.InvokeAsync("GetOrganizationDetails", new object[] { - organizationId}, this.GetOrganizationDetailsOperationCompleted, userState); - } - - private void OnGetOrganizationDetailsOperationCompleted(object arg) { - if ((this.GetOrganizationDetailsCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GetOrganizationDetailsCompleted(this, new GetOrganizationDetailsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/UpdateOrganizationQuotas", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void UpdateOrganizationQuotas(string organizationId, int mailboxesNumber, int contactsNumber, int distributionListsNumber) { - this.Invoke("UpdateOrganizationQuotas", new object[] { - organizationId, - mailboxesNumber, - contactsNumber, - distributionListsNumber}); - } - - /// - public System.IAsyncResult BeginUpdateOrganizationQuotas(string organizationId, int mailboxesNumber, int contactsNumber, int distributionListsNumber, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("UpdateOrganizationQuotas", new object[] { - organizationId, - mailboxesNumber, - contactsNumber, - distributionListsNumber}, callback, asyncState); - } - - /// - public void EndUpdateOrganizationQuotas(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void UpdateOrganizationQuotasAsync(string organizationId, int mailboxesNumber, int contactsNumber, int distributionListsNumber) { - this.UpdateOrganizationQuotasAsync(organizationId, mailboxesNumber, contactsNumber, distributionListsNumber, null); - } - - /// - public void UpdateOrganizationQuotasAsync(string organizationId, int mailboxesNumber, int contactsNumber, int distributionListsNumber, object userState) { - if ((this.UpdateOrganizationQuotasOperationCompleted == null)) { - this.UpdateOrganizationQuotasOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateOrganizationQuotasOperationCompleted); - } - this.InvokeAsync("UpdateOrganizationQuotas", new object[] { - organizationId, - mailboxesNumber, - contactsNumber, - distributionListsNumber}, this.UpdateOrganizationQuotasOperationCompleted, userState); - } - - private void OnUpdateOrganizationQuotasOperationCompleted(object arg) { - if ((this.UpdateOrganizationQuotasCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.UpdateOrganizationQuotasCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/UpdateOrganizationCatchAllAddress", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void UpdateOrganizationCatchAllAddress(string organizationId, string catchAllEmail) { - this.Invoke("UpdateOrganizationCatchAllAddress", new object[] { - organizationId, - catchAllEmail}); - } - - /// - public System.IAsyncResult BeginUpdateOrganizationCatchAllAddress(string organizationId, string catchAllEmail, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("UpdateOrganizationCatchAllAddress", new object[] { - organizationId, - catchAllEmail}, callback, asyncState); - } - - /// - public void EndUpdateOrganizationCatchAllAddress(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void UpdateOrganizationCatchAllAddressAsync(string organizationId, string catchAllEmail) { - this.UpdateOrganizationCatchAllAddressAsync(organizationId, catchAllEmail, null); - } - - /// - public void UpdateOrganizationCatchAllAddressAsync(string organizationId, string catchAllEmail, object userState) { - if ((this.UpdateOrganizationCatchAllAddressOperationCompleted == null)) { - this.UpdateOrganizationCatchAllAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateOrganizationCatchAllAddressOperationCompleted); - } - this.InvokeAsync("UpdateOrganizationCatchAllAddress", new object[] { - organizationId, - catchAllEmail}, this.UpdateOrganizationCatchAllAddressOperationCompleted, userState); - } - - private void OnUpdateOrganizationCatchAllAddressOperationCompleted(object arg) { - if ((this.UpdateOrganizationCatchAllAddressCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.UpdateOrganizationCatchAllAddressCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/UpdateOrganizationServicePlan", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void UpdateOrganizationServicePlan(string organizationId, string programId, string offerId) { - this.Invoke("UpdateOrganizationServicePlan", new object[] { - organizationId, - programId, - offerId}); - } - - /// - public System.IAsyncResult BeginUpdateOrganizationServicePlan(string organizationId, string programId, string offerId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("UpdateOrganizationServicePlan", new object[] { - organizationId, - programId, - offerId}, callback, asyncState); - } - - /// - public void EndUpdateOrganizationServicePlan(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void UpdateOrganizationServicePlanAsync(string organizationId, string programId, string offerId) { - this.UpdateOrganizationServicePlanAsync(organizationId, programId, offerId, null); - } - - /// - public void UpdateOrganizationServicePlanAsync(string organizationId, string programId, string offerId, object userState) { - if ((this.UpdateOrganizationServicePlanOperationCompleted == null)) { - this.UpdateOrganizationServicePlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateOrganizationServicePlanOperationCompleted); - } - this.InvokeAsync("UpdateOrganizationServicePlan", new object[] { - organizationId, - programId, - offerId}, this.UpdateOrganizationServicePlanOperationCompleted, userState); - } - - private void OnUpdateOrganizationServicePlanOperationCompleted(object arg) { - if ((this.UpdateOrganizationServicePlanCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.UpdateOrganizationServicePlanCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteOrganization", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void DeleteOrganization(string organizationId) { - this.Invoke("DeleteOrganization", new object[] { - organizationId}); - } - - /// - public System.IAsyncResult BeginDeleteOrganization(string organizationId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("DeleteOrganization", new object[] { - organizationId}, callback, asyncState); - } - - /// - public void EndDeleteOrganization(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); - } - - /// - public void DeleteOrganizationAsync(string organizationId) { - this.DeleteOrganizationAsync(organizationId, null); - } - - /// - public void DeleteOrganizationAsync(string organizationId, object userState) { - if ((this.DeleteOrganizationOperationCompleted == null)) { - this.DeleteOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationOperationCompleted); - } - this.InvokeAsync("DeleteOrganization", new object[] { - organizationId}, this.DeleteOrganizationOperationCompleted, userState); - } - - private void OnDeleteOrganizationOperationCompleted(object arg) { - if ((this.DeleteOrganizationCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.DeleteOrganizationCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - public new void CancelAsync(object userState) { - base.CancelAsync(userState); - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void CreateOrganizationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetOrganizationDomainsCompletedEventHandler(object sender, GetOrganizationDomainsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetOrganizationDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeOrganizationDomain[] Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeOrganizationDomain[])(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void AddOrganizationDomainCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DeleteOrganizationDomainCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetOrganizationDetailsCompletedEventHandler(object sender, GetOrganizationDetailsCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetOrganizationDetailsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal GetOrganizationDetailsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ExchangeOrganization Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ExchangeOrganization)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void UpdateOrganizationQuotasCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void UpdateOrganizationCatchAllAddressCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void UpdateOrganizationServicePlanCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void DeleteOrganizationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); -} diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs index c4e51d8f..46703fa7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/ExchangeServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -29,7 +29,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4200 +// Runtime Version:2.0.50727.5456 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -37,21 +37,22 @@ //------------------------------------------------------------------------------ // -// This source code was auto-generated by wsdl, Version=2.0.50727.3038. +// This source code was auto-generated by wsdl, Version=2.0.50727.42. // + using WebsitePanel.Providers.HostedSolution; namespace WebsitePanel.Providers.Exchange { - using System.Diagnostics; + using System.Xml.Serialization; using System.Web.Services; using System.ComponentModel; using System.Web.Services.Protocols; using System; - using System.Xml.Serialization; + using System.Diagnostics; /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="ExchangeServerSoap", Namespace="http://smbsaas/websitepanel/server/")] @@ -73,6 +74,8 @@ namespace WebsitePanel.Providers.Exchange { private System.Threading.SendOrPostCallback GetOABVirtualDirectoryOperationCompleted; + private System.Threading.SendOrPostCallback CreateOrganizationAddressBookPolicyOperationCompleted; + private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; private System.Threading.SendOrPostCallback SetOrganizationStorageLimitsOperationCompleted; @@ -85,8 +88,6 @@ namespace WebsitePanel.Providers.Exchange { private System.Threading.SendOrPostCallback DeleteAuthoritativeDomainOperationCompleted; - private System.Threading.SendOrPostCallback CreateMailboxOperationCompleted; - private System.Threading.SendOrPostCallback DeleteMailboxOperationCompleted; private System.Threading.SendOrPostCallback DisableMailboxOperationCompleted; @@ -195,7 +196,7 @@ namespace WebsitePanel.Providers.Exchange { /// public ExchangeServer() { - this.Url = "http://127.0.0.1:9003/ExchangeServer.asmx"; + this.Url = "http://localhost:9006/ExchangeServer.asmx"; } /// @@ -216,6 +217,9 @@ namespace WebsitePanel.Providers.Exchange { /// public event GetOABVirtualDirectoryCompletedEventHandler GetOABVirtualDirectoryCompleted; + /// + public event CreateOrganizationAddressBookPolicyCompletedEventHandler CreateOrganizationAddressBookPolicyCompleted; + /// public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; @@ -234,9 +238,6 @@ namespace WebsitePanel.Providers.Exchange { /// public event DeleteAuthoritativeDomainCompletedEventHandler DeleteAuthoritativeDomainCompleted; - /// - public event CreateMailboxCompletedEventHandler CreateMailboxCompleted; - /// public event DeleteMailboxCompletedEventHandler DeleteMailboxCompleted; @@ -444,18 +445,20 @@ namespace WebsitePanel.Providers.Exchange { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ExtendToExchangeOrganization", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public Organization ExtendToExchangeOrganization(string organizationId, string securityGroup) { + public Organization ExtendToExchangeOrganization(string organizationId, string securityGroup, bool IsConsumer) { object[] results = this.Invoke("ExtendToExchangeOrganization", new object[] { organizationId, - securityGroup}); + securityGroup, + IsConsumer}); return ((Organization)(results[0])); } /// - public System.IAsyncResult BeginExtendToExchangeOrganization(string organizationId, string securityGroup, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginExtendToExchangeOrganization(string organizationId, string securityGroup, bool IsConsumer, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("ExtendToExchangeOrganization", new object[] { organizationId, - securityGroup}, callback, asyncState); + securityGroup, + IsConsumer}, callback, asyncState); } /// @@ -465,18 +468,19 @@ namespace WebsitePanel.Providers.Exchange { } /// - public void ExtendToExchangeOrganizationAsync(string organizationId, string securityGroup) { - this.ExtendToExchangeOrganizationAsync(organizationId, securityGroup, null); + public void ExtendToExchangeOrganizationAsync(string organizationId, string securityGroup, bool IsConsumer) { + this.ExtendToExchangeOrganizationAsync(organizationId, securityGroup, IsConsumer, null); } /// - public void ExtendToExchangeOrganizationAsync(string organizationId, string securityGroup, object userState) { + public void ExtendToExchangeOrganizationAsync(string organizationId, string securityGroup, bool IsConsumer, object userState) { if ((this.ExtendToExchangeOrganizationOperationCompleted == null)) { this.ExtendToExchangeOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnExtendToExchangeOrganizationOperationCompleted); } this.InvokeAsync("ExtendToExchangeOrganization", new object[] { organizationId, - securityGroup}, this.ExtendToExchangeOrganizationOperationCompleted, userState); + securityGroup, + IsConsumer}, this.ExtendToExchangeOrganizationOperationCompleted, userState); } private void OnExtendToExchangeOrganizationOperationCompleted(object arg) { @@ -496,6 +500,7 @@ namespace WebsitePanel.Providers.Exchange { ExchangeAccountType accountType, string mailboxDatabase, string offlineAddressBook, + string addressBookPolicy, string accountName, bool enablePOP, bool enableIMAP, @@ -505,7 +510,12 @@ namespace WebsitePanel.Providers.Exchange { int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, - int keepDeletedItemsDays) { + int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + bool hideFromAddressBook, + bool isConsumer) { object[] results = this.Invoke("CreateMailEnableUser", new object[] { upn, organizationId, @@ -513,6 +523,7 @@ namespace WebsitePanel.Providers.Exchange { accountType, mailboxDatabase, offlineAddressBook, + addressBookPolicy, accountName, enablePOP, enableIMAP, @@ -522,7 +533,12 @@ namespace WebsitePanel.Providers.Exchange { issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, - keepDeletedItemsDays}); + keepDeletedItemsDays, + maxRecipients, + maxSendMessageSizeKB, + maxReceiveMessageSizeKB, + hideFromAddressBook, + isConsumer}); return ((string)(results[0])); } @@ -534,6 +550,7 @@ namespace WebsitePanel.Providers.Exchange { ExchangeAccountType accountType, string mailboxDatabase, string offlineAddressBook, + string addressBookPolicy, string accountName, bool enablePOP, bool enableIMAP, @@ -544,6 +561,11 @@ namespace WebsitePanel.Providers.Exchange { int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + bool hideFromAddressBook, + bool isConsumer, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateMailEnableUser", new object[] { @@ -553,6 +575,7 @@ namespace WebsitePanel.Providers.Exchange { accountType, mailboxDatabase, offlineAddressBook, + addressBookPolicy, accountName, enablePOP, enableIMAP, @@ -562,7 +585,12 @@ namespace WebsitePanel.Providers.Exchange { issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, - keepDeletedItemsDays}, callback, asyncState); + keepDeletedItemsDays, + maxRecipients, + maxSendMessageSizeKB, + maxReceiveMessageSizeKB, + hideFromAddressBook, + isConsumer}, callback, asyncState); } /// @@ -579,27 +607,7 @@ namespace WebsitePanel.Providers.Exchange { ExchangeAccountType accountType, string mailboxDatabase, string offlineAddressBook, - string accountName, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - int issueWarningKB, - int prohibitSendKB, - int prohibitSendReceiveKB, - int keepDeletedItemsDays) { - this.CreateMailEnableUserAsync(upn, organizationId, organizationDistinguishedName, accountType, mailboxDatabase, offlineAddressBook, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, null); - } - - /// - public void CreateMailEnableUserAsync( - string upn, - string organizationId, - string organizationDistinguishedName, - ExchangeAccountType accountType, - string mailboxDatabase, - string offlineAddressBook, + string addressBookPolicy, string accountName, bool enablePOP, bool enableIMAP, @@ -610,6 +618,38 @@ namespace WebsitePanel.Providers.Exchange { int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + bool hideFromAddressBook, + bool isConsumer) { + this.CreateMailEnableUserAsync(upn, organizationId, organizationDistinguishedName, accountType, mailboxDatabase, offlineAddressBook, addressBookPolicy, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, hideFromAddressBook, isConsumer, null); + } + + /// + public void CreateMailEnableUserAsync( + string upn, + string organizationId, + string organizationDistinguishedName, + ExchangeAccountType accountType, + string mailboxDatabase, + string offlineAddressBook, + string addressBookPolicy, + string accountName, + bool enablePOP, + bool enableIMAP, + bool enableOWA, + bool enableMAPI, + bool enableActiveSync, + int issueWarningKB, + int prohibitSendKB, + int prohibitSendReceiveKB, + int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + bool hideFromAddressBook, + bool isConsumer, object userState) { if ((this.CreateMailEnableUserOperationCompleted == null)) { this.CreateMailEnableUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateMailEnableUserOperationCompleted); @@ -621,6 +661,7 @@ namespace WebsitePanel.Providers.Exchange { accountType, mailboxDatabase, offlineAddressBook, + addressBookPolicy, accountName, enablePOP, enableIMAP, @@ -630,7 +671,12 @@ namespace WebsitePanel.Providers.Exchange { issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, - keepDeletedItemsDays}, this.CreateMailEnableUserOperationCompleted, userState); + keepDeletedItemsDays, + maxRecipients, + maxSendMessageSizeKB, + maxReceiveMessageSizeKB, + hideFromAddressBook, + isConsumer}, this.CreateMailEnableUserOperationCompleted, userState); } private void OnCreateMailEnableUserOperationCompleted(object arg) { @@ -767,31 +813,87 @@ namespace WebsitePanel.Providers.Exchange { } } + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganizationAddressBookPolicy", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public Organization CreateOrganizationAddressBookPolicy(string organizationId, string gal, string addressBook, string roomList, string oab) { + object[] results = this.Invoke("CreateOrganizationAddressBookPolicy", new object[] { + organizationId, + gal, + addressBook, + roomList, + oab}); + return ((Organization)(results[0])); + } + + /// + public System.IAsyncResult BeginCreateOrganizationAddressBookPolicy(string organizationId, string gal, string addressBook, string roomList, string oab, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("CreateOrganizationAddressBookPolicy", new object[] { + organizationId, + gal, + addressBook, + roomList, + oab}, callback, asyncState); + } + + /// + public Organization EndCreateOrganizationAddressBookPolicy(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((Organization)(results[0])); + } + + /// + public void CreateOrganizationAddressBookPolicyAsync(string organizationId, string gal, string addressBook, string roomList, string oab) { + this.CreateOrganizationAddressBookPolicyAsync(organizationId, gal, addressBook, roomList, oab, null); + } + + /// + public void CreateOrganizationAddressBookPolicyAsync(string organizationId, string gal, string addressBook, string roomList, string oab, object userState) { + if ((this.CreateOrganizationAddressBookPolicyOperationCompleted == null)) { + this.CreateOrganizationAddressBookPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationAddressBookPolicyOperationCompleted); + } + this.InvokeAsync("CreateOrganizationAddressBookPolicy", new object[] { + organizationId, + gal, + addressBook, + roomList, + oab}, this.CreateOrganizationAddressBookPolicyOperationCompleted, userState); + } + + private void OnCreateOrganizationAddressBookPolicyOperationCompleted(object arg) { + if ((this.CreateOrganizationAddressBookPolicyCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CreateOrganizationAddressBookPolicyCompleted(this, new CreateOrganizationAddressBookPolicyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteOrganization", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool DeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomsAddressList, string offlineAddressBook, string securityGroup) { + public bool DeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy) { object[] results = this.Invoke("DeleteOrganization", new object[] { organizationId, distinguishedName, globalAddressList, addressList, - roomsAddressList, + roomList, offlineAddressBook, - securityGroup}); + securityGroup, + addressBookPolicy}); return ((bool)(results[0])); } /// - public System.IAsyncResult BeginDeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomsAddressList, string offlineAddressBook, string securityGroup, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteOrganization", new object[] { organizationId, distinguishedName, globalAddressList, addressList, - roomsAddressList, + roomList, offlineAddressBook, - securityGroup}, callback, asyncState); + securityGroup, + addressBookPolicy}, callback, asyncState); } /// @@ -801,12 +903,12 @@ namespace WebsitePanel.Providers.Exchange { } /// - public void DeleteOrganizationAsync(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomsAddressList, string offlineAddressBook, string securityGroup) { - this.DeleteOrganizationAsync(organizationId, distinguishedName, globalAddressList, addressList, roomsAddressList, offlineAddressBook, securityGroup, null); + public void DeleteOrganizationAsync(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy) { + this.DeleteOrganizationAsync(organizationId, distinguishedName, globalAddressList, addressList, roomList, offlineAddressBook, securityGroup, addressBookPolicy, null); } /// - public void DeleteOrganizationAsync(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomsAddressList, string offlineAddressBook, string securityGroup, object userState) { + public void DeleteOrganizationAsync(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy, object userState) { if ((this.DeleteOrganizationOperationCompleted == null)) { this.DeleteOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationOperationCompleted); } @@ -815,9 +917,10 @@ namespace WebsitePanel.Providers.Exchange { distinguishedName, globalAddressList, addressList, - roomsAddressList, + roomList, offlineAddressBook, - securityGroup}, this.DeleteOrganizationOperationCompleted, userState); + securityGroup, + addressBookPolicy}, this.DeleteOrganizationOperationCompleted, userState); } private void OnDeleteOrganizationOperationCompleted(object arg) { @@ -1040,188 +1143,6 @@ namespace WebsitePanel.Providers.Exchange { } } - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateMailbox", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string CreateMailbox( - string organizationId, - string organizationDistinguishedName, - string mailboxDatabase, - string securityGroup, - string offlineAddressBook, - ExchangeAccountType accountType, - string displayName, - string accountName, - string name, - string domain, - string password, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - int issueWarningKB, - int prohibitSendKB, - int prohibitSendReceiveKB, - int keepDeletedItemsDays) { - object[] results = this.Invoke("CreateMailbox", new object[] { - organizationId, - organizationDistinguishedName, - mailboxDatabase, - securityGroup, - offlineAddressBook, - accountType, - displayName, - accountName, - name, - domain, - password, - enablePOP, - enableIMAP, - enableOWA, - enableMAPI, - enableActiveSync, - issueWarningKB, - prohibitSendKB, - prohibitSendReceiveKB, - keepDeletedItemsDays}); - return ((string)(results[0])); - } - - /// - public System.IAsyncResult BeginCreateMailbox( - string organizationId, - string organizationDistinguishedName, - string mailboxDatabase, - string securityGroup, - string offlineAddressBook, - ExchangeAccountType accountType, - string displayName, - string accountName, - string name, - string domain, - string password, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - int issueWarningKB, - int prohibitSendKB, - int prohibitSendReceiveKB, - int keepDeletedItemsDays, - System.AsyncCallback callback, - object asyncState) { - return this.BeginInvoke("CreateMailbox", new object[] { - organizationId, - organizationDistinguishedName, - mailboxDatabase, - securityGroup, - offlineAddressBook, - accountType, - displayName, - accountName, - name, - domain, - password, - enablePOP, - enableIMAP, - enableOWA, - enableMAPI, - enableActiveSync, - issueWarningKB, - prohibitSendKB, - prohibitSendReceiveKB, - keepDeletedItemsDays}, callback, asyncState); - } - - /// - public string EndCreateMailbox(System.IAsyncResult asyncResult) { - object[] results = this.EndInvoke(asyncResult); - return ((string)(results[0])); - } - - /// - public void CreateMailboxAsync( - string organizationId, - string organizationDistinguishedName, - string mailboxDatabase, - string securityGroup, - string offlineAddressBook, - ExchangeAccountType accountType, - string displayName, - string accountName, - string name, - string domain, - string password, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - int issueWarningKB, - int prohibitSendKB, - int prohibitSendReceiveKB, - int keepDeletedItemsDays) { - this.CreateMailboxAsync(organizationId, organizationDistinguishedName, mailboxDatabase, securityGroup, offlineAddressBook, accountType, displayName, accountName, name, domain, password, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, null); - } - - /// - public void CreateMailboxAsync( - string organizationId, - string organizationDistinguishedName, - string mailboxDatabase, - string securityGroup, - string offlineAddressBook, - ExchangeAccountType accountType, - string displayName, - string accountName, - string name, - string domain, - string password, - bool enablePOP, - bool enableIMAP, - bool enableOWA, - bool enableMAPI, - bool enableActiveSync, - int issueWarningKB, - int prohibitSendKB, - int prohibitSendReceiveKB, - int keepDeletedItemsDays, - object userState) { - if ((this.CreateMailboxOperationCompleted == null)) { - this.CreateMailboxOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateMailboxOperationCompleted); - } - this.InvokeAsync("CreateMailbox", new object[] { - organizationId, - organizationDistinguishedName, - mailboxDatabase, - securityGroup, - offlineAddressBook, - accountType, - displayName, - accountName, - name, - domain, - password, - enablePOP, - enableIMAP, - enableOWA, - enableMAPI, - enableActiveSync, - issueWarningKB, - prohibitSendKB, - prohibitSendReceiveKB, - keepDeletedItemsDays}, this.CreateMailboxOperationCompleted, userState); - } - - private void OnCreateMailboxOperationCompleted(object arg) { - if ((this.CreateMailboxCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.CreateMailboxCompleted(this, new CreateMailboxCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteMailbox", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] @@ -1347,115 +1268,19 @@ namespace WebsitePanel.Providers.Exchange { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SetMailboxGeneralSettings( - string accountName, - string displayName, - string password, - bool hideFromAddressBook, - bool disabled, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes) { + public void SetMailboxGeneralSettings(string accountName, bool hideFromAddressBook, bool disabled) { this.Invoke("SetMailboxGeneralSettings", new object[] { accountName, - displayName, - password, hideFromAddressBook, - disabled, - firstName, - initials, - lastName, - address, - city, - state, - zip, - country, - jobTitle, - company, - department, - office, - managerAccountName, - businessPhone, - fax, - homePhone, - mobilePhone, - pager, - webPage, - notes}); + disabled}); } /// - public System.IAsyncResult BeginSetMailboxGeneralSettings( - string accountName, - string displayName, - string password, - bool hideFromAddressBook, - bool disabled, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - System.AsyncCallback callback, - object asyncState) { + public System.IAsyncResult BeginSetMailboxGeneralSettings(string accountName, bool hideFromAddressBook, bool disabled, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetMailboxGeneralSettings", new object[] { accountName, - displayName, - password, hideFromAddressBook, - disabled, - firstName, - initials, - lastName, - address, - city, - state, - zip, - country, - jobTitle, - company, - department, - office, - managerAccountName, - businessPhone, - fax, - homePhone, - mobilePhone, - pager, - webPage, - notes}, callback, asyncState); + disabled}, callback, asyncState); } /// @@ -1464,92 +1289,19 @@ namespace WebsitePanel.Providers.Exchange { } /// - public void SetMailboxGeneralSettingsAsync( - string accountName, - string displayName, - string password, - bool hideFromAddressBook, - bool disabled, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes) { - this.SetMailboxGeneralSettingsAsync(accountName, displayName, password, hideFromAddressBook, disabled, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, null); + public void SetMailboxGeneralSettingsAsync(string accountName, bool hideFromAddressBook, bool disabled) { + this.SetMailboxGeneralSettingsAsync(accountName, hideFromAddressBook, disabled, null); } /// - public void SetMailboxGeneralSettingsAsync( - string accountName, - string displayName, - string password, - bool hideFromAddressBook, - bool disabled, - string firstName, - string initials, - string lastName, - string address, - string city, - string state, - string zip, - string country, - string jobTitle, - string company, - string department, - string office, - string managerAccountName, - string businessPhone, - string fax, - string homePhone, - string mobilePhone, - string pager, - string webPage, - string notes, - object userState) { + public void SetMailboxGeneralSettingsAsync(string accountName, bool hideFromAddressBook, bool disabled, object userState) { if ((this.SetMailboxGeneralSettingsOperationCompleted == null)) { this.SetMailboxGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxGeneralSettingsOperationCompleted); } this.InvokeAsync("SetMailboxGeneralSettings", new object[] { accountName, - displayName, - password, hideFromAddressBook, - disabled, - firstName, - initials, - lastName, - address, - city, - state, - zip, - country, - jobTitle, - company, - department, - office, - managerAccountName, - businessPhone, - fax, - homePhone, - mobilePhone, - pager, - webPage, - notes}, this.SetMailboxGeneralSettingsOperationCompleted, userState); + disabled}, this.SetMailboxGeneralSettingsOperationCompleted, userState); } private void OnSetMailboxGeneralSettingsOperationCompleted(object arg) { @@ -1604,7 +1356,7 @@ namespace WebsitePanel.Providers.Exchange { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool requireSenderAuthentication) { + public void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { this.Invoke("SetMailboxMailFlowSettings", new object[] { accountName, enableForwarding, @@ -1613,14 +1365,11 @@ namespace WebsitePanel.Providers.Exchange { sendOnBehalfAccounts, acceptAccounts, rejectAccounts, - maxRecipients, - maxSendMessageSizeKB, - maxReceiveMessageSizeKB, requireSenderAuthentication}); } /// - public System.IAsyncResult BeginSetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetMailboxMailFlowSettings", new object[] { accountName, enableForwarding, @@ -1629,9 +1378,6 @@ namespace WebsitePanel.Providers.Exchange { sendOnBehalfAccounts, acceptAccounts, rejectAccounts, - maxRecipients, - maxSendMessageSizeKB, - maxReceiveMessageSizeKB, requireSenderAuthentication}, callback, asyncState); } @@ -1641,12 +1387,12 @@ namespace WebsitePanel.Providers.Exchange { } /// - public void SetMailboxMailFlowSettingsAsync(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool requireSenderAuthentication) { - this.SetMailboxMailFlowSettingsAsync(accountName, enableForwarding, forwardingAccountName, forwardToBoth, sendOnBehalfAccounts, acceptAccounts, rejectAccounts, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, requireSenderAuthentication, null); + public void SetMailboxMailFlowSettingsAsync(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + this.SetMailboxMailFlowSettingsAsync(accountName, enableForwarding, forwardingAccountName, forwardToBoth, sendOnBehalfAccounts, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); } /// - public void SetMailboxMailFlowSettingsAsync(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool requireSenderAuthentication, object userState) { + public void SetMailboxMailFlowSettingsAsync(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { if ((this.SetMailboxMailFlowSettingsOperationCompleted == null)) { this.SetMailboxMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxMailFlowSettingsOperationCompleted); } @@ -1658,9 +1404,6 @@ namespace WebsitePanel.Providers.Exchange { sendOnBehalfAccounts, acceptAccounts, rejectAccounts, - maxRecipients, - maxSendMessageSizeKB, - maxReceiveMessageSizeKB, requireSenderAuthentication}, this.SetMailboxMailFlowSettingsOperationCompleted, userState); } @@ -1716,7 +1459,7 @@ namespace WebsitePanel.Providers.Exchange { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetMailboxAdvancedSettings", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) { + public void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB) { this.Invoke("SetMailboxAdvancedSettings", new object[] { organizationId, accountName, @@ -1728,11 +1471,30 @@ namespace WebsitePanel.Providers.Exchange { issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, - keepDeletedItemsDays}); + keepDeletedItemsDays, + maxRecipients, + maxSendMessageSizeKB, + maxReceiveMessageSizeKB}); } /// - public System.IAsyncResult BeginSetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetMailboxAdvancedSettings( + string organizationId, + string accountName, + bool enablePOP, + bool enableIMAP, + bool enableOWA, + bool enableMAPI, + bool enableActiveSync, + int issueWarningKB, + int prohibitSendKB, + int prohibitSendReceiveKB, + int keepDeletedItemsDays, + int maxRecipients, + int maxSendMessageSizeKB, + int maxReceiveMessageSizeKB, + System.AsyncCallback callback, + object asyncState) { return this.BeginInvoke("SetMailboxAdvancedSettings", new object[] { organizationId, accountName, @@ -1744,7 +1506,10 @@ namespace WebsitePanel.Providers.Exchange { issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, - keepDeletedItemsDays}, callback, asyncState); + keepDeletedItemsDays, + maxRecipients, + maxSendMessageSizeKB, + maxReceiveMessageSizeKB}, callback, asyncState); } /// @@ -1753,12 +1518,12 @@ namespace WebsitePanel.Providers.Exchange { } /// - public void SetMailboxAdvancedSettingsAsync(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) { - this.SetMailboxAdvancedSettingsAsync(organizationId, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, null); + public void SetMailboxAdvancedSettingsAsync(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB) { + this.SetMailboxAdvancedSettingsAsync(organizationId, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, null); } /// - public void SetMailboxAdvancedSettingsAsync(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, object userState) { + public void SetMailboxAdvancedSettingsAsync(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, object userState) { if ((this.SetMailboxAdvancedSettingsOperationCompleted == null)) { this.SetMailboxAdvancedSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetMailboxAdvancedSettingsOperationCompleted); } @@ -1773,7 +1538,10 @@ namespace WebsitePanel.Providers.Exchange { issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, - keepDeletedItemsDays}, this.SetMailboxAdvancedSettingsOperationCompleted, userState); + keepDeletedItemsDays, + maxRecipients, + maxSendMessageSizeKB, + maxReceiveMessageSizeKB}, this.SetMailboxAdvancedSettingsOperationCompleted, userState); } private void OnSetMailboxAdvancedSettingsOperationCompleted(object arg) { @@ -2500,7 +2268,7 @@ namespace WebsitePanel.Providers.Exchange { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateDistributionList", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void CreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy) { + public void CreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists) { this.Invoke("CreateDistributionList", new object[] { organizationId, organizationDistinguishedName, @@ -2508,11 +2276,12 @@ namespace WebsitePanel.Providers.Exchange { accountName, name, domain, - managedBy}); + managedBy, + addressLists}); } /// - public System.IAsyncResult BeginCreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateDistributionList", new object[] { organizationId, organizationDistinguishedName, @@ -2520,7 +2289,8 @@ namespace WebsitePanel.Providers.Exchange { accountName, name, domain, - managedBy}, callback, asyncState); + managedBy, + addressLists}, callback, asyncState); } /// @@ -2529,12 +2299,12 @@ namespace WebsitePanel.Providers.Exchange { } /// - public void CreateDistributionListAsync(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy) { - this.CreateDistributionListAsync(organizationId, organizationDistinguishedName, displayName, accountName, name, domain, managedBy, null); + public void CreateDistributionListAsync(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists) { + this.CreateDistributionListAsync(organizationId, organizationDistinguishedName, displayName, accountName, name, domain, managedBy, addressLists, null); } /// - public void CreateDistributionListAsync(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, object userState) { + public void CreateDistributionListAsync(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists, object userState) { if ((this.CreateDistributionListOperationCompleted == null)) { this.CreateDistributionListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateDistributionListOperationCompleted); } @@ -2545,7 +2315,8 @@ namespace WebsitePanel.Providers.Exchange { accountName, name, domain, - managedBy}, this.CreateDistributionListOperationCompleted, userState); + managedBy, + addressLists}, this.CreateDistributionListOperationCompleted, userState); } private void OnCreateDistributionListOperationCompleted(object arg) { @@ -2640,25 +2411,27 @@ namespace WebsitePanel.Providers.Exchange { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes) { + public void SetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists) { this.Invoke("SetDistributionListGeneralSettings", new object[] { accountName, displayName, hideFromAddressBook, managedBy, members, - notes}); + notes, + addressLists}); } /// - public System.IAsyncResult BeginSetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetDistributionListGeneralSettings", new object[] { accountName, displayName, hideFromAddressBook, managedBy, members, - notes}, callback, asyncState); + notes, + addressLists}, callback, asyncState); } /// @@ -2667,12 +2440,12 @@ namespace WebsitePanel.Providers.Exchange { } /// - public void SetDistributionListGeneralSettingsAsync(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes) { - this.SetDistributionListGeneralSettingsAsync(accountName, displayName, hideFromAddressBook, managedBy, members, notes, null); + public void SetDistributionListGeneralSettingsAsync(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists) { + this.SetDistributionListGeneralSettingsAsync(accountName, displayName, hideFromAddressBook, managedBy, members, notes, addressLists, null); } /// - public void SetDistributionListGeneralSettingsAsync(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, object userState) { + public void SetDistributionListGeneralSettingsAsync(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists, object userState) { if ((this.SetDistributionListGeneralSettingsOperationCompleted == null)) { this.SetDistributionListGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListGeneralSettingsOperationCompleted); } @@ -2682,7 +2455,8 @@ namespace WebsitePanel.Providers.Exchange { hideFromAddressBook, managedBy, members, - notes}, this.SetDistributionListGeneralSettingsOperationCompleted, userState); + notes, + addressLists}, this.SetDistributionListGeneralSettingsOperationCompleted, userState); } private void OnSetDistributionListGeneralSettingsOperationCompleted(object arg) { @@ -2737,21 +2511,23 @@ namespace WebsitePanel.Providers.Exchange { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListMailFlowSettings", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { + public void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists) { this.Invoke("SetDistributionListMailFlowSettings", new object[] { accountName, acceptAccounts, rejectAccounts, - requireSenderAuthentication}); + requireSenderAuthentication, + addressLists}); } /// - public System.IAsyncResult BeginSetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetDistributionListMailFlowSettings", new object[] { accountName, acceptAccounts, rejectAccounts, - requireSenderAuthentication}, callback, asyncState); + requireSenderAuthentication, + addressLists}, callback, asyncState); } /// @@ -2760,12 +2536,12 @@ namespace WebsitePanel.Providers.Exchange { } /// - public void SetDistributionListMailFlowSettingsAsync(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) { - this.SetDistributionListMailFlowSettingsAsync(accountName, acceptAccounts, rejectAccounts, requireSenderAuthentication, null); + public void SetDistributionListMailFlowSettingsAsync(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists) { + this.SetDistributionListMailFlowSettingsAsync(accountName, acceptAccounts, rejectAccounts, requireSenderAuthentication, addressLists, null); } /// - public void SetDistributionListMailFlowSettingsAsync(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, object userState) { + public void SetDistributionListMailFlowSettingsAsync(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists, object userState) { if ((this.SetDistributionListMailFlowSettingsOperationCompleted == null)) { this.SetDistributionListMailFlowSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListMailFlowSettingsOperationCompleted); } @@ -2773,7 +2549,8 @@ namespace WebsitePanel.Providers.Exchange { accountName, acceptAccounts, rejectAccounts, - requireSenderAuthentication}, this.SetDistributionListMailFlowSettingsOperationCompleted, userState); + requireSenderAuthentication, + addressLists}, this.SetDistributionListMailFlowSettingsOperationCompleted, userState); } private void OnSetDistributionListMailFlowSettingsOperationCompleted(object arg) { @@ -2828,17 +2605,19 @@ namespace WebsitePanel.Providers.Exchange { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListEmailAddresses", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses) { + public void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses, string[] addressLists) { this.Invoke("SetDistributionListEmailAddresses", new object[] { accountName, - emailAddresses}); + emailAddresses, + addressLists}); } /// - public System.IAsyncResult BeginSetDistributionListEmailAddresses(string accountName, string[] emailAddresses, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListEmailAddresses(string accountName, string[] emailAddresses, string[] addressLists, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetDistributionListEmailAddresses", new object[] { accountName, - emailAddresses}, callback, asyncState); + emailAddresses, + addressLists}, callback, asyncState); } /// @@ -2847,18 +2626,19 @@ namespace WebsitePanel.Providers.Exchange { } /// - public void SetDistributionListEmailAddressesAsync(string accountName, string[] emailAddresses) { - this.SetDistributionListEmailAddressesAsync(accountName, emailAddresses, null); + public void SetDistributionListEmailAddressesAsync(string accountName, string[] emailAddresses, string[] addressLists) { + this.SetDistributionListEmailAddressesAsync(accountName, emailAddresses, addressLists, null); } /// - public void SetDistributionListEmailAddressesAsync(string accountName, string[] emailAddresses, object userState) { + public void SetDistributionListEmailAddressesAsync(string accountName, string[] emailAddresses, string[] addressLists, object userState) { if ((this.SetDistributionListEmailAddressesOperationCompleted == null)) { this.SetDistributionListEmailAddressesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListEmailAddressesOperationCompleted); } this.InvokeAsync("SetDistributionListEmailAddresses", new object[] { accountName, - emailAddresses}, this.SetDistributionListEmailAddressesOperationCompleted, userState); + emailAddresses, + addressLists}, this.SetDistributionListEmailAddressesOperationCompleted, userState); } private void OnSetDistributionListEmailAddressesOperationCompleted(object arg) { @@ -2871,17 +2651,19 @@ namespace WebsitePanel.Providers.Exchange { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListPrimaryEmailAddress", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress) { + public void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress, string[] addressLists) { this.Invoke("SetDistributionListPrimaryEmailAddress", new object[] { accountName, - emailAddress}); + emailAddress, + addressLists}); } /// - public System.IAsyncResult BeginSetDistributionListPrimaryEmailAddress(string accountName, string emailAddress, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListPrimaryEmailAddress(string accountName, string emailAddress, string[] addressLists, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetDistributionListPrimaryEmailAddress", new object[] { accountName, - emailAddress}, callback, asyncState); + emailAddress, + addressLists}, callback, asyncState); } /// @@ -2890,18 +2672,19 @@ namespace WebsitePanel.Providers.Exchange { } /// - public void SetDistributionListPrimaryEmailAddressAsync(string accountName, string emailAddress) { - this.SetDistributionListPrimaryEmailAddressAsync(accountName, emailAddress, null); + public void SetDistributionListPrimaryEmailAddressAsync(string accountName, string emailAddress, string[] addressLists) { + this.SetDistributionListPrimaryEmailAddressAsync(accountName, emailAddress, addressLists, null); } /// - public void SetDistributionListPrimaryEmailAddressAsync(string accountName, string emailAddress, object userState) { + public void SetDistributionListPrimaryEmailAddressAsync(string accountName, string emailAddress, string[] addressLists, object userState) { if ((this.SetDistributionListPrimaryEmailAddressOperationCompleted == null)) { this.SetDistributionListPrimaryEmailAddressOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListPrimaryEmailAddressOperationCompleted); } this.InvokeAsync("SetDistributionListPrimaryEmailAddress", new object[] { accountName, - emailAddress}, this.SetDistributionListPrimaryEmailAddressOperationCompleted, userState); + emailAddress, + addressLists}, this.SetDistributionListPrimaryEmailAddressOperationCompleted, userState); } private void OnSetDistributionListPrimaryEmailAddressOperationCompleted(object arg) { @@ -2914,21 +2697,23 @@ namespace WebsitePanel.Providers.Exchange { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetDistributionListPermissions", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts) { + public void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists) { this.Invoke("SetDistributionListPermissions", new object[] { organizationId, accountName, sendAsAccounts, - sendOnBehalfAccounts}); + sendOnBehalfAccounts, + addressLists}); } /// - public System.IAsyncResult BeginSetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetDistributionListPermissions", new object[] { organizationId, accountName, sendAsAccounts, - sendOnBehalfAccounts}, callback, asyncState); + sendOnBehalfAccounts, + addressLists}, callback, asyncState); } /// @@ -2937,12 +2722,12 @@ namespace WebsitePanel.Providers.Exchange { } /// - public void SetDistributionListPermissionsAsync(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts) { - this.SetDistributionListPermissionsAsync(organizationId, accountName, sendAsAccounts, sendOnBehalfAccounts, null); + public void SetDistributionListPermissionsAsync(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists) { + this.SetDistributionListPermissionsAsync(organizationId, accountName, sendAsAccounts, sendOnBehalfAccounts, addressLists, null); } /// - public void SetDistributionListPermissionsAsync(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, object userState) { + public void SetDistributionListPermissionsAsync(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists, object userState) { if ((this.SetDistributionListPermissionsOperationCompleted == null)) { this.SetDistributionListPermissionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDistributionListPermissionsOperationCompleted); } @@ -2950,7 +2735,8 @@ namespace WebsitePanel.Providers.Exchange { organizationId, accountName, sendAsAccounts, - sendOnBehalfAccounts}, this.SetDistributionListPermissionsOperationCompleted, userState); + sendOnBehalfAccounts, + addressLists}, this.SetDistributionListPermissionsOperationCompleted, userState); } private void OnSetDistributionListPermissionsOperationCompleted(object arg) { @@ -3243,21 +3029,21 @@ namespace WebsitePanel.Providers.Exchange { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetPublicFolderGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void SetPublicFolderGeneralSettings(string folder, string newFolderName, string[] authorAccounts, bool hideFromAddressBook) { + public void SetPublicFolderGeneralSettings(string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts) { this.Invoke("SetPublicFolderGeneralSettings", new object[] { folder, newFolderName, - authorAccounts, - hideFromAddressBook}); + hideFromAddressBook, + accounts}); } /// - public System.IAsyncResult BeginSetPublicFolderGeneralSettings(string folder, string newFolderName, string[] authorAccounts, bool hideFromAddressBook, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginSetPublicFolderGeneralSettings(string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetPublicFolderGeneralSettings", new object[] { folder, newFolderName, - authorAccounts, - hideFromAddressBook}, callback, asyncState); + hideFromAddressBook, + accounts}, callback, asyncState); } /// @@ -3266,20 +3052,20 @@ namespace WebsitePanel.Providers.Exchange { } /// - public void SetPublicFolderGeneralSettingsAsync(string folder, string newFolderName, string[] authorAccounts, bool hideFromAddressBook) { - this.SetPublicFolderGeneralSettingsAsync(folder, newFolderName, authorAccounts, hideFromAddressBook, null); + public void SetPublicFolderGeneralSettingsAsync(string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts) { + this.SetPublicFolderGeneralSettingsAsync(folder, newFolderName, hideFromAddressBook, accounts, null); } /// - public void SetPublicFolderGeneralSettingsAsync(string folder, string newFolderName, string[] authorAccounts, bool hideFromAddressBook, object userState) { + public void SetPublicFolderGeneralSettingsAsync(string folder, string newFolderName, bool hideFromAddressBook, ExchangeAccount[] accounts, object userState) { if ((this.SetPublicFolderGeneralSettingsOperationCompleted == null)) { this.SetPublicFolderGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPublicFolderGeneralSettingsOperationCompleted); } this.InvokeAsync("SetPublicFolderGeneralSettings", new object[] { folder, newFolderName, - authorAccounts, - hideFromAddressBook}, this.SetPublicFolderGeneralSettingsOperationCompleted, userState); + hideFromAddressBook, + accounts}, this.SetPublicFolderGeneralSettingsOperationCompleted, userState); } private void OnSetPublicFolderGeneralSettingsOperationCompleted(object arg) { @@ -4085,29 +3871,12 @@ namespace WebsitePanel.Providers.Exchange { } } - - - - - - - - - - - - - - - - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CheckAccountCredentialsCompletedEventHandler(object sender, CheckAccountCredentialsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CheckAccountCredentialsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4129,11 +3898,11 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void ExtendToExchangeOrganizationCompletedEventHandler(object sender, ExtendToExchangeOrganizationCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class ExtendToExchangeOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4155,11 +3924,11 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateMailEnableUserCompletedEventHandler(object sender, CreateMailEnableUserCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CreateMailEnableUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4181,11 +3950,11 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateOrganizationOfflineAddressBookCompletedEventHandler(object sender, CreateOrganizationOfflineAddressBookCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CreateOrganizationOfflineAddressBookCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4207,15 +3976,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateOrganizationOfflineAddressBookCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetOABVirtualDirectoryCompletedEventHandler(object sender, GetOABVirtualDirectoryCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetOABVirtualDirectoryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4237,11 +4006,37 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateOrganizationAddressBookPolicyCompletedEventHandler(object sender, CreateOrganizationAddressBookPolicyCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateOrganizationAddressBookPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal CreateOrganizationAddressBookPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public Organization Result { + get { + this.RaiseExceptionIfNecessary(); + return ((Organization)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4263,15 +4058,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetOrganizationStorageLimitsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxesStatisticsCompletedEventHandler(object sender, GetMailboxesStatisticsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxesStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4293,15 +4088,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddAuthoritativeDomainCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetAuthoritativeDomainsCompletedEventHandler(object sender, GetAuthoritativeDomainsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetAuthoritativeDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4323,49 +4118,23 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteAuthoritativeDomainCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void CreateMailboxCompletedEventHandler(object sender, CreateMailboxCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CreateMailboxCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal CreateMailboxCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public string Result { - get { - this.RaiseExceptionIfNecessary(); - return ((string)(this.results[0])); - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteMailboxCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DisableMailboxCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxGeneralSettingsCompletedEventHandler(object sender, GetMailboxGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4387,15 +4156,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxMailFlowSettingsCompletedEventHandler(object sender, GetMailboxMailFlowSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4417,15 +4186,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxMailFlowSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxAdvancedSettingsCompletedEventHandler(object sender, GetMailboxAdvancedSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxAdvancedSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4447,15 +4216,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxAdvancedSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxEmailAddressesCompletedEventHandler(object sender, GetMailboxEmailAddressesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4477,23 +4246,23 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxEmailAddressesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxPrimaryEmailAddressCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetMailboxPermissionsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxPermissionsCompletedEventHandler(object sender, GetMailboxPermissionsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4515,11 +4284,11 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMailboxStatisticsCompletedEventHandler(object sender, GetMailboxStatisticsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMailboxStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4541,19 +4310,19 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateContactCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteContactCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetContactGeneralSettingsCompletedEventHandler(object sender, GetContactGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetContactGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4575,15 +4344,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetContactGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetContactMailFlowSettingsCompletedEventHandler(object sender, GetContactMailFlowSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetContactMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4605,23 +4374,23 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetContactMailFlowSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateDistributionListCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteDistributionListCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetDistributionListGeneralSettingsCompletedEventHandler(object sender, GetDistributionListGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetDistributionListGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4643,15 +4412,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetDistributionListGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetDistributionListMailFlowSettingsCompletedEventHandler(object sender, GetDistributionListMailFlowSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetDistributionListMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4673,15 +4442,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetDistributionListMailFlowSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetDistributionListEmailAddressesCompletedEventHandler(object sender, GetDistributionListEmailAddressesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetDistributionListEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4703,23 +4472,23 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetDistributionListEmailAddressesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetDistributionListPrimaryEmailAddressCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetDistributionListPermissionsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetDistributionListPermissionsCompletedEventHandler(object sender, GetDistributionListPermissionsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetDistributionListPermissionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4741,27 +4510,27 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreatePublicFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeletePublicFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void EnableMailPublicFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DisableMailPublicFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetPublicFolderGeneralSettingsCompletedEventHandler(object sender, GetPublicFolderGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetPublicFolderGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4783,15 +4552,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetPublicFolderGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, GetPublicFolderMailFlowSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetPublicFolderMailFlowSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4813,15 +4582,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetPublicFolderMailFlowSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetPublicFolderEmailAddressesCompletedEventHandler(object sender, GetPublicFolderEmailAddressesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetPublicFolderEmailAddressesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4843,19 +4612,19 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetPublicFolderEmailAddressesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetPublicFolderPrimaryEmailAddressCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetPublicFoldersStatisticsCompletedEventHandler(object sender, GetPublicFoldersStatisticsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetPublicFoldersStatisticsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4877,11 +4646,11 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetPublicFoldersRecursiveCompletedEventHandler(object sender, GetPublicFoldersRecursiveCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetPublicFoldersRecursiveCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4903,11 +4672,11 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetPublicFolderSizeCompletedEventHandler(object sender, GetPublicFolderSizeCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetPublicFolderSizeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4929,15 +4698,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateOrganizationActiveSyncPolicyCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetActiveSyncPolicyCompletedEventHandler(object sender, GetActiveSyncPolicyCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetActiveSyncPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4959,15 +4728,15 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetActiveSyncPolicyCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMobileDevicesCompletedEventHandler(object sender, GetMobileDevicesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMobileDevicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4989,11 +4758,11 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetMobileDeviceCompletedEventHandler(object sender, GetMobileDeviceCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetMobileDeviceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5015,14 +4784,14 @@ namespace WebsitePanel.Providers.Exchange { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void WipeDataFromDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CancelRemoteWipeRequestCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void RemoveDeviceCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); } diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/FtpServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/FtpServerProxy.cs index 958d97d2..038f2acd 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/FtpServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/FtpServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/HostedSharePointServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/HostedSharePointServerProxy.cs index ab10c8fe..d380cbe6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/HostedSharePointServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/HostedSharePointServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -29,7 +29,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.1433 +// Runtime Version:2.0.50727.5448 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -39,283 +39,328 @@ // // This source code was auto-generated by wsdl, Version=2.0.50727.42. // -using WebsitePanel.Providers.SharePoint; - -namespace WebsitePanel.Providers.HostedSolution { - using System.Diagnostics; +namespace WebsitePanel.Providers.HostedSolution +{ + using System.Xml.Serialization; using System.Web.Services; using System.ComponentModel; using System.Web.Services.Protocols; using System; - using System.Xml.Serialization; - - + using System.Diagnostics; + using WebsitePanel.Providers.SharePoint; + + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name="HostedSharePointServerSoap", Namespace="http://smbsaas/websitepanel/server/")] + [System.Web.Services.WebServiceBindingAttribute(Name = "HostedSharePointServerSoap", Namespace = "http://smbsaas/websitepanel/server/")] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] - public partial class HostedSharePointServer : Microsoft.Web.Services3.WebServicesClientProtocol { - + public partial class HostedSharePointServer : Microsoft.Web.Services3.WebServicesClientProtocol + { + public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue; - + private System.Threading.SendOrPostCallback GetSupportedLanguagesOperationCompleted; - + private System.Threading.SendOrPostCallback GetSiteCollectionsOperationCompleted; - + private System.Threading.SendOrPostCallback GetSiteCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback CreateSiteCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback UpdateQuotasOperationCompleted; - + private System.Threading.SendOrPostCallback CalculateSiteCollectionsDiskSpaceOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteSiteCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback BackupSiteCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback RestoreSiteCollectionOperationCompleted; - + private System.Threading.SendOrPostCallback GetTempFileBinaryChunkOperationCompleted; - + private System.Threading.SendOrPostCallback AppendTempFileBinaryChunkOperationCompleted; - + private System.Threading.SendOrPostCallback GetSiteCollectionSizeOperationCompleted; - + + private System.Threading.SendOrPostCallback SetPeoplePickerOuOperationCompleted; + /// - public HostedSharePointServer() { - this.Url = "http://192.168.0.132:9003/HostedSharePointServer.asmx"; + public HostedSharePointServer() + { + this.Url = "http://localhost:9003/HostedSharePointServer.asmx"; } - + /// public event GetSupportedLanguagesCompletedEventHandler GetSupportedLanguagesCompleted; - + /// public event GetSiteCollectionsCompletedEventHandler GetSiteCollectionsCompleted; - + /// public event GetSiteCollectionCompletedEventHandler GetSiteCollectionCompleted; - + /// public event CreateSiteCollectionCompletedEventHandler CreateSiteCollectionCompleted; - + /// public event UpdateQuotasCompletedEventHandler UpdateQuotasCompleted; - + /// public event CalculateSiteCollectionsDiskSpaceCompletedEventHandler CalculateSiteCollectionsDiskSpaceCompleted; - + /// public event DeleteSiteCollectionCompletedEventHandler DeleteSiteCollectionCompleted; - + /// public event BackupSiteCollectionCompletedEventHandler BackupSiteCollectionCompleted; - + /// public event RestoreSiteCollectionCompletedEventHandler RestoreSiteCollectionCompleted; - + /// public event GetTempFileBinaryChunkCompletedEventHandler GetTempFileBinaryChunkCompleted; - + /// public event AppendTempFileBinaryChunkCompletedEventHandler AppendTempFileBinaryChunkCompleted; - + /// public event GetSiteCollectionSizeCompletedEventHandler GetSiteCollectionSizeCompleted; - + + /// + public event SetPeoplePickerOuCompletedEventHandler SetPeoplePickerOuCompleted; + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetSupportedLanguages", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int[] GetSupportedLanguages() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetSupportedLanguages", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int[] GetSupportedLanguages() + { object[] results = this.Invoke("GetSupportedLanguages", new object[0]); return ((int[])(results[0])); } - + /// - public System.IAsyncResult BeginGetSupportedLanguages(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetSupportedLanguages(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetSupportedLanguages", new object[0], callback, asyncState); } - + /// - public int[] EndGetSupportedLanguages(System.IAsyncResult asyncResult) { + public int[] EndGetSupportedLanguages(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((int[])(results[0])); } - + /// - public void GetSupportedLanguagesAsync() { + public void GetSupportedLanguagesAsync() + { this.GetSupportedLanguagesAsync(null); } - + /// - public void GetSupportedLanguagesAsync(object userState) { - if ((this.GetSupportedLanguagesOperationCompleted == null)) { + public void GetSupportedLanguagesAsync(object userState) + { + if ((this.GetSupportedLanguagesOperationCompleted == null)) + { this.GetSupportedLanguagesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSupportedLanguagesOperationCompleted); } this.InvokeAsync("GetSupportedLanguages", new object[0], this.GetSupportedLanguagesOperationCompleted, userState); } - - private void OnGetSupportedLanguagesOperationCompleted(object arg) { - if ((this.GetSupportedLanguagesCompleted != null)) { + + private void OnGetSupportedLanguagesOperationCompleted(object arg) + { + if ((this.GetSupportedLanguagesCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetSupportedLanguagesCompleted(this, new GetSupportedLanguagesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetSiteCollections", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SharePointSiteCollection[] GetSiteCollections() { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetSiteCollections", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SharePointSiteCollection[] GetSiteCollections() + { object[] results = this.Invoke("GetSiteCollections", new object[0]); return ((SharePointSiteCollection[])(results[0])); } - + /// - public System.IAsyncResult BeginGetSiteCollections(System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetSiteCollections(System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetSiteCollections", new object[0], callback, asyncState); } - + /// - public SharePointSiteCollection[] EndGetSiteCollections(System.IAsyncResult asyncResult) { + public SharePointSiteCollection[] EndGetSiteCollections(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((SharePointSiteCollection[])(results[0])); } - + /// - public void GetSiteCollectionsAsync() { + public void GetSiteCollectionsAsync() + { this.GetSiteCollectionsAsync(null); } - + /// - public void GetSiteCollectionsAsync(object userState) { - if ((this.GetSiteCollectionsOperationCompleted == null)) { + public void GetSiteCollectionsAsync(object userState) + { + if ((this.GetSiteCollectionsOperationCompleted == null)) + { this.GetSiteCollectionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsOperationCompleted); } this.InvokeAsync("GetSiteCollections", new object[0], this.GetSiteCollectionsOperationCompleted, userState); } - - private void OnGetSiteCollectionsOperationCompleted(object arg) { - if ((this.GetSiteCollectionsCompleted != null)) { + + private void OnGetSiteCollectionsOperationCompleted(object arg) + { + if ((this.GetSiteCollectionsCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetSiteCollectionsCompleted(this, new GetSiteCollectionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetSiteCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SharePointSiteCollection GetSiteCollection(string url) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetSiteCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SharePointSiteCollection GetSiteCollection(string url) + { object[] results = this.Invoke("GetSiteCollection", new object[] { url}); return ((SharePointSiteCollection)(results[0])); } - + /// - public System.IAsyncResult BeginGetSiteCollection(string url, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetSiteCollection(string url, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetSiteCollection", new object[] { url}, callback, asyncState); } - + /// - public SharePointSiteCollection EndGetSiteCollection(System.IAsyncResult asyncResult) { + public SharePointSiteCollection EndGetSiteCollection(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((SharePointSiteCollection)(results[0])); } - + /// - public void GetSiteCollectionAsync(string url) { + public void GetSiteCollectionAsync(string url) + { this.GetSiteCollectionAsync(url, null); } - + /// - public void GetSiteCollectionAsync(string url, object userState) { - if ((this.GetSiteCollectionOperationCompleted == null)) { + public void GetSiteCollectionAsync(string url, object userState) + { + if ((this.GetSiteCollectionOperationCompleted == null)) + { this.GetSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionOperationCompleted); } this.InvokeAsync("GetSiteCollection", new object[] { url}, this.GetSiteCollectionOperationCompleted, userState); } - - private void OnGetSiteCollectionOperationCompleted(object arg) { - if ((this.GetSiteCollectionCompleted != null)) { + + private void OnGetSiteCollectionOperationCompleted(object arg) + { + if ((this.GetSiteCollectionCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetSiteCollectionCompleted(this, new GetSiteCollectionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateSiteCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void CreateSiteCollection(SharePointSiteCollection siteCollection) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateSiteCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void CreateSiteCollection(SharePointSiteCollection siteCollection) + { this.Invoke("CreateSiteCollection", new object[] { siteCollection}); } - + /// - public System.IAsyncResult BeginCreateSiteCollection(SharePointSiteCollection siteCollection, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCreateSiteCollection(SharePointSiteCollection siteCollection, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CreateSiteCollection", new object[] { siteCollection}, callback, asyncState); } - + /// - public void EndCreateSiteCollection(System.IAsyncResult asyncResult) { + public void EndCreateSiteCollection(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void CreateSiteCollectionAsync(SharePointSiteCollection siteCollection) { + public void CreateSiteCollectionAsync(SharePointSiteCollection siteCollection) + { this.CreateSiteCollectionAsync(siteCollection, null); } - + /// - public void CreateSiteCollectionAsync(SharePointSiteCollection siteCollection, object userState) { - if ((this.CreateSiteCollectionOperationCompleted == null)) { + public void CreateSiteCollectionAsync(SharePointSiteCollection siteCollection, object userState) + { + if ((this.CreateSiteCollectionOperationCompleted == null)) + { this.CreateSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateSiteCollectionOperationCompleted); } this.InvokeAsync("CreateSiteCollection", new object[] { siteCollection}, this.CreateSiteCollectionOperationCompleted, userState); } - - private void OnCreateSiteCollectionOperationCompleted(object arg) { - if ((this.CreateSiteCollectionCompleted != null)) { + + private void OnCreateSiteCollectionOperationCompleted(object arg) + { + if ((this.CreateSiteCollectionCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateSiteCollectionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/UpdateQuotas", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void UpdateQuotas(string url, long maxSize, long warningSize) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/UpdateQuotas", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void UpdateQuotas(string url, long maxSize, long warningSize) + { this.Invoke("UpdateQuotas", new object[] { url, maxSize, warningSize}); } - + /// - public System.IAsyncResult BeginUpdateQuotas(string url, long maxSize, long warningSize, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginUpdateQuotas(string url, long maxSize, long warningSize, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("UpdateQuotas", new object[] { url, maxSize, warningSize}, callback, asyncState); } - + /// - public void EndUpdateQuotas(System.IAsyncResult asyncResult) { + public void EndUpdateQuotas(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void UpdateQuotasAsync(string url, long maxSize, long warningSize) { + public void UpdateQuotasAsync(string url, long maxSize, long warningSize) + { this.UpdateQuotasAsync(url, maxSize, warningSize, null); } - + /// - public void UpdateQuotasAsync(string url, long maxSize, long warningSize, object userState) { - if ((this.UpdateQuotasOperationCompleted == null)) { + public void UpdateQuotasAsync(string url, long maxSize, long warningSize, object userState) + { + if ((this.UpdateQuotasOperationCompleted == null)) + { this.UpdateQuotasOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateQuotasOperationCompleted); } this.InvokeAsync("UpdateQuotas", new object[] { @@ -323,129 +368,153 @@ namespace WebsitePanel.Providers.HostedSolution { maxSize, warningSize}, this.UpdateQuotasOperationCompleted, userState); } - - private void OnUpdateQuotasOperationCompleted(object arg) { - if ((this.UpdateQuotasCompleted != null)) { + + private void OnUpdateQuotasOperationCompleted(object arg) + { + if ((this.UpdateQuotasCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.UpdateQuotasCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CalculateSiteCollectionsDiskSpace", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SharePointSiteDiskSpace[] CalculateSiteCollectionsDiskSpace(string[] urls) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CalculateSiteCollectionsDiskSpace", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SharePointSiteDiskSpace[] CalculateSiteCollectionsDiskSpace(string[] urls) + { object[] results = this.Invoke("CalculateSiteCollectionsDiskSpace", new object[] { urls}); return ((SharePointSiteDiskSpace[])(results[0])); } - + /// - public System.IAsyncResult BeginCalculateSiteCollectionsDiskSpace(string[] urls, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginCalculateSiteCollectionsDiskSpace(string[] urls, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("CalculateSiteCollectionsDiskSpace", new object[] { urls}, callback, asyncState); } - + /// - public SharePointSiteDiskSpace[] EndCalculateSiteCollectionsDiskSpace(System.IAsyncResult asyncResult) { + public SharePointSiteDiskSpace[] EndCalculateSiteCollectionsDiskSpace(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((SharePointSiteDiskSpace[])(results[0])); } - + /// - public void CalculateSiteCollectionsDiskSpaceAsync(string[] urls) { + public void CalculateSiteCollectionsDiskSpaceAsync(string[] urls) + { this.CalculateSiteCollectionsDiskSpaceAsync(urls, null); } - + /// - public void CalculateSiteCollectionsDiskSpaceAsync(string[] urls, object userState) { - if ((this.CalculateSiteCollectionsDiskSpaceOperationCompleted == null)) { + public void CalculateSiteCollectionsDiskSpaceAsync(string[] urls, object userState) + { + if ((this.CalculateSiteCollectionsDiskSpaceOperationCompleted == null)) + { this.CalculateSiteCollectionsDiskSpaceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCalculateSiteCollectionsDiskSpaceOperationCompleted); } this.InvokeAsync("CalculateSiteCollectionsDiskSpace", new object[] { urls}, this.CalculateSiteCollectionsDiskSpaceOperationCompleted, userState); } - - private void OnCalculateSiteCollectionsDiskSpaceOperationCompleted(object arg) { - if ((this.CalculateSiteCollectionsDiskSpaceCompleted != null)) { + + private void OnCalculateSiteCollectionsDiskSpaceOperationCompleted(object arg) + { + if ((this.CalculateSiteCollectionsDiskSpaceCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CalculateSiteCollectionsDiskSpaceCompleted(this, new CalculateSiteCollectionsDiskSpaceCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteSiteCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void DeleteSiteCollection(string url) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteSiteCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void DeleteSiteCollection(SharePointSiteCollection siteCollection) + { this.Invoke("DeleteSiteCollection", new object[] { - url}); + siteCollection}); } - + /// - public System.IAsyncResult BeginDeleteSiteCollection(string url, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDeleteSiteCollection(SharePointSiteCollection siteCollection, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("DeleteSiteCollection", new object[] { - url}, callback, asyncState); + siteCollection}, callback, asyncState); } - + /// - public void EndDeleteSiteCollection(System.IAsyncResult asyncResult) { + public void EndDeleteSiteCollection(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void DeleteSiteCollectionAsync(string url) { - this.DeleteSiteCollectionAsync(url, null); + public void DeleteSiteCollectionAsync(SharePointSiteCollection siteCollection) + { + this.DeleteSiteCollectionAsync(siteCollection, null); } - + /// - public void DeleteSiteCollectionAsync(string url, object userState) { - if ((this.DeleteSiteCollectionOperationCompleted == null)) { + public void DeleteSiteCollectionAsync(SharePointSiteCollection siteCollection, object userState) + { + if ((this.DeleteSiteCollectionOperationCompleted == null)) + { this.DeleteSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteSiteCollectionOperationCompleted); } this.InvokeAsync("DeleteSiteCollection", new object[] { - url}, this.DeleteSiteCollectionOperationCompleted, userState); + siteCollection}, this.DeleteSiteCollectionOperationCompleted, userState); } - - private void OnDeleteSiteCollectionOperationCompleted(object arg) { - if ((this.DeleteSiteCollectionCompleted != null)) { + + private void OnDeleteSiteCollectionOperationCompleted(object arg) + { + if ((this.DeleteSiteCollectionCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteSiteCollectionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/BackupSiteCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string BackupSiteCollection(string url, string filename, bool zip) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/BackupSiteCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string BackupSiteCollection(string url, string filename, bool zip) + { object[] results = this.Invoke("BackupSiteCollection", new object[] { url, filename, zip}); return ((string)(results[0])); } - + /// - public System.IAsyncResult BeginBackupSiteCollection(string url, string filename, bool zip, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginBackupSiteCollection(string url, string filename, bool zip, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("BackupSiteCollection", new object[] { url, filename, zip}, callback, asyncState); } - + /// - public string EndBackupSiteCollection(System.IAsyncResult asyncResult) { + public string EndBackupSiteCollection(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string)(results[0])); } - + /// - public void BackupSiteCollectionAsync(string url, string filename, bool zip) { + public void BackupSiteCollectionAsync(string url, string filename, bool zip) + { this.BackupSiteCollectionAsync(url, filename, zip, null); } - + /// - public void BackupSiteCollectionAsync(string url, string filename, bool zip, object userState) { - if ((this.BackupSiteCollectionOperationCompleted == null)) { + public void BackupSiteCollectionAsync(string url, string filename, bool zip, object userState) + { + if ((this.BackupSiteCollectionOperationCompleted == null)) + { this.BackupSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnBackupSiteCollectionOperationCompleted); } this.InvokeAsync("BackupSiteCollection", new object[] { @@ -453,91 +522,107 @@ namespace WebsitePanel.Providers.HostedSolution { filename, zip}, this.BackupSiteCollectionOperationCompleted, userState); } - - private void OnBackupSiteCollectionOperationCompleted(object arg) { - if ((this.BackupSiteCollectionCompleted != null)) { + + private void OnBackupSiteCollectionOperationCompleted(object arg) + { + if ((this.BackupSiteCollectionCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.BackupSiteCollectionCompleted(this, new BackupSiteCollectionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RestoreSiteCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RestoreSiteCollection(SharePointSiteCollection siteCollection, string filename) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RestoreSiteCollection", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void RestoreSiteCollection(SharePointSiteCollection siteCollection, string filename) + { this.Invoke("RestoreSiteCollection", new object[] { siteCollection, filename}); } - + /// - public System.IAsyncResult BeginRestoreSiteCollection(SharePointSiteCollection siteCollection, string filename, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginRestoreSiteCollection(SharePointSiteCollection siteCollection, string filename, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("RestoreSiteCollection", new object[] { siteCollection, filename}, callback, asyncState); } - + /// - public void EndRestoreSiteCollection(System.IAsyncResult asyncResult) { + public void EndRestoreSiteCollection(System.IAsyncResult asyncResult) + { this.EndInvoke(asyncResult); } - + /// - public void RestoreSiteCollectionAsync(SharePointSiteCollection siteCollection, string filename) { + public void RestoreSiteCollectionAsync(SharePointSiteCollection siteCollection, string filename) + { this.RestoreSiteCollectionAsync(siteCollection, filename, null); } - + /// - public void RestoreSiteCollectionAsync(SharePointSiteCollection siteCollection, string filename, object userState) { - if ((this.RestoreSiteCollectionOperationCompleted == null)) { + public void RestoreSiteCollectionAsync(SharePointSiteCollection siteCollection, string filename, object userState) + { + if ((this.RestoreSiteCollectionOperationCompleted == null)) + { this.RestoreSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRestoreSiteCollectionOperationCompleted); } this.InvokeAsync("RestoreSiteCollection", new object[] { siteCollection, filename}, this.RestoreSiteCollectionOperationCompleted, userState); } - - private void OnRestoreSiteCollectionOperationCompleted(object arg) { - if ((this.RestoreSiteCollectionCompleted != null)) { + + private void OnRestoreSiteCollectionOperationCompleted(object arg) + { + if ((this.RestoreSiteCollectionCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.RestoreSiteCollectionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetTempFileBinaryChunk", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - [return: System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] - public byte[] GetTempFileBinaryChunk(string path, int offset, int length) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetTempFileBinaryChunk", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [return: System.Xml.Serialization.XmlElementAttribute(DataType = "base64Binary")] + public byte[] GetTempFileBinaryChunk(string path, int offset, int length) + { object[] results = this.Invoke("GetTempFileBinaryChunk", new object[] { path, offset, length}); return ((byte[])(results[0])); } - + /// - public System.IAsyncResult BeginGetTempFileBinaryChunk(string path, int offset, int length, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetTempFileBinaryChunk(string path, int offset, int length, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetTempFileBinaryChunk", new object[] { path, offset, length}, callback, asyncState); } - + /// - public byte[] EndGetTempFileBinaryChunk(System.IAsyncResult asyncResult) { + public byte[] EndGetTempFileBinaryChunk(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((byte[])(results[0])); } - + /// - public void GetTempFileBinaryChunkAsync(string path, int offset, int length) { + public void GetTempFileBinaryChunkAsync(string path, int offset, int length) + { this.GetTempFileBinaryChunkAsync(path, offset, length, null); } - + /// - public void GetTempFileBinaryChunkAsync(string path, int offset, int length, object userState) { - if ((this.GetTempFileBinaryChunkOperationCompleted == null)) { + public void GetTempFileBinaryChunkAsync(string path, int offset, int length, object userState) + { + if ((this.GetTempFileBinaryChunkOperationCompleted == null)) + { this.GetTempFileBinaryChunkOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetTempFileBinaryChunkOperationCompleted); } this.InvokeAsync("GetTempFileBinaryChunk", new object[] { @@ -545,47 +630,55 @@ namespace WebsitePanel.Providers.HostedSolution { offset, length}, this.GetTempFileBinaryChunkOperationCompleted, userState); } - - private void OnGetTempFileBinaryChunkOperationCompleted(object arg) { - if ((this.GetTempFileBinaryChunkCompleted != null)) { + + private void OnGetTempFileBinaryChunkOperationCompleted(object arg) + { + if ((this.GetTempFileBinaryChunkCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetTempFileBinaryChunkCompleted(this, new GetTempFileBinaryChunkCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AppendTempFileBinaryChunk", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string AppendTempFileBinaryChunk(string fileName, string path, [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] chunk) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AppendTempFileBinaryChunk", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string AppendTempFileBinaryChunk(string fileName, string path, [System.Xml.Serialization.XmlElementAttribute(DataType = "base64Binary")] byte[] chunk) + { object[] results = this.Invoke("AppendTempFileBinaryChunk", new object[] { fileName, path, chunk}); return ((string)(results[0])); } - + /// - public System.IAsyncResult BeginAppendTempFileBinaryChunk(string fileName, string path, byte[] chunk, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAppendTempFileBinaryChunk(string fileName, string path, byte[] chunk, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("AppendTempFileBinaryChunk", new object[] { fileName, path, chunk}, callback, asyncState); } - + /// - public string EndAppendTempFileBinaryChunk(System.IAsyncResult asyncResult) { + public string EndAppendTempFileBinaryChunk(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((string)(results[0])); } - + /// - public void AppendTempFileBinaryChunkAsync(string fileName, string path, byte[] chunk) { + public void AppendTempFileBinaryChunkAsync(string fileName, string path, byte[] chunk) + { this.AppendTempFileBinaryChunkAsync(fileName, path, chunk, null); } - + /// - public void AppendTempFileBinaryChunkAsync(string fileName, string path, byte[] chunk, object userState) { - if ((this.AppendTempFileBinaryChunkOperationCompleted == null)) { + public void AppendTempFileBinaryChunkAsync(string fileName, string path, byte[] chunk, object userState) + { + if ((this.AppendTempFileBinaryChunkOperationCompleted == null)) + { this.AppendTempFileBinaryChunkOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAppendTempFileBinaryChunkOperationCompleted); } this.InvokeAsync("AppendTempFileBinaryChunk", new object[] { @@ -593,287 +686,381 @@ namespace WebsitePanel.Providers.HostedSolution { path, chunk}, this.AppendTempFileBinaryChunkOperationCompleted, userState); } - - private void OnAppendTempFileBinaryChunkOperationCompleted(object arg) { - if ((this.AppendTempFileBinaryChunkCompleted != null)) { + + private void OnAppendTempFileBinaryChunkOperationCompleted(object arg) + { + if ((this.AppendTempFileBinaryChunkCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.AppendTempFileBinaryChunkCompleted(this, new AppendTempFileBinaryChunkCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetSiteCollectionSize", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public long GetSiteCollectionSize(string url) { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetSiteCollectionSize", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public long GetSiteCollectionSize(string url) + { object[] results = this.Invoke("GetSiteCollectionSize", new object[] { url}); return ((long)(results[0])); } - + /// - public System.IAsyncResult BeginGetSiteCollectionSize(string url, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetSiteCollectionSize(string url, System.AsyncCallback callback, object asyncState) + { return this.BeginInvoke("GetSiteCollectionSize", new object[] { url}, callback, asyncState); } - + /// - public long EndGetSiteCollectionSize(System.IAsyncResult asyncResult) { + public long EndGetSiteCollectionSize(System.IAsyncResult asyncResult) + { object[] results = this.EndInvoke(asyncResult); return ((long)(results[0])); } - + /// - public void GetSiteCollectionSizeAsync(string url) { + public void GetSiteCollectionSizeAsync(string url) + { this.GetSiteCollectionSizeAsync(url, null); } - + /// - public void GetSiteCollectionSizeAsync(string url, object userState) { - if ((this.GetSiteCollectionSizeOperationCompleted == null)) { + public void GetSiteCollectionSizeAsync(string url, object userState) + { + if ((this.GetSiteCollectionSizeOperationCompleted == null)) + { this.GetSiteCollectionSizeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionSizeOperationCompleted); } this.InvokeAsync("GetSiteCollectionSize", new object[] { url}, this.GetSiteCollectionSizeOperationCompleted, userState); } - - private void OnGetSiteCollectionSizeOperationCompleted(object arg) { - if ((this.GetSiteCollectionSizeCompleted != null)) { + + private void OnGetSiteCollectionSizeOperationCompleted(object arg) + { + if ((this.GetSiteCollectionSizeCompleted != null)) + { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetSiteCollectionSizeCompleted(this, new GetSiteCollectionSizeCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - public new void CancelAsync(object userState) { + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetPeoplePickerOu", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SetPeoplePickerOu(string site, string ou) + { + this.Invoke("SetPeoplePickerOu", new object[] { + site, + ou}); + } + + /// + public System.IAsyncResult BeginSetPeoplePickerOu(string site, string ou, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("SetPeoplePickerOu", new object[] { + site, + ou}, callback, asyncState); + } + + /// + public void EndSetPeoplePickerOu(System.IAsyncResult asyncResult) + { + this.EndInvoke(asyncResult); + } + + /// + public void SetPeoplePickerOuAsync(string site, string ou) + { + this.SetPeoplePickerOuAsync(site, ou, null); + } + + /// + public void SetPeoplePickerOuAsync(string site, string ou, object userState) + { + if ((this.SetPeoplePickerOuOperationCompleted == null)) + { + this.SetPeoplePickerOuOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetPeoplePickerOuOperationCompleted); + } + this.InvokeAsync("SetPeoplePickerOu", new object[] { + site, + ou}, this.SetPeoplePickerOuOperationCompleted, userState); + } + + private void OnSetPeoplePickerOuOperationCompleted(object arg) + { + if ((this.SetPeoplePickerOuCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetPeoplePickerOuCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) + { base.CancelAsync(userState); } } - - - - - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetSupportedLanguagesCompletedEventHandler(object sender, GetSupportedLanguagesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetSupportedLanguagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetSupportedLanguagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetSupportedLanguagesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetSupportedLanguagesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public int[] Result { - get { + public int[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((int[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetSiteCollectionsCompletedEventHandler(object sender, GetSiteCollectionsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetSiteCollectionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetSiteCollectionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetSiteCollectionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetSiteCollectionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public SharePointSiteCollection[] Result { - get { + public SharePointSiteCollection[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((SharePointSiteCollection[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetSiteCollectionCompletedEventHandler(object sender, GetSiteCollectionCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetSiteCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetSiteCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public SharePointSiteCollection Result { - get { + public SharePointSiteCollection Result + { + get + { this.RaiseExceptionIfNecessary(); return ((SharePointSiteCollection)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateSiteCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateQuotasCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CalculateSiteCollectionsDiskSpaceCompletedEventHandler(object sender, CalculateSiteCollectionsDiskSpaceCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CalculateSiteCollectionsDiskSpaceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class CalculateSiteCollectionsDiskSpaceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal CalculateSiteCollectionsDiskSpaceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal CalculateSiteCollectionsDiskSpaceCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public SharePointSiteDiskSpace[] Result { - get { + public SharePointSiteDiskSpace[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((SharePointSiteDiskSpace[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteSiteCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void BackupSiteCollectionCompletedEventHandler(object sender, BackupSiteCollectionCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class BackupSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class BackupSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal BackupSiteCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal BackupSiteCollectionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public string Result { - get { + public string Result + { + get + { this.RaiseExceptionIfNecessary(); return ((string)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void RestoreSiteCollectionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetTempFileBinaryChunkCompletedEventHandler(object sender, GetTempFileBinaryChunkCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetTempFileBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetTempFileBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetTempFileBinaryChunkCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetTempFileBinaryChunkCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public byte[] Result { - get { + public byte[] Result + { + get + { this.RaiseExceptionIfNecessary(); return ((byte[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AppendTempFileBinaryChunkCompletedEventHandler(object sender, AppendTempFileBinaryChunkCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class AppendTempFileBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class AppendTempFileBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal AppendTempFileBinaryChunkCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal AppendTempFileBinaryChunkCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public string Result { - get { + public string Result + { + get + { this.RaiseExceptionIfNecessary(); return ((string)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetSiteCollectionSizeCompletedEventHandler(object sender, GetSiteCollectionSizeCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetSiteCollectionSizeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - + public partial class GetSiteCollectionSizeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + private object[] results; - - internal GetSiteCollectionSizeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { + + internal GetSiteCollectionSizeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { this.results = results; } - + /// - public long Result { - get { + public long Result + { + get + { this.RaiseExceptionIfNecessary(); return ((long)(this.results[0])); } } } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetPeoplePickerOuCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); } diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/LyncServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/LyncServerProxy.cs new file mode 100644 index 00000000..846a78f8 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/LyncServerProxy.cs @@ -0,0 +1,941 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.5456 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by wsdl, Version=2.0.50727.42. +// +using WebsitePanel.Providers.HostedSolution; + +namespace WebsitePanel.Providers.Lync +{ + using System.Xml.Serialization; + using System.Web.Services; + using System.ComponentModel; + using System.Web.Services.Protocols; + using System; + using System.Diagnostics; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Web.Services.WebServiceBindingAttribute(Name = "LyncServerSoap", Namespace = "http://smbsaas/websitepanel/server/")] + public partial class LyncServer : Microsoft.Web.Services3.WebServicesClientProtocol + { + + public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue; + + private System.Threading.SendOrPostCallback CreateOrganizationOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; + + private System.Threading.SendOrPostCallback CreateUserOperationCompleted; + + private System.Threading.SendOrPostCallback GetLyncUserGeneralSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SetLyncUserPlanOperationCompleted; + + private System.Threading.SendOrPostCallback DeleteUserOperationCompleted; + + private System.Threading.SendOrPostCallback GetFederationDomainsOperationCompleted; + + private System.Threading.SendOrPostCallback AddFederationDomainOperationCompleted; + + private System.Threading.SendOrPostCallback RemoveFederationDomainOperationCompleted; + + private System.Threading.SendOrPostCallback ReloadConfigurationOperationCompleted; + + /// + public LyncServer() + { + this.Url = "http://localhost:9003/LyncServer.asmx"; + } + + /// + public event CreateOrganizationCompletedEventHandler CreateOrganizationCompleted; + + /// + public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; + + /// + public event CreateUserCompletedEventHandler CreateUserCompleted; + + /// + public event GetLyncUserGeneralSettingsCompletedEventHandler GetLyncUserGeneralSettingsCompleted; + + /// + public event SetLyncUserPlanCompletedEventHandler SetLyncUserPlanCompleted; + + /// + public event DeleteUserCompletedEventHandler DeleteUserCompleted; + + /// + public event GetFederationDomainsCompletedEventHandler GetFederationDomainsCompleted; + + /// + public event AddFederationDomainCompletedEventHandler AddFederationDomainCompleted; + + /// + public event RemoveFederationDomainCompletedEventHandler RemoveFederationDomainCompleted; + + /// + public event ReloadConfigurationCompletedEventHandler ReloadConfigurationCompleted; + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganization", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string CreateOrganization(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice) + { + object[] results = this.Invoke("CreateOrganization", new object[] { + organizationId, + sipDomain, + enableConferencing, + enableConferencingVideo, + maxConferenceSize, + enabledFederation, + enabledEnterpriseVoice}); + return ((string)(results[0])); + } + + /// + public System.IAsyncResult BeginCreateOrganization(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("CreateOrganization", new object[] { + organizationId, + sipDomain, + enableConferencing, + enableConferencingVideo, + maxConferenceSize, + enabledFederation, + enabledEnterpriseVoice}, callback, asyncState); + } + + /// + public string EndCreateOrganization(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((string)(results[0])); + } + + /// + public void CreateOrganizationAsync(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice) + { + this.CreateOrganizationAsync(organizationId, sipDomain, enableConferencing, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice, null); + } + + /// + public void CreateOrganizationAsync(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice, object userState) + { + if ((this.CreateOrganizationOperationCompleted == null)) + { + this.CreateOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationOperationCompleted); + } + this.InvokeAsync("CreateOrganization", new object[] { + organizationId, + sipDomain, + enableConferencing, + enableConferencingVideo, + maxConferenceSize, + enabledFederation, + enabledEnterpriseVoice}, this.CreateOrganizationOperationCompleted, userState); + } + + private void OnCreateOrganizationOperationCompleted(object arg) + { + if ((this.CreateOrganizationCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CreateOrganizationCompleted(this, new CreateOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteOrganization", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool DeleteOrganization(string organizationId, string sipDomain) + { + object[] results = this.Invoke("DeleteOrganization", new object[] { + organizationId, + sipDomain}); + return ((bool)(results[0])); + } + + /// + public System.IAsyncResult BeginDeleteOrganization(string organizationId, string sipDomain, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("DeleteOrganization", new object[] { + organizationId, + sipDomain}, callback, asyncState); + } + + /// + public bool EndDeleteOrganization(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((bool)(results[0])); + } + + /// + public void DeleteOrganizationAsync(string organizationId, string sipDomain) + { + this.DeleteOrganizationAsync(organizationId, sipDomain, null); + } + + /// + public void DeleteOrganizationAsync(string organizationId, string sipDomain, object userState) + { + if ((this.DeleteOrganizationOperationCompleted == null)) + { + this.DeleteOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationOperationCompleted); + } + this.InvokeAsync("DeleteOrganization", new object[] { + organizationId, + sipDomain}, this.DeleteOrganizationOperationCompleted, userState); + } + + private void OnDeleteOrganizationOperationCompleted(object arg) + { + if ((this.DeleteOrganizationCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteOrganizationCompleted(this, new DeleteOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateUser", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool CreateUser(string organizationId, string userUpn, LyncUserPlan plan) + { + object[] results = this.Invoke("CreateUser", new object[] { + organizationId, + userUpn, + plan}); + return ((bool)(results[0])); + } + + /// + public System.IAsyncResult BeginCreateUser(string organizationId, string userUpn, LyncUserPlan plan, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("CreateUser", new object[] { + organizationId, + userUpn, + plan}, callback, asyncState); + } + + /// + public bool EndCreateUser(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((bool)(results[0])); + } + + /// + public void CreateUserAsync(string organizationId, string userUpn, LyncUserPlan plan) + { + this.CreateUserAsync(organizationId, userUpn, plan, null); + } + + /// + public void CreateUserAsync(string organizationId, string userUpn, LyncUserPlan plan, object userState) + { + if ((this.CreateUserOperationCompleted == null)) + { + this.CreateUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateUserOperationCompleted); + } + this.InvokeAsync("CreateUser", new object[] { + organizationId, + userUpn, + plan}, this.CreateUserOperationCompleted, userState); + } + + private void OnCreateUserOperationCompleted(object arg) + { + if ((this.CreateUserCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CreateUserCompleted(this, new CreateUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetLyncUserGeneralSettings", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public LyncUser GetLyncUserGeneralSettings(string organizationId, string userUpn) + { + object[] results = this.Invoke("GetLyncUserGeneralSettings", new object[] { + organizationId, + userUpn}); + return ((LyncUser)(results[0])); + } + + /// + public System.IAsyncResult BeginGetLyncUserGeneralSettings(string organizationId, string userUpn, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetLyncUserGeneralSettings", new object[] { + organizationId, + userUpn}, callback, asyncState); + } + + /// + public LyncUser EndGetLyncUserGeneralSettings(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((LyncUser)(results[0])); + } + + /// + public void GetLyncUserGeneralSettingsAsync(string organizationId, string userUpn) + { + this.GetLyncUserGeneralSettingsAsync(organizationId, userUpn, null); + } + + /// + public void GetLyncUserGeneralSettingsAsync(string organizationId, string userUpn, object userState) + { + if ((this.GetLyncUserGeneralSettingsOperationCompleted == null)) + { + this.GetLyncUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLyncUserGeneralSettingsOperationCompleted); + } + this.InvokeAsync("GetLyncUserGeneralSettings", new object[] { + organizationId, + userUpn}, this.GetLyncUserGeneralSettingsOperationCompleted, userState); + } + + private void OnGetLyncUserGeneralSettingsOperationCompleted(object arg) + { + if ((this.GetLyncUserGeneralSettingsCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetLyncUserGeneralSettingsCompleted(this, new GetLyncUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetLyncUserPlan", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool SetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan) + { + object[] results = this.Invoke("SetLyncUserPlan", new object[] { + organizationId, + userUpn, + plan}); + return ((bool)(results[0])); + } + + /// + public System.IAsyncResult BeginSetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("SetLyncUserPlan", new object[] { + organizationId, + userUpn, + plan}, callback, asyncState); + } + + /// + public bool EndSetLyncUserPlan(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((bool)(results[0])); + } + + /// + public void SetLyncUserPlanAsync(string organizationId, string userUpn, LyncUserPlan plan) + { + this.SetLyncUserPlanAsync(organizationId, userUpn, plan, null); + } + + /// + public void SetLyncUserPlanAsync(string organizationId, string userUpn, LyncUserPlan plan, object userState) + { + if ((this.SetLyncUserPlanOperationCompleted == null)) + { + this.SetLyncUserPlanOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetLyncUserPlanOperationCompleted); + } + this.InvokeAsync("SetLyncUserPlan", new object[] { + organizationId, + userUpn, + plan}, this.SetLyncUserPlanOperationCompleted, userState); + } + + private void OnSetLyncUserPlanOperationCompleted(object arg) + { + if ((this.SetLyncUserPlanCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetLyncUserPlanCompleted(this, new SetLyncUserPlanCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteUser", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool DeleteUser(string userUpn) + { + object[] results = this.Invoke("DeleteUser", new object[] { + userUpn}); + return ((bool)(results[0])); + } + + /// + public System.IAsyncResult BeginDeleteUser(string userUpn, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("DeleteUser", new object[] { + userUpn}, callback, asyncState); + } + + /// + public bool EndDeleteUser(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((bool)(results[0])); + } + + /// + public void DeleteUserAsync(string userUpn) + { + this.DeleteUserAsync(userUpn, null); + } + + /// + public void DeleteUserAsync(string userUpn, object userState) + { + if ((this.DeleteUserOperationCompleted == null)) + { + this.DeleteUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteUserOperationCompleted); + } + this.InvokeAsync("DeleteUser", new object[] { + userUpn}, this.DeleteUserOperationCompleted, userState); + } + + private void OnDeleteUserOperationCompleted(object arg) + { + if ((this.DeleteUserCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.DeleteUserCompleted(this, new DeleteUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFederationDomains", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public LyncFederationDomain[] GetFederationDomains(string organizationId) + { + object[] results = this.Invoke("GetFederationDomains", new object[] { + organizationId}); + return ((LyncFederationDomain[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetFederationDomains(string organizationId, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("GetFederationDomains", new object[] { + organizationId}, callback, asyncState); + } + + /// + public LyncFederationDomain[] EndGetFederationDomains(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((LyncFederationDomain[])(results[0])); + } + + /// + public void GetFederationDomainsAsync(string organizationId) + { + this.GetFederationDomainsAsync(organizationId, null); + } + + /// + public void GetFederationDomainsAsync(string organizationId, object userState) + { + if ((this.GetFederationDomainsOperationCompleted == null)) + { + this.GetFederationDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFederationDomainsOperationCompleted); + } + this.InvokeAsync("GetFederationDomains", new object[] { + organizationId}, this.GetFederationDomainsOperationCompleted, userState); + } + + private void OnGetFederationDomainsOperationCompleted(object arg) + { + if ((this.GetFederationDomainsCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetFederationDomainsCompleted(this, new GetFederationDomainsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/AddFederationDomain", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool AddFederationDomain(string organizationId, string domainName, string proxyFqdn) + { + object[] results = this.Invoke("AddFederationDomain", new object[] { + organizationId, + domainName, + proxyFqdn}); + return ((bool)(results[0])); + } + + /// + public System.IAsyncResult BeginAddFederationDomain(string organizationId, string domainName, string proxyFqdn, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("AddFederationDomain", new object[] { + organizationId, + domainName, + proxyFqdn}, callback, asyncState); + } + + /// + public bool EndAddFederationDomain(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((bool)(results[0])); + } + + /// + public void AddFederationDomainAsync(string organizationId, string domainName, string proxyFqdn) + { + this.AddFederationDomainAsync(organizationId, domainName, proxyFqdn, null); + } + + /// + public void AddFederationDomainAsync(string organizationId, string domainName, string proxyFqdn, object userState) + { + if ((this.AddFederationDomainOperationCompleted == null)) + { + this.AddFederationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddFederationDomainOperationCompleted); + } + this.InvokeAsync("AddFederationDomain", new object[] { + organizationId, + domainName, + proxyFqdn}, this.AddFederationDomainOperationCompleted, userState); + } + + private void OnAddFederationDomainOperationCompleted(object arg) + { + if ((this.AddFederationDomainCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.AddFederationDomainCompleted(this, new AddFederationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveFederationDomain", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool RemoveFederationDomain(string organizationId, string domainName) + { + object[] results = this.Invoke("RemoveFederationDomain", new object[] { + organizationId, + domainName}); + return ((bool)(results[0])); + } + + /// + public System.IAsyncResult BeginRemoveFederationDomain(string organizationId, string domainName, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("RemoveFederationDomain", new object[] { + organizationId, + domainName}, callback, asyncState); + } + + /// + public bool EndRemoveFederationDomain(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((bool)(results[0])); + } + + /// + public void RemoveFederationDomainAsync(string organizationId, string domainName) + { + this.RemoveFederationDomainAsync(organizationId, domainName, null); + } + + /// + public void RemoveFederationDomainAsync(string organizationId, string domainName, object userState) + { + if ((this.RemoveFederationDomainOperationCompleted == null)) + { + this.RemoveFederationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveFederationDomainOperationCompleted); + } + this.InvokeAsync("RemoveFederationDomain", new object[] { + organizationId, + domainName}, this.RemoveFederationDomainOperationCompleted, userState); + } + + private void OnRemoveFederationDomainOperationCompleted(object arg) + { + if ((this.RemoveFederationDomainCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RemoveFederationDomainCompleted(this, new RemoveFederationDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ReloadConfiguration", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void ReloadConfiguration() + { + this.Invoke("ReloadConfiguration", new object[0]); + } + + /// + public System.IAsyncResult BeginReloadConfiguration(System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("ReloadConfiguration", new object[0], callback, asyncState); + } + + /// + public void EndReloadConfiguration(System.IAsyncResult asyncResult) + { + this.EndInvoke(asyncResult); + } + + /// + public void ReloadConfigurationAsync() + { + this.ReloadConfigurationAsync(null); + } + + /// + public void ReloadConfigurationAsync(object userState) + { + if ((this.ReloadConfigurationOperationCompleted == null)) + { + this.ReloadConfigurationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnReloadConfigurationOperationCompleted); + } + this.InvokeAsync("ReloadConfiguration", new object[0], this.ReloadConfigurationOperationCompleted, userState); + } + + private void OnReloadConfigurationOperationCompleted(object arg) + { + if ((this.ReloadConfigurationCompleted != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.ReloadConfigurationCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) + { + base.CancelAsync(userState); + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateOrganizationCompletedEventHandler(object sender, CreateOrganizationCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CreateOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public string Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public bool Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CreateUserCompletedEventHandler(object sender, CreateUserCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal CreateUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public bool Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetLyncUserGeneralSettingsCompletedEventHandler(object sender, GetLyncUserGeneralSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetLyncUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetLyncUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public LyncUser Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((LyncUser)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetLyncUserPlanCompletedEventHandler(object sender, SetLyncUserPlanCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SetLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal SetLyncUserPlanCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public bool Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void DeleteUserCompletedEventHandler(object sender, DeleteUserCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DeleteUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal DeleteUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public bool Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetFederationDomainsCompletedEventHandler(object sender, GetFederationDomainsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetFederationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal GetFederationDomainsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public LyncFederationDomain[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((LyncFederationDomain[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void AddFederationDomainCompletedEventHandler(object sender, AddFederationDomainCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AddFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal AddFederationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public bool Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void RemoveFederationDomainCompletedEventHandler(object sender, RemoveFederationDomainCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class RemoveFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal RemoveFederationDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public bool Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void ReloadConfigurationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); +} diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/MailServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/MailServerProxy.cs index 5d2102f3..4d8605dc 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/MailServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/MailServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/OCSEdgeServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/OCSEdgeServerProxy.cs index 04f248e6..90d1b668 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/OCSEdgeServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/OCSEdgeServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/OCSServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/OCSServerProxy.cs index 9df6e4a7..19034cf3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/OCSServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/OCSServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/OperatingSystemProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/OperatingSystemProxy.cs index 58723d1f..f40b6d59 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/OperatingSystemProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/OperatingSystemProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs index a09c265b..c9d6a0f0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -29,7 +29,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3053 +// Runtime Version:2.0.50727.5456 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -39,17 +39,17 @@ // // This source code was auto-generated by wsdl, Version=2.0.50727.42. // -using WebsitePanel.Providers.Common; -using WebsitePanel.Providers.ResultObjects; - namespace WebsitePanel.Providers.HostedSolution { - using System.Diagnostics; + using System.Xml.Serialization; using System.Web.Services; using System.ComponentModel; using System.Web.Services.Protocols; using System; - using System.Xml.Serialization; - + using System.Diagnostics; + + using WebsitePanel.Providers.Common; + using WebsitePanel.Providers.ResultObjects; + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] @@ -72,7 +72,7 @@ namespace WebsitePanel.Providers.HostedSolution { private System.Threading.SendOrPostCallback DeleteUserOperationCompleted; - private System.Threading.SendOrPostCallback GeUserGeneralSettingsOperationCompleted; + private System.Threading.SendOrPostCallback GetUserGeneralSettingsOperationCompleted; private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted; @@ -82,9 +82,11 @@ namespace WebsitePanel.Providers.HostedSolution { private System.Threading.SendOrPostCallback GetPasswordPolicyOperationCompleted; + private System.Threading.SendOrPostCallback GetSamAccountNameByUserPrincipalNameOperationCompleted; + /// public Organizations() { - this.Url = "http://exchange-dev:9003/Organizations.asmx"; + this.Url = "http://localhost:9006/Organizations.asmx"; } /// @@ -103,7 +105,7 @@ namespace WebsitePanel.Providers.HostedSolution { public event DeleteUserCompletedEventHandler DeleteUserCompleted; /// - public event GeUserGeneralSettingsCompletedEventHandler GeUserGeneralSettingsCompleted; + public event GetUserGeneralSettingsCompletedEventHandler GetUserGeneralSettingsCompleted; /// public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted; @@ -117,6 +119,9 @@ namespace WebsitePanel.Providers.HostedSolution { /// public event GetPasswordPolicyCompletedEventHandler GetPasswordPolicyCompleted; + /// + public event GetSamAccountNameByUserPrincipalNameCompletedEventHandler GetSamAccountNameByUserPrincipalNameCompleted; + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/OrganizationExists", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] @@ -244,14 +249,15 @@ namespace WebsitePanel.Providers.HostedSolution { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled) { - this.Invoke("CreateUser", new object[] { + public int CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled) { + object[] results = this.Invoke("CreateUser", new object[] { organizationId, loginName, displayName, upn, password, enabled}); + return ((int)(results[0])); } /// @@ -266,8 +272,9 @@ namespace WebsitePanel.Providers.HostedSolution { } /// - public void EndCreateUser(System.IAsyncResult asyncResult) { - this.EndInvoke(asyncResult); + public int EndCreateUser(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); } /// @@ -292,7 +299,7 @@ namespace WebsitePanel.Providers.HostedSolution { private void OnCreateUserOperationCompleted(object arg) { if ((this.CreateUserCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.CreateUserCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + this.CreateUserCompleted(this, new CreateUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } @@ -341,46 +348,46 @@ namespace WebsitePanel.Providers.HostedSolution { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GeUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public OrganizationUser GeUserGeneralSettings(string loginName, string organizationId) { - object[] results = this.Invoke("GeUserGeneralSettings", new object[] { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationUser GetUserGeneralSettings(string loginName, string organizationId) { + object[] results = this.Invoke("GetUserGeneralSettings", new object[] { loginName, organizationId}); return ((OrganizationUser)(results[0])); } /// - public System.IAsyncResult BeginGeUserGeneralSettings(string loginName, string organizationId, System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GeUserGeneralSettings", new object[] { + public System.IAsyncResult BeginGetUserGeneralSettings(string loginName, string organizationId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetUserGeneralSettings", new object[] { loginName, organizationId}, callback, asyncState); } /// - public OrganizationUser EndGeUserGeneralSettings(System.IAsyncResult asyncResult) { + public OrganizationUser EndGetUserGeneralSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((OrganizationUser)(results[0])); } /// - public void GeUserGeneralSettingsAsync(string loginName, string organizationId) { - this.GeUserGeneralSettingsAsync(loginName, organizationId, null); + public void GetUserGeneralSettingsAsync(string loginName, string organizationId) { + this.GetUserGeneralSettingsAsync(loginName, organizationId, null); } /// - public void GeUserGeneralSettingsAsync(string loginName, string organizationId, object userState) { - if ((this.GeUserGeneralSettingsOperationCompleted == null)) { - this.GeUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGeUserGeneralSettingsOperationCompleted); + public void GetUserGeneralSettingsAsync(string loginName, string organizationId, object userState) { + if ((this.GetUserGeneralSettingsOperationCompleted == null)) { + this.GetUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetUserGeneralSettingsOperationCompleted); } - this.InvokeAsync("GeUserGeneralSettings", new object[] { + this.InvokeAsync("GetUserGeneralSettings", new object[] { loginName, - organizationId}, this.GeUserGeneralSettingsOperationCompleted, userState); + organizationId}, this.GetUserGeneralSettingsOperationCompleted, userState); } - private void OnGeUserGeneralSettingsOperationCompleted(object arg) { - if ((this.GeUserGeneralSettingsCompleted != null)) { + private void OnGetUserGeneralSettingsOperationCompleted(object arg) { + if ((this.GetUserGeneralSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GeUserGeneralSettingsCompleted(this, new GeUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + this.GetUserGeneralSettingsCompleted(this, new GetUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } @@ -745,21 +752,57 @@ namespace WebsitePanel.Providers.HostedSolution { } } + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSamAccountNameByUserPrincipalName", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string GetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName) { + object[] results = this.Invoke("GetSamAccountNameByUserPrincipalName", new object[] { + organizationId, + userPrincipalName}); + return ((string)(results[0])); + } + + /// + public System.IAsyncResult BeginGetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetSamAccountNameByUserPrincipalName", new object[] { + organizationId, + userPrincipalName}, callback, asyncState); + } + + /// + public string EndGetSamAccountNameByUserPrincipalName(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string)(results[0])); + } + + /// + public void GetSamAccountNameByUserPrincipalNameAsync(string organizationId, string userPrincipalName) { + this.GetSamAccountNameByUserPrincipalNameAsync(organizationId, userPrincipalName, null); + } + + /// + public void GetSamAccountNameByUserPrincipalNameAsync(string organizationId, string userPrincipalName, object userState) { + if ((this.GetSamAccountNameByUserPrincipalNameOperationCompleted == null)) { + this.GetSamAccountNameByUserPrincipalNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSamAccountNameByUserPrincipalNameOperationCompleted); + } + this.InvokeAsync("GetSamAccountNameByUserPrincipalName", new object[] { + organizationId, + userPrincipalName}, this.GetSamAccountNameByUserPrincipalNameOperationCompleted, userState); + } + + private void OnGetSamAccountNameByUserPrincipalNameOperationCompleted(object arg) { + if ((this.GetSamAccountNameByUserPrincipalNameCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetSamAccountNameByUserPrincipalNameCompleted(this, new GetSamAccountNameByUserPrincipalNameCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// public new void CancelAsync(object userState) { base.CancelAsync(userState); } } - - - - - - - - - /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void OrganizationExistsCompletedEventHandler(object sender, OrganizationExistsCompletedEventArgs e); @@ -818,7 +861,29 @@ namespace WebsitePanel.Providers.HostedSolution { /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void CreateUserCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + public delegate void CreateUserCompletedEventHandler(object sender, CreateUserCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal CreateUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] @@ -826,17 +891,17 @@ namespace WebsitePanel.Providers.HostedSolution { /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GeUserGeneralSettingsCompletedEventHandler(object sender, GeUserGeneralSettingsCompletedEventArgs e); + public delegate void GetUserGeneralSettingsCompletedEventHandler(object sender, GetUserGeneralSettingsCompletedEventArgs e); /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GeUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + public partial class GetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; - internal GeUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + internal GetUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } @@ -887,4 +952,30 @@ namespace WebsitePanel.Providers.HostedSolution { } } } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetSamAccountNameByUserPrincipalNameCompletedEventHandler(object sender, GetSamAccountNameByUserPrincipalNameCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetSamAccountNameByUserPrincipalNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetSamAccountNameByUserPrincipalNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); + } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/ServiceProviderProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/ServiceProviderProxy.cs index 440cfdce..8336dc9b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/ServiceProviderProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/ServiceProviderProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/SharePointServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/SharePointServerProxy.cs index 63e8bd3c..83d4adc7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/SharePointServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/SharePointServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/StatisticsServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/StatisticsServerProxy.cs index 1ca9fc55..b3eaf74d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/StatisticsServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/StatisticsServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/VirtualizationServerForPrivateCloudProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/VirtualizationServerForPrivateCloudProxy.cs index 5e03c0c6..8bfd9cc4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/VirtualizationServerForPrivateCloudProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/VirtualizationServerForPrivateCloudProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/VirtualizationServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/VirtualizationServerProxy.cs index 2db1270b..bbd40eea 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/VirtualizationServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/VirtualizationServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/WebServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/WebServerProxy.cs index 5fdca03c..2b2f80a0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/WebServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/WebServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -39,20 +39,21 @@ // // This source code was auto-generated by wsdl, Version=2.0.50727.3038. // -namespace WebsitePanel.Providers.Web { +namespace WebsitePanel.Providers.Web +{ using System.Diagnostics; using System.Web.Services; using System.ComponentModel; using System.Web.Services.Protocols; using System; using System.Xml.Serialization; - using WebsitePanel.Providers.ResultObjects; - using WebsitePanel.Providers.WebAppGallery; - using WebsitePanel.Providers.Common; + using WebsitePanel.Providers.ResultObjects; + using WebsitePanel.Providers.WebAppGallery; + using WebsitePanel.Providers.Common; /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="WebServerSoap", Namespace="http://smbsaas/websitepanel/server/")] @@ -173,12 +174,24 @@ namespace WebsitePanel.Providers.Web { private System.Threading.SendOrPostCallback UpdateHeliconApeGroupOperationCompleted; + private System.Threading.SendOrPostCallback GrantWebDeployPublishingAccessOperationCompleted; + + private System.Threading.SendOrPostCallback RevokeWebDeployPublishingAccessOperationCompleted; + private System.Threading.SendOrPostCallback DeleteHeliconApeGroupOperationCompleted; + private System.Threading.SendOrPostCallback InitFeedsOperationCompleted; + + private System.Threading.SendOrPostCallback SetResourceLanguageOperationCompleted; + + private System.Threading.SendOrPostCallback GetGalleryLanguagesOperationCompleted; + private System.Threading.SendOrPostCallback GetGalleryCategoriesOperationCompleted; private System.Threading.SendOrPostCallback GetGalleryApplicationsOperationCompleted; + private System.Threading.SendOrPostCallback GetGalleryApplicationsFilteredOperationCompleted; + private System.Threading.SendOrPostCallback IsMsDeployInstalledOperationCompleted; private System.Threading.SendOrPostCallback GetGalleryApplicationOperationCompleted; @@ -196,33 +209,29 @@ namespace WebsitePanel.Providers.Web { private System.Threading.SendOrPostCallback CheckWebManagementPasswordComplexityOperationCompleted; private System.Threading.SendOrPostCallback GrantWebManagementAccessOperationCompleted; - - private System.Threading.SendOrPostCallback GrantWebDeployPublishingAccessOperationCompleted; - - private System.Threading.SendOrPostCallback RevokeWebDeployPublishingAccessOperationCompleted; private System.Threading.SendOrPostCallback RevokeWebManagementAccessOperationCompleted; private System.Threading.SendOrPostCallback ChangeWebManagementAccessPasswordOperationCompleted; - + private System.Threading.SendOrPostCallback generateCSROperationCompleted; - + private System.Threading.SendOrPostCallback generateRenewalCSROperationCompleted; - + private System.Threading.SendOrPostCallback getCertificateOperationCompleted; - + private System.Threading.SendOrPostCallback installCertificateOperationCompleted; - + private System.Threading.SendOrPostCallback installPFXOperationCompleted; - + private System.Threading.SendOrPostCallback exportCertificateOperationCompleted; - + private System.Threading.SendOrPostCallback getServerCertificatesOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteCertificateOperationCompleted; - + private System.Threading.SendOrPostCallback ImportCertificateOperationCompleted; - + private System.Threading.SendOrPostCallback CheckCertificateOperationCompleted; /// @@ -398,15 +407,33 @@ namespace WebsitePanel.Providers.Web { /// public event UpdateHeliconApeGroupCompletedEventHandler UpdateHeliconApeGroupCompleted; + /// + public event GrantWebDeployPublishingAccessCompletedEventHandler GrantWebDeployPublishingAccessCompleted; + + /// + public event RevokeWebDeployPublishingAccessCompletedEventHandler RevokeWebDeployPublishingAccessCompleted; + /// public event DeleteHeliconApeGroupCompletedEventHandler DeleteHeliconApeGroupCompleted; + /// + public event InitFeedsCompletedEventHandler InitFeedsCompleted; + + /// + public event SetResourceLanguageCompletedEventHandler SetResourceLanguageCompleted; + + /// + public event GetGalleryLanguagesCompletedEventHandler GetGalleryLanguagesCompleted; + /// public event GetGalleryCategoriesCompletedEventHandler GetGalleryCategoriesCompleted; /// public event GetGalleryApplicationsCompletedEventHandler GetGalleryApplicationsCompleted; + /// + public event GetGalleryApplicationsFilteredCompletedEventHandler GetGalleryApplicationsFilteredCompleted; + /// public event IsMsDeployInstalledCompletedEventHandler IsMsDeployInstalledCompleted; @@ -435,44 +462,38 @@ namespace WebsitePanel.Providers.Web { public event GrantWebManagementAccessCompletedEventHandler GrantWebManagementAccessCompleted; /// - public event GrantWebDeployPublishingAccessCompletedEventHandler GrantWebDeployPublishingAccessCompleted; - - /// - public event RevokeWebDeployPublishingAccessCompletedEventHandler RevokeWebDeployPublishingAccessCompleted; - - /// - public event RevokeWebManagementAccessCompletedEventHandler RevokeWebManagementAccessCompleted; + public event RevokeWebManagementAccessCompletedEventHandler RevokeWebManagementAccessCompleted; /// public event ChangeWebManagementAccessPasswordCompletedEventHandler ChangeWebManagementAccessPasswordCompleted; - + /// public event generateCSRCompletedEventHandler generateCSRCompleted; - + /// public event generateRenewalCSRCompletedEventHandler generateRenewalCSRCompleted; - + /// public event getCertificateCompletedEventHandler getCertificateCompleted; - + /// public event installCertificateCompletedEventHandler installCertificateCompleted; - + /// public event installPFXCompletedEventHandler installPFXCompleted; - + /// public event exportCertificateCompletedEventHandler exportCertificateCompleted; - + /// public event getServerCertificatesCompletedEventHandler getServerCertificatesCompleted; - + /// public event DeleteCertificateCompletedEventHandler DeleteCertificateCompleted; - + /// public event ImportCertificateCompletedEventHandler ImportCertificateCompleted; - + /// public event CheckCertificateCompletedEventHandler CheckCertificateCompleted; @@ -2852,6 +2873,95 @@ namespace WebsitePanel.Providers.Web { } } + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GrantWebDeployPublishingAccess", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void GrantWebDeployPublishingAccess(string siteId, string accountName, string accountPassword) { + this.Invoke("GrantWebDeployPublishingAccess", new object[] { + siteId, + accountName, + accountPassword}); + } + + /// + public System.IAsyncResult BeginGrantWebDeployPublishingAccess(string siteId, string accountName, string accountPassword, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GrantWebDeployPublishingAccess", new object[] { + siteId, + accountName, + accountPassword}, callback, asyncState); + } + + /// + public void EndGrantWebDeployPublishingAccess(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void GrantWebDeployPublishingAccessAsync(string siteId, string accountName, string accountPassword) { + this.GrantWebDeployPublishingAccessAsync(siteId, accountName, accountPassword, null); + } + + /// + public void GrantWebDeployPublishingAccessAsync(string siteId, string accountName, string accountPassword, object userState) { + if ((this.GrantWebDeployPublishingAccessOperationCompleted == null)) { + this.GrantWebDeployPublishingAccessOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGrantWebDeployPublishingAccessOperationCompleted); + } + this.InvokeAsync("GrantWebDeployPublishingAccess", new object[] { + siteId, + accountName, + accountPassword}, this.GrantWebDeployPublishingAccessOperationCompleted, userState); + } + + private void OnGrantWebDeployPublishingAccessOperationCompleted(object arg) { + if ((this.GrantWebDeployPublishingAccessCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GrantWebDeployPublishingAccessCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RevokeWebDeployPublishingAccess", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void RevokeWebDeployPublishingAccess(string siteId, string accountName) { + this.Invoke("RevokeWebDeployPublishingAccess", new object[] { + siteId, + accountName}); + } + + /// + public System.IAsyncResult BeginRevokeWebDeployPublishingAccess(string siteId, string accountName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("RevokeWebDeployPublishingAccess", new object[] { + siteId, + accountName}, callback, asyncState); + } + + /// + public void EndRevokeWebDeployPublishingAccess(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void RevokeWebDeployPublishingAccessAsync(string siteId, string accountName) { + this.RevokeWebDeployPublishingAccessAsync(siteId, accountName, null); + } + + /// + public void RevokeWebDeployPublishingAccessAsync(string siteId, string accountName, object userState) { + if ((this.RevokeWebDeployPublishingAccessOperationCompleted == null)) { + this.RevokeWebDeployPublishingAccessOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRevokeWebDeployPublishingAccessOperationCompleted); + } + this.InvokeAsync("RevokeWebDeployPublishingAccess", new object[] { + siteId, + accountName}, this.RevokeWebDeployPublishingAccessOperationCompleted, userState); + } + + private void OnRevokeWebDeployPublishingAccessOperationCompleted(object arg) { + if ((this.RevokeWebDeployPublishingAccessCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RevokeWebDeployPublishingAccessCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteHeliconApeGroup", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] @@ -2895,17 +3005,147 @@ namespace WebsitePanel.Providers.Web { } } + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/InitFeeds", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void InitFeeds(int UserId, string[] feeds) { + this.Invoke("InitFeeds", new object[] { + UserId, + feeds}); + } + + /// + public System.IAsyncResult BeginInitFeeds(int UserId, string[] feeds, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("InitFeeds", new object[] { + UserId, + feeds}, callback, asyncState); + } + + /// + public void EndInitFeeds(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void InitFeedsAsync(int UserId, string[] feeds) { + this.InitFeedsAsync(UserId, feeds, null); + } + + /// + public void InitFeedsAsync(int UserId, string[] feeds, object userState) { + if ((this.InitFeedsOperationCompleted == null)) { + this.InitFeedsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInitFeedsOperationCompleted); + } + this.InvokeAsync("InitFeeds", new object[] { + UserId, + feeds}, this.InitFeedsOperationCompleted, userState); + } + + private void OnInitFeedsOperationCompleted(object arg) { + if ((this.InitFeedsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.InitFeedsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetResourceLanguage", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SetResourceLanguage(int UserId, string resourceLanguage) { + this.Invoke("SetResourceLanguage", new object[] { + UserId, + resourceLanguage}); + } + + /// + public System.IAsyncResult BeginSetResourceLanguage(int UserId, string resourceLanguage, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SetResourceLanguage", new object[] { + UserId, + resourceLanguage}, callback, asyncState); + } + + /// + public void EndSetResourceLanguage(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void SetResourceLanguageAsync(int UserId, string resourceLanguage) { + this.SetResourceLanguageAsync(UserId, resourceLanguage, null); + } + + /// + public void SetResourceLanguageAsync(int UserId, string resourceLanguage, object userState) { + if ((this.SetResourceLanguageOperationCompleted == null)) { + this.SetResourceLanguageOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetResourceLanguageOperationCompleted); + } + this.InvokeAsync("SetResourceLanguage", new object[] { + UserId, + resourceLanguage}, this.SetResourceLanguageOperationCompleted, userState); + } + + private void OnSetResourceLanguageOperationCompleted(object arg) { + if ((this.SetResourceLanguageCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SetResourceLanguageCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetGalleryLanguages", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public GalleryLanguagesResult GetGalleryLanguages(int UserId) { + object[] results = this.Invoke("GetGalleryLanguages", new object[] { + UserId}); + return ((GalleryLanguagesResult)(results[0])); + } + + /// + public System.IAsyncResult BeginGetGalleryLanguages(int UserId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetGalleryLanguages", new object[] { + UserId}, callback, asyncState); + } + + /// + public GalleryLanguagesResult EndGetGalleryLanguages(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((GalleryLanguagesResult)(results[0])); + } + + /// + public void GetGalleryLanguagesAsync(int UserId) { + this.GetGalleryLanguagesAsync(UserId, null); + } + + /// + public void GetGalleryLanguagesAsync(int UserId, object userState) { + if ((this.GetGalleryLanguagesOperationCompleted == null)) { + this.GetGalleryLanguagesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetGalleryLanguagesOperationCompleted); + } + this.InvokeAsync("GetGalleryLanguages", new object[] { + UserId}, this.GetGalleryLanguagesOperationCompleted, userState); + } + + private void OnGetGalleryLanguagesOperationCompleted(object arg) { + if ((this.GetGalleryLanguagesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetGalleryLanguagesCompleted(this, new GetGalleryLanguagesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetGalleryCategories", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public GalleryCategoriesResult GetGalleryCategories() { - object[] results = this.Invoke("GetGalleryCategories", new object[0]); + public GalleryCategoriesResult GetGalleryCategories(int UserId) { + object[] results = this.Invoke("GetGalleryCategories", new object[] { + UserId}); return ((GalleryCategoriesResult)(results[0])); } /// - public System.IAsyncResult BeginGetGalleryCategories(System.AsyncCallback callback, object asyncState) { - return this.BeginInvoke("GetGalleryCategories", new object[0], callback, asyncState); + public System.IAsyncResult BeginGetGalleryCategories(int UserId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetGalleryCategories", new object[] { + UserId}, callback, asyncState); } /// @@ -2915,16 +3155,17 @@ namespace WebsitePanel.Providers.Web { } /// - public void GetGalleryCategoriesAsync() { - this.GetGalleryCategoriesAsync(null); + public void GetGalleryCategoriesAsync(int UserId) { + this.GetGalleryCategoriesAsync(UserId, null); } /// - public void GetGalleryCategoriesAsync(object userState) { + public void GetGalleryCategoriesAsync(int UserId, object userState) { if ((this.GetGalleryCategoriesOperationCompleted == null)) { this.GetGalleryCategoriesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetGalleryCategoriesOperationCompleted); } - this.InvokeAsync("GetGalleryCategories", new object[0], this.GetGalleryCategoriesOperationCompleted, userState); + this.InvokeAsync("GetGalleryCategories", new object[] { + UserId}, this.GetGalleryCategoriesOperationCompleted, userState); } private void OnGetGalleryCategoriesOperationCompleted(object arg) { @@ -2937,15 +3178,17 @@ namespace WebsitePanel.Providers.Web { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetGalleryApplications", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public GalleryApplicationsResult GetGalleryApplications(string categoryId) { + public GalleryApplicationsResult GetGalleryApplications(int UserId, string categoryId) { object[] results = this.Invoke("GetGalleryApplications", new object[] { + UserId, categoryId}); return ((GalleryApplicationsResult)(results[0])); } /// - public System.IAsyncResult BeginGetGalleryApplications(string categoryId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetGalleryApplications(int UserId, string categoryId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetGalleryApplications", new object[] { + UserId, categoryId}, callback, asyncState); } @@ -2956,16 +3199,17 @@ namespace WebsitePanel.Providers.Web { } /// - public void GetGalleryApplicationsAsync(string categoryId) { - this.GetGalleryApplicationsAsync(categoryId, null); + public void GetGalleryApplicationsAsync(int UserId, string categoryId) { + this.GetGalleryApplicationsAsync(UserId, categoryId, null); } /// - public void GetGalleryApplicationsAsync(string categoryId, object userState) { + public void GetGalleryApplicationsAsync(int UserId, string categoryId, object userState) { if ((this.GetGalleryApplicationsOperationCompleted == null)) { this.GetGalleryApplicationsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetGalleryApplicationsOperationCompleted); } this.InvokeAsync("GetGalleryApplications", new object[] { + UserId, categoryId}, this.GetGalleryApplicationsOperationCompleted, userState); } @@ -2976,6 +3220,51 @@ namespace WebsitePanel.Providers.Web { } } + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetGalleryApplicationsFiltered", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public GalleryApplicationsResult GetGalleryApplicationsFiltered(int UserId, string pattern) { + object[] results = this.Invoke("GetGalleryApplicationsFiltered", new object[] { + UserId, + pattern}); + return ((GalleryApplicationsResult)(results[0])); + } + + /// + public System.IAsyncResult BeginGetGalleryApplicationsFiltered(int UserId, string pattern, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetGalleryApplicationsFiltered", new object[] { + UserId, + pattern}, callback, asyncState); + } + + /// + public GalleryApplicationsResult EndGetGalleryApplicationsFiltered(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((GalleryApplicationsResult)(results[0])); + } + + /// + public void GetGalleryApplicationsFilteredAsync(int UserId, string pattern) { + this.GetGalleryApplicationsFilteredAsync(UserId, pattern, null); + } + + /// + public void GetGalleryApplicationsFilteredAsync(int UserId, string pattern, object userState) { + if ((this.GetGalleryApplicationsFilteredOperationCompleted == null)) { + this.GetGalleryApplicationsFilteredOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetGalleryApplicationsFilteredOperationCompleted); + } + this.InvokeAsync("GetGalleryApplicationsFiltered", new object[] { + UserId, + pattern}, this.GetGalleryApplicationsFilteredOperationCompleted, userState); + } + + private void OnGetGalleryApplicationsFilteredOperationCompleted(object arg) { + if ((this.GetGalleryApplicationsFilteredCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetGalleryApplicationsFilteredCompleted(this, new GetGalleryApplicationsFilteredCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/IsMsDeployInstalled", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] @@ -3018,15 +3307,17 @@ namespace WebsitePanel.Providers.Web { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetGalleryApplication", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public GalleryApplicationResult GetGalleryApplication(string id) { + public GalleryApplicationResult GetGalleryApplication(int UserId, string id) { object[] results = this.Invoke("GetGalleryApplication", new object[] { + UserId, id}); return ((GalleryApplicationResult)(results[0])); } /// - public System.IAsyncResult BeginGetGalleryApplication(string id, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetGalleryApplication(int UserId, string id, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetGalleryApplication", new object[] { + UserId, id}, callback, asyncState); } @@ -3037,16 +3328,17 @@ namespace WebsitePanel.Providers.Web { } /// - public void GetGalleryApplicationAsync(string id) { - this.GetGalleryApplicationAsync(id, null); + public void GetGalleryApplicationAsync(int UserId, string id) { + this.GetGalleryApplicationAsync(UserId, id, null); } /// - public void GetGalleryApplicationAsync(string id, object userState) { + public void GetGalleryApplicationAsync(int UserId, string id, object userState) { if ((this.GetGalleryApplicationOperationCompleted == null)) { this.GetGalleryApplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetGalleryApplicationOperationCompleted); } this.InvokeAsync("GetGalleryApplication", new object[] { + UserId, id}, this.GetGalleryApplicationOperationCompleted, userState); } @@ -3060,15 +3352,17 @@ namespace WebsitePanel.Providers.Web { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetGalleryApplicationStatus", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public GalleryWebAppStatus GetGalleryApplicationStatus(string id) { + public GalleryWebAppStatus GetGalleryApplicationStatus(int UserId, string id) { object[] results = this.Invoke("GetGalleryApplicationStatus", new object[] { + UserId, id}); return ((GalleryWebAppStatus)(results[0])); } /// - public System.IAsyncResult BeginGetGalleryApplicationStatus(string id, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetGalleryApplicationStatus(int UserId, string id, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetGalleryApplicationStatus", new object[] { + UserId, id}, callback, asyncState); } @@ -3079,16 +3373,17 @@ namespace WebsitePanel.Providers.Web { } /// - public void GetGalleryApplicationStatusAsync(string id) { - this.GetGalleryApplicationStatusAsync(id, null); + public void GetGalleryApplicationStatusAsync(int UserId, string id) { + this.GetGalleryApplicationStatusAsync(UserId, id, null); } /// - public void GetGalleryApplicationStatusAsync(string id, object userState) { + public void GetGalleryApplicationStatusAsync(int UserId, string id, object userState) { if ((this.GetGalleryApplicationStatusOperationCompleted == null)) { this.GetGalleryApplicationStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetGalleryApplicationStatusOperationCompleted); } this.InvokeAsync("GetGalleryApplicationStatus", new object[] { + UserId, id}, this.GetGalleryApplicationStatusOperationCompleted, userState); } @@ -3102,15 +3397,17 @@ namespace WebsitePanel.Providers.Web { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DownloadGalleryApplication", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public GalleryWebAppStatus DownloadGalleryApplication(string id) { + public GalleryWebAppStatus DownloadGalleryApplication(int UserId, string id) { object[] results = this.Invoke("DownloadGalleryApplication", new object[] { + UserId, id}); return ((GalleryWebAppStatus)(results[0])); } /// - public System.IAsyncResult BeginDownloadGalleryApplication(string id, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginDownloadGalleryApplication(int UserId, string id, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DownloadGalleryApplication", new object[] { + UserId, id}, callback, asyncState); } @@ -3121,16 +3418,17 @@ namespace WebsitePanel.Providers.Web { } /// - public void DownloadGalleryApplicationAsync(string id) { - this.DownloadGalleryApplicationAsync(id, null); + public void DownloadGalleryApplicationAsync(int UserId, string id) { + this.DownloadGalleryApplicationAsync(UserId, id, null); } /// - public void DownloadGalleryApplicationAsync(string id, object userState) { + public void DownloadGalleryApplicationAsync(int UserId, string id, object userState) { if ((this.DownloadGalleryApplicationOperationCompleted == null)) { this.DownloadGalleryApplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDownloadGalleryApplicationOperationCompleted); } this.InvokeAsync("DownloadGalleryApplication", new object[] { + UserId, id}, this.DownloadGalleryApplicationOperationCompleted, userState); } @@ -3144,15 +3442,17 @@ namespace WebsitePanel.Providers.Web { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetGalleryApplicationParameters", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public DeploymentParametersResult GetGalleryApplicationParameters(string id) { + public DeploymentParametersResult GetGalleryApplicationParameters(int UserId, string id) { object[] results = this.Invoke("GetGalleryApplicationParameters", new object[] { + UserId, id}); return ((DeploymentParametersResult)(results[0])); } /// - public System.IAsyncResult BeginGetGalleryApplicationParameters(string id, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetGalleryApplicationParameters(int UserId, string id, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetGalleryApplicationParameters", new object[] { + UserId, id}, callback, asyncState); } @@ -3163,16 +3463,17 @@ namespace WebsitePanel.Providers.Web { } /// - public void GetGalleryApplicationParametersAsync(string id) { - this.GetGalleryApplicationParametersAsync(id, null); + public void GetGalleryApplicationParametersAsync(int UserId, string id) { + this.GetGalleryApplicationParametersAsync(UserId, id, null); } /// - public void GetGalleryApplicationParametersAsync(string id, object userState) { + public void GetGalleryApplicationParametersAsync(int UserId, string id, object userState) { if ((this.GetGalleryApplicationParametersOperationCompleted == null)) { this.GetGalleryApplicationParametersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetGalleryApplicationParametersOperationCompleted); } this.InvokeAsync("GetGalleryApplicationParameters", new object[] { + UserId, id}, this.GetGalleryApplicationParametersOperationCompleted, userState); } @@ -3186,18 +3487,22 @@ namespace WebsitePanel.Providers.Web { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/InstallGalleryApplication", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public StringResultObject InstallGalleryApplication(string id, DeploymentParameter[] updatedValues) { + public StringResultObject InstallGalleryApplication(int UserId, string id, DeploymentParameter[] updatedValues, string languageId) { object[] results = this.Invoke("InstallGalleryApplication", new object[] { + UserId, id, - updatedValues}); + updatedValues, + languageId}); return ((StringResultObject)(results[0])); } /// - public System.IAsyncResult BeginInstallGalleryApplication(string id, DeploymentParameter[] updatedValues, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginInstallGalleryApplication(int UserId, string id, DeploymentParameter[] updatedValues, string languageId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("InstallGalleryApplication", new object[] { + UserId, id, - updatedValues}, callback, asyncState); + updatedValues, + languageId}, callback, asyncState); } /// @@ -3207,18 +3512,20 @@ namespace WebsitePanel.Providers.Web { } /// - public void InstallGalleryApplicationAsync(string id, DeploymentParameter[] updatedValues) { - this.InstallGalleryApplicationAsync(id, updatedValues, null); + public void InstallGalleryApplicationAsync(int UserId, string id, DeploymentParameter[] updatedValues, string languageId) { + this.InstallGalleryApplicationAsync(UserId, id, updatedValues, languageId, null); } /// - public void InstallGalleryApplicationAsync(string id, DeploymentParameter[] updatedValues, object userState) { + public void InstallGalleryApplicationAsync(int UserId, string id, DeploymentParameter[] updatedValues, string languageId, object userState) { if ((this.InstallGalleryApplicationOperationCompleted == null)) { this.InstallGalleryApplicationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallGalleryApplicationOperationCompleted); } this.InvokeAsync("InstallGalleryApplication", new object[] { + UserId, id, - updatedValues}, this.InstallGalleryApplicationOperationCompleted, userState); + updatedValues, + languageId}, this.InstallGalleryApplicationOperationCompleted, userState); } private void OnInstallGalleryApplicationOperationCompleted(object arg) { @@ -3360,112 +3667,7 @@ namespace WebsitePanel.Providers.Web { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GrantWebDeployPublishingAccess", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void GrantWebDeployPublishingAccess(string siteId, string accountName, string accountPassword) - { - this.Invoke("GrantWebDeployPublishingAccess", new object[] { - siteId, - accountName, - accountPassword}); - } - - /// - public System.IAsyncResult BeginGrantWebDeployPublishingAccess(string siteId, string accountName, string accountPassword, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("GrantWebDeployPublishingAccess", new object[] { - siteId, - accountName, - accountPassword}, callback, asyncState); - } - - /// - public void EndGrantWebDeployPublishingAccess(System.IAsyncResult asyncResult) - { - this.EndInvoke(asyncResult); - } - - /// - public void GrantWebDeployPublishingAccessAsync(string siteId, string accountName, string accountPassword) - { - this.GrantWebDeployPublishingAccessAsync(siteId, accountName, accountPassword, null); - } - - /// - public void GrantWebDeployPublishingAccessAsync(string siteId, string accountName, string accountPassword, object userState) - { - if ((this.GrantWebDeployPublishingAccessOperationCompleted == null)) - { - this.GrantWebDeployPublishingAccessOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGrantWebDeployPublishingAccessOperationCompleted); - } - this.InvokeAsync("GrantWebDeployPublishingAccess", new object[] { - siteId, - accountName, - accountPassword}, this.GrantWebDeployPublishingAccessOperationCompleted, userState); - } - - private void OnGrantWebDeployPublishingAccessOperationCompleted(object arg) - { - if ((this.GrantWebDeployPublishingAccessCompleted != null)) - { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.GrantWebDeployPublishingAccessCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RevokeWebDeployPublishingAccess", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RevokeWebDeployPublishingAccess(string siteId, string accountName) - { - this.Invoke("RevokeWebDeployPublishingAccess", new object[] { - siteId, - accountName}); - } - - /// - public System.IAsyncResult BeginRevokeWebDeployPublishingAccess(string siteId, string accountName, System.AsyncCallback callback, object asyncState) - { - return this.BeginInvoke("RevokeWebDeployPublishingAccess", new object[] { - siteId, - accountName}, callback, asyncState); - } - - /// - public void EndRevokeWebDeployPublishingAccess(System.IAsyncResult asyncResult) - { - this.EndInvoke(asyncResult); - } - - /// - public void RevokeWebDeployPublishingAccessAsync(string siteId, string accountName) - { - this.RevokeWebDeployPublishingAccessAsync(siteId, accountName, null); - } - - /// - public void RevokeWebDeployPublishingAccessAsync(string siteId, string accountName, object userState) - { - if ((this.RevokeWebDeployPublishingAccessOperationCompleted == null)) - { - this.RevokeWebDeployPublishingAccessOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRevokeWebDeployPublishingAccessOperationCompleted); - } - this.InvokeAsync("RevokeWebDeployPublishingAccess", new object[] { - siteId, - accountName}, this.RevokeWebDeployPublishingAccessOperationCompleted, userState); - } - - private void OnRevokeWebDeployPublishingAccessOperationCompleted(object arg) - { - if ((this.RevokeWebDeployPublishingAccessCompleted != null)) - { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.RevokeWebDeployPublishingAccessCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RevokeWebManagementAccess", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RevokeWebManagementAccess", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public void RevokeWebManagementAccess(string siteId, string accountName) { this.Invoke("RevokeWebManagementAccess", new object[] { siteId, @@ -3548,249 +3750,211 @@ namespace WebsitePanel.Providers.Web { this.ChangeWebManagementAccessPasswordCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/generateCSR", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SSLCertificate generateCSR(SSLCertificate certificate) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/generateCSR", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SSLCertificate generateCSR(SSLCertificate certificate) { object[] results = this.Invoke("generateCSR", new object[] { certificate}); return ((SSLCertificate)(results[0])); } - + /// - public System.IAsyncResult BegingenerateCSR(SSLCertificate certificate, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BegingenerateCSR(SSLCertificate certificate, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("generateCSR", new object[] { certificate}, callback, asyncState); } - + /// - public SSLCertificate EndgenerateCSR(System.IAsyncResult asyncResult) - { + public SSLCertificate EndgenerateCSR(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SSLCertificate)(results[0])); } - + /// - public void generateCSRAsync(SSLCertificate certificate) - { + public void generateCSRAsync(SSLCertificate certificate) { this.generateCSRAsync(certificate, null); } - + /// - public void generateCSRAsync(SSLCertificate certificate, object userState) - { - if ((this.generateCSROperationCompleted == null)) - { + public void generateCSRAsync(SSLCertificate certificate, object userState) { + if ((this.generateCSROperationCompleted == null)) { this.generateCSROperationCompleted = new System.Threading.SendOrPostCallback(this.OngenerateCSROperationCompleted); } this.InvokeAsync("generateCSR", new object[] { certificate}, this.generateCSROperationCompleted, userState); } - - private void OngenerateCSROperationCompleted(object arg) - { - if ((this.generateCSRCompleted != null)) - { + + private void OngenerateCSROperationCompleted(object arg) { + if ((this.generateCSRCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.generateCSRCompleted(this, new generateCSRCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/generateRenewalCSR", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SSLCertificate generateRenewalCSR(SSLCertificate certificate) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/generateRenewalCSR", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SSLCertificate generateRenewalCSR(SSLCertificate certificate) { object[] results = this.Invoke("generateRenewalCSR", new object[] { certificate}); return ((SSLCertificate)(results[0])); } - + /// - public System.IAsyncResult BegingenerateRenewalCSR(SSLCertificate certificate, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BegingenerateRenewalCSR(SSLCertificate certificate, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("generateRenewalCSR", new object[] { certificate}, callback, asyncState); } - + /// - public SSLCertificate EndgenerateRenewalCSR(System.IAsyncResult asyncResult) - { + public SSLCertificate EndgenerateRenewalCSR(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SSLCertificate)(results[0])); } - + /// - public void generateRenewalCSRAsync(SSLCertificate certificate) - { + public void generateRenewalCSRAsync(SSLCertificate certificate) { this.generateRenewalCSRAsync(certificate, null); } - + /// - public void generateRenewalCSRAsync(SSLCertificate certificate, object userState) - { - if ((this.generateRenewalCSROperationCompleted == null)) - { + public void generateRenewalCSRAsync(SSLCertificate certificate, object userState) { + if ((this.generateRenewalCSROperationCompleted == null)) { this.generateRenewalCSROperationCompleted = new System.Threading.SendOrPostCallback(this.OngenerateRenewalCSROperationCompleted); } this.InvokeAsync("generateRenewalCSR", new object[] { certificate}, this.generateRenewalCSROperationCompleted, userState); } - - private void OngenerateRenewalCSROperationCompleted(object arg) - { - if ((this.generateRenewalCSRCompleted != null)) - { + + private void OngenerateRenewalCSROperationCompleted(object arg) { + if ((this.generateRenewalCSRCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.generateRenewalCSRCompleted(this, new generateRenewalCSRCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/getCertificate", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SSLCertificate getCertificate(WebSite site) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/getCertificate", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SSLCertificate getCertificate(WebSite site) { object[] results = this.Invoke("getCertificate", new object[] { site}); return ((SSLCertificate)(results[0])); } - + /// - public System.IAsyncResult BegingetCertificate(WebSite site, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BegingetCertificate(WebSite site, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("getCertificate", new object[] { site}, callback, asyncState); } - + /// - public SSLCertificate EndgetCertificate(System.IAsyncResult asyncResult) - { + public SSLCertificate EndgetCertificate(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SSLCertificate)(results[0])); } - + /// - public void getCertificateAsync(WebSite site) - { + public void getCertificateAsync(WebSite site) { this.getCertificateAsync(site, null); } - + /// - public void getCertificateAsync(WebSite site, object userState) - { - if ((this.getCertificateOperationCompleted == null)) - { + public void getCertificateAsync(WebSite site, object userState) { + if ((this.getCertificateOperationCompleted == null)) { this.getCertificateOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetCertificateOperationCompleted); } this.InvokeAsync("getCertificate", new object[] { site}, this.getCertificateOperationCompleted, userState); } - - private void OngetCertificateOperationCompleted(object arg) - { - if ((this.getCertificateCompleted != null)) - { + + private void OngetCertificateOperationCompleted(object arg) { + if ((this.getCertificateCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.getCertificateCompleted(this, new getCertificateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/installCertificate", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SSLCertificate installCertificate(SSLCertificate certificate, WebSite website) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/installCertificate", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SSLCertificate installCertificate(SSLCertificate certificate, WebSite website) { object[] results = this.Invoke("installCertificate", new object[] { certificate, website}); return ((SSLCertificate)(results[0])); } - + /// - public System.IAsyncResult BegininstallCertificate(SSLCertificate certificate, WebSite website, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BegininstallCertificate(SSLCertificate certificate, WebSite website, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("installCertificate", new object[] { certificate, website}, callback, asyncState); } - + /// - public SSLCertificate EndinstallCertificate(System.IAsyncResult asyncResult) - { + public SSLCertificate EndinstallCertificate(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SSLCertificate)(results[0])); } - + /// - public void installCertificateAsync(SSLCertificate certificate, WebSite website) - { + public void installCertificateAsync(SSLCertificate certificate, WebSite website) { this.installCertificateAsync(certificate, website, null); } - + /// - public void installCertificateAsync(SSLCertificate certificate, WebSite website, object userState) - { - if ((this.installCertificateOperationCompleted == null)) - { + public void installCertificateAsync(SSLCertificate certificate, WebSite website, object userState) { + if ((this.installCertificateOperationCompleted == null)) { this.installCertificateOperationCompleted = new System.Threading.SendOrPostCallback(this.OninstallCertificateOperationCompleted); } this.InvokeAsync("installCertificate", new object[] { certificate, website}, this.installCertificateOperationCompleted, userState); } - - private void OninstallCertificateOperationCompleted(object arg) - { - if ((this.installCertificateCompleted != null)) - { + + private void OninstallCertificateOperationCompleted(object arg) { + if ((this.installCertificateCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.installCertificateCompleted(this, new installCertificateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/installPFX", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SSLCertificate installPFX([System.Xml.Serialization.XmlElementAttribute(DataType = "base64Binary")] byte[] certificate, string password, WebSite website) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/installPFX", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SSLCertificate installPFX([System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] certificate, string password, WebSite website) { object[] results = this.Invoke("installPFX", new object[] { certificate, password, website}); return ((SSLCertificate)(results[0])); } - + /// - public System.IAsyncResult BegininstallPFX(byte[] certificate, string password, WebSite website, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BegininstallPFX(byte[] certificate, string password, WebSite website, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("installPFX", new object[] { certificate, password, website}, callback, asyncState); } - + /// - public SSLCertificate EndinstallPFX(System.IAsyncResult asyncResult) - { + public SSLCertificate EndinstallPFX(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SSLCertificate)(results[0])); } - + /// - public void installPFXAsync(byte[] certificate, string password, WebSite website) - { + public void installPFXAsync(byte[] certificate, string password, WebSite website) { this.installPFXAsync(certificate, password, website, null); } - + /// - public void installPFXAsync(byte[] certificate, string password, WebSite website, object userState) - { - if ((this.installPFXOperationCompleted == null)) - { + public void installPFXAsync(byte[] certificate, string password, WebSite website, object userState) { + if ((this.installPFXOperationCompleted == null)) { this.installPFXOperationCompleted = new System.Threading.SendOrPostCallback(this.OninstallPFXOperationCompleted); } this.InvokeAsync("installPFX", new object[] { @@ -3798,265 +3962,223 @@ namespace WebsitePanel.Providers.Web { password, website}, this.installPFXOperationCompleted, userState); } - - private void OninstallPFXOperationCompleted(object arg) - { - if ((this.installPFXCompleted != null)) - { + + private void OninstallPFXOperationCompleted(object arg) { + if ((this.installPFXCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.installPFXCompleted(this, new installPFXCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/exportCertificate", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - [return: System.Xml.Serialization.XmlElementAttribute(DataType = "base64Binary")] - public byte[] exportCertificate(string serialNumber, string password) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/exportCertificate", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + [return: System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] exportCertificate(string serialNumber, string password) { object[] results = this.Invoke("exportCertificate", new object[] { serialNumber, password}); return ((byte[])(results[0])); } - + /// - public System.IAsyncResult BeginexportCertificate(string serialNumber, string password, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginexportCertificate(string serialNumber, string password, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("exportCertificate", new object[] { serialNumber, password}, callback, asyncState); } - + /// - public byte[] EndexportCertificate(System.IAsyncResult asyncResult) - { + public byte[] EndexportCertificate(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((byte[])(results[0])); } - + /// - public void exportCertificateAsync(string serialNumber, string password) - { + public void exportCertificateAsync(string serialNumber, string password) { this.exportCertificateAsync(serialNumber, password, null); } - + /// - public void exportCertificateAsync(string serialNumber, string password, object userState) - { - if ((this.exportCertificateOperationCompleted == null)) - { + public void exportCertificateAsync(string serialNumber, string password, object userState) { + if ((this.exportCertificateOperationCompleted == null)) { this.exportCertificateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnexportCertificateOperationCompleted); } this.InvokeAsync("exportCertificate", new object[] { serialNumber, password}, this.exportCertificateOperationCompleted, userState); } - - private void OnexportCertificateOperationCompleted(object arg) - { - if ((this.exportCertificateCompleted != null)) - { + + private void OnexportCertificateOperationCompleted(object arg) { + if ((this.exportCertificateCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.exportCertificateCompleted(this, new exportCertificateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/getServerCertificates", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SSLCertificate[] getServerCertificates() - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/getServerCertificates", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SSLCertificate[] getServerCertificates() { object[] results = this.Invoke("getServerCertificates", new object[0]); return ((SSLCertificate[])(results[0])); } - + /// - public System.IAsyncResult BegingetServerCertificates(System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BegingetServerCertificates(System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("getServerCertificates", new object[0], callback, asyncState); } - + /// - public SSLCertificate[] EndgetServerCertificates(System.IAsyncResult asyncResult) - { + public SSLCertificate[] EndgetServerCertificates(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SSLCertificate[])(results[0])); } - + /// - public void getServerCertificatesAsync() - { + public void getServerCertificatesAsync() { this.getServerCertificatesAsync(null); } - + /// - public void getServerCertificatesAsync(object userState) - { - if ((this.getServerCertificatesOperationCompleted == null)) - { + public void getServerCertificatesAsync(object userState) { + if ((this.getServerCertificatesOperationCompleted == null)) { this.getServerCertificatesOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetServerCertificatesOperationCompleted); } this.InvokeAsync("getServerCertificates", new object[0], this.getServerCertificatesOperationCompleted, userState); } - - private void OngetServerCertificatesOperationCompleted(object arg) - { - if ((this.getServerCertificatesCompleted != null)) - { + + private void OngetServerCertificatesOperationCompleted(object arg) { + if ((this.getServerCertificatesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.getServerCertificatesCompleted(this, new getServerCertificatesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteCertificate", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject DeleteCertificate(SSLCertificate certificate, WebSite website) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteCertificate", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject DeleteCertificate(SSLCertificate certificate, WebSite website) { object[] results = this.Invoke("DeleteCertificate", new object[] { certificate, website}); return ((ResultObject)(results[0])); } - + /// - public System.IAsyncResult BeginDeleteCertificate(SSLCertificate certificate, WebSite website, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeleteCertificate(SSLCertificate certificate, WebSite website, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteCertificate", new object[] { certificate, website}, callback, asyncState); } - + /// - public ResultObject EndDeleteCertificate(System.IAsyncResult asyncResult) - { + public ResultObject EndDeleteCertificate(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((ResultObject)(results[0])); } - + /// - public void DeleteCertificateAsync(SSLCertificate certificate, WebSite website) - { + public void DeleteCertificateAsync(SSLCertificate certificate, WebSite website) { this.DeleteCertificateAsync(certificate, website, null); } - + /// - public void DeleteCertificateAsync(SSLCertificate certificate, WebSite website, object userState) - { - if ((this.DeleteCertificateOperationCompleted == null)) - { + public void DeleteCertificateAsync(SSLCertificate certificate, WebSite website, object userState) { + if ((this.DeleteCertificateOperationCompleted == null)) { this.DeleteCertificateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteCertificateOperationCompleted); } this.InvokeAsync("DeleteCertificate", new object[] { certificate, website}, this.DeleteCertificateOperationCompleted, userState); } - - private void OnDeleteCertificateOperationCompleted(object arg) - { - if ((this.DeleteCertificateCompleted != null)) - { + + private void OnDeleteCertificateOperationCompleted(object arg) { + if ((this.DeleteCertificateCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteCertificateCompleted(this, new DeleteCertificateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ImportCertificate", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SSLCertificate ImportCertificate(WebSite website) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ImportCertificate", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SSLCertificate ImportCertificate(WebSite website) { object[] results = this.Invoke("ImportCertificate", new object[] { website}); return ((SSLCertificate)(results[0])); } - + /// - public System.IAsyncResult BeginImportCertificate(WebSite website, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginImportCertificate(WebSite website, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("ImportCertificate", new object[] { website}, callback, asyncState); } - + /// - public SSLCertificate EndImportCertificate(System.IAsyncResult asyncResult) - { + public SSLCertificate EndImportCertificate(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SSLCertificate)(results[0])); } - + /// - public void ImportCertificateAsync(WebSite website) - { + public void ImportCertificateAsync(WebSite website) { this.ImportCertificateAsync(website, null); } - + /// - public void ImportCertificateAsync(WebSite website, object userState) - { - if ((this.ImportCertificateOperationCompleted == null)) - { + public void ImportCertificateAsync(WebSite website, object userState) { + if ((this.ImportCertificateOperationCompleted == null)) { this.ImportCertificateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnImportCertificateOperationCompleted); } this.InvokeAsync("ImportCertificate", new object[] { website}, this.ImportCertificateOperationCompleted, userState); } - - private void OnImportCertificateOperationCompleted(object arg) - { - if ((this.ImportCertificateCompleted != null)) - { + + private void OnImportCertificateOperationCompleted(object arg) { + if ((this.ImportCertificateCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ImportCertificateCompleted(this, new ImportCertificateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckCertificate", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool CheckCertificate(WebSite webSite) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckCertificate", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool CheckCertificate(WebSite webSite) { object[] results = this.Invoke("CheckCertificate", new object[] { webSite}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginCheckCertificate(WebSite webSite, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCheckCertificate(WebSite webSite, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CheckCertificate", new object[] { webSite}, callback, asyncState); } - + /// - public bool EndCheckCertificate(System.IAsyncResult asyncResult) - { + public bool EndCheckCertificate(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void CheckCertificateAsync(WebSite webSite) - { + public void CheckCertificateAsync(WebSite webSite) { this.CheckCertificateAsync(webSite, null); } - + /// - public void CheckCertificateAsync(WebSite webSite, object userState) - { - if ((this.CheckCertificateOperationCompleted == null)) - { + public void CheckCertificateAsync(WebSite webSite, object userState) { + if ((this.CheckCertificateOperationCompleted == null)) { this.CheckCertificateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckCertificateOperationCompleted); } this.InvokeAsync("CheckCertificate", new object[] { webSite}, this.CheckCertificateOperationCompleted, userState); } - - private void OnCheckCertificateOperationCompleted(object arg) - { - if ((this.CheckCertificateCompleted != null)) - { + + private void OnCheckCertificateOperationCompleted(object arg) { + if ((this.CheckCertificateCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CheckCertificateCompleted(this, new CheckCertificateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } @@ -4068,49 +4190,16 @@ namespace WebsitePanel.Providers.Web { } } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void ChangeSiteStateCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetSiteStateCompletedEventHandler(object sender, GetSiteStateCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetSiteStateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4132,11 +4221,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetSiteIdCompletedEventHandler(object sender, GetSiteIdCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetSiteIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4158,11 +4247,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetSitesAccountsCompletedEventHandler(object sender, GetSitesAccountsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetSitesAccountsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4184,11 +4273,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SiteExistsCompletedEventHandler(object sender, SiteExistsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SiteExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4210,11 +4299,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetSitesCompletedEventHandler(object sender, GetSitesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetSitesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4236,11 +4325,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetSiteCompletedEventHandler(object sender, GetSiteCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetSiteCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4262,11 +4351,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetSiteBindingsCompletedEventHandler(object sender, GetSiteBindingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetSiteBindingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4288,11 +4377,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateSiteCompletedEventHandler(object sender, CreateSiteCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CreateSiteCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4314,23 +4403,23 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateSiteCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateSiteBindingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteSiteCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void VirtualDirectoryExistsCompletedEventHandler(object sender, VirtualDirectoryExistsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class VirtualDirectoryExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4352,11 +4441,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetVirtualDirectoriesCompletedEventHandler(object sender, GetVirtualDirectoriesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetVirtualDirectoriesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4378,11 +4467,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetVirtualDirectoryCompletedEventHandler(object sender, GetVirtualDirectoryCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetVirtualDirectoryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4404,23 +4493,23 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateVirtualDirectoryCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateVirtualDirectoryCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteVirtualDirectoryCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void IsFrontPageSystemInstalledCompletedEventHandler(object sender, IsFrontPageSystemInstalledCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class IsFrontPageSystemInstalledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4442,11 +4531,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void IsFrontPageInstalledCompletedEventHandler(object sender, IsFrontPageInstalledCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class IsFrontPageInstalledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4468,11 +4557,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void InstallFrontPageCompletedEventHandler(object sender, InstallFrontPageCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class InstallFrontPageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4494,19 +4583,19 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UninstallFrontPageCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void ChangeFrontPagePasswordCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void IsColdFusionSystemInstalledCompletedEventHandler(object sender, IsColdFusionSystemInstalledCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class IsColdFusionSystemInstalledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4528,23 +4617,23 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GrantWebSiteAccessCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void InstallSecuredFoldersCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UninstallSecuredFoldersCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetFoldersCompletedEventHandler(object sender, GetFoldersCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4566,11 +4655,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetFolderCompletedEventHandler(object sender, GetFolderCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4592,19 +4681,19 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetUsersCompletedEventHandler(object sender, GetUsersCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetUsersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4626,11 +4715,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetUserCompletedEventHandler(object sender, GetUserCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4652,19 +4741,19 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateUserCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteUserCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGroupsCompletedEventHandler(object sender, GetGroupsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGroupsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4686,11 +4775,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGroupCompletedEventHandler(object sender, GetGroupCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4712,19 +4801,19 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetHeliconApeStatusCompletedEventHandler(object sender, GetHeliconApeStatusCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetHeliconApeStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4746,23 +4835,23 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void InstallHeliconApeCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void EnableHeliconApeCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DisableHeliconApeCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetHeliconApeFoldersCompletedEventHandler(object sender, GetHeliconApeFoldersCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetHeliconApeFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4784,11 +4873,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetHeliconApeHttpdFolderCompletedEventHandler(object sender, GetHeliconApeHttpdFolderCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetHeliconApeHttpdFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4810,11 +4899,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetHeliconApeFolderCompletedEventHandler(object sender, GetHeliconApeFolderCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetHeliconApeFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4836,23 +4925,23 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateHeliconApeFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateHeliconApeHttpdFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteHeliconApeFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetHeliconApeUsersCompletedEventHandler(object sender, GetHeliconApeUsersCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetHeliconApeUsersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4874,11 +4963,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetHeliconApeUserCompletedEventHandler(object sender, GetHeliconApeUserCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetHeliconApeUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4900,19 +4989,19 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateHeliconApeUserCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteHeliconApeUserCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetHeliconApeGroupsCompletedEventHandler(object sender, GetHeliconApeGroupsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetHeliconApeGroupsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4934,11 +5023,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetHeliconApeGroupCompletedEventHandler(object sender, GetHeliconApeGroupCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetHeliconApeGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4960,19 +5049,61 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void UpdateHeliconApeGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GrantWebDeployPublishingAccessCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void RevokeWebDeployPublishingAccessCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteHeliconApeGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void InitFeedsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void SetResourceLanguageCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetGalleryLanguagesCompletedEventHandler(object sender, GetGalleryLanguagesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetGalleryLanguagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetGalleryLanguagesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public GalleryLanguagesResult Result { + get { + this.RaiseExceptionIfNecessary(); + return ((GalleryLanguagesResult)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGalleryCategoriesCompletedEventHandler(object sender, GetGalleryCategoriesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGalleryCategoriesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -4994,11 +5125,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGalleryApplicationsCompletedEventHandler(object sender, GetGalleryApplicationsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGalleryApplicationsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5020,11 +5151,37 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetGalleryApplicationsFilteredCompletedEventHandler(object sender, GetGalleryApplicationsFilteredCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetGalleryApplicationsFilteredCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetGalleryApplicationsFilteredCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public GalleryApplicationsResult Result { + get { + this.RaiseExceptionIfNecessary(); + return ((GalleryApplicationsResult)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void IsMsDeployInstalledCompletedEventHandler(object sender, IsMsDeployInstalledCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class IsMsDeployInstalledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5046,11 +5203,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGalleryApplicationCompletedEventHandler(object sender, GetGalleryApplicationCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGalleryApplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5072,11 +5229,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGalleryApplicationStatusCompletedEventHandler(object sender, GetGalleryApplicationStatusCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGalleryApplicationStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5098,11 +5255,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DownloadGalleryApplicationCompletedEventHandler(object sender, DownloadGalleryApplicationCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DownloadGalleryApplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5124,11 +5281,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetGalleryApplicationParametersCompletedEventHandler(object sender, GetGalleryApplicationParametersCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetGalleryApplicationParametersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5150,11 +5307,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void InstallGalleryApplicationCompletedEventHandler(object sender, InstallGalleryApplicationCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class InstallGalleryApplicationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5176,11 +5333,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CheckWebManagementAccountExistsCompletedEventHandler(object sender, CheckWebManagementAccountExistsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CheckWebManagementAccountExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5202,11 +5359,11 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CheckWebManagementPasswordComplexityCompletedEventHandler(object sender, CheckWebManagementPasswordComplexityCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CheckWebManagementPasswordComplexityCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -5228,319 +5385,271 @@ namespace WebsitePanel.Providers.Web { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GrantWebManagementAccessCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void GrantWebDeployPublishingAccessCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void RevokeWebDeployPublishingAccessCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] - public delegate void RevokeWebManagementAccessCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void RevokeWebManagementAccessCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void ChangeWebManagementAccessPasswordCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void generateCSRCompletedEventHandler(object sender, generateCSRCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class generateCSRCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class generateCSRCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal generateCSRCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal generateCSRCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SSLCertificate Result - { - get - { + public SSLCertificate Result { + get { this.RaiseExceptionIfNecessary(); return ((SSLCertificate)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void generateRenewalCSRCompletedEventHandler(object sender, generateRenewalCSRCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class generateRenewalCSRCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class generateRenewalCSRCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal generateRenewalCSRCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal generateRenewalCSRCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SSLCertificate Result - { - get - { + public SSLCertificate Result { + get { this.RaiseExceptionIfNecessary(); return ((SSLCertificate)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void getCertificateCompletedEventHandler(object sender, getCertificateCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class getCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class getCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal getCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal getCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SSLCertificate Result - { - get - { + public SSLCertificate Result { + get { this.RaiseExceptionIfNecessary(); return ((SSLCertificate)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void installCertificateCompletedEventHandler(object sender, installCertificateCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class installCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class installCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal installCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal installCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SSLCertificate Result - { - get - { + public SSLCertificate Result { + get { this.RaiseExceptionIfNecessary(); return ((SSLCertificate)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void installPFXCompletedEventHandler(object sender, installPFXCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class installPFXCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class installPFXCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal installPFXCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal installPFXCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SSLCertificate Result - { - get - { + public SSLCertificate Result { + get { this.RaiseExceptionIfNecessary(); return ((SSLCertificate)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void exportCertificateCompletedEventHandler(object sender, exportCertificateCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class exportCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class exportCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal exportCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal exportCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public byte[] Result - { - get - { + public byte[] Result { + get { this.RaiseExceptionIfNecessary(); return ((byte[])(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void getServerCertificatesCompletedEventHandler(object sender, getServerCertificatesCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class getServerCertificatesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class getServerCertificatesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal getServerCertificatesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal getServerCertificatesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SSLCertificate[] Result - { - get - { + public SSLCertificate[] Result { + get { this.RaiseExceptionIfNecessary(); return ((SSLCertificate[])(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteCertificateCompletedEventHandler(object sender, DeleteCertificateCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class DeleteCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class DeleteCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal DeleteCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal DeleteCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public ResultObject Result - { - get - { + public ResultObject Result { + get { this.RaiseExceptionIfNecessary(); return ((ResultObject)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void ImportCertificateCompletedEventHandler(object sender, ImportCertificateCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class ImportCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class ImportCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal ImportCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal ImportCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SSLCertificate Result - { - get - { + public SSLCertificate Result { + get { this.RaiseExceptionIfNecessary(); return ((SSLCertificate)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CheckCertificateCompletedEventHandler(object sender, CheckCertificateCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CheckCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CheckCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CheckCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CheckCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/WebsitePanel.Server.Client.csproj b/WebsitePanel/Sources/WebsitePanel.Server.Client/WebsitePanel.Server.Client.csproj index 37f746e8..44b375f0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/WebsitePanel.Server.Client.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/WebsitePanel.Server.Client.csproj @@ -78,10 +78,10 @@ - + diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/WindowsServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/WindowsServerProxy.cs index 9f79e7cb..57e41dd1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/WindowsServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/WindowsServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -47,497 +47,914 @@ namespace WebsitePanel.Server using System.Web.Services.Protocols; using System; using System.Xml.Serialization; - - + using WebsitePanel.Providers; + + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name = "WindowsServerSoap", Namespace = "http://smbsaas/websitepanel/server/")] - public partial class WindowsServer : Microsoft.Web.Services3.WebServicesClientProtocol - { - + [System.Web.Services.WebServiceBindingAttribute(Name="WindowsServerSoap", Namespace="http://smbsaas/websitepanel/server/")] + public partial class WindowsServer : Microsoft.Web.Services3.WebServicesClientProtocol { + private System.Threading.SendOrPostCallback GetTerminalServicesSessionsOperationCompleted; - + private System.Threading.SendOrPostCallback CloseTerminalServicesSessionOperationCompleted; - + private System.Threading.SendOrPostCallback GetWindowsProcessesOperationCompleted; - + private System.Threading.SendOrPostCallback TerminateWindowsProcessOperationCompleted; - + private System.Threading.SendOrPostCallback GetWindowsServicesOperationCompleted; - + private System.Threading.SendOrPostCallback ChangeWindowsServiceStatusOperationCompleted; - + + private System.Threading.SendOrPostCallback GetWPIProductsOperationCompleted; + + private System.Threading.SendOrPostCallback GetWPIProductsFilteredOperationCompleted; + + private System.Threading.SendOrPostCallback GetWPITabsOperationCompleted; + + private System.Threading.SendOrPostCallback InitWPIFeedsOperationCompleted; + + private System.Threading.SendOrPostCallback GetWPIKeywordsOperationCompleted; + + private System.Threading.SendOrPostCallback GetWPIProductsWithDependenciesOperationCompleted; + + private System.Threading.SendOrPostCallback InstallWPIProductsOperationCompleted; + + private System.Threading.SendOrPostCallback CancelInstallWPIProductsOperationCompleted; + + private System.Threading.SendOrPostCallback GetWPIStatusOperationCompleted; + + private System.Threading.SendOrPostCallback WpiGetLogFileDirectoryOperationCompleted; + + private System.Threading.SendOrPostCallback WpiGetLogsInDirectoryOperationCompleted; + private System.Threading.SendOrPostCallback GetLogNamesOperationCompleted; - + private System.Threading.SendOrPostCallback GetLogEntriesOperationCompleted; - + private System.Threading.SendOrPostCallback GetLogEntriesPagedOperationCompleted; - + private System.Threading.SendOrPostCallback ClearLogOperationCompleted; - + private System.Threading.SendOrPostCallback RebootSystemOperationCompleted; - + private System.Threading.SendOrPostCallback ExecuteSystemCommandOperationCompleted; - + /// - public WindowsServer() - { - this.Url = "http://localhost/WebsitePanelServer/WindowsServer.asmx"; + public WindowsServer() { + this.Url = "http://localhost:9003/WindowsServer.asmx"; } - + /// public event GetTerminalServicesSessionsCompletedEventHandler GetTerminalServicesSessionsCompleted; - + /// public event CloseTerminalServicesSessionCompletedEventHandler CloseTerminalServicesSessionCompleted; - + /// public event GetWindowsProcessesCompletedEventHandler GetWindowsProcessesCompleted; - + /// public event TerminateWindowsProcessCompletedEventHandler TerminateWindowsProcessCompleted; - + /// public event GetWindowsServicesCompletedEventHandler GetWindowsServicesCompleted; - + /// public event ChangeWindowsServiceStatusCompletedEventHandler ChangeWindowsServiceStatusCompleted; - + + /// + public event GetWPIProductsCompletedEventHandler GetWPIProductsCompleted; + + /// + public event GetWPIProductsFilteredCompletedEventHandler GetWPIProductsFilteredCompleted; + + /// + public event GetWPITabsCompletedEventHandler GetWPITabsCompleted; + + /// + public event InitWPIFeedsCompletedEventHandler InitWPIFeedsCompleted; + + /// + public event GetWPIKeywordsCompletedEventHandler GetWPIKeywordsCompleted; + + /// + public event GetWPIProductsWithDependenciesCompletedEventHandler GetWPIProductsWithDependenciesCompleted; + + /// + public event InstallWPIProductsCompletedEventHandler InstallWPIProductsCompleted; + + /// + public event CancelInstallWPIProductsCompletedEventHandler CancelInstallWPIProductsCompleted; + + /// + public event GetWPIStatusCompletedEventHandler GetWPIStatusCompleted; + + /// + public event WpiGetLogFileDirectoryCompletedEventHandler WpiGetLogFileDirectoryCompleted; + + /// + public event WpiGetLogsInDirectoryCompletedEventHandler WpiGetLogsInDirectoryCompleted; + /// public event GetLogNamesCompletedEventHandler GetLogNamesCompleted; - + /// public event GetLogEntriesCompletedEventHandler GetLogEntriesCompleted; - + /// public event GetLogEntriesPagedCompletedEventHandler GetLogEntriesPagedCompleted; - + /// public event ClearLogCompletedEventHandler ClearLogCompleted; - + /// public event RebootSystemCompletedEventHandler RebootSystemCompleted; - + /// public event ExecuteSystemCommandCompletedEventHandler ExecuteSystemCommandCompleted; - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetTerminalServicesSessions", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public TerminalSession[] GetTerminalServicesSessions() - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetTerminalServicesSessions", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public TerminalSession[] GetTerminalServicesSessions() { object[] results = this.Invoke("GetTerminalServicesSessions", new object[0]); return ((TerminalSession[])(results[0])); } - + /// - public System.IAsyncResult BeginGetTerminalServicesSessions(System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetTerminalServicesSessions(System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetTerminalServicesSessions", new object[0], callback, asyncState); } - + /// - public TerminalSession[] EndGetTerminalServicesSessions(System.IAsyncResult asyncResult) - { + public TerminalSession[] EndGetTerminalServicesSessions(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((TerminalSession[])(results[0])); } - + /// - public void GetTerminalServicesSessionsAsync() - { + public void GetTerminalServicesSessionsAsync() { this.GetTerminalServicesSessionsAsync(null); } - + /// - public void GetTerminalServicesSessionsAsync(object userState) - { - if ((this.GetTerminalServicesSessionsOperationCompleted == null)) - { + public void GetTerminalServicesSessionsAsync(object userState) { + if ((this.GetTerminalServicesSessionsOperationCompleted == null)) { this.GetTerminalServicesSessionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetTerminalServicesSessionsOperationCompleted); } this.InvokeAsync("GetTerminalServicesSessions", new object[0], this.GetTerminalServicesSessionsOperationCompleted, userState); } - - private void OnGetTerminalServicesSessionsOperationCompleted(object arg) - { - if ((this.GetTerminalServicesSessionsCompleted != null)) - { + + private void OnGetTerminalServicesSessionsOperationCompleted(object arg) { + if ((this.GetTerminalServicesSessionsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetTerminalServicesSessionsCompleted(this, new GetTerminalServicesSessionsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CloseTerminalServicesSession", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void CloseTerminalServicesSession(int sessionId) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CloseTerminalServicesSession", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void CloseTerminalServicesSession(int sessionId) { this.Invoke("CloseTerminalServicesSession", new object[] { sessionId}); } - + /// - public System.IAsyncResult BeginCloseTerminalServicesSession(int sessionId, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCloseTerminalServicesSession(int sessionId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CloseTerminalServicesSession", new object[] { sessionId}, callback, asyncState); } - + /// - public void EndCloseTerminalServicesSession(System.IAsyncResult asyncResult) - { + public void EndCloseTerminalServicesSession(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void CloseTerminalServicesSessionAsync(int sessionId) - { + public void CloseTerminalServicesSessionAsync(int sessionId) { this.CloseTerminalServicesSessionAsync(sessionId, null); } - + /// - public void CloseTerminalServicesSessionAsync(int sessionId, object userState) - { - if ((this.CloseTerminalServicesSessionOperationCompleted == null)) - { + public void CloseTerminalServicesSessionAsync(int sessionId, object userState) { + if ((this.CloseTerminalServicesSessionOperationCompleted == null)) { this.CloseTerminalServicesSessionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCloseTerminalServicesSessionOperationCompleted); } this.InvokeAsync("CloseTerminalServicesSession", new object[] { sessionId}, this.CloseTerminalServicesSessionOperationCompleted, userState); } - - private void OnCloseTerminalServicesSessionOperationCompleted(object arg) - { - if ((this.CloseTerminalServicesSessionCompleted != null)) - { + + private void OnCloseTerminalServicesSessionOperationCompleted(object arg) { + if ((this.CloseTerminalServicesSessionCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CloseTerminalServicesSessionCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetWindowsProcesses", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public WindowsProcess[] GetWindowsProcesses() - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetWindowsProcesses", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WindowsProcess[] GetWindowsProcesses() { object[] results = this.Invoke("GetWindowsProcesses", new object[0]); return ((WindowsProcess[])(results[0])); } - + /// - public System.IAsyncResult BeginGetWindowsProcesses(System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetWindowsProcesses(System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetWindowsProcesses", new object[0], callback, asyncState); } - + /// - public WindowsProcess[] EndGetWindowsProcesses(System.IAsyncResult asyncResult) - { + public WindowsProcess[] EndGetWindowsProcesses(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((WindowsProcess[])(results[0])); } - + /// - public void GetWindowsProcessesAsync() - { + public void GetWindowsProcessesAsync() { this.GetWindowsProcessesAsync(null); } - + /// - public void GetWindowsProcessesAsync(object userState) - { - if ((this.GetWindowsProcessesOperationCompleted == null)) - { + public void GetWindowsProcessesAsync(object userState) { + if ((this.GetWindowsProcessesOperationCompleted == null)) { this.GetWindowsProcessesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWindowsProcessesOperationCompleted); } this.InvokeAsync("GetWindowsProcesses", new object[0], this.GetWindowsProcessesOperationCompleted, userState); } - - private void OnGetWindowsProcessesOperationCompleted(object arg) - { - if ((this.GetWindowsProcessesCompleted != null)) - { + + private void OnGetWindowsProcessesOperationCompleted(object arg) { + if ((this.GetWindowsProcessesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetWindowsProcessesCompleted(this, new GetWindowsProcessesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/TerminateWindowsProcess", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void TerminateWindowsProcess(int pid) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/TerminateWindowsProcess", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void TerminateWindowsProcess(int pid) { this.Invoke("TerminateWindowsProcess", new object[] { pid}); } - + /// - public System.IAsyncResult BeginTerminateWindowsProcess(int pid, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginTerminateWindowsProcess(int pid, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("TerminateWindowsProcess", new object[] { pid}, callback, asyncState); } - + /// - public void EndTerminateWindowsProcess(System.IAsyncResult asyncResult) - { + public void EndTerminateWindowsProcess(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void TerminateWindowsProcessAsync(int pid) - { + public void TerminateWindowsProcessAsync(int pid) { this.TerminateWindowsProcessAsync(pid, null); } - + /// - public void TerminateWindowsProcessAsync(int pid, object userState) - { - if ((this.TerminateWindowsProcessOperationCompleted == null)) - { + public void TerminateWindowsProcessAsync(int pid, object userState) { + if ((this.TerminateWindowsProcessOperationCompleted == null)) { this.TerminateWindowsProcessOperationCompleted = new System.Threading.SendOrPostCallback(this.OnTerminateWindowsProcessOperationCompleted); } this.InvokeAsync("TerminateWindowsProcess", new object[] { pid}, this.TerminateWindowsProcessOperationCompleted, userState); } - - private void OnTerminateWindowsProcessOperationCompleted(object arg) - { - if ((this.TerminateWindowsProcessCompleted != null)) - { + + private void OnTerminateWindowsProcessOperationCompleted(object arg) { + if ((this.TerminateWindowsProcessCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.TerminateWindowsProcessCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetWindowsServices", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public WindowsService[] GetWindowsServices() - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetWindowsServices", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WindowsService[] GetWindowsServices() { object[] results = this.Invoke("GetWindowsServices", new object[0]); return ((WindowsService[])(results[0])); } - + /// - public System.IAsyncResult BeginGetWindowsServices(System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetWindowsServices(System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetWindowsServices", new object[0], callback, asyncState); } - + /// - public WindowsService[] EndGetWindowsServices(System.IAsyncResult asyncResult) - { + public WindowsService[] EndGetWindowsServices(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((WindowsService[])(results[0])); } - + /// - public void GetWindowsServicesAsync() - { + public void GetWindowsServicesAsync() { this.GetWindowsServicesAsync(null); } - + /// - public void GetWindowsServicesAsync(object userState) - { - if ((this.GetWindowsServicesOperationCompleted == null)) - { + public void GetWindowsServicesAsync(object userState) { + if ((this.GetWindowsServicesOperationCompleted == null)) { this.GetWindowsServicesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWindowsServicesOperationCompleted); } this.InvokeAsync("GetWindowsServices", new object[0], this.GetWindowsServicesOperationCompleted, userState); } - - private void OnGetWindowsServicesOperationCompleted(object arg) - { - if ((this.GetWindowsServicesCompleted != null)) - { + + private void OnGetWindowsServicesOperationCompleted(object arg) { + if ((this.GetWindowsServicesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetWindowsServicesCompleted(this, new GetWindowsServicesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ChangeWindowsServiceStatus", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void ChangeWindowsServiceStatus(string id, WindowsServiceStatus status) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ChangeWindowsServiceStatus", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void ChangeWindowsServiceStatus(string id, WindowsServiceStatus status) { this.Invoke("ChangeWindowsServiceStatus", new object[] { id, status}); } - + /// - public System.IAsyncResult BeginChangeWindowsServiceStatus(string id, WindowsServiceStatus status, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginChangeWindowsServiceStatus(string id, WindowsServiceStatus status, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("ChangeWindowsServiceStatus", new object[] { id, status}, callback, asyncState); } - + /// - public void EndChangeWindowsServiceStatus(System.IAsyncResult asyncResult) - { + public void EndChangeWindowsServiceStatus(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void ChangeWindowsServiceStatusAsync(string id, WindowsServiceStatus status) - { + public void ChangeWindowsServiceStatusAsync(string id, WindowsServiceStatus status) { this.ChangeWindowsServiceStatusAsync(id, status, null); } - + /// - public void ChangeWindowsServiceStatusAsync(string id, WindowsServiceStatus status, object userState) - { - if ((this.ChangeWindowsServiceStatusOperationCompleted == null)) - { + public void ChangeWindowsServiceStatusAsync(string id, WindowsServiceStatus status, object userState) { + if ((this.ChangeWindowsServiceStatusOperationCompleted == null)) { this.ChangeWindowsServiceStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnChangeWindowsServiceStatusOperationCompleted); } this.InvokeAsync("ChangeWindowsServiceStatus", new object[] { id, status}, this.ChangeWindowsServiceStatusOperationCompleted, userState); } - - private void OnChangeWindowsServiceStatusOperationCompleted(object arg) - { - if ((this.ChangeWindowsServiceStatusCompleted != null)) - { + + private void OnChangeWindowsServiceStatusOperationCompleted(object arg) { + if ((this.ChangeWindowsServiceStatusCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ChangeWindowsServiceStatusCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetLogNames", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string[] GetLogNames() - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetWPIProducts", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WPIProduct[] GetWPIProducts(string tabId, string keywordId) { + object[] results = this.Invoke("GetWPIProducts", new object[] { + tabId, + keywordId}); + return ((WPIProduct[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetWPIProducts(string tabId, string keywordId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWPIProducts", new object[] { + tabId, + keywordId}, callback, asyncState); + } + + /// + public WPIProduct[] EndGetWPIProducts(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((WPIProduct[])(results[0])); + } + + /// + public void GetWPIProductsAsync(string tabId, string keywordId) { + this.GetWPIProductsAsync(tabId, keywordId, null); + } + + /// + public void GetWPIProductsAsync(string tabId, string keywordId, object userState) { + if ((this.GetWPIProductsOperationCompleted == null)) { + this.GetWPIProductsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIProductsOperationCompleted); + } + this.InvokeAsync("GetWPIProducts", new object[] { + tabId, + keywordId}, this.GetWPIProductsOperationCompleted, userState); + } + + private void OnGetWPIProductsOperationCompleted(object arg) { + if ((this.GetWPIProductsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWPIProductsCompleted(this, new GetWPIProductsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetWPIProductsFiltered", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WPIProduct[] GetWPIProductsFiltered(string filter) { + object[] results = this.Invoke("GetWPIProductsFiltered", new object[] { + filter}); + return ((WPIProduct[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetWPIProductsFiltered(string filter, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWPIProductsFiltered", new object[] { + filter}, callback, asyncState); + } + + /// + public WPIProduct[] EndGetWPIProductsFiltered(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((WPIProduct[])(results[0])); + } + + /// + public void GetWPIProductsFilteredAsync(string filter) { + this.GetWPIProductsFilteredAsync(filter, null); + } + + /// + public void GetWPIProductsFilteredAsync(string filter, object userState) { + if ((this.GetWPIProductsFilteredOperationCompleted == null)) { + this.GetWPIProductsFilteredOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIProductsFilteredOperationCompleted); + } + this.InvokeAsync("GetWPIProductsFiltered", new object[] { + filter}, this.GetWPIProductsFilteredOperationCompleted, userState); + } + + private void OnGetWPIProductsFilteredOperationCompleted(object arg) { + if ((this.GetWPIProductsFilteredCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWPIProductsFilteredCompleted(this, new GetWPIProductsFilteredCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetWPITabs", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WPITab[] GetWPITabs() { + object[] results = this.Invoke("GetWPITabs", new object[0]); + return ((WPITab[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetWPITabs(System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWPITabs", new object[0], callback, asyncState); + } + + /// + public WPITab[] EndGetWPITabs(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((WPITab[])(results[0])); + } + + /// + public void GetWPITabsAsync() { + this.GetWPITabsAsync(null); + } + + /// + public void GetWPITabsAsync(object userState) { + if ((this.GetWPITabsOperationCompleted == null)) { + this.GetWPITabsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPITabsOperationCompleted); + } + this.InvokeAsync("GetWPITabs", new object[0], this.GetWPITabsOperationCompleted, userState); + } + + private void OnGetWPITabsOperationCompleted(object arg) { + if ((this.GetWPITabsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWPITabsCompleted(this, new GetWPITabsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/InitWPIFeeds", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void InitWPIFeeds(string feedUrls) { + this.Invoke("InitWPIFeeds", new object[] { + feedUrls}); + } + + /// + public System.IAsyncResult BeginInitWPIFeeds(string feedUrls, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("InitWPIFeeds", new object[] { + feedUrls}, callback, asyncState); + } + + /// + public void EndInitWPIFeeds(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void InitWPIFeedsAsync(string feedUrls) { + this.InitWPIFeedsAsync(feedUrls, null); + } + + /// + public void InitWPIFeedsAsync(string feedUrls, object userState) { + if ((this.InitWPIFeedsOperationCompleted == null)) { + this.InitWPIFeedsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInitWPIFeedsOperationCompleted); + } + this.InvokeAsync("InitWPIFeeds", new object[] { + feedUrls}, this.InitWPIFeedsOperationCompleted, userState); + } + + private void OnInitWPIFeedsOperationCompleted(object arg) { + if ((this.InitWPIFeedsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.InitWPIFeedsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetWPIKeywords", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WPIKeyword[] GetWPIKeywords() { + object[] results = this.Invoke("GetWPIKeywords", new object[0]); + return ((WPIKeyword[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetWPIKeywords(System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWPIKeywords", new object[0], callback, asyncState); + } + + /// + public WPIKeyword[] EndGetWPIKeywords(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((WPIKeyword[])(results[0])); + } + + /// + public void GetWPIKeywordsAsync() { + this.GetWPIKeywordsAsync(null); + } + + /// + public void GetWPIKeywordsAsync(object userState) { + if ((this.GetWPIKeywordsOperationCompleted == null)) { + this.GetWPIKeywordsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIKeywordsOperationCompleted); + } + this.InvokeAsync("GetWPIKeywords", new object[0], this.GetWPIKeywordsOperationCompleted, userState); + } + + private void OnGetWPIKeywordsOperationCompleted(object arg) { + if ((this.GetWPIKeywordsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWPIKeywordsCompleted(this, new GetWPIKeywordsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetWPIProductsWithDependencies", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WPIProduct[] GetWPIProductsWithDependencies(string[] products) { + object[] results = this.Invoke("GetWPIProductsWithDependencies", new object[] { + products}); + return ((WPIProduct[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetWPIProductsWithDependencies(string[] products, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWPIProductsWithDependencies", new object[] { + products}, callback, asyncState); + } + + /// + public WPIProduct[] EndGetWPIProductsWithDependencies(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((WPIProduct[])(results[0])); + } + + /// + public void GetWPIProductsWithDependenciesAsync(string[] products) { + this.GetWPIProductsWithDependenciesAsync(products, null); + } + + /// + public void GetWPIProductsWithDependenciesAsync(string[] products, object userState) { + if ((this.GetWPIProductsWithDependenciesOperationCompleted == null)) { + this.GetWPIProductsWithDependenciesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIProductsWithDependenciesOperationCompleted); + } + this.InvokeAsync("GetWPIProductsWithDependencies", new object[] { + products}, this.GetWPIProductsWithDependenciesOperationCompleted, userState); + } + + private void OnGetWPIProductsWithDependenciesOperationCompleted(object arg) { + if ((this.GetWPIProductsWithDependenciesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWPIProductsWithDependenciesCompleted(this, new GetWPIProductsWithDependenciesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/InstallWPIProducts", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void InstallWPIProducts(string[] products) { + this.Invoke("InstallWPIProducts", new object[] { + products}); + } + + /// + public System.IAsyncResult BeginInstallWPIProducts(string[] products, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("InstallWPIProducts", new object[] { + products}, callback, asyncState); + } + + /// + public void EndInstallWPIProducts(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void InstallWPIProductsAsync(string[] products) { + this.InstallWPIProductsAsync(products, null); + } + + /// + public void InstallWPIProductsAsync(string[] products, object userState) { + if ((this.InstallWPIProductsOperationCompleted == null)) { + this.InstallWPIProductsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallWPIProductsOperationCompleted); + } + this.InvokeAsync("InstallWPIProducts", new object[] { + products}, this.InstallWPIProductsOperationCompleted, userState); + } + + private void OnInstallWPIProductsOperationCompleted(object arg) { + if ((this.InstallWPIProductsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.InstallWPIProductsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CancelInstallWPIProducts", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void CancelInstallWPIProducts() { + this.Invoke("CancelInstallWPIProducts", new object[0]); + } + + /// + public System.IAsyncResult BeginCancelInstallWPIProducts(System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("CancelInstallWPIProducts", new object[0], callback, asyncState); + } + + /// + public void EndCancelInstallWPIProducts(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void CancelInstallWPIProductsAsync() { + this.CancelInstallWPIProductsAsync(null); + } + + /// + public void CancelInstallWPIProductsAsync(object userState) { + if ((this.CancelInstallWPIProductsOperationCompleted == null)) { + this.CancelInstallWPIProductsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCancelInstallWPIProductsOperationCompleted); + } + this.InvokeAsync("CancelInstallWPIProducts", new object[0], this.CancelInstallWPIProductsOperationCompleted, userState); + } + + private void OnCancelInstallWPIProductsOperationCompleted(object arg) { + if ((this.CancelInstallWPIProductsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.CancelInstallWPIProductsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetWPIStatus", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string GetWPIStatus() { + object[] results = this.Invoke("GetWPIStatus", new object[0]); + return ((string)(results[0])); + } + + /// + public System.IAsyncResult BeginGetWPIStatus(System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWPIStatus", new object[0], callback, asyncState); + } + + /// + public string EndGetWPIStatus(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string)(results[0])); + } + + /// + public void GetWPIStatusAsync() { + this.GetWPIStatusAsync(null); + } + + /// + public void GetWPIStatusAsync(object userState) { + if ((this.GetWPIStatusOperationCompleted == null)) { + this.GetWPIStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWPIStatusOperationCompleted); + } + this.InvokeAsync("GetWPIStatus", new object[0], this.GetWPIStatusOperationCompleted, userState); + } + + private void OnGetWPIStatusOperationCompleted(object arg) { + if ((this.GetWPIStatusCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWPIStatusCompleted(this, new GetWPIStatusCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/WpiGetLogFileDirectory", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string WpiGetLogFileDirectory() { + object[] results = this.Invoke("WpiGetLogFileDirectory", new object[0]); + return ((string)(results[0])); + } + + /// + public System.IAsyncResult BeginWpiGetLogFileDirectory(System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("WpiGetLogFileDirectory", new object[0], callback, asyncState); + } + + /// + public string EndWpiGetLogFileDirectory(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string)(results[0])); + } + + /// + public void WpiGetLogFileDirectoryAsync() { + this.WpiGetLogFileDirectoryAsync(null); + } + + /// + public void WpiGetLogFileDirectoryAsync(object userState) { + if ((this.WpiGetLogFileDirectoryOperationCompleted == null)) { + this.WpiGetLogFileDirectoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWpiGetLogFileDirectoryOperationCompleted); + } + this.InvokeAsync("WpiGetLogFileDirectory", new object[0], this.WpiGetLogFileDirectoryOperationCompleted, userState); + } + + private void OnWpiGetLogFileDirectoryOperationCompleted(object arg) { + if ((this.WpiGetLogFileDirectoryCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.WpiGetLogFileDirectoryCompleted(this, new WpiGetLogFileDirectoryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/WpiGetLogsInDirectory", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SettingPair[] WpiGetLogsInDirectory(string Path) { + object[] results = this.Invoke("WpiGetLogsInDirectory", new object[] { + Path}); + return ((SettingPair[])(results[0])); + } + + /// + public System.IAsyncResult BeginWpiGetLogsInDirectory(string Path, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("WpiGetLogsInDirectory", new object[] { + Path}, callback, asyncState); + } + + /// + public SettingPair[] EndWpiGetLogsInDirectory(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((SettingPair[])(results[0])); + } + + /// + public void WpiGetLogsInDirectoryAsync(string Path) { + this.WpiGetLogsInDirectoryAsync(Path, null); + } + + /// + public void WpiGetLogsInDirectoryAsync(string Path, object userState) { + if ((this.WpiGetLogsInDirectoryOperationCompleted == null)) { + this.WpiGetLogsInDirectoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnWpiGetLogsInDirectoryOperationCompleted); + } + this.InvokeAsync("WpiGetLogsInDirectory", new object[] { + Path}, this.WpiGetLogsInDirectoryOperationCompleted, userState); + } + + private void OnWpiGetLogsInDirectoryOperationCompleted(object arg) { + if ((this.WpiGetLogsInDirectoryCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.WpiGetLogsInDirectoryCompleted(this, new WpiGetLogsInDirectoryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetLogNames", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetLogNames() { object[] results = this.Invoke("GetLogNames", new object[0]); return ((string[])(results[0])); } - + /// - public System.IAsyncResult BeginGetLogNames(System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetLogNames(System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetLogNames", new object[0], callback, asyncState); } - + /// - public string[] EndGetLogNames(System.IAsyncResult asyncResult) - { + public string[] EndGetLogNames(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((string[])(results[0])); } - + /// - public void GetLogNamesAsync() - { + public void GetLogNamesAsync() { this.GetLogNamesAsync(null); } - + /// - public void GetLogNamesAsync(object userState) - { - if ((this.GetLogNamesOperationCompleted == null)) - { + public void GetLogNamesAsync(object userState) { + if ((this.GetLogNamesOperationCompleted == null)) { this.GetLogNamesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLogNamesOperationCompleted); } this.InvokeAsync("GetLogNames", new object[0], this.GetLogNamesOperationCompleted, userState); } - - private void OnGetLogNamesOperationCompleted(object arg) - { - if ((this.GetLogNamesCompleted != null)) - { + + private void OnGetLogNamesOperationCompleted(object arg) { + if ((this.GetLogNamesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetLogNamesCompleted(this, new GetLogNamesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetLogEntries", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SystemLogEntry[] GetLogEntries(string logName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetLogEntries", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SystemLogEntry[] GetLogEntries(string logName) { object[] results = this.Invoke("GetLogEntries", new object[] { logName}); return ((SystemLogEntry[])(results[0])); } - + /// - public System.IAsyncResult BeginGetLogEntries(string logName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetLogEntries(string logName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetLogEntries", new object[] { logName}, callback, asyncState); } - + /// - public SystemLogEntry[] EndGetLogEntries(System.IAsyncResult asyncResult) - { + public SystemLogEntry[] EndGetLogEntries(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SystemLogEntry[])(results[0])); } - + /// - public void GetLogEntriesAsync(string logName) - { + public void GetLogEntriesAsync(string logName) { this.GetLogEntriesAsync(logName, null); } - + /// - public void GetLogEntriesAsync(string logName, object userState) - { - if ((this.GetLogEntriesOperationCompleted == null)) - { + public void GetLogEntriesAsync(string logName, object userState) { + if ((this.GetLogEntriesOperationCompleted == null)) { this.GetLogEntriesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLogEntriesOperationCompleted); } this.InvokeAsync("GetLogEntries", new object[] { logName}, this.GetLogEntriesOperationCompleted, userState); } - - private void OnGetLogEntriesOperationCompleted(object arg) - { - if ((this.GetLogEntriesCompleted != null)) - { + + private void OnGetLogEntriesOperationCompleted(object arg) { + if ((this.GetLogEntriesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetLogEntriesCompleted(this, new GetLogEntriesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetLogEntriesPaged", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SystemLogEntriesPaged GetLogEntriesPaged(string logName, int startRow, int maximumRows) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetLogEntriesPaged", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SystemLogEntriesPaged GetLogEntriesPaged(string logName, int startRow, int maximumRows) { object[] results = this.Invoke("GetLogEntriesPaged", new object[] { logName, startRow, maximumRows}); return ((SystemLogEntriesPaged)(results[0])); } - + /// - public System.IAsyncResult BeginGetLogEntriesPaged(string logName, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetLogEntriesPaged(string logName, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetLogEntriesPaged", new object[] { logName, startRow, maximumRows}, callback, asyncState); } - + /// - public SystemLogEntriesPaged EndGetLogEntriesPaged(System.IAsyncResult asyncResult) - { + public SystemLogEntriesPaged EndGetLogEntriesPaged(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SystemLogEntriesPaged)(results[0])); } - + /// - public void GetLogEntriesPagedAsync(string logName, int startRow, int maximumRows) - { + public void GetLogEntriesPagedAsync(string logName, int startRow, int maximumRows) { this.GetLogEntriesPagedAsync(logName, startRow, maximumRows, null); } - + /// - public void GetLogEntriesPagedAsync(string logName, int startRow, int maximumRows, object userState) - { - if ((this.GetLogEntriesPagedOperationCompleted == null)) - { + public void GetLogEntriesPagedAsync(string logName, int startRow, int maximumRows, object userState) { + if ((this.GetLogEntriesPagedOperationCompleted == null)) { this.GetLogEntriesPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLogEntriesPagedOperationCompleted); } this.InvokeAsync("GetLogEntriesPaged", new object[] { @@ -545,398 +962,555 @@ namespace WebsitePanel.Server startRow, maximumRows}, this.GetLogEntriesPagedOperationCompleted, userState); } - - private void OnGetLogEntriesPagedOperationCompleted(object arg) - { - if ((this.GetLogEntriesPagedCompleted != null)) - { + + private void OnGetLogEntriesPagedOperationCompleted(object arg) { + if ((this.GetLogEntriesPagedCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetLogEntriesPagedCompleted(this, new GetLogEntriesPagedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ClearLog", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void ClearLog(string logName) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ClearLog", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void ClearLog(string logName) { this.Invoke("ClearLog", new object[] { logName}); } - + /// - public System.IAsyncResult BeginClearLog(string logName, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginClearLog(string logName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("ClearLog", new object[] { logName}, callback, asyncState); } - + /// - public void EndClearLog(System.IAsyncResult asyncResult) - { + public void EndClearLog(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void ClearLogAsync(string logName) - { + public void ClearLogAsync(string logName) { this.ClearLogAsync(logName, null); } - + /// - public void ClearLogAsync(string logName, object userState) - { - if ((this.ClearLogOperationCompleted == null)) - { + public void ClearLogAsync(string logName, object userState) { + if ((this.ClearLogOperationCompleted == null)) { this.ClearLogOperationCompleted = new System.Threading.SendOrPostCallback(this.OnClearLogOperationCompleted); } this.InvokeAsync("ClearLog", new object[] { logName}, this.ClearLogOperationCompleted, userState); } - - private void OnClearLogOperationCompleted(object arg) - { - if ((this.ClearLogCompleted != null)) - { + + private void OnClearLogOperationCompleted(object arg) { + if ((this.ClearLogCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ClearLogCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RebootSystem", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void RebootSystem() - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RebootSystem", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void RebootSystem() { this.Invoke("RebootSystem", new object[0]); } - + /// - public System.IAsyncResult BeginRebootSystem(System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginRebootSystem(System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("RebootSystem", new object[0], callback, asyncState); } - + /// - public void EndRebootSystem(System.IAsyncResult asyncResult) - { + public void EndRebootSystem(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void RebootSystemAsync() - { + public void RebootSystemAsync() { this.RebootSystemAsync(null); } - + /// - public void RebootSystemAsync(object userState) - { - if ((this.RebootSystemOperationCompleted == null)) - { + public void RebootSystemAsync(object userState) { + if ((this.RebootSystemOperationCompleted == null)) { this.RebootSystemOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRebootSystemOperationCompleted); } this.InvokeAsync("RebootSystem", new object[0], this.RebootSystemOperationCompleted, userState); } - - private void OnRebootSystemOperationCompleted(object arg) - { - if ((this.RebootSystemCompleted != null)) - { + + private void OnRebootSystemOperationCompleted(object arg) { + if ((this.RebootSystemCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.RebootSystemCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ExecuteSystemCommand", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public string ExecuteSystemCommand(string path, string args) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ExecuteSystemCommand", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string ExecuteSystemCommand(string path, string args) { object[] results = this.Invoke("ExecuteSystemCommand", new object[] { path, args}); return ((string)(results[0])); } - + /// - public System.IAsyncResult BeginExecuteSystemCommand(string path, string args, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginExecuteSystemCommand(string path, string args, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("ExecuteSystemCommand", new object[] { path, args}, callback, asyncState); } - + /// - public string EndExecuteSystemCommand(System.IAsyncResult asyncResult) - { + public string EndExecuteSystemCommand(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((string)(results[0])); } - + /// - public void ExecuteSystemCommandAsync(string path, string args) - { + public void ExecuteSystemCommandAsync(string path, string args) { this.ExecuteSystemCommandAsync(path, args, null); } - + /// - public void ExecuteSystemCommandAsync(string path, string args, object userState) - { - if ((this.ExecuteSystemCommandOperationCompleted == null)) - { + public void ExecuteSystemCommandAsync(string path, string args, object userState) { + if ((this.ExecuteSystemCommandOperationCompleted == null)) { this.ExecuteSystemCommandOperationCompleted = new System.Threading.SendOrPostCallback(this.OnExecuteSystemCommandOperationCompleted); } this.InvokeAsync("ExecuteSystemCommand", new object[] { path, args}, this.ExecuteSystemCommandOperationCompleted, userState); } - - private void OnExecuteSystemCommandOperationCompleted(object arg) - { - if ((this.ExecuteSystemCommandCompleted != null)) - { + + private void OnExecuteSystemCommandOperationCompleted(object arg) { + if ((this.ExecuteSystemCommandCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.ExecuteSystemCommandCompleted(this, new ExecuteSystemCommandCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - public new void CancelAsync(object userState) - { + public new void CancelAsync(object userState) { base.CancelAsync(userState); } } - - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetTerminalServicesSessionsCompletedEventHandler(object sender, GetTerminalServicesSessionsCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetTerminalServicesSessionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetTerminalServicesSessionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetTerminalServicesSessionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) - : - base(exception, cancelled, userState) - { + + internal GetTerminalServicesSessionsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public TerminalSession[] Result - { - get - { + public TerminalSession[] Result { + get { this.RaiseExceptionIfNecessary(); return ((TerminalSession[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CloseTerminalServicesSessionCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetWindowsProcessesCompletedEventHandler(object sender, GetWindowsProcessesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetWindowsProcessesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetWindowsProcessesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetWindowsProcessesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) - : - base(exception, cancelled, userState) - { + + internal GetWindowsProcessesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public WindowsProcess[] Result - { - get - { + public WindowsProcess[] Result { + get { this.RaiseExceptionIfNecessary(); return ((WindowsProcess[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void TerminateWindowsProcessCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetWindowsServicesCompletedEventHandler(object sender, GetWindowsServicesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetWindowsServicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetWindowsServicesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetWindowsServicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) - : - base(exception, cancelled, userState) - { + + internal GetWindowsServicesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public WindowsService[] Result - { - get - { + public WindowsService[] Result { + get { this.RaiseExceptionIfNecessary(); return ((WindowsService[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void ChangeWindowsServiceStatusCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void GetLogNamesCompletedEventHandler(object sender, GetLogNamesCompletedEventArgs e); - + public delegate void GetWPIProductsCompletedEventHandler(object sender, GetWPIProductsCompletedEventArgs e); + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetLogNamesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetWPIProductsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetLogNamesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) - : - base(exception, cancelled, userState) - { + + internal GetWPIProductsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public string[] Result - { - get - { + public WPIProduct[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((WPIProduct[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetWPIProductsFilteredCompletedEventHandler(object sender, GetWPIProductsFilteredCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWPIProductsFilteredCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWPIProductsFilteredCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public WPIProduct[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((WPIProduct[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetWPITabsCompletedEventHandler(object sender, GetWPITabsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWPITabsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWPITabsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public WPITab[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((WPITab[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void InitWPIFeedsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetWPIKeywordsCompletedEventHandler(object sender, GetWPIKeywordsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWPIKeywordsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWPIKeywordsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public WPIKeyword[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((WPIKeyword[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetWPIProductsWithDependenciesCompletedEventHandler(object sender, GetWPIProductsWithDependenciesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWPIProductsWithDependenciesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWPIProductsWithDependenciesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public WPIProduct[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((WPIProduct[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void InstallWPIProductsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void CancelInstallWPIProductsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetWPIStatusCompletedEventHandler(object sender, GetWPIStatusCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWPIStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWPIStatusCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void WpiGetLogFileDirectoryCompletedEventHandler(object sender, WpiGetLogFileDirectoryCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class WpiGetLogFileDirectoryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal WpiGetLogFileDirectoryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void WpiGetLogsInDirectoryCompletedEventHandler(object sender, WpiGetLogsInDirectoryCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class WpiGetLogsInDirectoryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal WpiGetLogsInDirectoryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public SettingPair[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((SettingPair[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetLogNamesCompletedEventHandler(object sender, GetLogNamesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetLogNamesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetLogNamesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string[] Result { + get { this.RaiseExceptionIfNecessary(); return ((string[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetLogEntriesCompletedEventHandler(object sender, GetLogEntriesCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetLogEntriesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetLogEntriesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetLogEntriesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) - : - base(exception, cancelled, userState) - { + + internal GetLogEntriesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SystemLogEntry[] Result - { - get - { + public SystemLogEntry[] Result { + get { this.RaiseExceptionIfNecessary(); return ((SystemLogEntry[])(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetLogEntriesPagedCompletedEventHandler(object sender, GetLogEntriesPagedCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetLogEntriesPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetLogEntriesPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetLogEntriesPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) - : - base(exception, cancelled, userState) - { + + internal GetLogEntriesPagedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SystemLogEntriesPaged Result - { - get - { + public SystemLogEntriesPaged Result { + get { this.RaiseExceptionIfNecessary(); return ((SystemLogEntriesPaged)(this.results[0])); } } } - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void ClearLogCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void RebootSystemCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void ExecuteSystemCommandCompletedEventHandler(object sender, ExecuteSystemCommandCompletedEventArgs e); - + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class ExecuteSystemCommandCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class ExecuteSystemCommandCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal ExecuteSystemCommandCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) - : - base(exception, cancelled, userState) - { + + internal ExecuteSystemCommandCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public string Result - { - get - { + public string Result { + get { this.RaiseExceptionIfNecessary(); return ((string)(this.results[0])); } diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/BsdDES.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/BsdDES.cs index a04fc8d9..cac9b854 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/BsdDES.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/BsdDES.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/CRC32.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/CRC32.cs index c9d2d683..c2a71147 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/CRC32.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/CRC32.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/EventLogTraceListener.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/EventLogTraceListener.cs index 7188ffb4..f854bc1d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/EventLogTraceListener.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/EventLogTraceListener.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/FileUtils.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/FileUtils.cs index c12ceea8..f30354a5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/FileUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/FileUtils.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/Log.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/Log.cs index e93a3d7a..e645d9f5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/Log.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/Log.cs @@ -31,125 +31,125 @@ using System.Diagnostics; namespace WebsitePanel.Server.Utils { - /// - /// Application log. - /// - public sealed class Log - { + /// + /// Application log. + /// + public sealed class Log + { private static TraceSwitch logSeverity = new TraceSwitch("Log", "General trace switch"); - - private Log() - { - } - /// - /// Write error to the log. - /// - /// Error message. - /// Exception. - public static void WriteError(string message, Exception ex) - { - try - { - if (logSeverity.TraceError) - { - string line = string.Format("[{0:G}] ERROR: {1}\n{2}\n", DateTime.Now, message, ex); - Trace.TraceError(line); - } - } - catch { } - } + private Log() + { + } - /// - /// Write error to the log. - /// - /// Exception. - public static void WriteError(Exception ex) - { + /// + /// Write error to the log. + /// + /// Error message. + /// Exception. + public static void WriteError(string message, Exception ex) + { + try + { + if (logSeverity.TraceError) + { + string line = string.Format("[{0:G}] ERROR: {1}\n{2}\n", DateTime.Now, message, ex); + Trace.TraceError(line); + } + } + catch { } + } - try - { - if (ex != null) - { - WriteError(ex.Message, ex); - } - } - catch { } - } + /// + /// Write error to the log. + /// + /// Exception. + public static void WriteError(Exception ex) + { - /// - /// Write info message to log - /// - /// - public static void WriteInfo(string message, params object[] args) - { - try - { - if (logSeverity.TraceInfo) - { - Trace.TraceInformation(FormatIncomingMessage(message, args)); - } - } - catch { } - } + try + { + if (ex != null) + { + WriteError(ex.Message, ex); + } + } + catch { } + } - /// - /// Write info message to log - /// - /// - public static void WriteWarning(string message, params object[] args) - { - try - { - if (logSeverity.TraceWarning) - { - Trace.TraceWarning(FormatIncomingMessage(message, args)); - } - } - catch { } - } + /// + /// Write info message to log + /// + /// + public static void WriteInfo(string message, params object[] args) + { + try + { + if (logSeverity.TraceInfo) + { + Trace.TraceInformation(FormatIncomingMessage(message, "INFO", args)); + } + } + catch { } + } - /// - /// Write start message to log - /// - /// + /// + /// Write info message to log + /// + /// + public static void WriteWarning(string message, params object[] args) + { + try + { + if (logSeverity.TraceWarning) + { + Trace.TraceWarning(FormatIncomingMessage(message, "WARNING", args)); + } + } + catch { } + } + + /// + /// Write start message to log + /// + /// public static void WriteStart(string message, params object[] args) - { - try - { - if (logSeverity.TraceInfo) - { - Trace.TraceInformation(FormatIncomingMessage(message, args)); - } - } - catch { } - } - - /// - /// Write end message to log - /// - /// - public static void WriteEnd(string message, params object[] args) - { - try - { - if (logSeverity.TraceInfo) - { - Trace.TraceInformation(FormatIncomingMessage(message, args)); - } - } - catch { } - } + { + try + { + if (logSeverity.TraceInfo) + { + Trace.TraceInformation(FormatIncomingMessage(message, "START", args)); + } + } + catch { } + } - private static string FormatIncomingMessage(string message, params object[] args) - { - // - if (args.Length > 0) - { - message = String.Format(message, args); - } - // - return String.Concat(String.Format("[{0:G}] END: ", DateTime.Now), message); - } - } + /// + /// Write end message to log + /// + /// + public static void WriteEnd(string message, params object[] args) + { + try + { + if (logSeverity.TraceInfo) + { + Trace.TraceInformation(FormatIncomingMessage(message, "END", args)); + } + } + catch { } + } + + private static string FormatIncomingMessage(string message, string tag, params object[] args) + { + // + if (args.Length > 0) + { + message = String.Format(message, args); + } + // + return String.Concat(String.Format("[{0:G}] {1}: ", DateTime.Now, tag), message); + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/LogParser.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/LogParser.cs index eae403a5..2d893f45 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/LogParser.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/LogParser.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/LogReader.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/LogReader.cs index 27fa2891..f1f21b8c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/LogReader.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/LogReader.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/LogState.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/LogState.cs index 0d590b03..a8b977eb 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/LogState.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/LogState.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/MonthlyStatistics.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/MonthlyStatistics.cs index c46ba575..e13b24f9 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/MonthlyStatistics.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/MonthlyStatistics.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/StatsLine.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/StatsLine.cs index 5b7e0f7a..17bf05e4 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/StatsLine.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/LogParser/StatsLine.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/OS.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/OS.cs index 3a679f07..96800ef9 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/OS.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/OS.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/PInvoke.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/PInvoke.cs index 3db8d664..498a8f11 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/PInvoke.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/PInvoke.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/SecurityUtils.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/SecurityUtils.cs index c05dc629..7a3f5d77 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/SecurityUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/SecurityUtils.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -507,6 +507,11 @@ namespace WebsitePanel.Providers.Utils { if (serverSettings.ADEnabled) { + if (user.Name.IndexOf("\\") != -1) + { + string[] tmpStr = user.Name.Split('\\'); + user.Name = tmpStr[1]; + } //check is user name less than 20 symbols if (user.Name.Length > 20) @@ -538,6 +543,13 @@ namespace WebsitePanel.Providers.Utils SetObjectProperty(objUser, "UserPrincipalName", user.Name); SetObjectProperty(objUser, "sAMAccountName", user.Name); SetObjectProperty(objUser, "UserPassword", user.Password); + + if (user.MsIIS_FTPDir != string.Empty) + { + SetObjectProperty(objUser, "msIIS-FTPDir", user.MsIIS_FTPDir); + SetObjectProperty(objUser, "msIIS-FTPRoot", user.MsIIS_FTPRoot); + } + objUser.Properties["userAccountControl"].Value = ADAccountOptions.UF_NORMAL_ACCOUNT | ADAccountOptions.UF_PASSWD_NOTREQD; objUser.CommitChanges(); diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/StringUtils.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/StringUtils.cs index f1a7426e..ae0ddc6b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/StringUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/StringUtils.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -28,6 +28,7 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Text; using System.Text.RegularExpressions; @@ -51,5 +52,18 @@ namespace WebsitePanel.Providers.Utils return Regex.Replace(str, "\\W+", "_", RegexOptions.Compiled); } + + public static string CleanupASCIIControlCharacters(string s) + { + byte[] invalidCharacters = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0xB, + 0xC, 0xE, 0xF, 0x10, 0x11, 0x12, 0x14, 0x15, 0x16, + 0x17, 0x18, 0x1A, 0x1B, 0x1E, 0x1F, 0x7F }; + + byte[] sanitizedBytes = (from a in Encoding.UTF8.GetBytes(s) + where !invalidCharacters.Contains(a) + select a).ToArray(); + + return Encoding.UTF8.GetString(sanitizedBytes); + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/SystemSID.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/SystemSID.cs index cd14a80c..c5042426 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/SystemSID.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/SystemSID.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/WmiHelper.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/WmiHelper.cs index 0df6b148..ce96dcf0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/WmiHelper.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/WmiHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server.WPIService/Properties/AssemblyInfo.cs b/WebsitePanel/Sources/WebsitePanel.Server.WPIService/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..9399f7f3 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Server.WPIService/Properties/AssemblyInfo.cs @@ -0,0 +1,65 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WebsitePanel.Server.WPIService")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WebsitePanel.Server.WPIService")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("aed34aef-8940-48e0-9183-f2522efd7d28")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/WebsitePanel/Sources/WebsitePanel.Server.WPIService/Server.cs b/WebsitePanel/Sources/WebsitePanel.Server.WPIService/Server.cs new file mode 100644 index 00000000..227dc8c1 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Server.WPIService/Server.cs @@ -0,0 +1,68 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System; +using System.Diagnostics; +using System.Runtime.Remoting; +using System.Runtime.Remoting.Channels; +using System.Runtime.Remoting.Channels.Tcp; +using System.Threading; + +namespace WebsitePanel.Server.WPIService +{ + class Server + { + static Mutex mutex = null; + static void Main(string[] args) + { + bool onlyInstance = false; + mutex = new Mutex(false, "Global\\{5DE133EC-49AE-4AE4-99BE-0F0A0BB5719E}", out onlyInstance); + if (!mutex.WaitOne(0, false)) //if (!onlyInstance) + { + Console.WriteLine("The service is already running."); + return; + } + TcpChannel ch = new TcpChannel(WPIServiceContract.PORT); + ChannelServices.RegisterChannel(ch, true); + + WPIService wpiService = new WPIService(); + RemotingServices.Marshal(wpiService, "WPIServiceContract"); + + + Console.WriteLine("The service is running."); + + while (!wpiService.IsFinished) + { + Thread.Sleep(2000); + } + + Console.WriteLine("The service is finished."); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Server.WPIService/WPIService.cs b/WebsitePanel/Sources/WebsitePanel.Server.WPIService/WPIService.cs new file mode 100644 index 00000000..22e7ca82 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Server.WPIService/WPIService.cs @@ -0,0 +1,247 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using Microsoft.Web.PlatformInstaller; +using WebsitePanel.Server.Code; + +namespace WebsitePanel.Server.WPIService +{ + // Define a service contract. + //[ServiceContract(Namespace = "http://Helicon.Zoo.WPIService")] + //public interface IWPIService + //{ + // // [OperationContract] + // void Initialize(string[] feeds); + + // //[OperationContract] + // void BeginInstallation(string[] productsToInstall); + + // //[OperationContract] + // string GetStatus(); + + // string GetLogs(); + //} + + enum EWPIServiceStatus + { + Initialised, + Installation, + InstallationComplete, + InstallationError + } + + // Service class which implements the service contract. + //[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] + class WPIService : WPIServiceContract + { + private WpiHelper _wpiHelper; + private string[] _productsToInstall; + + private EWPIServiceStatus _installationStatus; + private string _statusMessage = "preparing..."; + + private Thread _installerThread; + private object _lock = new object(); + + public bool IsFinished { get; private set; } + + #region IWPIService contract + + public override string Ping() + { + return "OK"; + } + + public override void Initialize(string[] feeds) + { + lock (_lock) + { + if (_installationStatus == EWPIServiceStatus.Installation) + { + throw new Exception("Invalid state, already in Installation process"); + } + + _installationStatus = EWPIServiceStatus.Initialised; + + if (_wpiHelper == null) + { + _wpiHelper = new WpiHelper(feeds); + Console.WriteLine("_wpiHelper initialized"); + } + } + } + + public override void BeginInstallation(string[] productsToInstall) + { + lock (_lock) + { + + if (_installationStatus != EWPIServiceStatus.Initialised) + { + throw new Exception("Invalid state, expected EWPIServiceStatus.Initialised. now: " + _installationStatus); + } + + _installationStatus = EWPIServiceStatus.Installation; + _statusMessage = "Preparing for install"; + + _productsToInstall = new string[productsToInstall.Length]; + productsToInstall.CopyTo(_productsToInstall,0); + + _installerThread = new Thread(new ThreadStart(InternalBeginInstallation)); + _installerThread.Start(); + } + } + + + public override string GetStatus() + { + + lock(_lock) + { + + string result = this._statusMessage; + + //Allow exit from app, if finished + IsInstallationProceed(); + + return result; + } + } + + public override string GetLogFileDirectory() + { + + lock (_lock) + { + return null != _wpiHelper ? _wpiHelper.GetLogFileDirectory() : null; + } + } + + #endregion + + #region private implementaion + private bool IsInstallationProceed() + { + if (_installationStatus == EWPIServiceStatus.InstallationComplete) + { + IsFinished = true; + return false; + } + else if (_installationStatus == EWPIServiceStatus.InstallationError) + { + IsFinished = true; + return false; + } + + return true; + } + + + private void InternalBeginInstallation() + { + _wpiHelper.InstallProducts( + _productsToInstall, + WpiHelper.DeafultLanguage, + InstallStatusUpdatedHandler, + InstallCompleteHandler + ); + + lock (_lock) + { + _installationStatus = EWPIServiceStatus.InstallationComplete; + } + } + + private void InstallCompleteHandler(object sender, EventArgs eventArgs) + { + lock(_lock) + { + _installationStatus = EWPIServiceStatus.InstallationComplete; + } + } + + + private void InstallStatusUpdatedHandler(object sender, InstallStatusEventArgs e) + { + StringBuilder sb = new StringBuilder(); + sb.AppendFormat("{0}: ", e.InstallerContext.ProductName); + + switch (e.InstallerContext.InstallationState) + { + case InstallationState.Waiting: + sb.Append("please wait...").AppendLine(); + break; + case InstallationState.Downloading: + sb.Append("downloading").AppendLine(); + if (e.ProgressValue > 0) + { + sb.AppendFormat("{0} of {1} Kb downloaded", e.ProgressValue, + e.InstallerContext.Installer.InstallerFile.FileSize); + sb.AppendLine(); + } + break; + case InstallationState.Downloaded: + sb.Append("downloaded").AppendLine(); + break; + case InstallationState.DownloadFailed: + sb.AppendFormat("download failed").AppendLine(); + sb.AppendLine(e.InstallerContext.InstallStateDetails); + break; + case InstallationState.DependencyFailed: + sb.AppendFormat("dependency failed").AppendLine(); + sb.AppendLine(e.InstallerContext.InstallStateDetails); + sb.AppendFormat("{0}: {1}", e.InstallerContext.ReturnCode.Status, e.InstallerContext.ReturnCode.DetailedInformation).AppendLine(); + break; + case InstallationState.Installing: + sb.Append("installing").AppendLine(); + break; + case InstallationState.InstallCompleted: + sb.Append("install completed").AppendLine(); + break; + case InstallationState.Canceled: + sb.AppendFormat("canceled").AppendLine(); + sb.AppendLine(e.InstallerContext.InstallStateDetails); + sb.AppendFormat("{0}: {1}", e.InstallerContext.ReturnCode.Status, e.InstallerContext.ReturnCode.DetailedInformation).AppendLine(); + break; + default: + throw new ArgumentOutOfRangeException(); + } + + lock (_lock) + { + _statusMessage = sb.ToString(); + } + } + #endregion + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.ExchangeHostedEdition/WebsitePanel.Providers.ExchangeHostedEdition.csproj b/WebsitePanel/Sources/WebsitePanel.Server.WPIService/WebsitePanel.Server.WPIService.csproj similarity index 55% rename from WebsitePanel/Sources/WebsitePanel.Providers.ExchangeHostedEdition/WebsitePanel.Providers.ExchangeHostedEdition.csproj rename to WebsitePanel/Sources/WebsitePanel.Server.WPIService/WebsitePanel.Server.WPIService.csproj index 61fe1489..dd23de4b 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.ExchangeHostedEdition/WebsitePanel.Providers.ExchangeHostedEdition.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Server.WPIService/WebsitePanel.Server.WPIService.csproj @@ -5,14 +5,15 @@ AnyCPU 8.0.30703 2.0 - {5D30E0E3-7AAD-4BE1-8043-3F3E9994D321} - Library + {DD9E57D5-797F-4420-AF1A-23CEA2F310E0} + Exe Properties - WebsitePanel.Providers.ExchangeHostedEdition - WebsitePanel.Providers.ExchangeHostedEdition + WebsitePanel.Server.WPIService + WebsitePanel.Server.WPIService v3.5 + + 512 - true @@ -22,52 +23,49 @@ DEBUG;TRACE prompt 4 - 618 - none + pdbonly true ..\WebsitePanel.Server\bin\ TRACE prompt 4 - 618 - - ..\..\Lib\References\Microsoft\Microsoft.Exchange.Data.dll - False + + False + ..\..\Lib\References\Microsoft\Microsoft.Web.Deployment.dll + + + False + ..\..\Lib\Microsoft.Web.PlatformInstaller.dll - - - False - ..\..\Lib\System.Management.Automation.dll - - - + + - - VersionInfo.cs + + WPIHelper.cs - - + + - - {684C932A-6C75-46AC-A327-F3689D89EB42} - WebsitePanel.Providers.Base - - - {E91E52F3-9555-4D00-B577-2B1DBDD87CA7} - WebsitePanel.Server.Utils + + {736FA0F0-ECA3-416E-B299-85CC425FFF44} + WebsitePanel.Server.WPIServiceContract + + + + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Server.sln b/WebsitePanel/Sources/WebsitePanel.Server.sln index 715e7c13..d6a24e21 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.sln +++ b/WebsitePanel/Sources/WebsitePanel.Server.sln @@ -93,14 +93,16 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail.hMailServer5", "WebsitePanel.Providers.Mail.hMail5\WebsitePanel.Providers.Mail.hMailServer5.vbproj", "{8F644D50-D602-4AD3-8EB0-CA3C3676B18D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.ExchangeHostedEdition", "WebsitePanel.Providers.ExchangeHostedEdition\WebsitePanel.Providers.ExchangeHostedEdition.csproj", "{5D30E0E3-7AAD-4BE1-8043-3F3E9994D321}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Mail.SmarterMail7", "WebsitePanel.Providers.Mail.SmarterMail7\WebsitePanel.Providers.Mail.SmarterMail7.csproj", "{FB773A2C-1CD3-4D76-9C4F-B6B7EB9E479C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.VirtualizationForPC.HyperVForPC", "WebsitePanel.Providers.Virtualization.HyperVForPC\WebsitePanel.Providers.VirtualizationForPC.HyperVForPC.csproj", "{64BEEB10-7F9F-4860-B2FF-84CDA02766B3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Mail.SmarterMail9", "WebsitePanel.Providers.Mail.SmarterMail9\WebsitePanel.Providers.Mail.SmarterMail9.csproj", "{FB97E984-2463-44EB-B8BE-14AA41D0365E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Server.WPIService", "WebsitePanel.Server.WPIService\WebsitePanel.Server.WPIService.csproj", "{DD9E57D5-797F-4420-AF1A-23CEA2F310E0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Server.WPIServiceContract", "WebsitePanel.Server.WPIServiceContract\WebsitePanel.Server.WPIServiceContract.csproj", "{736FA0F0-ECA3-416E-B299-85CC425FFF44}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -267,10 +269,6 @@ Global {8F644D50-D602-4AD3-8EB0-CA3C3676B18D}.Debug|Any CPU.Build.0 = Debug|Any CPU {8F644D50-D602-4AD3-8EB0-CA3C3676B18D}.Release|Any CPU.ActiveCfg = Release|Any CPU {8F644D50-D602-4AD3-8EB0-CA3C3676B18D}.Release|Any CPU.Build.0 = Release|Any CPU - {5D30E0E3-7AAD-4BE1-8043-3F3E9994D321}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5D30E0E3-7AAD-4BE1-8043-3F3E9994D321}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5D30E0E3-7AAD-4BE1-8043-3F3E9994D321}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5D30E0E3-7AAD-4BE1-8043-3F3E9994D321}.Release|Any CPU.Build.0 = Release|Any CPU {FB773A2C-1CD3-4D76-9C4F-B6B7EB9E479C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FB773A2C-1CD3-4D76-9C4F-B6B7EB9E479C}.Debug|Any CPU.Build.0 = Debug|Any CPU {FB773A2C-1CD3-4D76-9C4F-B6B7EB9E479C}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -283,6 +281,14 @@ Global {FB97E984-2463-44EB-B8BE-14AA41D0365E}.Debug|Any CPU.Build.0 = Debug|Any CPU {FB97E984-2463-44EB-B8BE-14AA41D0365E}.Release|Any CPU.ActiveCfg = Release|Any CPU {FB97E984-2463-44EB-B8BE-14AA41D0365E}.Release|Any CPU.Build.0 = Release|Any CPU + {DD9E57D5-797F-4420-AF1A-23CEA2F310E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD9E57D5-797F-4420-AF1A-23CEA2F310E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD9E57D5-797F-4420-AF1A-23CEA2F310E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD9E57D5-797F-4420-AF1A-23CEA2F310E0}.Release|Any CPU.Build.0 = Release|Any CPU + {736FA0F0-ECA3-416E-B299-85CC425FFF44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {736FA0F0-ECA3-416E-B299-85CC425FFF44}.Debug|Any CPU.Build.0 = Debug|Any CPU + {736FA0F0-ECA3-416E-B299-85CC425FFF44}.Release|Any CPU.ActiveCfg = Release|Any CPU + {736FA0F0-ECA3-416E-B299-85CC425FFF44}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/WebsitePanel/Sources/WebsitePanel.Server/AutoDiscovery.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/AutoDiscovery.asmx.cs index eb858f0a..e187cd43 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/AutoDiscovery.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/AutoDiscovery.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/BlackBerry.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/BlackBerry.asmx.cs index 3a869c04..ff07fbfd 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/BlackBerry.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/BlackBerry.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/CRM.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/CRM.asmx.cs index 1b4d3a0c..7c8ff121 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/CRM.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/CRM.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Code/AutoDiscoveryHelper.cs b/WebsitePanel/Sources/WebsitePanel.Server/Code/AutoDiscoveryHelper.cs index a7e9cd59..0e804b46 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Code/AutoDiscoveryHelper.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/Code/AutoDiscoveryHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Code/ServerConfiguration.cs b/WebsitePanel/Sources/WebsitePanel.Server/Code/ServerConfiguration.cs index 338b2465..f2198dc8 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Code/ServerConfiguration.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/Code/ServerConfiguration.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Code/ServerUsernameTokenManager.cs b/WebsitePanel/Sources/WebsitePanel.Server/Code/ServerUsernameTokenManager.cs index 21ff94e1..9f9c1201 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Code/ServerUsernameTokenManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/Code/ServerUsernameTokenManager.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Code/UsernameAssertion.cs b/WebsitePanel/Sources/WebsitePanel.Server/Code/UsernameAssertion.cs index 74302d60..cfd60f5e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Code/UsernameAssertion.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/Code/UsernameAssertion.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -38,6 +38,7 @@ using Microsoft.Web.Services3; using Microsoft.Web.Services3.Design; using Microsoft.Web.Services3.Security; using Microsoft.Web.Services3.Security.Tokens; +using WebSecurity=Microsoft.Web.Services3.Security.Security; namespace WebsitePanel.Server { @@ -105,7 +106,7 @@ namespace WebsitePanel.Server this.filterContext = filterContext; } - public override void ValidateMessageSecurity(SoapEnvelope envelope, Security security) + public override void ValidateMessageSecurity(SoapEnvelope envelope, WebSecurity security) { if (!ServerConfiguration.Security.SecurityEnabled) return; @@ -145,7 +146,7 @@ namespace WebsitePanel.Server throw new SecurityFault("Message did not meet security requirements."); } - private bool CheckSignature(SoapEnvelope envelope, Security security, MessageSignature signature) + private bool CheckSignature(SoapEnvelope envelope, WebSecurity security, MessageSignature signature) { // // Now verify which parts of the message were actually signed. diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Code/WPIHelper.cs b/WebsitePanel/Sources/WebsitePanel.Server/Code/WPIHelper.cs new file mode 100644 index 00000000..e37445b8 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Server/Code/WPIHelper.cs @@ -0,0 +1,807 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using Microsoft.Web.Deployment; +using Microsoft.Web.PlatformInstaller; +using Installer = Microsoft.Web.PlatformInstaller.Installer; + +namespace WebsitePanel.Server.Code +{ + public class WpiUpdatedDeploymentParameter + { + public string Name; + public string Value; + public DeploymentWellKnownTag WellKnownTags; + } + + public class WpiHelper + { + #region public consts + + public const string DeafultLanguage = "en"; + + #endregion + + #region private fields + + private readonly List _feeds; + private string _webPIinstallersFolder; + private const string MainWpiFeed = "https://www.microsoft.com/web/webpi/3.0/webproductlist.xml"; + private const string IisChoiceProduct = "StaticContent"; + private const string WebMatrixChoiceProduct = "WebMatrix"; + private ProductManager _productManager; + private bool _installCompleted; + private InstallManager _installManager; + private string _LogFileDirectory = string.Empty; + string _resourceLanguage = DeafultLanguage; + private const DeploymentWellKnownTag databaseEngineTags = + DeploymentWellKnownTag.Sql | + DeploymentWellKnownTag.MySql | + DeploymentWellKnownTag.SqLite | + DeploymentWellKnownTag.VistaDB | + DeploymentWellKnownTag.FlatFile; + + #endregion private fields + + public WpiHelper(IEnumerable feeds) + { + _feeds = new List(); + _feeds.AddRange(feeds); + + Initialize(); + } + + private void Initialize() + { + // insert Main WebPI xml file + if (!_feeds.Contains(MainWpiFeed, StringComparer.OrdinalIgnoreCase)) + { + _feeds.Insert(0, MainWpiFeed); + } + + // create cache folder if not exists + //_webPIinstallersFolder = Environment.ExpandEnvironmentVariables(@"%LocalAppData%\Microsoft\Web Platform Installer\installers"); + _webPIinstallersFolder = Path.Combine( + Environment.ExpandEnvironmentVariables("%SystemRoot%"), + "Temp\\zoo.wpi\\AppData\\Local\\Microsoft\\Web Platform Installer\\installers" ); + + if (!Directory.Exists(_webPIinstallersFolder)) + { + Directory.CreateDirectory(_webPIinstallersFolder); + } + + // load feeds + _productManager = new ProductManager(); + + + foreach (string feed in _feeds) + { + Log(string.Format("Loading {0}", feed)); + if (feed.StartsWith("https://www.microsoft.com", StringComparison.OrdinalIgnoreCase)) + { + _productManager.Load(new Uri(feed), true, true, true, _webPIinstallersFolder); + } + else + { + _productManager.LoadExternalFile(new Uri(feed)); + } + } + + Log(string.Format("{0} products loaded", _productManager.Products.Count)); + + LogDebugInfo(); + } + + public void SetResourceLanguage(string resourceLanguage) + { + _resourceLanguage = resourceLanguage; + _productManager.SetResourceLanguage(resourceLanguage); + } + + #region Public interface + + public List GetProducts() + { + return GetProducts(null,null); + } + + public List GetLanguages() + { + List languages = new List(); + + foreach (Product product in GetProducts()) + { + if (null!=product.Installers) + { + foreach (Installer installer in product.Installers) + { + Language lang = installer.Language; + if (null!=lang && !languages.Contains(lang)) + { + languages.Add(lang); + } + } + } + } + + return languages; + } + + public void CancelInstallProducts() + { + if (_installManager!= null) + { + _installManager.Cancel(); + } + } + + private List GetInstallers(List productsToInstall, Language lang) + { + List installersToUse = new List(); + foreach (Product product in productsToInstall) + { + Installer installer = product.GetInstaller(lang); + if (null != installer) + { + installersToUse.Add(installer); + } + } + + return installersToUse; + } + + + public List GetProductsWithDependencies(IEnumerable productIdsToInstall ) + { + List updatedProductIdsToInstall = new List(); + // add iis chioce product to force iis (not-iisexpress/webmatrix) branch + updatedProductIdsToInstall.Add(IisChoiceProduct); + updatedProductIdsToInstall.AddRange(productIdsToInstall); + + List productsToInstall = new List(); + + foreach (string productId in updatedProductIdsToInstall) + { + Log(string.Format("Product {0} to be installed", productId)); + + Product product = _productManager.GetProduct(productId); + if (null == product) + { + Log(string.Format("Product {0} not found", productId)); + continue; + } + if (product.IsInstalled(true)) + { + Log(string.Format("Product {0} is installed", product.Title)); + } + else + { + Log(string.Format("Adding product {0} with dependencies", product.Title)); + // search and add dependencies but skip webmatrix/iisexpress branches + AddProductWithDependencies(product, productsToInstall, WebMatrixChoiceProduct); + } + } + + return productsToInstall; + } + + public string GetLogFileDirectory() + { + return _LogFileDirectory; + } + + + private Language GetLanguage(string languageId) + { + if (!string.IsNullOrEmpty(languageId)) + { + return _productManager.GetLanguage(languageId); + } + + return _productManager.GetLanguage(DeafultLanguage); + } + + + // GetTabs + public ReadOnlyCollection GetTabs() + { + return _productManager.Tabs; + } + + public Tab GetTab(string tabId) + { + return _productManager.GetTab(tabId); + } + + // GetKeywords + public ReadOnlyCollection GetKeywords() + { + return _productManager.Keywords; + } + + public List GetApplications(string keywordId) + { + + Keyword keyword = null; + if (!string.IsNullOrEmpty(keywordId)) + { + keyword = _productManager.GetKeyword(keywordId); + } + + + + List products = new List(); + + Language lang = GetLanguage(_resourceLanguage); + Language langDefault = GetLanguage(DeafultLanguage); + + foreach (Product product in _productManager.Products) + { + if (!product.IsApplication) + { + // skip + continue; + } + + //Check language + if ( + lang.AvailableProducts.Contains(product) || + langDefault.AvailableProducts.Contains(product) + ) + { + if (null == keyword) + { + products.Add(product); + } + else if (product.Keywords.Contains(keyword)) + { + products.Add(product); + } + + } + + } + + //Sort by Title + products.Sort(delegate(Product a, Product b) + { + return a.Title.CompareTo(b.Title); + }); + + + return products; + } + + public Product GetProduct(string productId) + { + return _productManager.GetProduct(productId); + } + + public IList GetAppDecalredParameters(string productId) + { + Product app = _productManager.GetProduct(productId); + Installer appInstaller = app.GetInstaller(GetLanguage(null)); + return appInstaller.MSDeployPackage.DeclaredParameters; + } + + public void InstallProducts( + IEnumerable productIdsToInstall, + string languageId, + EventHandler installStatusUpdatedHandler, + EventHandler installCompleteHandler) + { + + // Get products & dependencies list to install + List productsToInstall = GetProductsWithDependencies(productIdsToInstall); + + // Get installers + Language lang = GetLanguage(languageId); + List installersToUse = GetInstallers(productsToInstall, lang ); + + + // Prepare install manager & set event handlers + _installManager = new InstallManager(); + _installManager.Load(installersToUse); + + + if (null != installStatusUpdatedHandler) + { + _installManager.InstallerStatusUpdated += installStatusUpdatedHandler; + } + _installManager.InstallerStatusUpdated += InstallManager_InstallerStatusUpdated; + + if (null != installCompleteHandler) + { + _installManager.InstallCompleted += installCompleteHandler; + } + _installManager.InstallCompleted += InstallManager_InstallCompleted; + + // Download installer files + foreach (InstallerContext installerContext in _installManager.InstallerContexts) + { + if (null != installerContext.Installer.InstallerFile) + { + string failureReason; + if (!_installManager.DownloadInstallerFile(installerContext, out failureReason)) + { + Log(string.Format("DownloadInstallerFile '{0}' failed: {1}", + installerContext.Installer.InstallerFile.InstallerUrl, failureReason)); + } + } + } + + if (installersToUse.Count > 0) + { + // Start installation + _installCompleted = false; + Log("_installManager.StartInstallation()"); + _installManager.StartInstallation(); + + Log("_installManager.StartInstallation() done"); + while (!_installCompleted) + { + Thread.Sleep(100); + } + + //save logs + SaveLogDirectory(); + + + _installCompleted = false; + } + else + { + Log("Nothing to install"); + } + + } + + public bool InstallApplication( + string appId, + List updatedValues, + string languageId, + EventHandler installStatusUpdatedHandler, + EventHandler installCompleteHandler, + out string log, + out string failedMessage + ) + { + + Product app = GetProduct(appId); + Installer appInstaller = app.GetInstaller(GetLanguage(languageId)); + WpiAppInstallLogger logger = new WpiAppInstallLogger(); + + if (null != installStatusUpdatedHandler) + { + _installManager.InstallerStatusUpdated += installStatusUpdatedHandler; + } + _installManager.InstallerStatusUpdated += logger.HanlderInstallerStatusUpdated; + + if (null != installCompleteHandler) + { + _installManager.InstallCompleted += installCompleteHandler; + } + _installManager.InstallCompleted += logger.HandlerInstallCompleted; + + // set updated parameters + foreach (WpiUpdatedDeploymentParameter parameter in updatedValues) + { + if (!string.IsNullOrEmpty(parameter.Value)) + { + appInstaller.MSDeployPackage.SetParameters[parameter.Name] = parameter.Value; + } + } + + DeploymentWellKnownTag dbTag = (DeploymentWellKnownTag)GetDbTag(updatedValues); + + // remove parameters with alien db tags + foreach (DeclaredParameter parameter in appInstaller.MSDeployPackage.DeclaredParameters) + { + if (IsAlienDbTaggedParameter(dbTag, parameter)) + { + appInstaller.MSDeployPackage.RemoveParameters.Add(parameter.Name); + } + } + + // skip alien directives + RemoveUnusedProviders(appInstaller.MSDeployPackage, dbTag); + + _installCompleted = false; + Log("_installManager.StartApplicationInstallation()"); + _installManager.StartApplicationInstallation(); + while (!_installCompleted) + { + Thread.Sleep(1000); + } + Log("_installManager.StartApplicationInstallation() _installCompleted"); + + //save logs + SaveLogDirectory(); + + _installCompleted = false; + + log = logger.GetLog(); + failedMessage = logger.FailedMessage; + + return !logger.IsFailed; + } + + public bool IsKeywordApplication(Keyword keyword) + { + //if all products are Application + foreach (Product product in keyword.Products) + { + if (!product.IsApplication) + { + return false; + } + } + + return true; + + } + + #endregion Public interface + + + #region private members + + private void LogDebugInfo() + { + StringBuilder sb = new StringBuilder(); + + sb.Append("Products: "); + + sb.Append("Tabs: ").AppendLine(); + foreach (Tab tab in _productManager.Tabs) + { + sb.AppendFormat("\t{0}, FromCustomFeed = {1}", tab.Name, tab.FromCustomFeed).AppendLine(); + foreach (string f in tab.FeedList) + { + sb.AppendFormat("\t\t{0}", f).AppendLine(); + } + sb.AppendLine(); + } + sb.AppendLine(); + + sb.Append("Keywords: ").AppendLine().Append("\t"); + foreach (Keyword keyword in _productManager.Keywords) + { + sb.Append(keyword.Id).Append(","); + } + sb.AppendLine(); + + sb.Append("Languages: ").AppendLine().Append("\t"); + foreach (Language language in _productManager.Languages) + { + sb.Append(language.Name).Append(","); + } + sb.AppendLine(); + + Log(sb.ToString()); + } + + private static void Log(string message) + { +//#if DEBUG + Debug.WriteLine(string.Format("[{0}] WpiHelper: {1}", Process.GetCurrentProcess().Id, message)); + Console.WriteLine(message); +//#endif + } + + public List GetProducts(string FeedLocation, string keywordId) + { + Keyword keyword = null; + if (!string.IsNullOrEmpty(keywordId)) + { + keyword = _productManager.GetKeyword(keywordId); + } + + List products = new List(); + + foreach (Product product in _productManager.Products) + { + if (!string.IsNullOrEmpty(FeedLocation) && string.Compare(product.FeedLocation, FeedLocation, StringComparison.OrdinalIgnoreCase) != 0) + { + // if FeedLocation defined, then select products only from this feed location + continue; + } + + if (null == product.Installers || product.Installers.Count == 0) + { + // skip this product + // usually product without intsallers user as product detection + continue; + } + + if (null == keyword) + { + products.Add(product); + } + else if (product.Keywords.Contains(keyword)) + { + products.Add(product); + } + } + + //Sort by Title + products.Sort(delegate(Product a, Product b) + { + return a.Title.CompareTo(b.Title); + }); + + return products; + } + + public List GetProductsFiltered(string filter) + { + + List products = new List(); + + foreach (Product product in _productManager.Products) + { + if (null == product.Installers || product.Installers.Count == 0) + { + // skip this product + // usually product without intsallers user as product detection + continue; + } + + if (string.IsNullOrEmpty(filter)) + { + products.Add(product); + } + else if (product.Title.ToLower().Contains(filter.ToLower())) + { + products.Add(product); + } + } + + //Sort by Title + products.Sort(delegate(Product a, Product b) + { + return a.Title.CompareTo(b.Title); + }); + + + return products; + } + + + private void InstallManager_InstallCompleted(object sender, EventArgs e) + { + Log("Installation completed"); + if (null != _installManager) + { + /* + try + { + _installManager.Dispose(); + } catch(Exception ex) + { + Log("InstallManager_InstallCompleted Exception: "+ex.ToString()); + } + _installManager = null; + */ + } + _installCompleted = true; + } + + private void InstallManager_InstallerStatusUpdated(object sender, InstallStatusEventArgs e) + { + Log(string.Format("{0}: {1}. {2} Progress: {3}", + e.InstallerContext.ProductName, + e.InstallerContext.InstallationState, + e.InstallerContext.ReturnCode.DetailedInformation, + e.ProgressValue)); + } + + private static void AddProductWithDependencies(Product product, List productsToInstall, string skipProduct) + { + if (!productsToInstall.Contains(product)) + { + productsToInstall.Add(product); + } + + ICollection missingDependencies = product.GetMissingDependencies(productsToInstall); + if (missingDependencies != null) + { + foreach (Product dependency in missingDependencies) + { + if (string.Equals(dependency.ProductId, skipProduct, StringComparison.OrdinalIgnoreCase)) + { + Log(string.Format("Product {0} is iis express dependency, skip it", dependency.Title)); + continue; + } + + AddProductWithDependencies(dependency, productsToInstall, skipProduct); + } + } + } + + private void SaveLogDirectory() + { + Log("SaveLogDirectory"); + foreach (InstallerContext ctx in _installManager.InstallerContexts) + { + Log(ctx.LogFileDirectory); + _LogFileDirectory = ctx.LogFileDirectory; + break; + + } + } + + private DeploymentWellKnownTag GetDbTag(List parameters) + { + foreach (WpiUpdatedDeploymentParameter parameter in parameters) + { + if ((parameter.WellKnownTags & databaseEngineTags) != 0) + { + return (DeploymentWellKnownTag)Enum.Parse( + typeof(DeploymentWellKnownTag), + (parameter.WellKnownTags & databaseEngineTags).ToString().Split(',')[0]); + } + } + + return DeploymentWellKnownTag.None; + } + + private static bool IsAlienDbTaggedParameter(DeploymentWellKnownTag dbTag, DeclaredParameter parameter) + { + return (parameter.Tags & databaseEngineTags) != DeploymentWellKnownTag.None + && + (parameter.Tags & dbTag) == DeploymentWellKnownTag.None; + } + + private static void RemoveUnusedProviders(MSDeployPackage msDeployPackage, DeploymentWellKnownTag dbTag) + { + List providersToRemove = new List(); + + switch (dbTag) + { + case DeploymentWellKnownTag.MySql: + providersToRemove.Add("dbFullSql"); + providersToRemove.Add("DBSqlite"); + break; + case DeploymentWellKnownTag.Sql: + providersToRemove.Add("dbMySql"); + providersToRemove.Add("DBSqlite"); + break; + case DeploymentWellKnownTag.FlatFile: + providersToRemove.Add("dbFullSql"); + providersToRemove.Add("DBSqlite"); + providersToRemove.Add("dbMySql"); + break; + case DeploymentWellKnownTag.SqLite: + providersToRemove.Add("dbFullSql"); + providersToRemove.Add("dbMySql"); + break; + case DeploymentWellKnownTag.VistaDB: + providersToRemove.Add("dbFullSql"); + providersToRemove.Add("DBSqlite"); + providersToRemove.Add("dbMySql"); + break; + case DeploymentWellKnownTag.SqlCE: + providersToRemove.Add("dbFullSql"); + providersToRemove.Add("DBSqlite"); + providersToRemove.Add("dbMySql"); + break; + default: + break; + } + + foreach (string provider in providersToRemove) + { + msDeployPackage.SkipDirectives.Add(string.Format("objectName={0}", provider)); + } + } + + #endregion private members + } + + class WpiAppInstallLogger + { + private StringBuilder sb; + private InstallReturnCode _installReturnCode; + private string _failedMessage = string.Empty; + + public WpiAppInstallLogger() + { + sb = new StringBuilder(); + } + + public InstallReturnCode ReturnCode + { + get { return _installReturnCode; } + } + + public string FailedMessage + { + get { return _failedMessage; } + } + + public bool IsFailed + { + get + { + if (null != _installReturnCode) + { + return _installReturnCode.Status == InstallReturnCodeStatus.Failure || + _installReturnCode.Status == InstallReturnCodeStatus.FailureRebootRequired; + } + return false; + } + } + + public void HanlderInstallerStatusUpdated(object sender, InstallStatusEventArgs e) + { + sb.AppendFormat("{0}: {1}. {2} Progress: {3}", + e.InstallerContext.ProductName, + e.InstallerContext.InstallationState, + e.InstallerContext.ReturnCode.DetailedInformation, + e.ProgressValue).AppendLine(); + } + + public void HandlerInstallCompleted(object sender, EventArgs e) + { + InstallManager installManager = sender as InstallManager; + if (null != installManager) + { + InstallerContext installerContext; + if (null != installManager.InstallerContexts && installManager.InstallerContexts.Count>0) + { + installerContext = installManager.InstallerContexts[0]; + _installReturnCode = installerContext.ReturnCode; + } + } + + if (null != _installReturnCode) + { + _failedMessage = string.Format("{0}: {1}", + _installReturnCode.Status, + _installReturnCode.DetailedInformation); + sb.AppendFormat("Return Code: {0}", _failedMessage).AppendLine(); + } + sb.AppendLine("Installation completed"); + } + + public string GetLog() + { + return sb.ToString(); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Server/DNSServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/DNSServer.asmx.cs index 0b65e5cc..33356d9f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/DNSServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/DNSServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/DatabaseServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/DatabaseServer.asmx.cs index 127c5a6a..e951c4be 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/DatabaseServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/DatabaseServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Default.aspx.cs b/WebsitePanel/Sources/WebsitePanel.Server/Default.aspx.cs index d6ae29da..5267c682 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Default.aspx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/Default.aspx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServer.asmx.cs index 53875d70..c7f05931 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -68,41 +68,43 @@ namespace WebsitePanel.Server } } - #region Organizations - - [WebMethod, SoapHeader("settings")] - public Organization ExtendToExchangeOrganization(string organizationId, string securityGroup) - { - try - { - LogStart("ExtendToExchangeOrganization"); - Organization ret = ES.ExtendToExchangeOrganization(organizationId, securityGroup); - LogEnd("ExtendToExchangeOrganization"); - return ret; - } - catch (Exception ex) - { - LogError("ExtendToExchangeOrganization", ex); - throw; - } - } + #region Organizations [WebMethod, SoapHeader("settings")] - public string CreateMailEnableUser(string upn, string organizationId, string organizationDistinguishedName, ExchangeAccountType accountType, - string mailboxDatabase, string offlineAddressBook, + public Organization ExtendToExchangeOrganization(string organizationId, string securityGroup, bool IsConsumer) + { + try + { + LogStart("ExtendToExchangeOrganization"); + Organization ret = ES.ExtendToExchangeOrganization(organizationId, securityGroup, IsConsumer); + LogEnd("ExtendToExchangeOrganization"); + return ret; + } + catch (Exception ex) + { + LogError("ExtendToExchangeOrganization", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public string CreateMailEnableUser(string upn, string organizationId, string organizationDistinguishedName, ExchangeAccountType accountType, + string mailboxDatabase, string offlineAddressBook, string addressBookPolicy, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, - int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) + int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, + int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool hideFromAddressBook, bool isConsumer) { try { LogStart("CreateMailEnableUser"); - string ret = ES.CreateMailEnableUser(upn, organizationId, organizationDistinguishedName,accountType, - mailboxDatabase, offlineAddressBook, + string ret = ES.CreateMailEnableUser(upn, organizationId, organizationDistinguishedName, accountType, + mailboxDatabase, offlineAddressBook, addressBookPolicy, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, - keepDeletedItemsDays); + keepDeletedItemsDays, + maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, hideFromAddressBook, isConsumer); LogEnd("CreateMailEnableUser"); return ret; } @@ -113,137 +115,155 @@ namespace WebsitePanel.Server } } - /// - /// Creates organization OAB - /// - /// - /// - /// - /// - [WebMethod, SoapHeader("settings")] - public Organization CreateOrganizationOfflineAddressBook(string organizationId, string securityGroup, string oabVirtualDir) - { - try - { - LogStart("CreateOrganizationOfflineAddressBook"); - Organization ret = ES.CreateOrganizationOfflineAddressBook(organizationId, securityGroup, oabVirtualDir); - LogEnd("CreateOrganizationOfflineAddressBook"); - return ret; - } - catch (Exception ex) - { - LogError("CreateOrganizationOfflineAddressBook", ex); - throw; - } - } + /// + /// Creates organization OAB + /// + /// + /// + /// + /// + [WebMethod, SoapHeader("settings")] + public Organization CreateOrganizationOfflineAddressBook(string organizationId, string securityGroup, string oabVirtualDir) + { + try + { + LogStart("CreateOrganizationOfflineAddressBook"); + Organization ret = ES.CreateOrganizationOfflineAddressBook(organizationId, securityGroup, oabVirtualDir); + LogEnd("CreateOrganizationOfflineAddressBook"); + return ret; + } + catch (Exception ex) + { + LogError("CreateOrganizationOfflineAddressBook", ex); + throw; + } + } - /// - /// Updates organization OAB - /// - /// - [WebMethod, SoapHeader("settings")] - public void UpdateOrganizationOfflineAddressBook(string id) - { - try - { - LogStart("UpdateOrganizationOfflineAddressBook"); - ES.UpdateOrganizationOfflineAddressBook(id); - LogEnd("UpdateOrganizationOfflineAddressBook"); - } - catch (Exception ex) - { - LogError("UpdateOrganizationOfflineAddressBook", ex); - throw; - } - } + /// + /// Updates organization OAB + /// + /// + [WebMethod, SoapHeader("settings")] + public void UpdateOrganizationOfflineAddressBook(string id) + { + try + { + LogStart("UpdateOrganizationOfflineAddressBook"); + ES.UpdateOrganizationOfflineAddressBook(id); + LogEnd("UpdateOrganizationOfflineAddressBook"); + } + catch (Exception ex) + { + LogError("UpdateOrganizationOfflineAddressBook", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public string GetOABVirtualDirectory() - { - try - { - LogStart("GetOABVirtualDirectory"); - string ret = ES.GetOABVirtualDirectory(); - LogEnd("GetOABVirtualDirectory"); - return ret; - } - catch (Exception ex) - { - LogError("GetOABVirtualDirectory", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public string GetOABVirtualDirectory() + { + try + { + LogStart("GetOABVirtualDirectory"); + string ret = ES.GetOABVirtualDirectory(); + LogEnd("GetOABVirtualDirectory"); + return ret; + } + catch (Exception ex) + { + LogError("GetOABVirtualDirectory", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public bool DeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomsAddressList, string offlineAddressBook, string securityGroup) - { - try - { - LogStart("DeleteOrganization"); - bool ret = ES.DeleteOrganization(organizationId, distinguishedName, globalAddressList, addressList, roomsAddressList, offlineAddressBook, securityGroup); - LogEnd("DeleteOrganization"); - return ret; - } - catch (Exception ex) - { - LogError("DeleteOrganization", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public Organization CreateOrganizationAddressBookPolicy(string organizationId, string gal, string addressBook, string roomList, string oab) + { + try + { + LogStart("CCreateOrganizationAddressBookPolicy"); + Organization ret = ES.CreateOrganizationAddressBookPolicy(organizationId, gal, addressBook, roomList, oab); + LogEnd("CreateOrganizationAddressBookPolicy"); + return ret; + } + catch (Exception ex) + { + LogError("CreateOrganizationAddressBookPolicy", ex); + throw; + } + } + + + [WebMethod, SoapHeader("settings")] + public bool DeleteOrganization(string organizationId, string distinguishedName, string globalAddressList, string addressList, string roomList, string offlineAddressBook, string securityGroup, string addressBookPolicy) + { + try + { + LogStart("DeleteOrganization"); + bool ret = ES.DeleteOrganization(organizationId, distinguishedName, globalAddressList, addressList, roomList, offlineAddressBook, securityGroup, addressBookPolicy); + LogEnd("DeleteOrganization"); + return ret; + } + catch (Exception ex) + { + LogError("DeleteOrganization", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public void SetOrganizationStorageLimits(string organizationDistinguishedName, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) - { - try - { - LogStart("SetOrganizationStorageLimits"); - ES.SetOrganizationStorageLimits(organizationDistinguishedName, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays); - LogEnd("SetOrganizationStorageLimits"); - } - catch (Exception ex) - { - LogError("SetOrganizationStorageLimits", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public void SetOrganizationStorageLimits(string organizationDistinguishedName, int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) + { + try + { + LogStart("SetOrganizationStorageLimits"); + ES.SetOrganizationStorageLimits(organizationDistinguishedName, issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays); + LogEnd("SetOrganizationStorageLimits"); + } + catch (Exception ex) + { + LogError("SetOrganizationStorageLimits", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public ExchangeItemStatistics[] GetMailboxesStatistics(string organizationDistinguishedName) - { - try - { - LogStart("GetMailboxesStatistics"); - ExchangeItemStatistics[] ret = ES.GetMailboxesStatistics(organizationDistinguishedName); - LogEnd("GetMailboxesStatistics"); - return ret; - } - catch (Exception ex) - { - LogError("GetMailboxesStatistics", ex); - throw; - } - } - #endregion + [WebMethod, SoapHeader("settings")] + public ExchangeItemStatistics[] GetMailboxesStatistics(string organizationDistinguishedName) + { + try + { + LogStart("GetMailboxesStatistics"); + ExchangeItemStatistics[] ret = ES.GetMailboxesStatistics(organizationDistinguishedName); + LogEnd("GetMailboxesStatistics"); + return ret; + } + catch (Exception ex) + { + LogError("GetMailboxesStatistics", ex); + throw; + } + } + #endregion - #region Domains - [WebMethod, SoapHeader("settings")] + #region Domains + [WebMethod, SoapHeader("settings")] public void AddAuthoritativeDomain(string domain) - { - try - { + { + try + { LogStart("AddAuthoritativeDomain"); ES.AddAuthoritativeDomain(domain); LogEnd("AddAuthoritativeDomain"); - } - catch (Exception ex) - { + } + catch (Exception ex) + { LogError("AddAuthoritativeDomain", ex); - throw; - } - } + throw; + } + } [WebMethod, SoapHeader("settings")] @@ -252,7 +272,7 @@ namespace WebsitePanel.Server try { LogStart("GetAuthoritativeDomains"); - string []ret = ES.GetAuthoritativeDomains(); + string[] ret = ES.GetAuthoritativeDomains(); LogEnd("GetAuthoritativeDomains"); return ret; } @@ -263,39 +283,41 @@ namespace WebsitePanel.Server } } - [WebMethod, SoapHeader("settings")] + [WebMethod, SoapHeader("settings")] public void DeleteAuthoritativeDomain(string domain) - { - try - { + { + try + { LogStart("DeleteAuthoritativeDomain"); ES.DeleteAuthoritativeDomain(domain); LogEnd("DeleteAuthoritativeDomain"); - } - catch (Exception ex) - { + } + catch (Exception ex) + { LogError("DeleteAuthoritativeDomain", ex); - throw; - } - } - #endregion + throw; + } + } + #endregion - #region Mailboxes + #region Mailboxes + /* [WebMethod, SoapHeader("settings")] public string CreateMailbox(string organizationId, string organizationDistinguishedName, string mailboxDatabase, - string securityGroup, string offlineAddressBook, ExchangeAccountType accountType, + string securityGroup, string offlineAddressBook, string addressBookPolicy, ExchangeAccountType accountType, string displayName, string accountName, string name, string domain, string password, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, - int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) + int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool hideFromAddressBook) { try { LogStart("CreateMailbox"); string ret = ES.CreateMailbox(organizationId, organizationDistinguishedName, mailboxDatabase, securityGroup, - offlineAddressBook, accountType, + offlineAddressBook, addressBookPolicy, accountType, displayName, accountName, name, domain, password, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, - issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays); + issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, + maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, hideFromAddressBook); LogEnd("CreateMailbox"); return ret; } @@ -305,22 +327,22 @@ namespace WebsitePanel.Server throw; } } - - [WebMethod, SoapHeader("settings")] - public void DeleteMailbox(string accountName) - { - try - { - LogStart("DeleteMailbox"); - ES.DeleteMailbox(accountName); - LogEnd("DeleteMailbox"); - } - catch (Exception ex) - { - LogError("DeleteMailbox", ex); - throw; - } - } +*/ + [WebMethod, SoapHeader("settings")] + public void DeleteMailbox(string accountName) + { + try + { + LogStart("DeleteMailbox"); + ES.DeleteMailbox(accountName); + LogEnd("DeleteMailbox"); + } + catch (Exception ex) + { + LogError("DeleteMailbox", ex); + throw; + } + } [WebMethod, SoapHeader("settings")] @@ -339,164 +361,164 @@ namespace WebsitePanel.Server } } - [WebMethod, SoapHeader("settings")] - public ExchangeMailbox GetMailboxGeneralSettings(string accountName) - { - try - { - LogStart("GetMailboxGeneralSettings"); - ExchangeMailbox ret = ES.GetMailboxGeneralSettings(accountName); - LogEnd("GetMailboxGeneralSettings"); - return ret; - } - catch (Exception ex) - { - LogError("GetMailboxGeneralSettings", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public ExchangeMailbox GetMailboxGeneralSettings(string accountName) + { + try + { + LogStart("GetMailboxGeneralSettings"); + ExchangeMailbox ret = ES.GetMailboxGeneralSettings(accountName); + LogEnd("GetMailboxGeneralSettings"); + return ret; + } + catch (Exception ex) + { + LogError("GetMailboxGeneralSettings", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public void SetMailboxGeneralSettings(string accountName, string displayName, string password, bool hideFromAddressBook, bool disabled, string firstName, string initials, string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes) - { - try - { - LogStart("SetMailboxGeneralSettings"); - ES.SetMailboxGeneralSettings(accountName, displayName, password, hideFromAddressBook, disabled, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes); - LogEnd("SetMailboxGeneralSettings"); - } - catch (Exception ex) - { - LogError("SetMailboxGeneralSettings", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public void SetMailboxGeneralSettings(string accountName, bool hideFromAddressBook, bool disabled) + { + try + { + LogStart("SetMailboxGeneralSettings"); + ES.SetMailboxGeneralSettings(accountName, hideFromAddressBook, disabled); + LogEnd("SetMailboxGeneralSettings"); + } + catch (Exception ex) + { + LogError("SetMailboxGeneralSettings", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public ExchangeMailbox GetMailboxMailFlowSettings(string accountName) - { - try - { - LogStart("GetMailboxMailFlowSettings"); - ExchangeMailbox ret = ES.GetMailboxMailFlowSettings(accountName); - LogEnd("GetMailboxMailFlowSettings"); - return ret; - } - catch (Exception ex) - { - LogError("GetMailboxMailFlowSettings", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public ExchangeMailbox GetMailboxMailFlowSettings(string accountName) + { + try + { + LogStart("GetMailboxMailFlowSettings"); + ExchangeMailbox ret = ES.GetMailboxMailFlowSettings(accountName); + LogEnd("GetMailboxMailFlowSettings"); + return ret; + } + catch (Exception ex) + { + LogError("GetMailboxMailFlowSettings", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB, bool requireSenderAuthentication) - { - try - { - LogStart("SetMailboxMailFlowSettings"); - ES.SetMailboxMailFlowSettings(accountName, enableForwarding, forwardingAccountName, forwardToBoth, sendOnBehalfAccounts, acceptAccounts, rejectAccounts, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB, requireSenderAuthentication); - LogEnd("SetMailboxMailFlowSettings"); - } - catch (Exception ex) - { - LogError("SetMailboxMailFlowSettings", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public void SetMailboxMailFlowSettings(string accountName, bool enableForwarding, string forwardingAccountName, bool forwardToBoth, string[] sendOnBehalfAccounts, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { + try + { + LogStart("SetMailboxMailFlowSettings"); + ES.SetMailboxMailFlowSettings(accountName, enableForwarding, forwardingAccountName, forwardToBoth, sendOnBehalfAccounts, acceptAccounts, rejectAccounts, requireSenderAuthentication); + LogEnd("SetMailboxMailFlowSettings"); + } + catch (Exception ex) + { + LogError("SetMailboxMailFlowSettings", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public ExchangeMailbox GetMailboxAdvancedSettings(string accountName) - { - try - { - LogStart("GetMailboxAdvancedSettings"); - ExchangeMailbox ret = ES.GetMailboxAdvancedSettings(accountName); - LogEnd("GetMailboxAdvancedSettings"); - return ret; - } - catch (Exception ex) - { - LogError("GetMailboxAdvancedSettings", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public ExchangeMailbox GetMailboxAdvancedSettings(string accountName) + { + try + { + LogStart("GetMailboxAdvancedSettings"); + ExchangeMailbox ret = ES.GetMailboxAdvancedSettings(accountName); + LogEnd("GetMailboxAdvancedSettings"); + return ret; + } + catch (Exception ex) + { + LogError("GetMailboxAdvancedSettings", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, - int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays) - { - try - { - LogStart("SetMailboxAdvancedSettings"); - ES.SetMailboxAdvancedSettings(organizationId, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, - issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays); - LogEnd("SetMailboxAdvancedSettings"); - } - catch (Exception ex) - { - LogError("SetMailboxAdvancedSettings", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public void SetMailboxAdvancedSettings(string organizationId, string accountName, bool enablePOP, bool enableIMAP, bool enableOWA, bool enableMAPI, bool enableActiveSync, + int issueWarningKB, int prohibitSendKB, int prohibitSendReceiveKB, int keepDeletedItemsDays, int maxRecipients, int maxSendMessageSizeKB, int maxReceiveMessageSizeKB) + { + try + { + LogStart("SetMailboxAdvancedSettings"); + ES.SetMailboxAdvancedSettings(organizationId, accountName, enablePOP, enableIMAP, enableOWA, enableMAPI, enableActiveSync, + issueWarningKB, prohibitSendKB, prohibitSendReceiveKB, keepDeletedItemsDays, maxRecipients, maxSendMessageSizeKB, maxReceiveMessageSizeKB); + LogEnd("SetMailboxAdvancedSettings"); + } + catch (Exception ex) + { + LogError("SetMailboxAdvancedSettings", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName) - { - try - { - LogStart("GetMailboxEmailAddresses"); - ExchangeEmailAddress[] ret = ES.GetMailboxEmailAddresses(accountName); - LogEnd("GetMailboxEmailAddresses"); - return ret; - } - catch (Exception ex) - { - LogError("GetMailboxEmailAddresses", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public ExchangeEmailAddress[] GetMailboxEmailAddresses(string accountName) + { + try + { + LogStart("GetMailboxEmailAddresses"); + ExchangeEmailAddress[] ret = ES.GetMailboxEmailAddresses(accountName); + LogEnd("GetMailboxEmailAddresses"); + return ret; + } + catch (Exception ex) + { + LogError("GetMailboxEmailAddresses", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public void SetMailboxEmailAddresses(string accountName, string[] emailAddresses) - { - try - { - LogStart("SetMailboxEmailAddresses"); - ES.SetMailboxEmailAddresses(accountName, emailAddresses); - LogEnd("SetMailboxEmailAddresses"); - } - catch (Exception ex) - { - LogError("SetMailboxEmailAddresses", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public void SetMailboxEmailAddresses(string accountName, string[] emailAddresses) + { + try + { + LogStart("SetMailboxEmailAddresses"); + ES.SetMailboxEmailAddresses(accountName, emailAddresses); + LogEnd("SetMailboxEmailAddresses"); + } + catch (Exception ex) + { + LogError("SetMailboxEmailAddresses", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public void SetMailboxPrimaryEmailAddress(string accountName, string emailAddress) - { - try - { - LogStart("SetMailboxPrimaryEmailAddress"); - ES.SetMailboxPrimaryEmailAddress(accountName, emailAddress); - LogEnd("SetMailboxPrimaryEmailAddress"); - } - catch (Exception ex) - { - LogError("SetMailboxPrimaryEmailAddress", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public void SetMailboxPrimaryEmailAddress(string accountName, string emailAddress) + { + try + { + LogStart("SetMailboxPrimaryEmailAddress"); + ES.SetMailboxPrimaryEmailAddress(accountName, emailAddress); + LogEnd("SetMailboxPrimaryEmailAddress"); + } + catch (Exception ex) + { + LogError("SetMailboxPrimaryEmailAddress", ex); + throw; + } + } [WebMethod, SoapHeader("settings")] - public void SetMailboxPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts) + public void SetMailboxPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] fullAccessAccounts) { try { LogStart("SetMailboxPermissions"); - ES.SetMailboxPermissions(organizationId, accountName, sendAsAccounts, fullAccessAccounts); + ES.SetMailboxPermissions(organizationId, accountName, sendAsAccounts, fullAccessAccounts); LogEnd("SetMailboxPermissions"); } catch (Exception ex) @@ -505,16 +527,16 @@ namespace WebsitePanel.Server throw; } } - - + + [WebMethod, SoapHeader("settings")] - public ExchangeMailbox GetMailboxPermissions(string organizationId, string accountName) + public ExchangeMailbox GetMailboxPermissions(string organizationId, string accountName) { try { LogStart("GetMailboxPermissions"); - ExchangeMailbox ret = ES.GetMailboxPermissions(organizationId, accountName); + ExchangeMailbox ret = ES.GetMailboxPermissions(organizationId, accountName); LogEnd("GetMailboxPermissions"); return ret; } @@ -525,285 +547,285 @@ namespace WebsitePanel.Server } } - [WebMethod, SoapHeader("settings")] - public ExchangeMailboxStatistics GetMailboxStatistics(string accountName) - { - try - { - LogStart("GetMailboxStatistics"); - ExchangeMailboxStatistics ret = ES.GetMailboxStatistics(accountName); - LogEnd("GetMailboxStatistics"); - return ret; - } - catch (Exception ex) - { - Log.WriteError("GetMailboxStatistics", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public ExchangeMailboxStatistics GetMailboxStatistics(string accountName) + { + try + { + LogStart("GetMailboxStatistics"); + ExchangeMailboxStatistics ret = ES.GetMailboxStatistics(accountName); + LogEnd("GetMailboxStatistics"); + return ret; + } + catch (Exception ex) + { + Log.WriteError("GetMailboxStatistics", ex); + throw; + } + } #endregion - #region Contacts - [WebMethod, SoapHeader("settings")] + #region Contacts + [WebMethod, SoapHeader("settings")] public void CreateContact(string organizationId, string organizationDistinguishedName, string contactDisplayName, string contactAccountName, string contactEmail, string defaultOrganizationDomain) - { - try - { - LogStart("CreateContact"); + { + try + { + LogStart("CreateContact"); ES.CreateContact(organizationId, organizationDistinguishedName, contactDisplayName, contactAccountName, contactEmail, defaultOrganizationDomain); - LogEnd("CreateContact"); - } - catch (Exception ex) - { - LogError("CreateContact", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void DeleteContact(string accountName) - { - try - { - LogStart("DeleteContact"); - ES.DeleteContact(accountName); - LogEnd("DeleteContact"); - } - catch (Exception ex) - { - LogError("DeleteContact", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public ExchangeContact GetContactGeneralSettings(string accountName) - { - try - { - LogStart("GetContactGeneralSettings"); - ExchangeContact ret = ES.GetContactGeneralSettings(accountName); - LogEnd("GetContactGeneralSettings"); - return ret; - } - catch (Exception ex) - { - LogError("GetContactGeneralSettings", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void SetContactGeneralSettings(string accountName, string displayName, string email, bool hideFromAddressBook, string firstName, string initials, string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes, int useMapiRichTextFormat, string defaultDomain) - { - try - { - LogStart("SetContactGeneralSettings"); - ES.SetContactGeneralSettings(accountName, displayName, email, hideFromAddressBook, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, useMapiRichTextFormat, defaultDomain); - LogEnd("SetContactGeneralSettings"); - } - catch (Exception ex) - { - LogError("SetContactGeneralSettings", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public ExchangeContact GetContactMailFlowSettings(string accountName) - { - try - { - LogStart("GetContactMailFlowSettings"); - ExchangeContact ret = ES.GetContactMailFlowSettings(accountName); - LogEnd("GetContactMailFlowSettings"); - return ret; - } - catch (Exception ex) - { - LogError("GetContactMailFlowSettings", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void SetContactMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { - try - { - LogStart("SetContactMailFlowSettings"); - ES.SetContactMailFlowSettings(accountName, acceptAccounts, rejectAccounts, requireSenderAuthentication); - LogEnd("SetContactMailFlowSettings"); - } - catch (Exception ex) - { - LogError("SetContactMailFlowSettings", ex); - throw; - } - } - #endregion - - #region Distribution Lists - [WebMethod, SoapHeader("settings")] - public void CreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy) - { - try - { - LogStart("CreateDistributionList"); - ES.CreateDistributionList(organizationId, organizationDistinguishedName, displayName, accountName, name, domain, managedBy); - LogEnd("CreateDistributionList"); - } - catch (Exception ex) - { - LogError("CreateDistributionList", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void DeleteDistributionList(string accountName) - { - try - { - LogStart("DeleteDistributionList"); - ES.DeleteDistributionList(accountName); - LogEnd("DeleteDistributionList"); - } - catch (Exception ex) - { - LogError("DeleteDistributionList", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public ExchangeDistributionList GetDistributionListGeneralSettings(string accountName) - { - try - { - LogStart("GetDistributionListGeneralSettings"); - ExchangeDistributionList ret = ES.GetDistributionListGeneralSettings(accountName); - LogEnd("GetDistributionListGeneralSettings"); - return ret; - } - catch (Exception ex) - { - LogError("GetDistributionListGeneralSettings", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void SetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes) - { - try - { - LogStart("SetDistributionListGeneralSettings"); - ES.SetDistributionListGeneralSettings(accountName, displayName, hideFromAddressBook, managedBy, members, notes); - LogEnd("SetDistributionListGeneralSettings"); - } - catch (Exception ex) - { - LogError("SetDistributionListGeneralSettings", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public ExchangeDistributionList GetDistributionListMailFlowSettings(string accountName) - { - try - { - LogStart("GetDistributionListMailFlowSettings"); - ExchangeDistributionList ret = ES.GetDistributionListMailFlowSettings(accountName); - LogEnd("GetDistributionListMailFlowSettings"); - return ret; - } - catch (Exception ex) - { - LogError("GetDistributionListMailFlowSettings", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) - { - try - { - LogStart("SetDistributionListMailFlowSettings"); - ES.SetDistributionListMailFlowSettings(accountName, acceptAccounts, rejectAccounts, requireSenderAuthentication); - LogEnd("SetDistributionListMailFlowSettings"); - } - catch (Exception ex) - { - LogError("SetDistributionListMailFlowSettings", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public ExchangeEmailAddress[] GetDistributionListEmailAddresses(string accountName) - { - try - { - LogStart("GetDistributionListEmailAddresses"); - ExchangeEmailAddress[] ret = ES.GetDistributionListEmailAddresses(accountName); - LogEnd("GetDistributionListEmailAddresses"); - return ret; - } - catch (Exception ex) - { - LogError("GetDistributionListEmailAddresses", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses) - { - try - { - LogStart("SetDistributionListEmailAddresses"); - ES.SetDistributionListEmailAddresses(accountName, emailAddresses); - LogEnd("SetDistributionListEmailAddresses"); - } - catch (Exception ex) - { - LogError("SetDistributionListEmailAddresses", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress) - { - try - { - LogStart("SetDistributionListPrimaryEmailAddress"); - ES.SetDistributionListPrimaryEmailAddress(accountName, emailAddress); - LogEnd("SetDistributionListPrimaryEmailAddress"); - } - catch (Exception ex) - { - LogError("SetDistributionListPrimaryEmailAddress", ex); - throw; - } - } + LogEnd("CreateContact"); + } + catch (Exception ex) + { + LogError("CreateContact", ex); + throw; + } + } [WebMethod, SoapHeader("settings")] - public void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts) + public void DeleteContact(string accountName) { - ES.SetDistributionListPermissions(organizationId, accountName, sendAsAccounts, sendOnBehalfAccounts); + try + { + LogStart("DeleteContact"); + ES.DeleteContact(accountName); + LogEnd("DeleteContact"); + } + catch (Exception ex) + { + LogError("DeleteContact", ex); + throw; + } } - + + [WebMethod, SoapHeader("settings")] + public ExchangeContact GetContactGeneralSettings(string accountName) + { + try + { + LogStart("GetContactGeneralSettings"); + ExchangeContact ret = ES.GetContactGeneralSettings(accountName); + LogEnd("GetContactGeneralSettings"); + return ret; + } + catch (Exception ex) + { + LogError("GetContactGeneralSettings", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void SetContactGeneralSettings(string accountName, string displayName, string email, bool hideFromAddressBook, string firstName, string initials, string lastName, string address, string city, string state, string zip, string country, string jobTitle, string company, string department, string office, string managerAccountName, string businessPhone, string fax, string homePhone, string mobilePhone, string pager, string webPage, string notes, int useMapiRichTextFormat, string defaultDomain) + { + try + { + LogStart("SetContactGeneralSettings"); + ES.SetContactGeneralSettings(accountName, displayName, email, hideFromAddressBook, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, useMapiRichTextFormat, defaultDomain); + LogEnd("SetContactGeneralSettings"); + } + catch (Exception ex) + { + LogError("SetContactGeneralSettings", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public ExchangeContact GetContactMailFlowSettings(string accountName) + { + try + { + LogStart("GetContactMailFlowSettings"); + ExchangeContact ret = ES.GetContactMailFlowSettings(accountName); + LogEnd("GetContactMailFlowSettings"); + return ret; + } + catch (Exception ex) + { + LogError("GetContactMailFlowSettings", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void SetContactMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication) + { + try + { + LogStart("SetContactMailFlowSettings"); + ES.SetContactMailFlowSettings(accountName, acceptAccounts, rejectAccounts, requireSenderAuthentication); + LogEnd("SetContactMailFlowSettings"); + } + catch (Exception ex) + { + LogError("SetContactMailFlowSettings", ex); + throw; + } + } + #endregion + + #region Distribution Lists + [WebMethod, SoapHeader("settings")] + public void CreateDistributionList(string organizationId, string organizationDistinguishedName, string displayName, string accountName, string name, string domain, string managedBy, string[] addressLists) + { + try + { + LogStart("CreateDistributionList"); + ES.CreateDistributionList(organizationId, organizationDistinguishedName, displayName, accountName, name, domain, managedBy, addressLists); + LogEnd("CreateDistributionList"); + } + catch (Exception ex) + { + LogError("CreateDistributionList", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void DeleteDistributionList(string accountName) + { + try + { + LogStart("DeleteDistributionList"); + ES.DeleteDistributionList(accountName); + LogEnd("DeleteDistributionList"); + } + catch (Exception ex) + { + LogError("DeleteDistributionList", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public ExchangeDistributionList GetDistributionListGeneralSettings(string accountName) + { + try + { + LogStart("GetDistributionListGeneralSettings"); + ExchangeDistributionList ret = ES.GetDistributionListGeneralSettings(accountName); + LogEnd("GetDistributionListGeneralSettings"); + return ret; + } + catch (Exception ex) + { + LogError("GetDistributionListGeneralSettings", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void SetDistributionListGeneralSettings(string accountName, string displayName, bool hideFromAddressBook, string managedBy, string[] members, string notes, string[] addressLists) + { + try + { + LogStart("SetDistributionListGeneralSettings"); + ES.SetDistributionListGeneralSettings(accountName, displayName, hideFromAddressBook, managedBy, members, notes, addressLists); + LogEnd("SetDistributionListGeneralSettings"); + } + catch (Exception ex) + { + LogError("SetDistributionListGeneralSettings", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public ExchangeDistributionList GetDistributionListMailFlowSettings(string accountName) + { + try + { + LogStart("GetDistributionListMailFlowSettings"); + ExchangeDistributionList ret = ES.GetDistributionListMailFlowSettings(accountName); + LogEnd("GetDistributionListMailFlowSettings"); + return ret; + } + catch (Exception ex) + { + LogError("GetDistributionListMailFlowSettings", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void SetDistributionListMailFlowSettings(string accountName, string[] acceptAccounts, string[] rejectAccounts, bool requireSenderAuthentication, string[] addressLists) + { + try + { + LogStart("SetDistributionListMailFlowSettings"); + ES.SetDistributionListMailFlowSettings(accountName, acceptAccounts, rejectAccounts, requireSenderAuthentication, addressLists); + LogEnd("SetDistributionListMailFlowSettings"); + } + catch (Exception ex) + { + LogError("SetDistributionListMailFlowSettings", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public ExchangeEmailAddress[] GetDistributionListEmailAddresses(string accountName) + { + try + { + LogStart("GetDistributionListEmailAddresses"); + ExchangeEmailAddress[] ret = ES.GetDistributionListEmailAddresses(accountName); + LogEnd("GetDistributionListEmailAddresses"); + return ret; + } + catch (Exception ex) + { + LogError("GetDistributionListEmailAddresses", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void SetDistributionListEmailAddresses(string accountName, string[] emailAddresses, string[] addressLists) + { + try + { + LogStart("SetDistributionListEmailAddresses"); + ES.SetDistributionListEmailAddresses(accountName, emailAddresses, addressLists); + LogEnd("SetDistributionListEmailAddresses"); + } + catch (Exception ex) + { + LogError("SetDistributionListEmailAddresses", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void SetDistributionListPrimaryEmailAddress(string accountName, string emailAddress, string[] addressLists) + { + try + { + LogStart("SetDistributionListPrimaryEmailAddress"); + ES.SetDistributionListPrimaryEmailAddress(accountName, emailAddress, addressLists); + LogEnd("SetDistributionListPrimaryEmailAddress"); + } + catch (Exception ex) + { + LogError("SetDistributionListPrimaryEmailAddress", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void SetDistributionListPermissions(string organizationId, string accountName, string[] sendAsAccounts, string[] sendOnBehalfAccounts, string[] addressLists) + { + ES.SetDistributionListPermissions(organizationId, accountName, sendAsAccounts, sendOnBehalfAccounts, addressLists); + } + [WebMethod, SoapHeader("settings")] public ExchangeDistributionList GetDistributionListPermissions(string organizationId, string accountName) { return ES.GetDistributionListPermissions(organizationId, accountName); } - + #endregion @@ -896,12 +918,12 @@ namespace WebsitePanel.Server [WebMethod, SoapHeader("settings")] public void SetPublicFolderGeneralSettings(string folder, string newFolderName, - string[] authorAccounts, bool hideFromAddressBook) + bool hideFromAddressBook, ExchangeAccount[] accounts) { try { LogStart("SetPublicFolderGeneralSettings"); - ES.SetPublicFolderGeneralSettings(folder, newFolderName, authorAccounts, hideFromAddressBook); + ES.SetPublicFolderGeneralSettings(folder, newFolderName, hideFromAddressBook, accounts); LogEnd("SetPublicFolderGeneralSettings"); } catch (Exception ex) @@ -1048,148 +1070,148 @@ namespace WebsitePanel.Server #endregion - #region ActiveSync - [WebMethod, SoapHeader("settings")] - public void CreateOrganizationActiveSyncPolicy(string organizationId) - { - try - { - LogStart("CreateOrganizationActiveSyncPolicy"); - ES.CreateOrganizationActiveSyncPolicy(organizationId); - LogEnd("CreateOrganizationActiveSyncPolicy"); - } - catch (Exception ex) - { - LogError("CreateOrganizationActiveSyncPolicy", ex); - throw; - } - } + #region ActiveSync + [WebMethod, SoapHeader("settings")] + public void CreateOrganizationActiveSyncPolicy(string organizationId) + { + try + { + LogStart("CreateOrganizationActiveSyncPolicy"); + ES.CreateOrganizationActiveSyncPolicy(organizationId); + LogEnd("CreateOrganizationActiveSyncPolicy"); + } + catch (Exception ex) + { + LogError("CreateOrganizationActiveSyncPolicy", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public ExchangeActiveSyncPolicy GetActiveSyncPolicy(string organizationId) - { - try - { - LogStart("GetActiveSyncPolicy"); - ExchangeActiveSyncPolicy ret = ES.GetActiveSyncPolicy(organizationId); - LogEnd("GetActiveSyncPolicy"); - return ret; - } - catch (Exception ex) - { - LogError("GetActiveSyncPolicy", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public ExchangeActiveSyncPolicy GetActiveSyncPolicy(string organizationId) + { + try + { + LogStart("GetActiveSyncPolicy"); + ExchangeActiveSyncPolicy ret = ES.GetActiveSyncPolicy(organizationId); + LogEnd("GetActiveSyncPolicy"); + return ret; + } + catch (Exception ex) + { + LogError("GetActiveSyncPolicy", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public void SetActiveSyncPolicy(string id, bool allowNonProvisionableDevices, bool attachmentsEnabled, - int maxAttachmentSizeKB, bool uncAccessEnabled, bool wssAccessEnabled, bool devicePasswordEnabled, - bool alphanumericPasswordRequired, bool passwordRecoveryEnabled, bool deviceEncryptionEnabled, - bool allowSimplePassword, int maxPasswordFailedAttempts, int minPasswordLength, int inactivityLockMin, - int passwordExpirationDays, int passwordHistory, int refreshInterval) - { - try - { - LogStart("SetActiveSyncPolicy"); - ES.SetActiveSyncPolicy(id, allowNonProvisionableDevices, attachmentsEnabled, - maxAttachmentSizeKB, uncAccessEnabled, wssAccessEnabled, devicePasswordEnabled, alphanumericPasswordRequired, passwordRecoveryEnabled, - deviceEncryptionEnabled, allowSimplePassword, maxPasswordFailedAttempts, - minPasswordLength, inactivityLockMin, passwordExpirationDays, passwordHistory, refreshInterval); - LogEnd("SetActiveSyncPolicy"); - } - catch (Exception ex) - { - LogError("SetActiveSyncPolicy", ex); - throw; - } - } - #endregion + [WebMethod, SoapHeader("settings")] + public void SetActiveSyncPolicy(string id, bool allowNonProvisionableDevices, bool attachmentsEnabled, + int maxAttachmentSizeKB, bool uncAccessEnabled, bool wssAccessEnabled, bool devicePasswordEnabled, + bool alphanumericPasswordRequired, bool passwordRecoveryEnabled, bool deviceEncryptionEnabled, + bool allowSimplePassword, int maxPasswordFailedAttempts, int minPasswordLength, int inactivityLockMin, + int passwordExpirationDays, int passwordHistory, int refreshInterval) + { + try + { + LogStart("SetActiveSyncPolicy"); + ES.SetActiveSyncPolicy(id, allowNonProvisionableDevices, attachmentsEnabled, + maxAttachmentSizeKB, uncAccessEnabled, wssAccessEnabled, devicePasswordEnabled, alphanumericPasswordRequired, passwordRecoveryEnabled, + deviceEncryptionEnabled, allowSimplePassword, maxPasswordFailedAttempts, + minPasswordLength, inactivityLockMin, passwordExpirationDays, passwordHistory, refreshInterval); + LogEnd("SetActiveSyncPolicy"); + } + catch (Exception ex) + { + LogError("SetActiveSyncPolicy", ex); + throw; + } + } + #endregion - #region Mobile devices - [WebMethod, SoapHeader("settings")] - public ExchangeMobileDevice[] GetMobileDevices(string accountName) - { - try - { - LogStart("GetMobileDevices"); - ExchangeMobileDevice[] ret = ES.GetMobileDevices(accountName); - LogEnd("GetMobileDevices"); - return ret; - } - catch (Exception ex) - { - LogError("GetMobileDevices", ex); - throw; - } - } + #region Mobile devices + [WebMethod, SoapHeader("settings")] + public ExchangeMobileDevice[] GetMobileDevices(string accountName) + { + try + { + LogStart("GetMobileDevices"); + ExchangeMobileDevice[] ret = ES.GetMobileDevices(accountName); + LogEnd("GetMobileDevices"); + return ret; + } + catch (Exception ex) + { + LogError("GetMobileDevices", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public ExchangeMobileDevice GetMobileDevice(string id) - { - try - { - LogStart("GetMobileDevice"); - ExchangeMobileDevice ret = ES.GetMobileDevice(id); - LogEnd("GetMobileDevice"); - return ret; - } - catch (Exception ex) - { - LogError("GetMobileDevice", ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void WipeDataFromDevice(string id) - { - try - { - LogStart("WipeDataFromDevice"); - ES.WipeDataFromDevice(id); - LogEnd("WipeDataFromDevice"); - } - catch (Exception ex) - { - LogError("WipeDataFromDevice", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public ExchangeMobileDevice GetMobileDevice(string id) + { + try + { + LogStart("GetMobileDevice"); + ExchangeMobileDevice ret = ES.GetMobileDevice(id); + LogEnd("GetMobileDevice"); + return ret; + } + catch (Exception ex) + { + LogError("GetMobileDevice", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public void CancelRemoteWipeRequest(string id) - { - try - { - LogStart("CancelRemoteWipeRequest"); - ES.CancelRemoteWipeRequest(id); - LogEnd("CancelRemoteWipeRequest"); - } - catch (Exception ex) - { - LogError("CancelRemoteWipeRequest", ex); - throw; - } - } + [WebMethod, SoapHeader("settings")] + public void WipeDataFromDevice(string id) + { + try + { + LogStart("WipeDataFromDevice"); + ES.WipeDataFromDevice(id); + LogEnd("WipeDataFromDevice"); + } + catch (Exception ex) + { + LogError("WipeDataFromDevice", ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void CancelRemoteWipeRequest(string id) + { + try + { + LogStart("CancelRemoteWipeRequest"); + ES.CancelRemoteWipeRequest(id); + LogEnd("CancelRemoteWipeRequest"); + } + catch (Exception ex) + { + LogError("CancelRemoteWipeRequest", ex); + throw; + } + } - [WebMethod, SoapHeader("settings")] - public void RemoveDevice(string id) - { - try - { - LogStart("RemoveDevice"); - ES.RemoveDevice(id); - LogEnd("RemoveDevice"); - } - catch (Exception ex) - { - LogError("RemoveDevice", ex); - throw; - } - } - #endregion + [WebMethod, SoapHeader("settings")] + public void RemoveDevice(string id) + { + try + { + LogStart("RemoveDevice"); + ES.RemoveDevice(id); + LogEnd("RemoveDevice"); + } + catch (Exception ex) + { + LogError("RemoveDevice", ex); + throw; + } + } + #endregion protected void LogStart(string func) { diff --git a/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServerHostedEdition.asmx b/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServerHostedEdition.asmx deleted file mode 100644 index fbecb5cd..00000000 --- a/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServerHostedEdition.asmx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebService Language="C#" CodeBehind="ExchangeServerHostedEdition.asmx.cs" Class="WebsitePanel.Server.ExchangeServerHostedEdition" %> diff --git a/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServerHostedEdition.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServerHostedEdition.asmx.cs deleted file mode 100644 index d6c9b9a4..00000000 --- a/WebsitePanel/Sources/WebsitePanel.Server/ExchangeServerHostedEdition.asmx.cs +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) 2011, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Web; -using System.Web.Services; -using WebsitePanel.Providers; -using WebsitePanel.Providers.ExchangeHostedEdition; -using Microsoft.Web.Services3; -using System.Web.Services.Protocols; -using WebsitePanel.Server.Utils; - -namespace WebsitePanel.Server -{ - /// - /// Summary description for ExchangeHostedEdition - /// - [WebService(Namespace = "http://smbsaas/websitepanel/server/")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [Policy("ServerPolicy")] - public class ExchangeServerHostedEdition : HostingServiceProviderWebService, IExchangeHostedEdition - { - private IExchangeHostedEdition ExchangeServer - { - get { return (IExchangeHostedEdition)Provider; } - } - - [WebMethod, SoapHeader("settings")] - public void CreateOrganization(string organizationId, string programId, string offerId, string domain, - string adminName, string adminEmail, string adminPassword) - { - try - { - Log.WriteStart("'{0}' CreateOrganization", ProviderSettings.ProviderName); - ExchangeServer.CreateOrganization(organizationId, programId, offerId, domain, adminName, adminEmail, adminPassword); - Log.WriteEnd("'{0}' CreateOrganization", ProviderSettings.ProviderName); - } - catch (Exception ex) - { - Log.WriteError(String.Format("'{0}' CreateOrganization", ProviderSettings.ProviderName), ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public List GetOrganizationDomains(string organizationId) - { - try - { - Log.WriteStart("'{0}' GetOrganizationDomains", ProviderSettings.ProviderName); - List result = ExchangeServer.GetOrganizationDomains(organizationId); - Log.WriteEnd("'{0}' GetOrganizationDomains", ProviderSettings.ProviderName); - return result; - } - catch (Exception ex) - { - Log.WriteError(String.Format("'{0}' GetOrganizationDomains", ProviderSettings.ProviderName), ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void AddOrganizationDomain(string organizationId, string domain) - { - try - { - Log.WriteStart("'{0}' AddOrganizationDomain", ProviderSettings.ProviderName); - ExchangeServer.AddOrganizationDomain(organizationId, domain); - Log.WriteEnd("'{0}' AddOrganizationDomain", ProviderSettings.ProviderName); - } - catch (Exception ex) - { - Log.WriteError(String.Format("'{0}' AddOrganizationDomain", ProviderSettings.ProviderName), ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void DeleteOrganizationDomain(string organizationId, string domain) - { - try - { - Log.WriteStart("'{0}' DeleteOrganizationDomain", ProviderSettings.ProviderName); - ExchangeServer.DeleteOrganizationDomain(organizationId, domain); - Log.WriteEnd("'{0}' DeleteOrganizationDomain", ProviderSettings.ProviderName); - } - catch (Exception ex) - { - Log.WriteError(String.Format("'{0}' DeleteOrganizationDomain", ProviderSettings.ProviderName), ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public ExchangeOrganization GetOrganizationDetails(string organizationId) - { - try - { - Log.WriteStart("'{0}' GetOrganizationDetails", ProviderSettings.ProviderName); - ExchangeOrganization result = ExchangeServer.GetOrganizationDetails(organizationId); - Log.WriteEnd("'{0}' GetOrganizationDetails", ProviderSettings.ProviderName); - return result; - } - catch (Exception ex) - { - Log.WriteError(String.Format("'{0}' GetOrganizationDetails", ProviderSettings.ProviderName), ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void UpdateOrganizationQuotas(string organizationId, int mailboxesNumber, int contactsNumber, int distributionListsNumber) - { - try - { - Log.WriteStart("'{0}' UpdateOrganizationQuotas", ProviderSettings.ProviderName); - ExchangeServer.UpdateOrganizationQuotas(organizationId, mailboxesNumber, contactsNumber, distributionListsNumber); - Log.WriteEnd("'{0}' UpdateOrganizationQuotas", ProviderSettings.ProviderName); - } - catch (Exception ex) - { - Log.WriteError(String.Format("'{0}' UpdateOrganizationQuotas", ProviderSettings.ProviderName), ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void UpdateOrganizationCatchAllAddress(string organizationId, string catchAllEmail) - { - try - { - Log.WriteStart("'{0}' UpdateOrganizationCatchAllAddress", ProviderSettings.ProviderName); - ExchangeServer.UpdateOrganizationCatchAllAddress(organizationId, catchAllEmail); - Log.WriteEnd("'{0}' UpdateOrganizationCatchAllAddress", ProviderSettings.ProviderName); - } - catch (Exception ex) - { - Log.WriteError(String.Format("'{0}' UpdateOrganizationCatchAllAddress", ProviderSettings.ProviderName), ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void UpdateOrganizationServicePlan(string organizationId, string programId, string offerId) - { - try - { - Log.WriteStart("'{0}' UpdateOeganizationServicePlan", ProviderSettings.ProviderName); - ExchangeServer.UpdateOrganizationServicePlan(organizationId, programId, offerId); - Log.WriteEnd("'{0}' UpdateOeganizationServicePlan", ProviderSettings.ProviderName); - } - catch (Exception ex) - { - Log.WriteError(String.Format("'{0}' UpdateOeganizationServicePlan", ProviderSettings.ProviderName), ex); - throw; - } - } - - [WebMethod, SoapHeader("settings")] - public void DeleteOrganization(string organizationId) - { - try - { - Log.WriteStart("'{0}' DeleteOrganization", ProviderSettings.ProviderName); - ExchangeServer.DeleteOrganization(organizationId); - Log.WriteEnd("'{0}' DeleteOrganization", ProviderSettings.ProviderName); - } - catch (Exception ex) - { - Log.WriteError(String.Format("'{0}' DeleteOrganization", ProviderSettings.ProviderName), ex); - throw; - } - } - } -} diff --git a/WebsitePanel/Sources/WebsitePanel.Server/FTPServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/FTPServer.asmx.cs index 57ec8fdb..746359ed 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/FTPServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/FTPServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Global.asax.cs b/WebsitePanel/Sources/WebsitePanel.Server/Global.asax.cs index 43c2cbc9..764acf17 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Global.asax.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/Global.asax.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/HostedSharePointServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/HostedSharePointServer.asmx.cs index d9c76e53..b2c6bddf 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/HostedSharePointServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/HostedSharePointServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -38,186 +38,185 @@ using Microsoft.Web.Services3; namespace WebsitePanel.Server { - /// - /// Summary description for HostedSharePointServer - /// - [WebService(Namespace = "http://smbsaas/websitepanel/server/")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [Policy("ServerPolicy")] - [ToolboxItem(false)] - public class HostedSharePointServer : HostingServiceProviderWebService - { - private delegate TReturn Action(); + /// + /// Summary description for HostedSharePointServer + /// + [WebService(Namespace = "http://smbsaas/websitepanel/server/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [Policy("ServerPolicy")] + [ToolboxItem(false)] + public class HostedSharePointServer : HostingServiceProviderWebService + { + private delegate TReturn Action(); - /// - /// Gets hosted SharePoint provider instance. - /// - private IHostedSharePointServer HostedSharePointServerProvider - { - get { return (IHostedSharePointServer)Provider; } - } + /// + /// Gets hosted SharePoint provider instance. + /// + private IHostedSharePointServer HostedSharePointServerProvider + { + get { return (IHostedSharePointServer)Provider; } + } - /// - /// Gets list of supported languages by this installation of SharePoint. - /// - /// List of supported languages - [WebMethod, SoapHeader("settings")] - public int[] GetSupportedLanguages() - { - return ExecuteAction(delegate - { - return HostedSharePointServerProvider.GetSupportedLanguages(); - }, "GetSupportedLanguages"); - } + /// + /// Gets list of supported languages by this installation of SharePoint. + /// + /// List of supported languages + [WebMethod, SoapHeader("settings")] + public int[] GetSupportedLanguages() + { + return ExecuteAction(delegate + { + return HostedSharePointServerProvider.GetSupportedLanguages(); + }, "GetSupportedLanguages"); + } - /// - /// Gets list of SharePoint collections within root web application. - /// - /// List of SharePoint collections within root web application. - [WebMethod, SoapHeader("settings")] - public SharePointSiteCollection[] GetSiteCollections() - { - return ExecuteAction(delegate - { - return HostedSharePointServerProvider.GetSiteCollections(); - }, "GetSiteCollections"); - } + /// + /// Gets list of SharePoint collections within root web application. + /// + /// List of SharePoint collections within root web application. + [WebMethod, SoapHeader("settings")] + public SharePointSiteCollection[] GetSiteCollections() + { + return ExecuteAction(delegate + { + return HostedSharePointServerProvider.GetSiteCollections(); + }, "GetSiteCollections"); + } - /// - /// Gets SharePoint collection within root web application with given name. - /// - /// Url that uniquely identifies site collection to be loaded. - /// SharePoint collection within root web application with given name. - [WebMethod, SoapHeader("settings")] - public SharePointSiteCollection GetSiteCollection(string url) - { - return ExecuteAction(delegate - { - return HostedSharePointServerProvider.GetSiteCollection(url); - }, "GetSiteCollection"); - } + /// + /// Gets SharePoint collection within root web application with given name. + /// + /// Url that uniquely identifies site collection to be loaded. + /// SharePoint collection within root web application with given name. + [WebMethod, SoapHeader("settings")] + public SharePointSiteCollection GetSiteCollection(string url) + { + return ExecuteAction(delegate + { + return HostedSharePointServerProvider.GetSiteCollection(url); + }, "GetSiteCollection"); + } - /// - /// Creates site collection within predefined root web application. - /// - /// Information about site coolection to be created. - [WebMethod, SoapHeader("settings")] - public void CreateSiteCollection(SharePointSiteCollection siteCollection) - { - siteCollection.OwnerLogin = AttachNetbiosDomainName(siteCollection.OwnerLogin); - ExecuteAction(delegate - { - HostedSharePointServerProvider.CreateSiteCollection(siteCollection); - return new object(); - }, "CreateSiteCollection"); - } + /// + /// Creates site collection within predefined root web application. + /// + /// Information about site coolection to be created. + [WebMethod, SoapHeader("settings")] + public void CreateSiteCollection(SharePointSiteCollection siteCollection) + { + siteCollection.OwnerLogin = AttachNetbiosDomainName(siteCollection.OwnerLogin); + ExecuteAction(delegate + { + HostedSharePointServerProvider.CreateSiteCollection(siteCollection); + return new object(); + }, "CreateSiteCollection"); + } [WebMethod, SoapHeader("settings")] public void UpdateQuotas(string url, long maxSize, long warningSize) { ExecuteAction(delegate - { - HostedSharePointServerProvider.UpdateQuotas(url, maxSize, warningSize); - return new object(); - }, "UpdateQuotas"); - - - + { + HostedSharePointServerProvider.UpdateQuotas(url, maxSize, warningSize); + return new object(); + }, "UpdateQuotas"); + + + } [WebMethod, SoapHeader("settings")] public SharePointSiteDiskSpace[] CalculateSiteCollectionsDiskSpace(string[] urls) { - SharePointSiteDiskSpace []ret = null; + SharePointSiteDiskSpace[] ret = null; ret = ExecuteAction(delegate - { - return HostedSharePointServerProvider.CalculateSiteCollectionsDiskSpace(urls); - }, "CalculateSiteCollectionDiskSpace"); - return ret; + { + return HostedSharePointServerProvider.CalculateSiteCollectionsDiskSpace(urls); + }, "CalculateSiteCollectionDiskSpace"); + return ret; } /// - /// Deletes site collection under given url. - /// - /// Url that uniquely identifies site collection to be deleted. - [WebMethod, SoapHeader("settings")] - public void DeleteSiteCollection(string url) - { - ExecuteAction(delegate - { - HostedSharePointServerProvider.DeleteSiteCollection(url); - return new object(); - }, "DeleteSiteCollection"); - } + /// Deletes site collection under given url. + /// + /// Url that uniquely identifies site collection to be deleted. + [WebMethod, SoapHeader("settings")] + public void DeleteSiteCollection(SharePointSiteCollection siteCollection) + { + ExecuteAction(delegate + { + HostedSharePointServerProvider.DeleteSiteCollection(siteCollection); + return new object(); + }, "DeleteSiteCollection"); + } + /// + /// Backups site collection under give url. + /// + /// Url that uniquely identifies site collection to be deleted. + /// Resulting backup file name. + /// A value which shows whether created backup must be archived. + /// Created backup full path. + [WebMethod, SoapHeader("settings")] + public string BackupSiteCollection(string url, string filename, bool zip) + { + return ExecuteAction(delegate + { + return + HostedSharePointServerProvider.BackupSiteCollection(url, filename, zip); + }, "BackupSiteCollection"); + } - /// - /// Backups site collection under give url. - /// - /// Url that uniquely identifies site collection to be deleted. - /// Resulting backup file name. - /// A value which shows whether created backup must be archived. - /// Created backup full path. - [WebMethod, SoapHeader("settings")] - public string BackupSiteCollection(string url, string filename, bool zip) - { - return ExecuteAction(delegate - { - return - HostedSharePointServerProvider.BackupSiteCollection(url, filename, zip); - }, "BackupSiteCollection"); - } + /// + /// Restores site collection under given url from backup. + /// + /// Site collection to be restored. + /// Backup file name to restore from. + [WebMethod, SoapHeader("settings")] + public void RestoreSiteCollection(SharePointSiteCollection siteCollection, string filename) + { + siteCollection.OwnerLogin = AttachNetbiosDomainName(siteCollection.OwnerLogin); + ExecuteAction(delegate + { + HostedSharePointServerProvider.RestoreSiteCollection(siteCollection, filename); + return new object(); + }, "RestoreSiteCollection"); + } - /// - /// Restores site collection under given url from backup. - /// - /// Site collection to be restored. - /// Backup file name to restore from. - [WebMethod, SoapHeader("settings")] - public void RestoreSiteCollection(SharePointSiteCollection siteCollection, string filename) - { - siteCollection.OwnerLogin = AttachNetbiosDomainName(siteCollection.OwnerLogin); - ExecuteAction(delegate - { - HostedSharePointServerProvider.RestoreSiteCollection(siteCollection, filename); - return new object(); - }, "RestoreSiteCollection"); - } + /// + /// Gets binary data chunk of specified size from specified offset. + /// + /// Path to file to get bunary data chunk from. + /// Offset from which to start data reading. + /// Binary data chunk length. + /// Binary data chunk read from file. + [WebMethod, SoapHeader("settings")] + public byte[] GetTempFileBinaryChunk(string path, int offset, int length) + { + return ExecuteAction(delegate + { + return + HostedSharePointServerProvider.GetTempFileBinaryChunk(path, offset, length); + }, "GetTempFileBinaryChunk"); + } - /// - /// Gets binary data chunk of specified size from specified offset. - /// - /// Path to file to get bunary data chunk from. - /// Offset from which to start data reading. - /// Binary data chunk length. - /// Binary data chunk read from file. - [WebMethod, SoapHeader("settings")] - public byte[] GetTempFileBinaryChunk(string path, int offset, int length) - { - return ExecuteAction(delegate - { - return - HostedSharePointServerProvider.GetTempFileBinaryChunk(path, offset, length); - }, "GetTempFileBinaryChunk"); - } - - /// - /// Appends supplied binary data chunk to file. - /// - /// Non existent file name to append to. - /// Full path to existent file to append to. - /// Binary data chunk to append to. - /// Path to file that was appended with chunk. - [WebMethod, SoapHeader("settings")] - public virtual string AppendTempFileBinaryChunk(string fileName, string path, byte[] chunk) - { - return ExecuteAction(delegate - { - return - HostedSharePointServerProvider.AppendTempFileBinaryChunk(fileName, path, chunk); - }, "AppendTempFileBinaryChunk"); - } + /// + /// Appends supplied binary data chunk to file. + /// + /// Non existent file name to append to. + /// Full path to existent file to append to. + /// Binary data chunk to append to. + /// Path to file that was appended with chunk. + [WebMethod, SoapHeader("settings")] + public virtual string AppendTempFileBinaryChunk(string fileName, string path, byte[] chunk) + { + return ExecuteAction(delegate + { + return + HostedSharePointServerProvider.AppendTempFileBinaryChunk(fileName, path, chunk); + }, "AppendTempFileBinaryChunk"); + } [WebMethod, SoapHeader("settings")] @@ -230,38 +229,46 @@ namespace WebsitePanel.Server }, "GetSiteCollectionSize"); } - /// - /// Executes supplied action and performs logging. - /// - /// Type of action's return value. - /// Action to be executed. - /// Action name for logging purposes. - /// Action execution result. - private TReturn ExecuteAction(Action action, string actionName) - { - try - { - Log.WriteStart("'{0}' {1}", ProviderSettings.ProviderName, actionName); - TReturn result = action(); - Log.WriteEnd("'{0}' {1}", ProviderSettings.ProviderName, actionName); - return result; - } - catch (Exception ex) - { - Log.WriteError(String.Format("Can't {1} '{0}' provider", ProviderSettings.ProviderName, actionName), ex); - throw; - } - } - /// - /// Returns fully qualified netbios account name. - /// - /// Account name. - /// Fully qualified netbios account name. - private string AttachNetbiosDomainName(string accountName) - { - string domainNetbiosName = String.Format("{0}\\", ActiveDirectoryUtils.GetNETBIOSDomainName(ServerSettings.ADRootDomain)); - return String.Format("{0}{1}", domainNetbiosName, accountName.Replace(domainNetbiosName, String.Empty)); - } - } + [WebMethod, SoapHeader("settings")] + public void SetPeoplePickerOu(string site, string ou) + { + HostedSharePointServerProvider.SetPeoplePickerOu(site, ou); + } + + + /// + /// Executes supplied action and performs logging. + /// + /// Type of action's return value. + /// Action to be executed. + /// Action name for logging purposes. + /// Action execution result. + private TReturn ExecuteAction(Action action, string actionName) + { + try + { + Log.WriteStart("'{0}' {1}", ProviderSettings.ProviderName, actionName); + TReturn result = action(); + Log.WriteEnd("'{0}' {1}", ProviderSettings.ProviderName, actionName); + return result; + } + catch (Exception ex) + { + Log.WriteError(String.Format("Can't {1} '{0}' provider", ProviderSettings.ProviderName, actionName), ex); + throw; + } + } + + /// + /// Returns fully qualified netbios account name. + /// + /// Account name. + /// Fully qualified netbios account name. + private string AttachNetbiosDomainName(string accountName) + { + string domainNetbiosName = String.Format("{0}\\", ActiveDirectoryUtils.GetNETBIOSDomainName(ServerSettings.ADRootDomain)); + return String.Format("{0}{1}", domainNetbiosName, accountName.Replace(domainNetbiosName, String.Empty)); + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx b/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx new file mode 100644 index 00000000..8233e3df --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="LyncServer.asmx.cs" Class="WebsitePanel.Server.LyncServer" %> diff --git a/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx.cs new file mode 100644 index 00000000..8f04045d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx.cs @@ -0,0 +1,236 @@ +// Copyright (c) 2012, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.ComponentModel; +using System.Web.Services; +using System.Web.Services.Protocols; +using WebsitePanel.Providers; +using WebsitePanel.Providers.HostedSolution; +using WebsitePanel.Server.Utils; +using Microsoft.Web.Services3; + +namespace WebsitePanel.Server +{ + /// + /// OCS Web Service + /// + [WebService(Namespace = "http://smbsaas/websitepanel/server/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [Policy("ServerPolicy")] + [ToolboxItem(false)] + public class LyncServer : HostingServiceProviderWebService + { + private ILyncServer Lync + { + get { return (ILyncServer)Provider; } + } + + + #region Organization + [WebMethod, SoapHeader("settings")] + public string CreateOrganization(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice) + { + try + { + Log.WriteStart("{0}.CreateOrganization", ProviderSettings.ProviderName); + string ret = Lync.CreateOrganization(organizationId, sipDomain, enableConferencing, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice); + Log.WriteEnd("{0}.CreateOrganization", ProviderSettings.ProviderName); + return ret; + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error: {0}.CreateOrganization", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public bool DeleteOrganization(string organizationId, string sipDomain) + { + try + { + Log.WriteStart("{0}.DeleteOrganization", ProviderSettings.ProviderName); + bool ret = Lync.DeleteOrganization(organizationId, sipDomain); + Log.WriteEnd("{0}.DeleteOrganization", ProviderSettings.ProviderName); + return ret; + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error: {0}.DeleteOrganization", ProviderSettings.ProviderName), ex); + throw; + } + } + #endregion + + #region Users + + [WebMethod, SoapHeader("settings")] + public bool CreateUser(string organizationId, string userUpn, LyncUserPlan plan) + { + try + { + Log.WriteStart("{0}.CreateUser", ProviderSettings.ProviderName); + bool ret = Lync.CreateUser(organizationId, userUpn, plan); + Log.WriteEnd("{0}.CreateUser", ProviderSettings.ProviderName); + return ret; + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error: {0}.CreateUser", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public LyncUser GetLyncUserGeneralSettings(string organizationId, string userUpn) + { + try + { + Log.WriteStart("{0}.GetLyncUserGeneralSettings", ProviderSettings.ProviderName); + LyncUser ret = Lync.GetLyncUserGeneralSettings(organizationId, userUpn); + Log.WriteEnd("{0}.GetLyncUserGeneralSettings", ProviderSettings.ProviderName); + return ret; + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error: {0}.GetLyncUserGeneralSettings", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public bool SetLyncUserPlan(string organizationId, string userUpn, LyncUserPlan plan) + { + try + { + Log.WriteStart("{0}.SetLyncUserPlan", ProviderSettings.ProviderName); + bool ret = Lync.SetLyncUserPlan(organizationId, userUpn, plan); + Log.WriteEnd("{0}.SetLyncUserPlan", ProviderSettings.ProviderName); + return ret; + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error: {0}.SetLyncUserPlan", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public bool DeleteUser(string userUpn) + { + try + { + Log.WriteStart("{0}.DeleteUser", ProviderSettings.ProviderName); + bool ret = Lync.DeleteUser(userUpn); + Log.WriteEnd("{0}.DeleteUser", ProviderSettings.ProviderName); + return ret; + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error: {0}.DeleteUser", ProviderSettings.ProviderName), ex); + throw; + } + } + + #endregion + + #region Federation + [WebMethod, SoapHeader("settings")] + public LyncFederationDomain[] GetFederationDomains(string organizationId) + { + try + { + Log.WriteStart("{0}.GetFederationDomains", ProviderSettings.ProviderName); + LyncFederationDomain[] ret = Lync.GetFederationDomains(organizationId); + Log.WriteEnd("{0}.GetFederationDomains", ProviderSettings.ProviderName); + return ret; + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error: {0}.GetFederationDomains", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public bool AddFederationDomain(string organizationId, string domainName, string proxyFqdn) + { + try + { + Log.WriteStart("{0}.AddFederationDomain", ProviderSettings.ProviderName); + bool ret = Lync.AddFederationDomain(organizationId, domainName, proxyFqdn); + Log.WriteEnd("{0}.AddFederationDomain", ProviderSettings.ProviderName); + return ret; + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error: {0}.AddFederationDomain", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public bool RemoveFederationDomain(string organizationId, string domainName) + { + try + { + Log.WriteStart("{0}.RemoveFederationDomain", ProviderSettings.ProviderName); + bool ret = Lync.RemoveFederationDomain(organizationId, domainName); + Log.WriteEnd("{0}.RemoveFederationDomain", ProviderSettings.ProviderName); + return ret; + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error: {0}.RemoveFederationDomain", ProviderSettings.ProviderName), ex); + throw; + } + } + #endregion + + [WebMethod, SoapHeader("settings")] + public void ReloadConfiguration() + { + try + { + Log.WriteStart("{0}.ReloadConfiguration", ProviderSettings.ProviderName); + Lync.ReloadConfiguration(); + Log.WriteEnd("{0}.ReloadConfiguration", ProviderSettings.ProviderName); + } + catch (Exception ex) + { + Log.WriteError(String.Format("Error: {0}.ReloadConfiguration", ProviderSettings.ProviderName), ex); + throw; + } + } + + + + + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Server/MailServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/MailServer.asmx.cs index b6767e12..47a2bd3e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/MailServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/MailServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/OCSEdgeServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/OCSEdgeServer.asmx.cs index 0f17a1c5..958e08ae 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/OCSEdgeServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/OCSEdgeServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/OCSServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/OCSServer.asmx.cs index 5bf847e2..46c859dc 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/OCSServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/OCSServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/OperatingSystem.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/OperatingSystem.asmx.cs index cde6252e..e258900a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/OperatingSystem.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/OperatingSystem.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs index f130bb71..775058d8 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -67,14 +67,14 @@ namespace WebsitePanel.Server throw; } } - - + + [WebMethod, SoapHeader("settings")] public Organization CreateOrganization(string organizationId) { try { - Log.WriteStart("'{0}' CreateOrganization", ProviderSettings.ProviderName); + Log.WriteStart("'{0}' CreateOrganization", ProviderSettings.ProviderName); Organization ret = Organization.CreateOrganization(organizationId); Log.WriteEnd("'{0}' CreateOrganization", ProviderSettings.ProviderName); return ret; @@ -85,21 +85,17 @@ namespace WebsitePanel.Server throw; } } - + [WebMethod, SoapHeader("settings")] public void DeleteOrganization(string organizationId) { - Organization.DeleteOrganization(organizationId); + Organization.DeleteOrganization(organizationId); } [WebMethod, SoapHeader("settings")] - public void CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled) + public int CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled) { - Log.WriteStart("'{0} CreateUser", ProviderSettings.ProviderName); - - Organization.CreateUser(organizationId, loginName, displayName, upn, password, enabled); - - Log.WriteEnd("'{0}' CreateUser", ProviderSettings.ProviderName); + return Organization.CreateUser(organizationId, loginName, displayName, upn, password, enabled); } [WebMethod, SoapHeader("settings")] @@ -109,7 +105,7 @@ namespace WebsitePanel.Server } [WebMethod, SoapHeader("settings")] - public OrganizationUser GeUserGeneralSettings(string loginName, string organizationId) + public OrganizationUser GetUserGeneralSettings(string loginName, string organizationId) { return Organization.GetUserGeneralSettings(loginName, organizationId); } @@ -132,9 +128,9 @@ namespace WebsitePanel.Server [WebMethod, SoapHeader("settings")] public void DeleteOrganizationDomain(string organizationDistinguishedName, string domain) { - Organization.DeleteOrganizationDomain(organizationDistinguishedName, domain); + Organization.DeleteOrganizationDomain(organizationDistinguishedName, domain); } - + [WebMethod, SoapHeader("settings")] public void CreateOrganizationDomain(string organizationDistinguishedName, string domain) { @@ -147,5 +143,10 @@ namespace WebsitePanel.Server return Organization.GetPasswordPolicy(); } + [WebMethod, SoapHeader("settings")] + public string GetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName) + { + return Organization.GetSamAccountNameByUserPrincipalName(organizationId, userPrincipalName); + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Server/ServiceProvider.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/ServiceProvider.asmx.cs index 09189e8c..4a309af9 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/ServiceProvider.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/ServiceProvider.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/SharePointServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/SharePointServer.asmx.cs index fef76504..033d8e21 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/SharePointServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/SharePointServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/StatisticsServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/StatisticsServer.asmx.cs index 2fd5bf82..e42ed2ae 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/StatisticsServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/StatisticsServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/VirtualizationServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/VirtualizationServer.asmx.cs index fbe5370e..6e75cc5f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/VirtualizationServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/VirtualizationServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/VirtualizationServerForPrivateCloud.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/VirtualizationServerForPrivateCloud.asmx.cs index 68de0d43..4e141ebd 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/VirtualizationServerForPrivateCloud.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/VirtualizationServerForPrivateCloud.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Web.config b/WebsitePanel/Sources/WebsitePanel.Server/Web.config index 61882914..dafa8009 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/Web.config +++ b/WebsitePanel/Sources/WebsitePanel.Server/Web.config @@ -119,7 +119,7 @@ algorithmSuite="Default" /> - - + + diff --git a/WebsitePanel/Sources/WebsitePanel.Server/WebServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/WebServer.asmx.cs index 0ed2a811..16706c94 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/WebServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/WebServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -1062,12 +1062,62 @@ namespace WebsitePanel.Server #region Web Application Gallery [WebMethod, SoapHeader("settings")] - public GalleryCategoriesResult GetGalleryCategories() + public void InitFeeds(int UserId, string[] feeds) + { + try + { + Log.WriteStart("'{0}' InitFeeds", ProviderSettings.ProviderName); + WebProvider.InitFeeds(UserId, feeds); + Log.WriteEnd("'{0}' InitFeeds", ProviderSettings.ProviderName); + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' InitFeeds", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void SetResourceLanguage(int UserId, string resourceLanguage) + { + try + { + Log.WriteStart("'{0}' SetResourceLanguage", ProviderSettings.ProviderName); + WebProvider.SetResourceLanguage(UserId,resourceLanguage); + Log.WriteEnd("'{0}' SetResourceLanguage", ProviderSettings.ProviderName); + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' SetResourceLanguage", ProviderSettings.ProviderName), ex); + throw; + } + } + + + [WebMethod, SoapHeader("settings")] + public GalleryLanguagesResult GetGalleryLanguages(int UserId) + { + try + { + Log.WriteStart("'{0}' GalleryLanguagesResult", ProviderSettings.ProviderName); + GalleryLanguagesResult result = WebProvider.GetGalleryLanguages(UserId); + Log.WriteEnd("'{0}' GalleryLanguagesResult", ProviderSettings.ProviderName); + return result; + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' GalleryLanguagesResult", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public GalleryCategoriesResult GetGalleryCategories(int UserId) { try { Log.WriteStart("'{0}' GalleryCategoriesResult", ProviderSettings.ProviderName); - GalleryCategoriesResult result = WebProvider.GetGalleryCategories(); + GalleryCategoriesResult result = WebProvider.GetGalleryCategories(UserId); Log.WriteEnd("'{0}' GalleryCategoriesResult", ProviderSettings.ProviderName); return result; } @@ -1079,12 +1129,12 @@ namespace WebsitePanel.Server } [WebMethod, SoapHeader("settings")] - public GalleryApplicationsResult GetGalleryApplications(string categoryId) + public GalleryApplicationsResult GetGalleryApplications(int UserId, string categoryId) { try { Log.WriteStart("'{0}' GetGalleryApplications", ProviderSettings.ProviderName); - GalleryApplicationsResult result = WebProvider.GetGalleryApplications(categoryId); + GalleryApplicationsResult result = WebProvider.GetGalleryApplications(UserId,categoryId); Log.WriteEnd("'{0}' GetGalleryApplications", ProviderSettings.ProviderName); return result; } @@ -1094,7 +1144,26 @@ namespace WebsitePanel.Server throw; } } - [WebMethod, SoapHeader("settings")] + + [WebMethod, SoapHeader("settings")] + public GalleryApplicationsResult GetGalleryApplicationsFiltered(int UserId, string pattern) + { + try + { + Log.WriteStart("'{0}' GetGalleryApplicationsFiltered", ProviderSettings.ProviderName); + GalleryApplicationsResult result = WebProvider.GetGalleryApplicationsFiltered(UserId,pattern); + Log.WriteEnd("'{0}' GetGalleryApplicationsFiltered", ProviderSettings.ProviderName); + return result; + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' GetGalleryApplicationsFiltered", ProviderSettings.ProviderName), ex); + throw; + } + } + + + [WebMethod, SoapHeader("settings")] public bool IsMsDeployInstalled() { try @@ -1111,13 +1180,13 @@ namespace WebsitePanel.Server } } - [WebMethod, SoapHeader("settings")] - public GalleryApplicationResult GetGalleryApplication(string id) + [WebMethod, SoapHeader("settings")] + public GalleryApplicationResult GetGalleryApplication(int UserId, string id) { try { Log.WriteStart("'{0}' GetGalleryApplication", ProviderSettings.ProviderName); - GalleryApplicationResult result = WebProvider.GetGalleryApplication(id); + GalleryApplicationResult result = WebProvider.GetGalleryApplication(UserId,id); Log.WriteEnd("'{0}' GetGalleryApplication", ProviderSettings.ProviderName); return result; } @@ -1128,13 +1197,13 @@ namespace WebsitePanel.Server } } - [WebMethod, SoapHeader("settings")] - public GalleryWebAppStatus GetGalleryApplicationStatus(string id) + [WebMethod, SoapHeader("settings")] + public GalleryWebAppStatus GetGalleryApplicationStatus(int UserId, string id) { try { Log.WriteStart("'{0}' GetGalleryApplicationStatus", ProviderSettings.ProviderName); - GalleryWebAppStatus result = WebProvider.GetGalleryApplicationStatus(id); + GalleryWebAppStatus result = WebProvider.GetGalleryApplicationStatus(UserId,id); Log.WriteEnd("'{0}' GetGalleryApplicationStatus", ProviderSettings.ProviderName); return result; } @@ -1144,14 +1213,14 @@ namespace WebsitePanel.Server throw; } } - - [WebMethod, SoapHeader("settings")] - public GalleryWebAppStatus DownloadGalleryApplication(string id) + + [WebMethod, SoapHeader("settings")] + public GalleryWebAppStatus DownloadGalleryApplication(int UserId, string id) { try { Log.WriteStart("'{0}' DownloadGalleryApplication", ProviderSettings.ProviderName); - GalleryWebAppStatus result = WebProvider.DownloadGalleryApplication(id); + GalleryWebAppStatus result = WebProvider.DownloadGalleryApplication(UserId,id); Log.WriteEnd("'{0}' DownloadGalleryApplication", ProviderSettings.ProviderName); return result; } @@ -1162,13 +1231,13 @@ namespace WebsitePanel.Server } } - [WebMethod, SoapHeader("settings")] - public DeploymentParametersResult GetGalleryApplicationParameters(string id) + [WebMethod, SoapHeader("settings")] + public DeploymentParametersResult GetGalleryApplicationParameters(int UserId, string id) { try { Log.WriteStart("'{0}' GetGalleryApplicationParameters", ProviderSettings.ProviderName); - DeploymentParametersResult result = WebProvider.GetGalleryApplicationParameters(id); + DeploymentParametersResult result = WebProvider.GetGalleryApplicationParameters(UserId,id); Log.WriteEnd("'{0}' GetGalleryApplicationParameters", ProviderSettings.ProviderName); return result; } @@ -1179,13 +1248,13 @@ namespace WebsitePanel.Server } } - [WebMethod, SoapHeader("settings")] - public StringResultObject InstallGalleryApplication(string id, List updatedValues) + [WebMethod, SoapHeader("settings")] + public StringResultObject InstallGalleryApplication(int UserId, string id, List updatedValues, string languageId) { try { Log.WriteStart("'{0}' InstallGalleryApplication", ProviderSettings.ProviderName); - StringResultObject result = WebProvider.InstallGalleryApplication(id, updatedValues); + StringResultObject result = WebProvider.InstallGalleryApplication(UserId,id, updatedValues, languageId); Log.WriteEnd("'{0}' InstallGalleryApplication", ProviderSettings.ProviderName); return result; } diff --git a/WebsitePanel/Sources/WebsitePanel.Server/WebsitePanel.Server.csproj b/WebsitePanel/Sources/WebsitePanel.Server/WebsitePanel.Server.csproj index 904a5b5b..0953eeaa 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/WebsitePanel.Server.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Server/WebsitePanel.Server.csproj @@ -42,6 +42,14 @@ 618 + + False + ..\..\Lib\References\Microsoft\Microsoft.Web.Deployment.dll + + + False + ..\..\Lib\Microsoft.Web.PlatformInstaller.dll + False ..\..\Lib\Microsoft.Web.Services3.dll @@ -52,6 +60,8 @@ + + @@ -68,7 +78,7 @@ - + @@ -109,10 +119,11 @@ - - ExchangeServerHostedEdition.asmx + + LyncServer.asmx Component + OCSEdgeServer.asmx Component @@ -206,6 +217,10 @@ {E91E52F3-9555-4D00-B577-2B1DBDD87CA7} WebsitePanel.Server.Utils + + {736FA0F0-ECA3-416E-B299-85CC425FFF44} + WebsitePanel.Server.WPIServiceContract + @@ -224,7 +239,7 @@ False False - 9003 + 9004 / diff --git a/WebsitePanel/Sources/WebsitePanel.Server/WindowsServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/WindowsServer.asmx.cs index 3f038893..7c990684 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/WindowsServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/WindowsServer.asmx.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -29,6 +29,9 @@ using System; using System.IO; using System.Data; +using System.Security; +using System.Text; +using System.Threading; using System.Web; using System.Diagnostics; using System.Collections; @@ -38,11 +41,20 @@ using System.Web.Services.Protocols; using System.ComponentModel; using System.Text.RegularExpressions; using System.ServiceProcess; +using System.ServiceModel; +using System.Runtime.Remoting; +using System.Runtime.Remoting.Channels; +using System.Runtime.Remoting.Channels.Tcp; using System.Management; +using System.Collections.Specialized; +using Microsoft.Web.PlatformInstaller; using Microsoft.Web.Services3; - using WebsitePanel.Providers.Utils; +using WebsitePanel.Server.Code; using WebsitePanel.Server.Utils; +using WebsitePanel.Providers; +using WebsitePanel.Server.WPIService; + namespace WebsitePanel.Server { @@ -280,6 +292,554 @@ namespace WebsitePanel.Server } #endregion + #region Web Platform Installer + + + + private string makeHref(string value) + { + if (string.IsNullOrEmpty(value)) + return value; + + //" qweqwe http://www.helicontech.com/zoo/feed/ asdasdasd" + Regex link =new Regex("(http[^\\s,]+)(?$1"); + } + + + private WPIProduct ProductToWPIProduct(Product product) + { + WPIProduct p = new WPIProduct(); + p.ProductId = product.ProductId; + p.Summary = product.Summary; + p.LongDescription = makeHref(product.LongDescription); + p.Published = product.Published; + p.Author = product.Author; + p.AuthorUri = (product.AuthorUri != null) ? product.AuthorUri.ToString() : ""; + p.Title = product.Title; + p.Link = (product.Link != null) ? product.Link.ToString() : ""; + p.Version = product.Version; + + if (product.Installers.Count > 0) + { + if (product.Installers[0].EulaUrl != null) + { + p.EulaUrl = product.Installers[0].EulaUrl.ToString(); + + } + + if (product.Installers[0].InstallerFile != null) + { + if (product.Installers[0].InstallerFile.InstallerUrl != null) + { + p.DownloadedLocation = product.Installers[0].InstallerFile.InstallerUrl.ToString(); + } + p.FileSize = product.Installers[0].InstallerFile.FileSize; + } + + } + + if (product.IconUrl != null) + { + p.Logo = product.IconUrl.ToString(); + } + + p.IsInstalled = product.IsInstalled(true); + + return p; + } + + [WebMethod] + public WPIProduct[] GetWPIProducts(string tabId, string keywordId) + { + + + try + { + Log.WriteStart("GetWPIProducts"); + List wpiProducts = new List(); + + + WpiHelper wpi = GetWpiFeed(); + + string feedLocation = null; + if (tabId != null) + { + Tab tab = wpi.GetTab(tabId); + ICollection feeds = tab.FeedList; + feedLocation = feeds.GetEnumerator().Current; + } + + List products = wpi.GetProducts(feedLocation, keywordId); + + if (products != null) + { + + + foreach (Product product in products) + { + if (null != product && !product.IsApplication) + { + wpiProducts.Add(ProductToWPIProduct(product)); + + } + } + + } + + + + Log.WriteEnd("GetWPIProducts"); + return wpiProducts.ToArray(); + } + catch (Exception ex) + { + Log.WriteError("GetWPIProducts", ex); + throw; + } + } + + + [WebMethod] + public WPIProduct[] GetWPIProductsFiltered(string filter) + { + + + try + { + Log.WriteStart("GetWPIProductsFiltered"); + List wpiProducts = new List(); + + + WpiHelper wpi = GetWpiFeed(); + + List products = wpi.GetProductsFiltered( filter); + + if (products != null) + { + + + foreach (Product product in products) + { + if (null != product && !product.IsApplication) + { + wpiProducts.Add(ProductToWPIProduct(product)); + + } + } + + } + + + + Log.WriteEnd("GetWPIProductsFiltered"); + return wpiProducts.ToArray(); + } + catch (Exception ex) + { + Log.WriteError("GetWPIProductsFiltered", ex); + throw; + } + } + + [WebMethod] + public WPITab[] GetWPITabs() + { + try + { + Log.WriteStart("GetWPITabs"); + + WpiHelper wpi = GetWpiFeed(); + + List result = new List(); + + foreach (Tab tab in wpi.GetTabs()) + { + result.Add(new WPITab(tab.Id, tab.Name)); + } + + + Log.WriteEnd("GetWPITabs"); + + return result.ToArray(); + } + catch (Exception ex) + { + Log.WriteError("GetWPITabs", ex); + throw; + } + } + + + static string[] FEEDS = new string[] + { + // "https://www.microsoft.com/web/webpi/3.0/WebProductList.xml", + // "http://www.helicontech.com/zoo/feed/" + }; + + [WebMethod] + public void InitWPIFeeds(string feedUrls) + { + if (string.IsNullOrEmpty(feedUrls)) + { + throw new Exception("Empty feed list"); + } + + string[] newFEEDS = feedUrls.Split(';'); + + if (newFEEDS.Length == 0) + { + throw new Exception("Empty feed list"); + } + if (!ArraysEqual(newFEEDS, FEEDS)) + { + Log.WriteInfo("InitWPIFeeds - new value: " + feedUrls); + + //Feeds settings have been channged + FEEDS = newFEEDS; + wpi = null; + + } + } + + + public static bool ArraysEqual(T[] a1, T[] a2) + { + if (ReferenceEquals(a1, a2)) + return true; + + if (a1 == null || a2 == null) + return false; + + if (a1.Length != a2.Length) + return false; + + EqualityComparer comparer = EqualityComparer.Default; + for (int i = 0; i < a1.Length; i++) + { + if (!comparer.Equals(a1[i], a2[i])) return false; + } + return true; + } + + [WebMethod] + public WPIKeyword[] GetWPIKeywords() + { + try + { + Log.WriteStart("GetWPIKeywords"); + + WpiHelper wpi = GetWpiFeed(); + + List result = new List(); + + result.Add(new WPIKeyword("", "All")); + + foreach (Keyword keyword in wpi.GetKeywords()) + { + if (!wpi.IsKeywordApplication(keyword)) + { + result.Add(new WPIKeyword(keyword.Id, keyword.Text)); + } + + } + + + Log.WriteEnd("GetWPIKeywords"); + + return result.ToArray(); + } + catch (Exception ex) + { + Log.WriteError("GetWPIKeywords", ex); + throw; + } + } + + + [WebMethod] + public WPIProduct[] GetWPIProductsWithDependencies(string[] products) + { + try + { + Log.WriteStart("GetWPIProductsWithDependencies"); + + WpiHelper wpi = GetWpiFeed(); + + List result = new List(); + foreach (Product product in wpi.GetProductsWithDependencies(products)) + { + result.Add(ProductToWPIProduct(product)); + } + + Log.WriteEnd("GetWPIProductsWithDependencies"); + + return result.ToArray(); + } + catch (Exception ex) + { + Log.WriteError("GetWPIProductsWithDependencies", ex); + throw; + } + } + + static Process _WpiServiceExe = null; + + [WebMethod] + public void InstallWPIProducts(string[] products) + { + try + { + Log.WriteStart("InstallWPIProducts"); + + StartWpiService(); + + RegisterWpiService(); + + WPIServiceContract client = new WPIServiceContract(); + + client.Initialize(FEEDS); + client.BeginInstallation(products); + + + + + + Log.WriteEnd("InstallWPIProducts"); + } + catch (Exception ex) + { + Log.WriteError("InstallWPIProducts", ex); + throw; + } + } + + private void StartWpiService() + { + string binFolder = HttpContext.Current.Server.MapPath("/bin/"); + + string newUserProfile = Path.Combine(Environment.ExpandEnvironmentVariables("%SystemRoot%"), "Temp\\zoo.wpi"); + string newAppData = Path.Combine(newUserProfile, "Roaming"); + string newLocalAppData = Path.Combine(newUserProfile, "Local"); + try + { + Directory.CreateDirectory(newUserProfile); + Directory.CreateDirectory(newAppData); + Directory.CreateDirectory(newLocalAppData); + } + catch (Exception) + { + //throw; + } + + + Process wpiServiceExe = new Process(); + wpiServiceExe.StartInfo = new ProcessStartInfo(Path.Combine(binFolder, "WebsitePanel.Server.WPIService.exe")); + wpiServiceExe.StartInfo.UseShellExecute = false; + wpiServiceExe.StartInfo.EnvironmentVariables["UserProfile"] = newUserProfile; + wpiServiceExe.StartInfo.EnvironmentVariables["LocalAppData"] = newLocalAppData; + wpiServiceExe.StartInfo.EnvironmentVariables["AppData"] = newAppData; + if (wpiServiceExe.Start()) + { + _WpiServiceExe = wpiServiceExe; + } + } + + [WebMethod] + public void CancelInstallWPIProducts() + { + try + { + Log.WriteStart("CancelInstallWPIProducts"); + + KillWpiService(); + + + Log.WriteEnd("CancelInstallWPIProducts"); + } + catch (Exception ex) + { + Log.WriteError("CancelInstallWPIProducts", ex); + throw; + } + } + + private void KillWpiService() + { + //kill own service + if (_WpiServiceExe != null && !_WpiServiceExe.HasExited) + { + _WpiServiceExe.Kill(); + _WpiServiceExe = null; + } + else + { + //find WebsitePanel.Server.WPIService.exe + Process[] wpiservices = Process.GetProcessesByName("WebsitePanel.Server.WPIService"); + foreach (Process p in wpiservices) + { + p.Kill(); + } + } + } + + [WebMethod] + public string GetWPIStatus() + { + try + { + Log.WriteStart("GetWPIStatus"); + + RegisterWpiService(); + + WPIServiceContract client = new WPIServiceContract(); + + string status = client.GetStatus(); + + Log.WriteEnd("GetWPIStatus"); + + return status; //OK + } + catch (Exception ex) + { + // done or error + + if (_WpiServiceExe == null || _WpiServiceExe.HasExited) + { + // reset WpiHelper for refresh status + wpi = null; + return ""; //OK + } + + Log.WriteError("GetWPIStatus", ex); + + return ex.ToString(); + } + } + + [WebMethod] + public string WpiGetLogFileDirectory() + { + try + { + Log.WriteStart("WpiGetLogFileDirectory"); + + RegisterWpiService(); + + WPIServiceContract client = new WPIServiceContract(); + + string result = client.GetLogFileDirectory(); + + Log.WriteEnd("WpiGetLogFileDirectory"); + + return result; //OK + } + catch (Exception ex) + { + + Log.WriteError("WpiGetLogFileDirectory", ex); + + throw; + } + } + + [WebMethod] + public SettingPair[] WpiGetLogsInDirectory(string Path) + { + try + { + Log.WriteStart("WpiGetLogsInDirectory"); + + ArrayList result = new ArrayList(); + + string[] filePaths = Directory.GetFiles(Path); + foreach (string filePath in filePaths) + { + using (StreamReader streamReader = new StreamReader(filePath)) + { + string fileContent = SecurityElement.Escape(StringUtils.CleanupASCIIControlCharacters(streamReader.ReadToEnd())); + result.Add(new SettingPair(filePath, fileContent)); + } + + } + + Log.WriteEnd("WpiGetLogFileDirectory"); + + return (SettingPair[])result.ToArray(typeof(SettingPair)); //OK + } + catch (Exception ex) + { + + Log.WriteError("WpiGetLogFileDirectory", ex); + + throw; + } + } + + + + + + static WpiHelper wpi = null; + WpiHelper GetWpiFeed() + { + if (FEEDS.Length == 0) + { + throw new Exception("Empty feed list"); + } + + if (null == wpi) + { + wpi = new WpiHelper(FEEDS); + } + return wpi; + } + + private static object _lockRegisterWpiService = new object(); + private void RegisterWpiService() + { + lock (_lockRegisterWpiService) + { + + + try + { + ChannelServices.RegisterChannel(new TcpChannel(), true); + } + catch (System.Exception) + { + //ignor + } + + if (null == RemotingConfiguration.IsWellKnownClientType(typeof(WPIServiceContract))) + { + RemotingConfiguration.RegisterWellKnownClientType(typeof(WPIServiceContract), string.Format("tcp://localhost:{0}/WPIServiceContract", WPIServiceContract.PORT)); + } + + try + { + WPIServiceContract client = new WPIServiceContract(); + client.Ping(); + } + catch (Exception) + { + //unable to connect + //try to restart service + KillWpiService(); + //StartWpiService(); + } + + + + + } + + + } + #endregion GetWPIProducts + + #region Event Viewer [WebMethod] public List GetLogNames() diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/BinaryExpression.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/BinaryExpression.cs index 4db6c0e5..4ee6c6ee 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/BinaryExpression.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/BinaryExpression.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/CallTemplateStatement.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/CallTemplateStatement.cs index 7d7e2f99..d3765f00 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/CallTemplateStatement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/CallTemplateStatement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/ElseIfStatement.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/ElseIfStatement.cs index 377093ae..33307bc0 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/ElseIfStatement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/ElseIfStatement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/Expression.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/Expression.cs index 511c6158..93665b55 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/Expression.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/Expression.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/ForStatement.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/ForStatement.cs index 4790bdbd..ee6ce917 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/ForStatement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/ForStatement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/ForeachStatement.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/ForeachStatement.cs index 51311a8e..79b12c82 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/ForeachStatement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/ForeachStatement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/IdentifierExpression.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/IdentifierExpression.cs index de8c5237..e4513696 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/IdentifierExpression.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/IdentifierExpression.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/IdentifierPart.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/IdentifierPart.cs index 8d98f274..22430df5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/IdentifierPart.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/IdentifierPart.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/IfStatement.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/IfStatement.cs index ad53d56d..abd3f702 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/IfStatement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/IfStatement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/LiteralExpression.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/LiteralExpression.cs index 2ac2af7e..ea89e718 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/LiteralExpression.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/LiteralExpression.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/PrintStatement.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/PrintStatement.cs index a21cc01e..c45723b2 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/PrintStatement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/PrintStatement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/SetStatement.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/SetStatement.cs index be8069e8..677e1f09 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/SetStatement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/SetStatement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/Statement.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/Statement.cs index 5bd32729..eb59f887 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/Statement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/Statement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/TemplateStatement.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/TemplateStatement.cs index b8251f92..5092ed59 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/TemplateStatement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/TemplateStatement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/TextStatement.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/TextStatement.cs index cffff9c2..32ab0d02 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/TextStatement.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/TextStatement.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/AST/UnaryExpression.cs b/WebsitePanel/Sources/WebsitePanel.Templates/AST/UnaryExpression.cs index 73aafef2..92de7236 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/AST/UnaryExpression.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/AST/UnaryExpression.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/BuiltinFunctions.cs b/WebsitePanel/Sources/WebsitePanel.Templates/BuiltinFunctions.cs index 8dff270f..40407802 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/BuiltinFunctions.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/BuiltinFunctions.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/Lexer.cs b/WebsitePanel/Sources/WebsitePanel.Templates/Lexer.cs index 754b0884..bfb2a864 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/Lexer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/Lexer.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/Parser.cs b/WebsitePanel/Sources/WebsitePanel.Templates/Parser.cs index b22811a2..47960985 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/Parser.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/Parser.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/ParserException.cs b/WebsitePanel/Sources/WebsitePanel.Templates/ParserException.cs index 5cdad424..019d3705 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/ParserException.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/ParserException.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/Program.cs b/WebsitePanel/Sources/WebsitePanel.Templates/Program.cs index d9d3261b..e1077d41 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/Program.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/Program.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/Template.cs b/WebsitePanel/Sources/WebsitePanel.Templates/Template.cs index 41e4ec35..5f4b459d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/Template.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/Template.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/TemplateContext.cs b/WebsitePanel/Sources/WebsitePanel.Templates/TemplateContext.cs index 497eec5d..2a58cf99 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/TemplateContext.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/TemplateContext.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/Token.cs b/WebsitePanel/Sources/WebsitePanel.Templates/Token.cs index 6d5b66d8..fa1cc0d2 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/Token.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/Token.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.Templates/TokenType.cs b/WebsitePanel/Sources/WebsitePanel.Templates/TokenType.cs index 5214100e..29cfd881 100644 --- a/WebsitePanel/Sources/WebsitePanel.Templates/TokenType.cs +++ b/WebsitePanel/Sources/WebsitePanel.Templates/TokenType.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2011, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/ModulesData.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/ModulesData.config index f4ac71d6..efd04273 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/ModulesData.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/ModulesData.config @@ -2,15 +2,15 @@ - - - - - - - - - + + + + + + + + + @@ -24,7 +24,7 @@ - + @@ -55,6 +55,7 @@ + @@ -67,7 +68,6 @@ - @@ -97,6 +97,7 @@ + @@ -119,7 +120,6 @@ - diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/SiteSettings.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/SiteSettings.config index 0a99be01..e40147a6 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/SiteSettings.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/SiteSettings.config @@ -3,7 +3,7 @@ WebsitePanel - http://localhost:9002 + http://localhost:9005 UserCulture UserTheme diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config index 616e6848..e8d06e78 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config @@ -174,7 +174,8 @@ - + + @@ -486,7 +487,10 @@ - + + + + @@ -508,7 +512,15 @@ - + + + + + + + + + @@ -580,17 +592,4 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config index e3a9e46c..be8e97cf 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config @@ -9,25 +9,25 @@ -