Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
EliSadaka committed Aug 1, 2022
1 parent a905b4b commit 7829989
Show file tree
Hide file tree
Showing 20 changed files with 64 additions and 107 deletions.
11 changes: 2 additions & 9 deletions Bass.vb
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Imports System.Text
Imports System.IO
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Imaging
Imports System.Runtime.InteropServices
Imports System.Security
Imports System.Runtime.InteropServices
Imports System.Net
Imports System.Net.Sockets

Partial Public Class Plugin
<SuppressUnmanagedCodeSecurity()> _
Expand Down Expand Up @@ -111,7 +104,7 @@ Partial Public Class Plugin
Public origres As Integer
Public plugin As Integer
Public sample As Integer
Private filenamePtr As IntPtr
Private ReadOnly filenamePtr As IntPtr
End Class ' BASS_CHANNELINFO

<DllImport("bass.dll", CharSet:=CharSet.Auto)> _
Expand Down
3 changes: 1 addition & 2 deletions ConnectionManagerService.vb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Imports System.Text
Imports System.Xml
Imports System.Xml

Partial Public Class Plugin
<UpnpServiceVariable("SourceProtocolInfo", "string", True)> _
Expand Down
9 changes: 4 additions & 5 deletions ControlPointManager.vb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
Imports System.Text
Imports System.IO
Imports System.Net
Imports System.Net.Sockets
Imports System.Runtime.InteropServices
Imports System.Text
Imports System.Threading
Imports System.Xml
Imports System.Runtime.InteropServices
Imports System.Net
Imports System.Net.Sockets

Partial Public Class Plugin
Private Shared ReadOnly renderingDevices As New List(Of MediaRendererDevice)
Expand Down
10 changes: 2 additions & 8 deletions Encoder.vb
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
Imports System.Text
Imports System.IO
Imports System.Drawing
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Imaging
Imports System.Security
Imports System.Runtime.InteropServices
Imports System.Net
Imports System.Net.Sockets
Imports System.Threading
Imports System.Security

Partial Public Class Plugin
Private MustInherit Class Encoder
Expand Down
6 changes: 2 additions & 4 deletions HttpRequest.vb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Imports System.Text
Imports System.IO
Imports System.Net.Sockets
Imports System.Threading
Imports System.Web
Imports System.IO
Imports System.Text

Partial Public Class Plugin
Private Class HttpRequest
Expand Down
4 changes: 2 additions & 2 deletions HttpResponse.vb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Imports System.Text
Imports System.IO
Imports System.IO
Imports System.Net.Sockets
Imports System.Text
Imports System.Xml

Partial Public Class Plugin
Expand Down
7 changes: 2 additions & 5 deletions HttpServer.vb
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
Imports System.Text
Imports System.Net
Imports System.Net
Imports System.Net.Sockets
Imports System.Threading
Imports System.Xml
Imports System.Threading.Tasks
Imports System.Runtime.InteropServices
Imports System.Threading

Partial Public Class Plugin
Private Delegate Sub HttpRouteDelegate(request As HttpRequest)
Expand Down
6 changes: 2 additions & 4 deletions ItemManager.vb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Imports System.Text
Imports System.IO
Imports System.Threading
Imports System.Collections.ObjectModel
Imports System.Text
Imports System.Xml
Imports System.Collections.ObjectModel

Partial Public Class Plugin
Private Class ItemManager
Expand Down
4 changes: 1 addition & 3 deletions MediaReceiverRegistrarService.vb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Imports System.Text

Partial Public Class Plugin
Partial Public Class Plugin
<UpnpServiceVariable("AuthorizationDeniedUpdateID", "ui4", True)> _
<UpnpServiceVariable("A_ARG_TYPE_DeviceID", "string", False)> _
<UpnpServiceVariable("A_ARG_TYPE_RegistrationRespMsg", "bin.base64", False)> _
Expand Down
7 changes: 2 additions & 5 deletions MediaServerDevice.vb
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
Imports System.Text
Imports System.Xml
Imports System.Net
Imports System.Runtime.InteropServices
Imports System.Reflection
Imports System.Threading
Imports System.Net
Imports System.Net.Sockets
Imports System.Xml

