logo e-radio code presentation prepared by abdullah mustafa abu nada120070069 hussian abd-jaleel...

17
LOGO E-Radio code E-Radio code presentation presentation Prepared By Prepared By Abdullah Mustafa Abu Nada Abdullah Mustafa Abu Nada 120070069 120070069 Hussian Abd-Jaleel Shaalan Hussian Abd-Jaleel Shaalan 120070105 120070105 Software group project

Upload: patrick-glenn

Post on 28-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

LOGOLOGO

E-Radio code presentationE-Radio code presentation

Prepared By Prepared By Abdullah Mustafa Abu NadaAbdullah Mustafa Abu Nada 120070069120070069Hussian Abd-Jaleel Shaalan Hussian Abd-Jaleel Shaalan 120070105120070105Nael Wael SkaikNael Wael Skaik 120070275120070275

Software group project

Page 2: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

Contents

Parts of project1

E-radio WEB application2

E-radio Windows application3

4

Page 3: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

Project parts

Windows APP

For streaming audio files from PC. VB.NET

E-Radio

WEB APP

For managing the radio station web site and receive streaming.PHP and MYSQL

Page 4: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

WEB APP

Classes

Main setting ClassMessage Bean Class

DJ bean Class

Integrated software Bean

Playlist Bean Class

Program Bean

Page 5: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

WEB APP

Main setting Class :

This class contains the radio settings (name , description, URL, Port number).

Store this information in DB.

Page 6: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

WEB APP

DJ Class :

This class contains the DJ info. (name , picture , email , Status).

Store this information in database, and display DJ information.

Page 7: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

WEB APP

playlist Class: Create playlists and manage it.

Playlist programs Class: Responsible for adding the programs to playlists with out conflict.

Program Class: Adding programs and manage it.

Time Class: Adding times and manage it.

Page 8: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

WEB APP

Integrated software Class: Responsible for adding the society website links and manage its.

Message Class: Responsible for sending and receiving messages from and to visitor

admins and DJs.

Page 9: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

Desktop APP

BASS API

Streaming

Start severStart severGet audio Get audio filesfiles

Page 10: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

libraries

System. Threading :enable multithreaded programming. In addition to classes for synchronizing thread activities.

System. Net. Sockets :provides a managed implementation of the Windows Sockets.

Page 11: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

Start Server

Start Server()

Start the server (socket) . Determine the total number of connection can be Listen it in the

server . Creates an IP Address instance from an IP address . Identify current port . Identify Directory to get audio files.

Page 12: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

Start Server

Public Function StartServer() As Boolean

CurrentIP = Me.Comboip.Text.Trim Dim address As IPAddress = IPAddress.Parse(CurrentIP) Currentport = TxtPort.Text 'idenfy current port CurrentDir = Me.txtDir.Text 'identfy Directory to GetFiles Dim EndPoint As IPEndPoint = New IPEndPoint(address, Int32.Parse(Currentport)) ss = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Udb)  ss.Listen(20)  ThreadAccept = New Thread(AddressOf ThreadAcceptRun) ThreadAccept.IsBackground = True ThreadAccept.Start() 

Page 13: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

Thread Accept Run()

Thread Accept Run()

Enables our application to have more than one execution path at the same time and multiple connection which IP current listing.

If the Connection accepted , then Initialize the Server class.

Page 14: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

Thread Accept Run() 

Private Sub ThreadAcceptRun() ThreadAcceptRunning = True Do While Not DoStop Try ' Wait for an incoming connections sock = ss.Accep   ' Connection accepted  ' Initialise the Server class Dim ServerRun As New Server(sock, CurrentDir, Me.TxtName.Text)   ' Create a new thread to handle the connection Dim t As Thread = New Thread(AddressOf ServerRun.HandleConnection)   t.IsBackground = True  End Sub  

Page 15: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

The handler for the load event

The handler for the load event Gets the path for the executable file that started in the

application.

create the Directory TMP stream to load the current files(*.mp3) where it run.

Handle Connection Create byte array buffer. Stream byte array by using BASS API.

Page 16: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

Add your company slogan

LOGOLOGO

The handler for the load event

Directory.CreateDirectory(Application.StartupPath & "\tmp_streams") 'CREATE THE Directory TMP STREAM TO LOADED THE CURRENT FILES(*.mp3) WHEN RUN IT   End If Dim filestr As String For Each filestr In Directory.GetFiles(Application.StartupPath & "\tmp_streams", "*.mp3") 'GET THE CRRENT FILES THAT TRANSFER FROM Directory SONGS TO Directory tmp_streams TO RUN IT IN mp3 PROGRAM Try File.Delete(filestr) Catch ex As Exception  End Try

Page 17: LOGO E-Radio code presentation Prepared By Abdullah Mustafa Abu Nada120070069 Hussian Abd-Jaleel Shaalan 120070105 Nael Wael Skaik120070275 Software group

LOGOLOGO