Foros del Web » Programación para mayores de 30 ;) » .NET »

os interesa...

Estas en el tema de os interesa... en el foro de .NET en Foros del Web. HOLA A TODOS SI QUEREIS UNA CLASE CDDB PARA ACCEDER AL SERVIDOR FREEDB PODEMOS ACERLA JUNTOS YA QUE YO DISPONGO DEL CODIGO PARA VISUAL BASIC ...
  #1 (permalink)  
Antiguo 28/01/2004, 11:24
 
Fecha de Ingreso: agosto-2003
Mensajes: 398
Antigüedad: 20 años, 8 meses
Puntos: 0
os interesa...

HOLA A TODOS SI QUEREIS UNA CLASE CDDB PARA ACCEDER AL SERVIDOR FREEDB PODEMOS ACERLA JUNTOS YA QUE YO DISPONGO DEL CODIGO PARA VISUAL BASIC 6.0
PERO YO LO NECESITO PARA VISUAL BASIC .NET
Y QUIERO QUE JUNTOS LO PASEMOS A VISUAL BASIC .NET PARA ELLO YO IRE PONIENDO PARTES DEL CODIGO

AQUI VA LA PRIMERA:





CODE


Option Explicit

'Form handles
Dim frmFuzzy As frmFuzzyMatch
Dim frmSites As frmServerSites
Dim frmSubmit As frmSubmitInfo

'Default Freedb Server to use
Const CDDB_SERVER As String = "freedb.freedb.org"

'Events
Public Event ProtocolError(ByVal Number As Long, ByVal Message As String)

'Enums
Public Enum uCDDBIfc
AUTO
SPTI
ASPI
MCI
End Enum

Public Enum uCDDBMode
TEST
SUBMIT
End Enum

Public Enum uCDDBLang
ENGLISH
GERMAN
FRENCH
End Enum

Public Enum uCDDBMatchCode
MATCH_NONE
MATCH_MULTIPLE
MATCH_EXACT
End Enum

'collections
Private colServers As Collection
Private colTrackNames As Collection
Private colTrackTimes As Collection
Private colTrackNotes As Collection

'properties management
Private strAppName As String
Private strAppVer As String
Private enumCDDBMode As uCDDBMode
Private strCDDBServer As String
Private strUserEmail As String
'lrcuscp 13.5.2002
Private strCDDBFilePath As String

Private m_QueryString As String
Private m_UseFirstMatch As Boolean
Private m_AllowSubmit As Boolean
Private m_QueryLocal As Boolean

Private m_MatchCode As uCDDBMatchCode

Private m_MediaTOC As String
Private m_MediaId As String
Private m_ArtistName As String
Private m_AlbumName As String
Private m_Category As String
Private m_Genre As String
Private m_AlbumSeconds As Integer
Private m_Tracks As Integer
Private m_Notes As String
Private m_Year As String
Private m_Revision As Integer
Private m_CdTextInfo As String



Public Property Get GetMediaID() As String
GetMediaID = m_MediaId
End Property

Public Property Get GetArtistName() As String
GetArtistName = m_ArtistName
End Property

Public Property Get GetAlbumName() As String
GetAlbumName = m_AlbumName
End Property

Public Property Get GetAlbumCategory() As String
GetAlbumCategory = m_Category
End Property

Public Property Get GetAlbumGenre() As String
GetAlbumGenre = m_Category
If (m_Genre <> "") Then GetAlbumGenre = m_Genre
End Property

Public Property Get GetAlbumLength() As Long
GetAlbumLength = m_AlbumSeconds
End Property

Public Property Get GetAlbumTracks() As Long
GetAlbumTracks = m_Tracks
End Property

Public Property Get GetAlbumNotes() As String
GetAlbumNotes = m_Notes
End Property

Public Property Get GetAlbumYear() As String
GetAlbumYear = m_Year
End Property

Public Property Get GetAlbumRevision() As String
GetAlbumRevision = m_Revision
End Property

Public Property Get GetTrackName(idx As Integer) As String
GetTrackName = ""
If (idx > 0 And idx <= colTrackNames.Count) Then
GetTrackName = colTrackNames(idx)
End If
End Property

Public Property Get GetTrackTime(idx As Integer) As Integer
GetTrackTime = 0
If (idx > 0 And idx <= colTrackTimes.Count) Then
GetTrackTime = colTrackTimes(idx)
End If
End Property

Public Property Get GetTrackNotes(idx As Integer) As String
GetTrackNotes = ""
If (idx > 0 And idx <= colTrackNotes.Count) Then
GetTrackNotes = colTrackNotes(idx)
End If
End Property

Public Property Get GetCdText() As String
GetCdText = m_CdTextInfo
End Property


Public Property Get GetServer(idx As Integer) As String
Dim i As Integer
Dim j As Integer
Dim site As String
Dim tmpsite() As String

'process errors here
On Error Resume Next

'pass back a specific server
If (idx > 0 And idx <= colServers.Count) Then
'get site info string, no parsing option
GetServer = colServers(idx)
Else
'populate the servers into the selection box
For i = 1 To colServers.Count
'break down sserver site string to give more clear selection display
tmpsite = Split(colServers(i), " ", 15, vbTextCompare)

site = tmpsite(0) 'server name
site = site & vbTab & tmpsite(4) & _
vbTab & tmpsite(5) & vbTab 'lat and lon

'get the location...
For j = 6 To UBound(tmpsite())
site = site & " " & tmpsite(j)
Next j

'plug it in...
frmSites.lstList.AddItem site
Next i

'get user selection...
i = frmSites.GetSelection()

'server name _only_ returned, we are selecting for them...
tmpsite = Split(colServers(i), " ", 15, vbTextCompare)
GetServer = tmpsite(0)
End If
End Property





TAMBIEN DEBEREIS DECLARAR LAS APIS NECESARIAS.

BUENO AQUI VA LA PRIMERA AHORA OS TOCA A VOSOTROS USTEDES TRADUCIS ESTO A .NET Y YO OS PONGO LA SEGUNDA PARTE ASI PODREIS AÑADIRLE A VUESTRAS APLICACIONES LA POSIBILIDAD DE ACCEDER A FREEDB CON ESTA CLASE QUE ES TOTALMENTE GRATUITA.

SALUDOS OS ESPERO AMIGOS
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:39.