Partial Public Class Plugin
Private NotInheritable Class MediaServerDevice
Expand Down
14 changes: 7 additions & 7 deletions MusicBeeInterface.vb
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ Partial Public Class Plugin
MusicBeeStarted = 34
PlayingTracksChanged = 35
PlayingTracksQueueChanged = 36
PlaylistCreated = 37
PlaylistUpdated = 38
PlaylistDeleted = 39
PlaylistCreated = 37
PlaylistUpdated = 38
PlaylistDeleted = 39
End Enum

Public Enum CallbackType
Expand Down Expand Up @@ -524,7 +524,7 @@ Partial Public Class Plugin
Archiving = 4
End Enum

<Flags()> _
<Flags()>
Public Enum LibraryCategory
Music = 0
Audiobook = 1
Expand All @@ -538,9 +538,9 @@ Partial Public Class Plugin
AppleDevice = 2
GooglePlay2 = 3
AppleDevice2 = 4
WebDrivePluginOneDrive = 5
WebDrivePluginGoogleDrive = 6
WebDrivePluginDropBox = 7
WebDrivePluginOneDrive = 5
WebDrivePluginGoogleDrive = 6
WebDrivePluginDropBox = 7
End Enum

Public Enum DataType
Expand Down
15 changes: 7 additions & 8 deletions MusicBeeUpnp.vb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Imports System.Runtime.InteropServices
Imports System.Net
Imports System.Net
Imports System.Net.NetworkInformation
Imports System.Net.Sockets
Imports System.Runtime.InteropServices
Imports System.Threading

Public Class Plugin
Expand All @@ -15,12 +15,11 @@ Public Class Plugin
Private Shared ReadOnly logLock As New Object
Private Shared ReadOnly errorCount As New Dictionary(Of String, Integer)(StringComparer.Ordinal)
Private Shared ReadOnly sendDataBarrier As New SemaphoreSlim(4)
Private Shared ignoreNamePrefixes() As String = New String() {}
Private Shared ignoreNameChars As String = Nothing
Private Shared playCountTriggerPercent As Double
Private Shared playCountTriggerSeconds As Integer
Private Shared skipCountTriggerPercent As Double
Private Shared skipCountTriggerSeconds As Integer
Private Shared ReadOnly ignoreNameChars As String = Nothing
Private Shared ReadOnly playCountTriggerPercent As Double
Private Shared ReadOnly playCountTriggerSeconds As Integer
Private Shared ReadOnly skipCountTriggerPercent As Double
Private Shared ReadOnly skipCountTriggerSeconds As Integer
Private Shared logCounter As Integer = 0
Private Shared hostAddresses() As IPAddress
Private Shared subnetMasks()() As Byte
Expand Down
21 changes: 10 additions & 11 deletions My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Imports System
Imports System.Reflection
Imports System.Reflection
Imports System.Runtime.InteropServices

' General Information about an assembly is controlled through the following
Expand All @@ -8,17 +7,17 @@ Imports System.Runtime.InteropServices

' Review the values of the assembly attributes

<Assembly: AssemblyTitle("MusicBee Upnp/DNLA server")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Steven Mayall")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("Copyright ©Steven Mayall 2014")>
<Assembly: AssemblyTrademark("")>
<Assembly: AssemblyTitle("MusicBee Upnp/DNLA server")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Steven Mayall")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("Copyright ©Steven Mayall 2014")>
<Assembly: AssemblyTrademark("")>

<Assembly: ComVisible(False)>

'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("c42fccda-b7a8-46ed-a999-3ceabc341fe1")>
<Assembly: Guid("c42fccda-b7a8-46ed-a999-3ceabc341fe1")>

' Version information for an assembly consists of the following four values:
'
Expand All @@ -31,5 +30,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
6 changes: 3 additions & 3 deletions SplitButtonControl.vb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Imports System.Drawing
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms.VisualStyles
Imports System.ComponentModel

Partial Public Class Plugin
Private NotInheritable Class SplitButton
Expand All @@ -12,7 +12,7 @@ Partial Public Class Plugin
Private isSplitMenuVisible As Boolean
Private isMouseEntered As Boolean
Private splitMenuStrip As ContextMenuStrip
Private textFlags As TextFormatFlags = TextFormatFlags.Default
Private ReadOnly textFlags As TextFormatFlags = TextFormatFlags.Default
Private Shared ReadOnly borderSize As Integer = SystemInformation.Border3DSize.Width * 2

Public Sub New()
Expand Down
7 changes: 3 additions & 4 deletions SsdpServer.vb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
Imports System.Text
Imports System.Threading
Imports System.Net
Imports System.Net.Sockets
Imports System.Net
Imports System.Net.NetworkInformation
Imports System.Runtime.InteropServices
Imports System.Text
Imports System.Threading

Partial Public Class Plugin
Private Class SsdpServer
Expand Down
7 changes: 2 additions & 5 deletions UpnpControlPoint.vb
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
Imports System.Text
Imports UPNPLib
Imports System.Xml
Imports System.IO
Imports System.Net
Imports System.Net
Imports System.Net.Sockets
Imports UPNPLib

Partial Public Class Plugin
Private Class UpnpControlPoint
Expand Down
4 changes: 0 additions & 4 deletions UpnpDevice.vb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
Imports System.Xml
Imports System.Text
Imports System.Runtime.Remoting.Messaging
Imports System.Reflection
Imports System.Globalization

Partial Public Class Plugin
Private MustInherit Class UpnpDevice
Expand Down
4 changes: 0 additions & 4 deletions UpnpServer.vb
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
Imports System.Text
Imports System.Xml
Imports System.IO
Imports System.Net
Imports System.Net.NetworkInformation
Imports System.Net.Sockets

Partial Public Class Plugin
Private Class UpnpServer
Expand Down
8 changes: 4 additions & 4 deletions UpnpService.vb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Imports System.Text
Imports System.Xml
Imports System.IO
Imports System.Reflection
Imports System.IO
Imports System.Net
Imports System.Reflection
Imports System.Text
Imports System.Xml

Partial Public Class Plugin
Private MustInherit Class UpnpService
Expand Down
18 changes: 8 additions & 10 deletions UpnpServiceAttributes.vb
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
Imports System.Text

Partial Public Class Plugin
Partial Public Class Plugin
<AttributeUsage(AttributeTargets.[Class], AllowMultiple:=True)> _
Private NotInheritable Class UpnpServiceVariable
Inherits Attribute
Private m_name As String
Private m_dataType As String
Private m_sendEvents As Boolean
Private m_allowedValue As String()
Private ReadOnly m_name As String
Private ReadOnly m_dataType As String
Private ReadOnly m_sendEvents As Boolean
Private ReadOnly m_allowedValue As String()

Public Sub New(name As String, dataType As String, sendEvents As Boolean, ParamArray allowedValue As String())
m_name = name
Expand Down Expand Up @@ -48,9 +46,9 @@ Partial Public Class Plugin
<AttributeUsage(AttributeTargets.Parameter Or AttributeTargets.Method, AllowMultiple:=True)> _
Private NotInheritable Class UpnpServiceArgument
Inherits Attribute
Private m_index As Integer
Private m_name As String
Private m_relatedStateVariable As String
Private ReadOnly m_index As Integer
Private ReadOnly m_name As String
Private ReadOnly m_relatedStateVariable As String

Public Sub New(index As Integer, name As String, relatedStateVariable As String)
m_index = index
Expand Down

0 comments on commit 7829989

Please sign in to comment.