├── lib
├── NAudio.dll
├── taglib-sharp.dll
├── RavenEmbeddedClient
│ ├── log4net.dll
│ ├── Lucene.Net.dll
│ ├── Lucene.Net.pdb
│ ├── Raven.Http.dll
│ ├── Raven.Http.pdb
│ ├── Raven.Munin.dll
│ ├── Raven.Munin.pdb
│ ├── Spatial.Net.dll
│ ├── Esent.Interop.dll
│ ├── Esent.Interop.pdb
│ ├── AsyncCtpLibrary.dll
│ ├── Newtonsoft.Json.dll
│ ├── Newtonsoft.Json.pdb
│ ├── Raven.Database.dll
│ ├── Raven.Database.pdb
│ ├── SpellChecker.Net.dll
│ ├── Raven.Abstractions.dll
│ ├── Raven.Abstractions.pdb
│ ├── Raven.Client.Embedded.dll
│ ├── Raven.Client.Embedded.pdb
│ ├── Raven.Storage.Esent.dll
│ ├── Raven.Storage.Esent.pdb
│ ├── Raven.Storage.Managed.dll
│ ├── Raven.Storage.Managed.pdb
│ ├── ICSharpCode.NRefactory.dll
│ ├── Raven.Client.Lightweight.dll
│ └── Raven.Client.Lightweight.pdb
└── RavenClient
│ ├── MissingBitsFromClientProfile.dll
│ └── MissingBitsFromClientProfile.pdb
├── ProgettoMalgeri.suo
├── wpf-player
├── MyIco.ico
├── header.jpg
├── Images
│ ├── db.png
│ ├── info.png
│ ├── load.png
│ ├── play.png
│ ├── stop.png
│ ├── network.png
│ ├── pause.png
│ ├── app_exit.png
│ ├── info_black.png
│ ├── global_network.png
│ ├── playback_pause.png
│ ├── playback_play.png
│ ├── playback_stop.png
│ ├── document_refresh.png
│ ├── folder_database.png
│ └── media_volume_2_inv.png
├── Application.ico
├── headphones.bmp
├── headphones.ico
├── info_black.png
├── Fonts
│ ├── segoeui.ttf
│ ├── segoeuib.ttf
│ ├── segoeuii.ttf
│ ├── segoeuil.ttf
│ ├── segoeuiz.ttf
│ └── seguisb.ttf
├── Views
│ ├── playback_play.png
│ ├── playback_stop.png
│ └── playback_pause.png
├── NodesGetter.cs
├── NodesGetter.Designer.cs
├── App.xaml.cs
├── TrackDetailDialog.xaml
├── App.xaml
├── PositionIndicator.xaml.cs
├── TrackDetailDialog.xaml.cs
├── AppSplashDialog.xaml.cs
├── CircularProgressBar.xaml.cs
├── AboutDialog.xaml.cs
├── app.manifest
├── PositionIndicator.xaml
├── BooleanInverter.cs
└── AppSplashDialog.xaml
├── p2p-player
├── favicon.ico
├── sound_high.png
├── Views
│ ├── playback_stop.png
│ ├── playback_pause.png
│ ├── PlayerDictionary.xaml
│ ├── MainView.xaml.cs
│ ├── SearchList.xaml.cs
│ ├── AudioPlayer.xaml.cs
│ ├── MainView.xaml
│ └── SearchList.xaml
├── Images
│ ├── playback_pause.png
│ ├── playback_play.png
│ └── playback_stop.png
├── Properties
│ ├── AppManifest.xml
│ ├── OutOfBrowserSettings.xml
│ └── AssemblyInfo.cs
├── ServiceReferences.ClientConfig
├── p2p-player.csproj.user
├── SampleData
│ └── MainViewModelSampleData.xaml
├── MainDictionary.xaml
├── MainPage.xaml.cs
├── App.xaml
├── ViewModels
│ ├── SearchListModel.cs
│ ├── MainViewModel.cs
│ └── AudioPlayerModel.cs
└── MainPage.xaml
├── Documentation
├── GetRequest.png
├── PutRequest.png
└── AcademicPresentation
│ ├── snap1.jpg
│ ├── snap2.jpg
│ ├── p2p-player.pdf
│ ├── p2p-player.pptx
│ ├── template_main.jpg
│ ├── beyond_the_scene.dia
│ ├── beyond_the_scene.jpeg
│ ├── semantic_keyword.dia
│ ├── semantic_keyword.jpeg
│ └── template_internal.jpg
├── Examples
├── Resource
│ ├── Garden.mp3
│ └── SevenMP3.mp3
├── app.config
├── Properties
│ └── AssemblyInfo.cs
└── ProgrammingExamples.cs
├── Kademlia
├── Kademlia
│ ├── Kademlia.csproj.user
│ ├── Messages
│ │ ├── MessageEventHandler.cs
│ │ ├── Response.cs
│ │ ├── Ping.cs
│ │ ├── Pong.cs
│ │ ├── FindNode.cs
│ │ ├── FindValue.cs
│ │ ├── FindValueContactResponse.cs
│ │ ├── FindValueDataResponse.cs
│ │ ├── StoreResponse.cs
│ │ ├── FindNodeResponse.cs
│ │ └── StoreQuery.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Contact.cs
└── KademliaTester
│ ├── KademliaTester.csproj.user
│ ├── app.config
│ └── Properties
│ └── AssemblyInfo.cs
├── WebServer
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── app.manifest
│ └── AssemblyInfo.cs
└── Settings.cs
├── httpserver.py
├── nodes.xml
├── add_agpl_preamble.sh
├── add_agpl_preamble_xaml.sh
├── cli-peer
├── Properties
│ └── AssemblyInfo.cs
├── app.manifest
└── PeerRunner.cs
├── UdpBinding
├── UdpBindingCollectionElement.cs
├── UdpBindingConfigurationElement.cs
└── Properties
│ └── AssemblyInfo.cs
├── Persistence
├── IDocumentType.cs
├── ILoadable.cs
├── DhtElementComparer.cs
├── Properties
│ └── AssemblyInfo.cs
└── RepositoryConfiguration.cs
├── Metrics
├── Properties
│ └── AssemblyInfo.cs
├── Metrics.csproj
└── FileQualityCoefficient.cs
├── TransportService
├── Messages
│ ├── ChunkRequest.cs
│ ├── GenericMessage.cs
│ ├── AbstractMessage.cs
│ └── ChunkResponse.cs
├── Properties
│ └── AssemblyInfo.cs
├── ThreadPool.cs
└── ITransportProtocol.cs
└── README
/lib/NAudio.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/NAudio.dll
--------------------------------------------------------------------------------
/ProgettoMalgeri.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/ProgettoMalgeri.suo
--------------------------------------------------------------------------------
/lib/taglib-sharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/taglib-sharp.dll
--------------------------------------------------------------------------------
/wpf-player/MyIco.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/MyIco.ico
--------------------------------------------------------------------------------
/wpf-player/header.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/header.jpg
--------------------------------------------------------------------------------
/p2p-player/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/p2p-player/favicon.ico
--------------------------------------------------------------------------------
/wpf-player/Images/db.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/db.png
--------------------------------------------------------------------------------
/p2p-player/sound_high.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/p2p-player/sound_high.png
--------------------------------------------------------------------------------
/wpf-player/Application.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Application.ico
--------------------------------------------------------------------------------
/wpf-player/Images/info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/info.png
--------------------------------------------------------------------------------
/wpf-player/Images/load.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/load.png
--------------------------------------------------------------------------------
/wpf-player/Images/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/play.png
--------------------------------------------------------------------------------
/wpf-player/Images/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/stop.png
--------------------------------------------------------------------------------
/wpf-player/headphones.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/headphones.bmp
--------------------------------------------------------------------------------
/wpf-player/headphones.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/headphones.ico
--------------------------------------------------------------------------------
/wpf-player/info_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/info_black.png
--------------------------------------------------------------------------------
/Documentation/GetRequest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Documentation/GetRequest.png
--------------------------------------------------------------------------------
/Documentation/PutRequest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Documentation/PutRequest.png
--------------------------------------------------------------------------------
/Examples/Resource/Garden.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Examples/Resource/Garden.mp3
--------------------------------------------------------------------------------
/wpf-player/Fonts/segoeui.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Fonts/segoeui.ttf
--------------------------------------------------------------------------------
/wpf-player/Fonts/segoeuib.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Fonts/segoeuib.ttf
--------------------------------------------------------------------------------
/wpf-player/Fonts/segoeuii.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Fonts/segoeuii.ttf
--------------------------------------------------------------------------------
/wpf-player/Fonts/segoeuil.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Fonts/segoeuil.ttf
--------------------------------------------------------------------------------
/wpf-player/Fonts/segoeuiz.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Fonts/segoeuiz.ttf
--------------------------------------------------------------------------------
/wpf-player/Fonts/seguisb.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Fonts/seguisb.ttf
--------------------------------------------------------------------------------
/wpf-player/Images/network.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/network.png
--------------------------------------------------------------------------------
/wpf-player/Images/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/pause.png
--------------------------------------------------------------------------------
/Examples/Resource/SevenMP3.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Examples/Resource/SevenMP3.mp3
--------------------------------------------------------------------------------
/wpf-player/Images/app_exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/app_exit.png
--------------------------------------------------------------------------------
/p2p-player/Views/playback_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/p2p-player/Views/playback_stop.png
--------------------------------------------------------------------------------
/wpf-player/Images/info_black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/info_black.png
--------------------------------------------------------------------------------
/wpf-player/Views/playback_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Views/playback_play.png
--------------------------------------------------------------------------------
/wpf-player/Views/playback_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Views/playback_stop.png
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/log4net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/log4net.dll
--------------------------------------------------------------------------------
/p2p-player/Images/playback_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/p2p-player/Images/playback_pause.png
--------------------------------------------------------------------------------
/p2p-player/Images/playback_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/p2p-player/Images/playback_play.png
--------------------------------------------------------------------------------
/p2p-player/Images/playback_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/p2p-player/Images/playback_stop.png
--------------------------------------------------------------------------------
/p2p-player/Views/playback_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/p2p-player/Views/playback_pause.png
--------------------------------------------------------------------------------
/wpf-player/Images/global_network.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/global_network.png
--------------------------------------------------------------------------------
/wpf-player/Images/playback_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/playback_pause.png
--------------------------------------------------------------------------------
/wpf-player/Images/playback_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/playback_play.png
--------------------------------------------------------------------------------
/wpf-player/Images/playback_stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/playback_stop.png
--------------------------------------------------------------------------------
/wpf-player/Views/playback_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Views/playback_pause.png
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Lucene.Net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Lucene.Net.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Lucene.Net.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Lucene.Net.pdb
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Http.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Http.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Http.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Http.pdb
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Munin.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Munin.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Munin.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Munin.pdb
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Spatial.Net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Spatial.Net.dll
--------------------------------------------------------------------------------
/wpf-player/Images/document_refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/document_refresh.png
--------------------------------------------------------------------------------
/wpf-player/Images/folder_database.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/folder_database.png
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Esent.Interop.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Esent.Interop.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Esent.Interop.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Esent.Interop.pdb
--------------------------------------------------------------------------------
/wpf-player/Images/media_volume_2_inv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/wpf-player/Images/media_volume_2_inv.png
--------------------------------------------------------------------------------
/Documentation/AcademicPresentation/snap1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Documentation/AcademicPresentation/snap1.jpg
--------------------------------------------------------------------------------
/Documentation/AcademicPresentation/snap2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Documentation/AcademicPresentation/snap2.jpg
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/AsyncCtpLibrary.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/AsyncCtpLibrary.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Newtonsoft.Json.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Newtonsoft.Json.pdb
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Database.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Database.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Database.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Database.pdb
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/SpellChecker.Net.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/SpellChecker.Net.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Abstractions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Abstractions.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Abstractions.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Abstractions.pdb
--------------------------------------------------------------------------------
/Documentation/AcademicPresentation/p2p-player.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Documentation/AcademicPresentation/p2p-player.pdf
--------------------------------------------------------------------------------
/lib/RavenClient/MissingBitsFromClientProfile.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenClient/MissingBitsFromClientProfile.dll
--------------------------------------------------------------------------------
/lib/RavenClient/MissingBitsFromClientProfile.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenClient/MissingBitsFromClientProfile.pdb
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Client.Embedded.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Client.Embedded.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Client.Embedded.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Client.Embedded.pdb
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Storage.Esent.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Storage.Esent.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Storage.Esent.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Storage.Esent.pdb
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Storage.Managed.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Storage.Managed.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Storage.Managed.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Storage.Managed.pdb
--------------------------------------------------------------------------------
/Documentation/AcademicPresentation/p2p-player.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Documentation/AcademicPresentation/p2p-player.pptx
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/ICSharpCode.NRefactory.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/ICSharpCode.NRefactory.dll
--------------------------------------------------------------------------------
/Documentation/AcademicPresentation/template_main.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Documentation/AcademicPresentation/template_main.jpg
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Client.Lightweight.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Client.Lightweight.dll
--------------------------------------------------------------------------------
/lib/RavenEmbeddedClient/Raven.Client.Lightweight.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/lib/RavenEmbeddedClient/Raven.Client.Lightweight.pdb
--------------------------------------------------------------------------------
/Documentation/AcademicPresentation/beyond_the_scene.dia:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Documentation/AcademicPresentation/beyond_the_scene.dia
--------------------------------------------------------------------------------
/Documentation/AcademicPresentation/beyond_the_scene.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Documentation/AcademicPresentation/beyond_the_scene.jpeg
--------------------------------------------------------------------------------
/Documentation/AcademicPresentation/semantic_keyword.dia:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Documentation/AcademicPresentation/semantic_keyword.dia
--------------------------------------------------------------------------------
/Documentation/AcademicPresentation/semantic_keyword.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Documentation/AcademicPresentation/semantic_keyword.jpeg
--------------------------------------------------------------------------------
/Documentation/AcademicPresentation/template_internal.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zencoders/sambatyon/HEAD/Documentation/AcademicPresentation/template_internal.jpg
--------------------------------------------------------------------------------
/p2p-player/Properties/AppManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Kademlia.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | it-IT
11 | false
12 |
13 |
--------------------------------------------------------------------------------
/Kademlia/KademliaTester/KademliaTester.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | it-IT
11 | false
12 |
13 |
--------------------------------------------------------------------------------
/WebServer/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 9997
7 |
8 |
9 | 10000
10 |
11 |
12 |
--------------------------------------------------------------------------------
/p2p-player/Properties/OutOfBrowserSettings.xml:
--------------------------------------------------------------------------------
1 |
2 | Applicazione p2p-player sul desktop, a casa, in ufficio o in viaggio.
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/p2p-player/ServiceReferences.ClientConfig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 |
9 |
10 |
11 |
12 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/httpserver.py:
--------------------------------------------------------------------------------
1 | import string, cgi, time
2 | from os import curdir, sep
3 | from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
4 |
5 | class Handler(BaseHTTPRequestHandler):
6 | def do_GET(self):
7 | try:
8 | f = open(curdir + sep + 'nodes.xml')
9 | self.send_response(200)
10 | self.send_header('Content-type', 'application/xml')
11 | self.end_headers()
12 | self.wfile.write(f.read())
13 | f.close()
14 | return
15 | except IOError:
16 | self.send_error(404, 'File not found!')
17 |
18 | def main():
19 | try:
20 | server = HTTPServer(('',8000), Handler)
21 | print 'started httpserver....'
22 | server.serve_forever()
23 | except KeyboardInterrupt:
24 | print '^C received, shutting down'
25 | server.socket.close()
26 |
27 | if __name__ == '__main__':
28 | main()
--------------------------------------------------------------------------------
/nodes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 192.168.0.4
5 | 10000
6 |
7 |
8 | 192.168.0.4
9 | 10001
10 |
11 |
12 | 192.168.0.4
13 | 10002
14 |
15 |
16 | 192.168.0.4
17 | 10003
18 |
19 |
20 | 192.168.0.4
21 | 10004
22 |
23 |
24 | 192.168.0.3
25 | 10000
26 |
27 |
28 | 192.168.0.3
29 | 10001
30 |
31 |
32 | 192.168.0.3
33 | 10002
34 |
35 |
36 | 192.168.0.3
37 | 10003
38 |
39 |
40 | 192.168.0.3
41 | 10004
42 |
43 |
--------------------------------------------------------------------------------
/p2p-player/p2p-player.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | OfflineApplication
10 | True
11 | False
12 | False
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | True
22 | p2p-player
23 | True
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/wpf-player/NodesGetter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Configuration.Install;
6 | using System.Linq;
7 | using System.Net;
8 |
9 |
10 | namespace wpf_player
11 | {
12 | [RunInstaller(true)]
13 | public partial class NodesGetter : System.Configuration.Install.Installer
14 | {
15 | ///
16 | /// Default constructor
17 | ///
18 | public NodesGetter()
19 | {
20 | InitializeComponent();
21 | }
22 | ///
23 | /// Method called during installation. This method downloads the nodes file.
24 | ///
25 | ///
26 | public override void Install(IDictionary stateSaver)
27 | {
28 | base.Install(stateSaver);
29 | WebClient webClient = new WebClient();
30 | try
31 | {
32 | webClient.DownloadFile("http://localhost:8000/nodes.xml", Context.Parameters["targetdir"] + "\\Resource\\nodes.xml");
33 | }
34 | catch (Exception e)
35 | {
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Examples/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/wpf-player/NodesGetter.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace wpf_player
2 | {
3 | ///
4 | /// Installer class used to download the nodes file
5 | ///
6 | partial class NodesGetter
7 | {
8 | ///
9 | /// Variabile di progettazione necessaria.
10 | ///
11 | private System.ComponentModel.IContainer components = null;
12 |
13 | ///
14 | /// Liberare le risorse in uso.
15 | ///
16 | /// ha valore true se le risorse gestite devono essere eliminate, false in caso contrario.
17 | protected override void Dispose(bool disposing)
18 | {
19 | if (disposing && (components != null))
20 | {
21 | components.Dispose();
22 | }
23 | base.Dispose(disposing);
24 | }
25 |
26 | #region Codice generato da Progettazione componenti
27 |
28 | ///
29 | /// Metodo necessario per il supporto della finestra di progettazione. Non modificare
30 | /// il contenuto del metodo con l'editor di codice.
31 | ///
32 | private void InitializeComponent()
33 | {
34 | components = new System.ComponentModel.Container();
35 | }
36 |
37 | #endregion
38 | }
39 | }
--------------------------------------------------------------------------------
/p2p-player/SampleData/MainViewModelSampleData.xaml:
--------------------------------------------------------------------------------
1 |
28 |
29 |
--------------------------------------------------------------------------------
/add_agpl_preamble.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #sed -i '1s/\(.*\)/\/* kasdkaosdkoaskdoaskdoaskdoaskokaos \n asdkoakdoakdosakdoaskdosakdoad $ *\/\n\1/' prova.txt
4 |
5 | AGPL="1s/\(.*\)/\/*****************************************************************************************\n * p2p-player\n * An audio player developed in C# based on a shared base to obtain the music from.\n * \n * Copyright \(C\) 2010-2011 Dario Mazza, Sebastiano Merlino\n *\n * This program is free software: you can redistribute it and\/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or \(at your option\) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n * \n * Dario Mazza \(dariomzz@gmail.com\)\n * Sebastiano Merlino \(etr@pensieroartificiale.com\)\n * Full Source and Documentation available on Google Code Project \"p2p-player\", \n * see \n *\n ******************************************************************************************\/\n\n\1/"
6 |
7 | echo "sed -i ${AGPL} ..."
8 | for i in `find -iname "*.cs"`; do sed -i "${AGPL}" $i ; done;
9 |
10 | #sed -i '1s/\(.*\)/$AGPL\1/' Metrics/FileQualityCoefficient.cs
11 |
12 |
--------------------------------------------------------------------------------
/p2p-player/MainDictionary.xaml:
--------------------------------------------------------------------------------
1 |
28 |
31 |
32 |
--------------------------------------------------------------------------------
/add_agpl_preamble_xaml.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #sed -i '1s/\(.*\)/\/* kasdkaosdkoaskdoaskdoaskdoaskokaos \n asdkoakdoakdosakdoaskdosakdoad $ *\/\n\1/' prova.txt
4 |
5 | AGPL="1s/\(.*\)/\n\1/"
6 |
7 | echo "sed -i ${AGPL} ..."
8 | for i in `find -iname "*.xaml"`; do sed -i "${AGPL}" $i ; done;
9 |
10 | #sed -i '1s/\(.*\)/$AGPL\1/' Metrics/FileQualityCoefficient.cs
11 |
12 |
--------------------------------------------------------------------------------
/p2p-player/Views/PlayerDictionary.xaml:
--------------------------------------------------------------------------------
1 |
28 |
31 |
32 |
--------------------------------------------------------------------------------
/wpf-player/App.xaml.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Configuration;
30 | using System.Data;
31 | using System.Windows;
32 |
33 | namespace wpf_player
34 | {
35 | ///
36 | /// Interaction logic for App.xaml
37 | ///
38 | public partial class App : Application
39 | {
40 | }
41 | }
--------------------------------------------------------------------------------
/wpf-player/TrackDetailDialog.xaml:
--------------------------------------------------------------------------------
1 |
28 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/wpf-player/App.xaml:
--------------------------------------------------------------------------------
1 |
2 | /*****************************************************************************************
3 | * p2p-player
4 | * An audio player developed in C# based on a shared base to obtain the music from.
5 | *
6 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
7 | *
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as
10 | * published by the Free Software Foundation, either version 3 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU Affero General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU Affero General Public License
19 | * along with this program. If not, see .
20 | *
21 | * Dario Mazza (dariomzz@gmail.com)
22 | * Sebastiano Merlino (etr@pensieroartificiale.com)
23 | * Full Source and Documentation available on Google Code Project "p2p-player",
24 | * see
25 | *
26 | ******************************************************************************************/
27 |
28 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/cli-peer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Le informazioni generali relative a un assembly sono controllate dal seguente
6 | // set di attributi. Per modificare le informazioni associate a un assembly
7 | // occorre quindi modificare i valori di questi attributi.
8 | [assembly: AssemblyTitle("cli-peer")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("cli-peer")]
13 | [assembly: AssemblyCopyright("")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
18 | // ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
19 | // COM, impostare su true l'attributo ComVisible per tale tipo.
20 | [assembly: ComVisible(false)]
21 |
22 | // Se il progetto viene esposto a COM, il GUID che segue verrà utilizzato per creare l'ID della libreria dei tipi
23 | [assembly: Guid("71a88fa7-43df-4c7e-84ec-7b8e044cc77f")]
24 |
25 | // Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
26 | //
27 | // Numero di versione principale
28 | // Numero di versione secondario
29 | // Numero build
30 | // Revisione
31 | //
32 | // È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
33 | // utilizzando l'asterisco (*) come descritto di seguito:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/UdpBinding/UdpBindingCollectionElement.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System.ServiceModel.Configuration;
28 | using System.ServiceModel.Channels;
29 |
30 | namespace UdpTransportBinding
31 | {
32 | ///
33 | /// Binding Section for Udp. Implements configuration for SampleProfileUdpBinding.
34 | ///
35 | public class UdpBindingCollectionElement : StandardBindingCollectionElement
36 | {
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Messages/MessageEventHandler.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | /*
28 | * Created by SharpDevelop.
29 | * User: anovak
30 | * Date: 6/22/2010
31 | * Time: 10:23 PM
32 | *
33 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
34 | */
35 | using System;
36 |
37 | namespace Kademlia.Messages
38 | {
39 | ///
40 | /// A delegate for handling message events.
41 | ///
42 | public delegate void MessageEventHandler(Contact sender, T message) where T : Message;
43 | }
44 |
--------------------------------------------------------------------------------
/p2p-player/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Windows;
29 | using System.Windows.Controls;
30 | using System.Windows.Documents;
31 | using System.Windows.Ink;
32 | using System.Windows.Input;
33 | using System.Windows.Media;
34 | using System.Windows.Media.Animation;
35 | using System.Windows.Shapes;
36 |
37 | namespace p2p_player
38 | {
39 | public partial class MainPage : UserControl
40 | {
41 | public MainPage()
42 | {
43 | // Required to initialize variables
44 | InitializeComponent();
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/p2p-player/Views/MainView.xaml.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Windows;
29 | using System.Windows.Controls;
30 | using System.Windows.Documents;
31 | using System.Windows.Ink;
32 | using System.Windows.Input;
33 | using System.Windows.Media;
34 | using System.Windows.Media.Animation;
35 | using System.Windows.Shapes;
36 |
37 | namespace p2p_player
38 | {
39 | public partial class MainView : UserControl
40 | {
41 | public MainView()
42 | {
43 | // Required to initialize variables
44 | InitializeComponent();
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/p2p-player/App.xaml:
--------------------------------------------------------------------------------
1 |
28 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Persistence/IDocumentType.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 |
32 | namespace Persistence
33 | {
34 | ///
35 | /// Interface that describes a Document that will be stored in a Repository.
36 | /// The unique constrait for this type is the presence of a property called Id.
37 | ///
38 | public interface IDocumentType
39 | {
40 | ///
41 | /// Identifier of the document.
42 | ///
43 | string Id
44 | {
45 | get;
46 | set;
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/p2p-player/ViewModels/SearchListModel.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Text;
30 | using System.Windows.Data;
31 | using System.ComponentModel;
32 | using System.Collections.ObjectModel;
33 |
34 | namespace p2p_player
35 | {
36 | public class SearchListModel : INotifyPropertyChanged
37 | {
38 | public SearchListModel()
39 | {
40 |
41 | }
42 |
43 | #region INotifyPropertyChanged
44 | public event PropertyChangedEventHandler PropertyChanged;
45 |
46 | private void NotifyPropertyChanged(String info)
47 | {
48 | if (PropertyChanged != null)
49 | {
50 | PropertyChanged(this, new PropertyChangedEventArgs(info));
51 | }
52 | }
53 | #endregion
54 | }
55 | }
--------------------------------------------------------------------------------
/p2p-player/Views/SearchList.xaml.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Text;
30 | using System.Windows;
31 | using System.Windows.Controls;
32 | using System.Windows.Data;
33 | using System.Windows.Documents;
34 | using System.Windows.Input;
35 | using System.Windows.Media;
36 | using System.Windows.Media.Imaging;
37 | using System.Windows.Shapes;
38 |
39 | namespace p2p_player
40 | {
41 | ///
42 | /// Logica di interazione per SearchList.xaml
43 | ///
44 | public partial class SearchList : UserControl
45 | {
46 | public SearchList()
47 | {
48 | this.InitializeComponent();
49 |
50 | // Inserire il codice richiesto per la creazione dell'oggetto al di sotto di questo punto.
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/Kademlia/KademliaTester/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
11 |
12 |
14 |
15 |
16 |
17 |
21 |
22 |
23 |
24 |
27 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/p2p-player/Views/AudioPlayer.xaml.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Text;
30 | using System.Windows;
31 | using System.Windows.Controls;
32 | using System.Windows.Data;
33 | using System.Windows.Documents;
34 | using System.Windows.Input;
35 | using System.Windows.Media;
36 | using System.Windows.Media.Imaging;
37 | using System.Windows.Shapes;
38 | using System.IO;
39 |
40 | namespace p2p_player
41 | {
42 | ///
43 | /// Logica di interazione per AudioPlayer.xaml
44 | ///
45 | public partial class AudioPlayer : UserControl
46 | {
47 | public AudioPlayer()
48 | {
49 | this.InitializeComponent();
50 | // Inserire il codice richiesto per la creazione dell'oggetto al di sotto di questo punto.
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/wpf-player/PositionIndicator.xaml.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Text;
30 | using System.Windows;
31 | using System.Windows.Controls;
32 | using System.Windows.Data;
33 | using System.Windows.Documents;
34 | using System.Windows.Input;
35 | using System.Windows.Media;
36 | using System.Windows.Media.Imaging;
37 | using System.Windows.Navigation;
38 | using System.Windows.Shapes;
39 |
40 | namespace wpf_player
41 | {
42 | ///
43 | /// Logica di interazione per PositionIndicator.xaml
44 | ///
45 | public partial class PositionIndicator : UserControl
46 | {
47 | ///
48 | /// Default constructor
49 | ///
50 | public PositionIndicator()
51 | {
52 | this.InitializeComponent();
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/wpf-player/TrackDetailDialog.xaml.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Text;
30 | using System.Windows;
31 | using System.Windows.Controls;
32 | using System.Windows.Data;
33 | using System.Windows.Documents;
34 | using System.Windows.Input;
35 | using System.Windows.Media;
36 | using System.Windows.Media.Imaging;
37 | using System.Windows.Shapes;
38 |
39 | namespace wpf_player
40 | {
41 | ///
42 | /// Logica di interazione per TrackDetailDialog.xaml
43 | ///
44 | public partial class TrackDetailDialog : Window
45 | {
46 | ///
47 | /// Default Constructor
48 | ///
49 | public TrackDetailDialog()
50 | {
51 | this.InitializeComponent();
52 |
53 | // Inserire il codice richiesto per la creazione dell'oggetto al di sotto di questo punto.
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/WebServer/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Il codice è stato generato da uno strumento.
4 | // Versione runtime:4.0.30319.1
5 | //
6 | // Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
7 | // il codice viene rigenerato.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace PeerLibrary.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.UserScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("9997")]
29 | public string udpPort {
30 | get {
31 | return ((string)(this["udpPort"]));
32 | }
33 | set {
34 | this["udpPort"] = value;
35 | }
36 | }
37 |
38 | [global::System.Configuration.UserScopedSettingAttribute()]
39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40 | [global::System.Configuration.DefaultSettingValueAttribute("10000")]
41 | public string kademliaPort {
42 | get {
43 | return ((string)(this["kademliaPort"]));
44 | }
45 | set {
46 | this["kademliaPort"] = value;
47 | }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/wpf-player/AppSplashDialog.xaml.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Text;
30 | using System.Windows;
31 | using System.Windows.Controls;
32 | using System.Windows.Data;
33 | using System.Windows.Documents;
34 | using System.Windows.Input;
35 | using System.Windows.Media;
36 | using System.Windows.Media.Imaging;
37 | using System.Windows.Shapes;
38 | using System.Windows.Media.Animation;
39 |
40 | namespace wpf_player
41 | {
42 | ///
43 | /// Logica di interazione per AppSplashDialog.xaml
44 | ///
45 | public partial class AppSplashDialog : Window
46 | {
47 | ///
48 | /// Default constructor
49 | ///
50 | public AppSplashDialog()
51 | {
52 | this.InitializeComponent();
53 | // Inserire il codice richiesto per la creazione dell'oggetto al di sotto di questo punto.
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Messages/Response.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 | using System.ServiceModel;
33 |
34 | namespace Kademlia.Messages
35 | {
36 | ///
37 | /// Represents a response message, in the same conversation as an original message.
38 | ///
39 | [DataContract]
40 | public abstract class Response : Message
41 | {
42 | ///
43 | /// Make a reply in the same conversation as the given message.
44 | ///
45 | /// The sender node identificator
46 | /// The message the node is responding to
47 | /// The address of the sender
48 | public Response(ID nodeID, Message respondingTo, Uri nodeEndpoint) : base(nodeID, respondingTo.ConversationID, nodeEndpoint)
49 | {
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Messages/Ping.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 | using System.ServiceModel;
33 |
34 | namespace Kademlia.Messages
35 | {
36 | ///
37 | /// Represents a ping message, used to see if a remote node is up.
38 | ///
39 | [DataContract]
40 | public class Ping : Message
41 | {
42 | ///
43 | /// Constructor of the ping message class
44 | ///
45 | /// Identificator of te sender
46 | /// Endpoint of the sender
47 | public Ping(ID senderID, Uri nodeEndpoint) : base(senderID, nodeEndpoint)
48 | {
49 | }
50 |
51 | ///
52 | /// Default Property indicating the name of the message.
53 | ///
54 | [DataMember]
55 | public override string Name
56 | {
57 | get { return "PING"; }
58 | set { }
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Messages/Pong.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 | using System.ServiceModel;
33 |
34 | namespace Kademlia.Messages
35 | {
36 | ///
37 | /// Represents a ping reply.
38 | ///
39 | [DataContract]
40 | public class Pong : Response
41 | {
42 | ///
43 | /// Constructor of the Ping class
44 | ///
45 | /// Identificator of the Sender
46 | /// Ping message originating the pong
47 | /// URI endpoint of the Sender
48 | public Pong(ID senderID, Ping ping, Uri nodeEndpoint) : base(senderID, ping, nodeEndpoint)
49 | {
50 | }
51 |
52 | ///
53 | /// Name of the message
54 | ///
55 | [DataMember]
56 | public override string Name
57 | {
58 | get { return "PONG"; }
59 | set { }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/p2p-player/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
28 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/wpf-player/CircularProgressBar.xaml.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | namespace Progress
28 | {
29 | #region #using Directives
30 |
31 | using System.Windows;
32 | using System.Windows.Controls;
33 | using System.Windows.Media.Animation;
34 |
35 | #endregion
36 |
37 | ///
38 | /// Provides a circular progress bar
39 | ///
40 | public partial class CircularProgressBar : UserControl
41 | {
42 | static CircularProgressBar()
43 | {
44 | //Use a default Animation Framerate of 30, which uses less CPU time
45 | //than the standard 50 which you get out of the box
46 | Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline), new FrameworkPropertyMetadata {
47 | DefaultValue = 30
48 | });
49 | }
50 | ///
51 | /// Default Constructor
52 | ///
53 | public CircularProgressBar()
54 | {
55 | InitializeComponent();
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/wpf-player/AboutDialog.xaml.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Text;
30 | using System.Windows;
31 | using System.Windows.Controls;
32 | using System.Windows.Data;
33 | using System.Windows.Documents;
34 | using System.Windows.Input;
35 | using System.Windows.Media;
36 | using System.Windows.Media.Imaging;
37 | using System.Windows.Shapes;
38 |
39 | namespace wpf_player
40 | {
41 | ///
42 | /// Logica di interazione per AboutDialog.xaml
43 | ///
44 | public partial class AboutDialog : Window
45 | {
46 | ///
47 | /// Default Constructor
48 | ///
49 | public AboutDialog()
50 | {
51 | this.InitializeComponent();
52 |
53 | // Inserire il codice richiesto per la creazione dell'oggetto al di sotto di questo punto.
54 | }
55 | ///
56 | /// Ok button click handler. This method closes the dialog
57 | ///
58 | ///
59 | ///
60 | private void okButton_Click(object sender, System.Windows.RoutedEventArgs e)
61 | {
62 | this.Close();
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | #region Using directives
28 |
29 | using System;
30 | using System.Reflection;
31 | using System.Runtime.InteropServices;
32 |
33 | #endregion
34 |
35 | // General Information about an assembly is controlled through the following
36 | // set of attributes. Change these attribute values to modify the information
37 | // associated with an assembly.
38 | [assembly: AssemblyTitle("Kademlia")]
39 | [assembly: AssemblyDescription("")]
40 | [assembly: AssemblyConfiguration("")]
41 | [assembly: AssemblyCompany("")]
42 | [assembly: AssemblyProduct("Kademlia")]
43 | [assembly: AssemblyCopyright("")]
44 | [assembly: AssemblyTrademark("")]
45 | [assembly: AssemblyCulture("")]
46 |
47 | // This sets the default COM visibility of types in the assembly to invisible.
48 | // If you need to expose a type to COM, use [ComVisible(true)] on that type.
49 | [assembly: ComVisible(false)]
50 |
51 | // The assembly version has following format :
52 | //
53 | // Major.Minor.Build.Revision
54 | //
55 | // You can specify all the values or you can use the default the Revision and
56 | // Build Numbers by using the '*' as shown below:
57 | [assembly: AssemblyVersion("0.2.*")]
58 |
--------------------------------------------------------------------------------
/Metrics/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | #region Using directives
28 |
29 | using System;
30 | using System.Reflection;
31 | using System.Runtime.InteropServices;
32 |
33 | #endregion
34 |
35 | // General Information about an assembly is controlled through the following
36 | // set of attributes. Change these attribute values to modify the information
37 | // associated with an assembly.
38 | [assembly: AssemblyTitle("Metrics")]
39 | [assembly: AssemblyDescription("")]
40 | [assembly: AssemblyConfiguration("")]
41 | [assembly: AssemblyCompany("")]
42 | [assembly: AssemblyProduct("Metrics")]
43 | [assembly: AssemblyCopyright("Copyright 2010")]
44 | [assembly: AssemblyTrademark("")]
45 | [assembly: AssemblyCulture("")]
46 |
47 | // This sets the default COM visibility of types in the assembly to invisible.
48 | // If you need to expose a type to COM, use [ComVisible(true)] on that type.
49 | [assembly: ComVisible(false)]
50 |
51 | // The assembly version has following format :
52 | //
53 | // Major.Minor.Build.Revision
54 | //
55 | // You can specify all the values or you can use the default the Revision and
56 | // Build Numbers by using the '*' as shown below:
57 | [assembly: AssemblyVersion("1.0.*")]
58 |
--------------------------------------------------------------------------------
/Kademlia/KademliaTester/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | #region Using directives
28 |
29 | using System;
30 | using System.Reflection;
31 | using System.Runtime.InteropServices;
32 |
33 | #endregion
34 |
35 | // General Information about an assembly is controlled through the following
36 | // set of attributes. Change these attribute values to modify the information
37 | // associated with an assembly.
38 | [assembly: AssemblyTitle("KademliaTester")]
39 | [assembly: AssemblyDescription("")]
40 | [assembly: AssemblyConfiguration("")]
41 | [assembly: AssemblyCompany("")]
42 | [assembly: AssemblyProduct("KademliaTester")]
43 | [assembly: AssemblyCopyright("")]
44 | [assembly: AssemblyTrademark("")]
45 | [assembly: AssemblyCulture("")]
46 |
47 | // This sets the default COM visibility of types in the assembly to invisible.
48 | // If you need to expose a type to COM, use [ComVisible(true)] on that type.
49 | [assembly: ComVisible(false)]
50 |
51 | // The assembly version has following format :
52 | //
53 | // Major.Minor.Build.Revision
54 | //
55 | // You can specify all the values or you can use the default the Revision and
56 | // Build Numbers by using the '*' as shown below:
57 | [assembly: AssemblyVersion("1.0.*")]
58 |
--------------------------------------------------------------------------------
/cli-peer/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/wpf-player/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/Persistence/ILoadable.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 |
32 | namespace Persistence
33 | {
34 | ///
35 | /// Interface that describe an object that can be loaded in the the repository.
36 | ///
37 | public interface ILoadable
38 | {
39 | ///
40 | /// This method is used to return a instance of an object that contains only information that
41 | /// has to be serialized.
42 | ///
43 | /// A representation as database type of the current object
44 | dynamic GetAsDatabaseType();
45 | ///
46 | /// Load data from an object loaded from the repository as Database type
47 | ///
48 | /// Dynamic object containing data
49 | /// True if all data have been successfully loaded, false otherwise
50 | bool LoadFromDatabaseType(dynamic data);
51 | ///
52 | /// Get database type associated to this object
53 | ///
54 | /// Type reference for the Database Type
55 | Type GetDatabaseType();
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Messages/FindNode.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 | using System.ServiceModel;
33 |
34 | namespace Kademlia.Messages
35 | {
36 | ///
37 | /// A message used to search for a node.
38 | ///
39 | [DataContract]
40 | public class FindNode : Message
41 | {
42 | private ID target;
43 |
44 | ///
45 | /// Make a new FIND_NODE message
46 | ///
47 | /// the identificator of the sender
48 | /// The ID of the node searched
49 | /// The address of the sender
50 | public FindNode(ID nodeID, ID toFind, Uri nodeEndpoint) : base(nodeID, nodeEndpoint)
51 | {
52 | target = toFind;
53 | }
54 |
55 | ///
56 | /// Get/Set the target of this message.
57 | ///
58 | [DataMember]
59 | public ID Target
60 | {
61 | get { return target; }
62 | set { this.target = value; }
63 | }
64 |
65 | ///
66 | /// Default Name of the message
67 | ///
68 | [DataMember]
69 | public override string Name
70 | {
71 | get { return "FIND_NODE"; }
72 | set { }
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/Persistence/DhtElementComparer.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 |
32 | namespace Persistence
33 | {
34 | ///
35 | /// Comparer Class that performs custom comparison for the HashSet containing DhtElement
36 | ///
37 | class DhtElementComparer : IEqualityComparer
38 | {
39 | ///
40 | /// Equality Comparison that relies on DhtElement Equals method
41 | ///
42 | /// First element of the comparison
43 | /// Second element of the comparison
44 | /// True if the elements are equals, false otherwise
45 | bool IEqualityComparer.Equals(DhtElement x, DhtElement y)
46 | {
47 | return x.Equals(y);
48 | }
49 | ///
50 | /// Method for getting the HashCode of an Element. This relies on DhtElement GetHashCode method.
51 | ///
52 | /// DhtElement of whom we want to know the HashCode
53 | /// The HashCode of the element
54 | int IEqualityComparer.GetHashCode(DhtElement obj)
55 | {
56 | return obj.GetHashCode();
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Messages/FindValue.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 | using System.ServiceModel;
33 |
34 | namespace Kademlia.Messages
35 | {
36 | ///
37 | /// Represents a request to get a value.
38 | /// Receiver should either send key or a node list.
39 | ///
40 | [DataContract]
41 | public class FindValue : Message
42 | {
43 | private string key;
44 |
45 | ///
46 | /// Make a new FindValue message.
47 | ///
48 | /// The sender identificator
49 | /// The desired key by the sender
50 | /// The address of the sender
51 | public FindValue(ID nodeID, string wantedKey, Uri nodeEndpoint) : base(nodeID, nodeEndpoint)
52 | {
53 | this.key = wantedKey;
54 | }
55 |
56 | ///
57 | /// The key that the message searches.
58 | ///
59 | [DataMember]
60 | public string Key {
61 | get { return key; }
62 | set { this.key = value; }
63 | }
64 |
65 | ///
66 | /// the default name of the message
67 | ///
68 | [DataMember]
69 | public override string Name
70 | {
71 | get { return "FIND_VALUE"; }
72 | set { }
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/p2p-player/Views/MainView.xaml:
--------------------------------------------------------------------------------
1 |
28 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
52 |
53 |
--------------------------------------------------------------------------------
/UdpBinding/UdpBindingConfigurationElement.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.ServiceModel.Channels;
29 | using System.Configuration;
30 | using System.Collections;
31 | using System.Globalization;
32 | using System.ServiceModel;
33 | using System.ServiceModel.Configuration;
34 |
35 | namespace UdpTransportBinding
36 | {
37 | public class UdpBindingConfigurationElement : StandardBindingElement
38 | {
39 | public UdpBindingConfigurationElement(string configurationName)
40 | : base(configurationName)
41 | {
42 | }
43 |
44 | public UdpBindingConfigurationElement()
45 | : this(null)
46 | {
47 | }
48 |
49 | protected override Type BindingElementType
50 | {
51 | get { return typeof(NetUdpBinding); }
52 | }
53 |
54 | protected override void OnApplyConfiguration(Binding binding)
55 | {
56 | if (binding == null)
57 | throw new ArgumentNullException("binding");
58 |
59 | if (binding.GetType() != typeof(NetUdpBinding))
60 | {
61 | throw new ArgumentException(string.Format(CultureInfo.CurrentCulture,
62 | "Invalid type for binding. Expected type: {0}. Type passed in: {1}.",
63 | typeof(NetUdpBinding).AssemblyQualifiedName,
64 | binding.GetType().AssemblyQualifiedName));
65 | }
66 | }
67 |
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Contact.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Net;
29 | using System.ServiceModel;
30 |
31 | namespace Kademlia
32 | {
33 | ///
34 | /// Represents the information needed to contact another node.
35 | ///
36 | [Serializable]
37 | public class Contact
38 | {
39 | private ID nodeID;
40 | private Uri nodeEndpoint;
41 |
42 | ///
43 | /// Make a contact for a node with the given ID at the given location.
44 | ///
45 | /// The identificator of the node
46 | /// The address of the node
47 | public Contact(ID id, Uri endpoint)
48 | {
49 | nodeID = id;
50 | nodeEndpoint = endpoint;
51 | }
52 |
53 | ///
54 | /// Get the node's ID.
55 | ///
56 | /// The node ID
57 | public ID NodeID {
58 | get { return nodeID; }
59 | }
60 |
61 | ///
62 | /// Get the node's endpoint.
63 | ///
64 | /// The address
65 | public Uri NodeEndPoint {
66 | get { return nodeEndpoint; }
67 | }
68 |
69 | ///
70 | /// Method used to obtain a string representation of the class
71 | ///
72 | /// A string representing the object
73 | public override string ToString()
74 | {
75 | return NodeID.ToString() + "@" + NodeEndPoint.ToString();
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/WebServer/Properties/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
47 |
--------------------------------------------------------------------------------
/WebServer/Settings.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | namespace PeerLibrary.Properties {
28 |
29 |
30 | // La classe consente la gestione di eventi specifici sulla classe delle impostazioni:
31 | // L'evento SettingChanging viene generato prima della modifica di un valore dell'impostazione.
32 | // L'evento PropertyChanged viene generato dopo la modifica di un valore dell'impostazione.
33 | // L'evento SettingsLoaded viene generato dopo il caricamento dei valori dell'impostazione.
34 | // L'evento SettingsSaving viene generato prima del salvataggio dei valori dell'impostazione.
35 | internal sealed partial class Settings {
36 |
37 | public Settings() {
38 | // // Per aggiungere gestori eventi per il salvataggio e la modifica delle impostazioni, rimuovere i commenti dalle righe seguenti:
39 | //
40 | // this.SettingChanging += this.SettingChangingEventHandler;
41 | //
42 | // this.SettingsSaving += this.SettingsSavingEventHandler;
43 | //
44 | }
45 |
46 | private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
47 | // Aggiungere qui il codice per gestire l'evento SettingChangingEvent.
48 | }
49 |
50 | private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
51 | // Aggiungere qui il codice per gestire l'evento SettingsSaving.
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/p2p-player/Views/SearchList.xaml:
--------------------------------------------------------------------------------
1 |
28 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/wpf-player/PositionIndicator.xaml:
--------------------------------------------------------------------------------
1 |
28 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/TransportService/Messages/ChunkRequest.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 |
33 | namespace TransportService.Messages
34 | {
35 | ///
36 | /// Class representing the message used to request a chunk to a requestor.
37 | ///
38 | [DataContract]
39 | public class ChunkRequest : GenericMessage
40 | {
41 | ///
42 | /// Default constructor of the class
43 | ///
44 | public ChunkRequest() { }
45 |
46 | ///
47 | /// Constructor that initialize attributes of the class.
48 | ///
49 | /// Resource id of the file to download
50 | /// Chunk id of the chunk
51 | /// URI representing the address of transport layer of the sender of this message
52 | public ChunkRequest(/*int activeBuffer, */string RID, int CID, Uri SenderAddress)
53 | {
54 | this.MessageType = "CHKRQ";
55 | // this.activeBuffer = activeBuffer;
56 | this.CID = CID;
57 | this.RID = RID;
58 | this.SenderAddress = SenderAddress;
59 | }
60 |
61 | /* [DataMember]
62 | public int ActiveBuffer
63 | {
64 | get { return activeBuffer; }
65 | set { activeBuffer = value; }
66 | }*/
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/p2p-player/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System.Reflection;
28 | using System.Runtime.CompilerServices;
29 | using System.Runtime.InteropServices;
30 |
31 | // General Information about an assembly is controlled through the following
32 | // set of attributes. Change these attribute values to modify the information
33 | // associated with an assembly.
34 | [assembly: AssemblyTitle("p2p-player")]
35 | [assembly: AssemblyDescription("")]
36 | [assembly: AssemblyConfiguration("")]
37 | [assembly: AssemblyCompany("Microsoft")]
38 | [assembly: AssemblyProduct("p2p-player")]
39 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
40 | [assembly: AssemblyTrademark("")]
41 | [assembly: AssemblyCulture("")]
42 |
43 | // Setting ComVisible to false makes the types in this assembly not visible
44 | // to COM components. If you need to access a type in this assembly from
45 | // COM, set the ComVisible attribute to true on that type.
46 | [assembly: ComVisible(false)]
47 |
48 | // The following GUID is for the ID of the typelib if this project is exposed to COM
49 | [assembly: Guid("c104c2c2-4940-4e10-a860-4c692e073b6b")]
50 |
51 | // Version information for an assembly consists of the following four values:
52 | //
53 | // Major Version
54 | // Minor Version
55 | // Build Number
56 | // Revision
57 | //
58 | // You can specify all the values or you can default the Revision and Build Numbers
59 | // by using the '*' as shown below:
60 | // [assembly: AssemblyVersion("1.0.*")]
61 |
62 | [assembly: AssemblyVersion("1.0.0.0")]
63 | [assembly: AssemblyFileVersion("1.0.0.0")]
--------------------------------------------------------------------------------
/p2p-player/ViewModels/MainViewModel.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.ComponentModel;
29 | using System.Windows.Controls;
30 |
31 | namespace p2p_player
32 | {
33 | public class MainViewModel : INotifyPropertyChanged
34 | {
35 | public MainViewModel()
36 | {
37 | // Insert code required on object creation below this point.
38 | }
39 |
40 | private string viewModelProperty = "Runtime Property Value";
41 | ///
42 | /// Sample ViewModel property; this property is used in the view to display its value using a Binding.
43 | ///
44 | ///
45 | public string ViewModelProperty
46 | {
47 | get
48 | {
49 | return this.viewModelProperty;
50 | }
51 | set
52 | {
53 | this.viewModelProperty = value;
54 | this.NotifyPropertyChanged("ViewModelProperty");
55 | }
56 | }
57 |
58 | ///
59 | /// Sample ViewModel method; this method is invoked by a Behavior that is associated with it in the View.
60 | ///
61 | public void ViewModelMethod()
62 | {
63 | if(!this.ViewModelProperty.EndsWith("Updated Value", StringComparison.Ordinal))
64 | {
65 | this.ViewModelProperty = this.ViewModelProperty + " - Updated Value";
66 | }
67 | }
68 |
69 | #region INotifyPropertyChanged
70 | public event PropertyChangedEventHandler PropertyChanged;
71 |
72 | private void NotifyPropertyChanged(String info)
73 | {
74 | if (PropertyChanged != null)
75 | {
76 | PropertyChanged(this, new PropertyChangedEventArgs(info));
77 | }
78 | }
79 | #endregion
80 |
81 | }
82 | }
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Messages/FindValueContactResponse.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 | using System.ServiceModel;
33 |
34 | namespace Kademlia.Messages
35 | {
36 | ///
37 | /// Description of FindKeyContactResponse.
38 | ///
39 | [DataContract]
40 | public class FindValueContactResponse : Response
41 | {
42 | private List contacts;
43 |
44 | ///
45 | /// Make a new response reporting contacts to try.
46 | ///
47 | /// the sender identificator
48 | /// The FindValue message orginating this response
49 | /// The list of suggested contacts
50 | /// The address of the sender
51 | public FindValueContactResponse(ID nodeID, FindValue request, List close, Uri nodeEndpoint) : base(nodeID, request, nodeEndpoint)
52 | {
53 | contacts = close;
54 | }
55 |
56 | ///
57 | /// The list of contacts sent.
58 | ///
59 | [DataMember]
60 | public List Contacts
61 | {
62 | get { return contacts; }
63 | set { this.contacts = value; }
64 | }
65 |
66 | ///
67 | /// The default name for the message
68 | ///
69 | [DataMember]
70 | public override string Name
71 | {
72 | get { return "FIND_VALUE_RESPONSE_CONTACTS"; }
73 | set { }
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Messages/FindValueDataResponse.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 | using System.ServiceModel;
33 | using Persistence;
34 |
35 | namespace Kademlia.Messages
36 | {
37 | ///
38 | /// Send data in reply to a FindVAlue
39 | ///
40 | [DataContract]
41 | public class FindValueDataResponse : Response
42 | {
43 | private IList vals;
44 |
45 | ///
46 | /// Make a new response.
47 | ///
48 | /// The identificator of the sender
49 | /// The FindValue request generating this response
50 | /// The list of KademliaResources found
51 | /// The address of the sender
52 | public FindValueDataResponse(ID nodeID, FindValue request, IList data, Uri nodeEndpoint) : base(nodeID, request, nodeEndpoint)
53 | {
54 | vals = data;
55 | }
56 |
57 | ///
58 | /// the values returned for the key
59 | ///
60 | [DataMember]
61 | public IList Values
62 | {
63 | get { return vals; }
64 | set { this.vals = value; }
65 | }
66 |
67 | ///
68 | /// The default name of the message
69 | ///
70 | [DataMember]
71 | public override string Name
72 | {
73 | get { return "FIND_VALUE_RESPONSE_DATA"; }
74 | set { }
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/TransportService/Messages/GenericMessage.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 |
33 | namespace TransportService.Messages
34 | {
35 | ///
36 | /// Utility class that implements common method from Abstract Message and makes possible
37 | /// to avoid repetitions in code.
38 | ///
39 | [DataContract]
40 | public class GenericMessage : AbstractMessage
41 | {
42 | ///
43 | ///
44 | ///
45 | [DataMember]
46 | public override string MessageType
47 | {
48 | get;
49 | set;
50 | }
51 |
52 | ///
53 | ///
54 | ///
55 | [DataMember]
56 | public override string RID
57 | {
58 | get;
59 | set;
60 | }
61 |
62 | ///
63 | ///
64 | ///
65 | [DataMember]
66 | public override int CID
67 | {
68 | get;
69 | set;
70 | }
71 |
72 | ///
73 | ///
74 | ///
75 | [DataMember]
76 | public override Uri SenderAddress
77 | {
78 | get;
79 | set;
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Messages/StoreResponse.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 | using System.ServiceModel;
33 |
34 | namespace Kademlia.Messages
35 | {
36 | ///
37 | /// A reply to a store query.
38 | ///
39 | [DataContract]
40 | public class StoreResponse : Response
41 | {
42 | private bool sendData;
43 |
44 | ///
45 | /// Constructor of the class
46 | ///
47 | /// Identificator of the sender
48 | /// StoreQuery originating this message
49 | /// Param that indicates if the node has accepted the request to store
50 | /// Address of the sender node
51 | public StoreResponse(ID nodeID, StoreQuery query, bool accept, Uri nodeEndpoint) : base(nodeID, query, nodeEndpoint)
52 | {
53 | sendData = accept;
54 | }
55 |
56 | ///
57 | /// Indicator to verify if it is necessary or not to send data
58 | ///
59 | [DataMember]
60 | public bool ShouldSendData
61 | {
62 | get { return sendData; }
63 | set { this.sendData = value; }
64 | }
65 |
66 | ///
67 | /// Default name of the message
68 | ///
69 | [DataMember]
70 | public override string Name
71 | {
72 | get { return "STORE_RESPONSE"; }
73 | set { }
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Examples/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System.Reflection;
28 | using System.Runtime.CompilerServices;
29 | using System.Runtime.InteropServices;
30 |
31 | // Le informazioni generali relative a un assembly sono controllate dal seguente
32 | // set di attributi. Per modificare le informazioni associate a un assembly
33 | // occorre quindi modificare i valori di questi attributi.
34 | [assembly: AssemblyTitle("Examples")]
35 | [assembly: AssemblyDescription("")]
36 | [assembly: AssemblyConfiguration("")]
37 | [assembly: AssemblyCompany("Microsoft")]
38 | [assembly: AssemblyProduct("Examples")]
39 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
40 | [assembly: AssemblyTrademark("")]
41 | [assembly: AssemblyCulture("")]
42 |
43 | // Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
44 | // ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
45 | // COM, impostare su true l'attributo ComVisible per tale tipo.
46 | [assembly: ComVisible(false)]
47 |
48 | // Se il progetto viene esposto a COM, il GUID che segue verrà utilizzato per creare l'ID della libreria dei tipi
49 | [assembly: Guid("55a83082-40f1-4078-8b29-d63a11c9083d")]
50 |
51 | // Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
52 | //
53 | // Numero di versione principale
54 | // Numero di versione secondario
55 | // Numero build
56 | // Revisione
57 | //
58 | // È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
59 | // utilizzando l'asterisco (*) come descritto di seguito:
60 | // [assembly: AssemblyVersion("1.0.*")]
61 | [assembly: AssemblyVersion("1.0.0.0")]
62 | [assembly: AssemblyFileVersion("1.0.0.0")]
63 |
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Messages/FindNodeResponse.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 | using System.ServiceModel;
33 |
34 | namespace Kademlia.Messages
35 | {
36 | ///
37 | /// A response to a FindNode message.
38 | /// Contains a list of Contacts.
39 | ///
40 | [DataContract]
41 | public class FindNodeResponse : Response
42 | {
43 | private List contacts;
44 |
45 | ///
46 | /// Constructor of the class. It calls the base constructor and store contacts into the message.
47 | ///
48 | /// Identificator of the sender
49 | /// FindNode request that orginates this response
50 | /// List of contact that could match the request
51 | /// Address of the sender
52 | public FindNodeResponse(ID nodeID, FindNode request, List recommended, Uri nodeEndpoint) : base(nodeID, request, nodeEndpoint)
53 | {
54 | contacts = recommended;
55 | }
56 |
57 | ///
58 | /// Gets the list of recommended contacts.
59 | ///
60 | ///
61 | [DataMember]
62 | public List Contacts
63 | {
64 | get {return contacts;}
65 | set { this.contacts = value; }
66 | }
67 |
68 | ///
69 | /// Name of the message over the network
70 | ///
71 | [DataMember]
72 | public override string Name
73 | {
74 | get { return "FIND_NODE_RESPONSE"; }
75 | set { }
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/UdpBinding/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System.Reflection;
28 | using System.Runtime.CompilerServices;
29 | using System.Runtime.InteropServices;
30 |
31 | // Le informazioni generali relative a un assembly sono controllate dal seguente
32 | // set di attributi. Per modificare le informazioni associate a un assembly
33 | // occorre quindi modificare i valori di questi attributi.
34 | [assembly: AssemblyTitle("UdpBinding")]
35 | [assembly: AssemblyDescription("")]
36 | [assembly: AssemblyConfiguration("")]
37 | [assembly: AssemblyCompany("Microsoft")]
38 | [assembly: AssemblyProduct("UdpBinding")]
39 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
40 | [assembly: AssemblyTrademark("")]
41 | [assembly: AssemblyCulture("")]
42 |
43 | // Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
44 | // ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
45 | // COM, impostare su true l'attributo ComVisible per tale tipo.
46 | [assembly: ComVisible(false)]
47 |
48 | // Se il progetto viene esposto a COM, il GUID che segue verrà utilizzato per creare l'ID della libreria dei tipi
49 | [assembly: Guid("0d8beb76-608d-4eda-984d-7e913db6f4d1")]
50 |
51 | // Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
52 | //
53 | // Numero di versione principale
54 | // Numero di versione secondario
55 | // Numero build
56 | // Revisione
57 | //
58 | // È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
59 | // utilizzando l'asterisco (*) come descritto di seguito:
60 | // [assembly: AssemblyVersion("1.0.*")]
61 | [assembly: AssemblyVersion("1.0.0.0")]
62 | [assembly: AssemblyFileVersion("1.0.0.0")]
63 |
--------------------------------------------------------------------------------
/Persistence/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System.Reflection;
28 | using System.Runtime.CompilerServices;
29 | using System.Runtime.InteropServices;
30 |
31 | // Le informazioni generali relative a un assembly sono controllate dal seguente
32 | // set di attributi. Per modificare le informazioni associate a un assembly
33 | // occorre quindi modificare i valori di questi attributi.
34 | [assembly: AssemblyTitle("Persistence")]
35 | [assembly: AssemblyDescription("")]
36 | [assembly: AssemblyConfiguration("")]
37 | [assembly: AssemblyCompany("Microsoft")]
38 | [assembly: AssemblyProduct("Persistence")]
39 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
40 | [assembly: AssemblyTrademark("")]
41 | [assembly: AssemblyCulture("")]
42 |
43 | // Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
44 | // ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
45 | // COM, impostare su true l'attributo ComVisible per tale tipo.
46 | [assembly: ComVisible(false)]
47 |
48 | // Se il progetto viene esposto a COM, il GUID che segue verrà utilizzato per creare l'ID della libreria dei tipi
49 | [assembly: Guid("189c03d4-9508-4735-9858-17caf07e6ea6")]
50 |
51 | // Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
52 | //
53 | // Numero di versione principale
54 | // Numero di versione secondario
55 | // Numero build
56 | // Revisione
57 | //
58 | // È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
59 | // utilizzando l'asterisco (*) come descritto di seguito:
60 | // [assembly: AssemblyVersion("1.0.*")]
61 | [assembly: AssemblyVersion("1.0.0.0")]
62 | [assembly: AssemblyFileVersion("1.0.0.0")]
63 |
--------------------------------------------------------------------------------
/TransportService/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System.Reflection;
28 | using System.Runtime.CompilerServices;
29 | using System.Runtime.InteropServices;
30 |
31 | // Le informazioni generali relative a un assembly sono controllate dal seguente
32 | // set di attributi. Per modificare le informazioni associate a un assembly
33 | // occorre quindi modificare i valori di questi attributi.
34 | [assembly: AssemblyTitle("TransportService")]
35 | [assembly: AssemblyDescription("")]
36 | [assembly: AssemblyConfiguration("")]
37 | [assembly: AssemblyCompany("Microsoft")]
38 | [assembly: AssemblyProduct("TransportService")]
39 | [assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
40 | [assembly: AssemblyTrademark("")]
41 | [assembly: AssemblyCulture("")]
42 |
43 | // Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
44 | // ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
45 | // COM, impostare su true l'attributo ComVisible per tale tipo.
46 | [assembly: ComVisible(false)]
47 |
48 | // Se il progetto viene esposto a COM, il GUID che segue verrà utilizzato per creare l'ID della libreria dei tipi
49 | [assembly: Guid("7f6fd6fa-d540-4bad-952f-363c9f15d6b4")]
50 |
51 | // Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
52 | //
53 | // Numero di versione principale
54 | // Numero di versione secondario
55 | // Numero build
56 | // Revisione
57 | //
58 | // È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
59 | // utilizzando l'asterisco (*) come descritto di seguito:
60 | // [assembly: AssemblyVersion("1.0.*")]
61 | [assembly: AssemblyVersion("1.0.0.0")]
62 | [assembly: AssemblyFileVersion("1.0.0.0")]
63 |
--------------------------------------------------------------------------------
/WebServer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System.Reflection;
28 | using System.Runtime.CompilerServices;
29 | using System.Runtime.InteropServices;
30 |
31 | // Le informazioni generali relative a un assembly sono controllate dal seguente
32 | // set di attributi. Per modificare le informazioni associate a un assembly
33 | // occorre quindi modificare i valori di questi attributi.
34 | [assembly: AssemblyTitle("PeerLibrary")]
35 | [assembly: AssemblyDescription("")]
36 | [assembly: AssemblyConfiguration("")]
37 | [assembly: AssemblyCompany("")]
38 | [assembly: AssemblyProduct("PeerLibrary")]
39 | [assembly: AssemblyCopyright("")]
40 | [assembly: AssemblyTrademark("")]
41 | [assembly: AssemblyCulture("")]
42 |
43 | // Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
44 | // ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
45 | // COM, impostare su true l'attributo ComVisible per tale tipo.
46 | [assembly: ComVisible(false)]
47 |
48 | // Se il progetto viene esposto a COM, il GUID che segue verrà utilizzato per creare l'ID della libreria dei tipi
49 | [assembly: Guid("30eaee87-48e1-424b-9b38-1451594514ff")]
50 |
51 | // Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
52 | //
53 | // Numero di versione principale
54 | // Numero di versione secondario
55 | // Numero build
56 | // Revisione
57 | //
58 | // È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
59 | // utilizzando l'asterisco (*) come descritto di seguito:
60 | // [assembly: AssemblyVersion("1.0.*")]
61 | [assembly: AssemblyVersion("1.0.0.0")]
62 | [assembly: AssemblyFileVersion("1.0.0.0")]
63 | [assembly: log4net.Config.XmlConfigurator(Watch = true)]
--------------------------------------------------------------------------------
/TransportService/Messages/AbstractMessage.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 |
33 | namespace TransportService.Messages
34 | {
35 | ///
36 | /// Class used to plasmate an abstract representation of a message.
37 | /// It represents the official DataContract of the TransportService.
38 | ///
39 | [DataContract]
40 | public abstract class AbstractMessage
41 | {
42 | // protected string messageType;
43 | // protected string rID;
44 | // protected int cID;
45 | // protected Uri senderAddress;
46 |
47 | ///
48 | /// Property used to recognize the message type associated to the message
49 | ///
50 | [DataMember]
51 | public abstract string MessageType
52 | {
53 | get;
54 | set;
55 | }
56 |
57 | ///
58 | /// Property representing the resource id.
59 | ///
60 | [DataMember]
61 | public abstract string RID
62 | {
63 | get;
64 | set;
65 | }
66 |
67 | ///
68 | /// Property representing the chunk id.
69 | ///
70 | [DataMember]
71 | public abstract int CID
72 | {
73 | get;
74 | set;
75 | }
76 |
77 | ///
78 | /// Property identifying the address of the sender of the message
79 | ///
80 | [DataMember]
81 | public abstract Uri SenderAddress
82 | {
83 | get;
84 | set;
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/Examples/ProgrammingExamples.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using log4net;
32 | using log4net.Config;
33 |
34 | namespace Examples
35 | {
36 | ///
37 | /// This class enables the developer to execute the programming examples contained in the specific classes.
38 | /// Currently there are 3 example modules: Tag, Generic Repository, Kademlia-specific repository.
39 | /// If the Console Application is launched with one or more example module names only this specific examples
40 | /// will be launched
41 | /// ProgrammingExamples.exe tag rep
42 | ///
43 | class ProgrammingExamples
44 | {
45 | ///
46 | /// Access method for the execution of the console application.
47 | /// This method simply use RunExamples() methods of the example modules.
48 | ///
49 | ///
50 | /// String array of example module names. Strings that do not represent a example
51 | /// module name will be ignored.
52 | ///
53 | static void Main(string[] args)
54 | {
55 | //LOG4NET
56 | XmlConfigurator.Configure();
57 | int num_args = args.Length;
58 | if (num_args == 0 || args.Contains("tag"))
59 | {
60 | TagExamples.RunExamples();
61 | }
62 | if (num_args == 0 || args.Contains("rep"))
63 | {
64 | RepositoryExamples.RunExamples();
65 | }
66 | if (num_args == 0 || args.Contains("kad_rep"))
67 | {
68 | KademliaRepositoryExamples.RunExamples();
69 | }
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/TransportService/ThreadPool.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 |
32 | namespace TransportService
33 | {
34 | ///
35 | /// ThreadPool implementation realized inside the TransportService.
36 | /// It is useful to have an indipendent version of the thread pool in this case because using the official
37 | /// .NET implementation the number of total "pool" peer is reduced by other elements; this is bad here because
38 | /// in this part of the project there are realtime requirements.
39 | /// This class is strictly coupled with the ThreadPoolObject class.
40 | ///
41 | ///
42 | internal class ThreadPool
43 | {
44 | private ThreadPoolObject[] pool;
45 | private int poolSize;
46 |
47 | ///
48 | /// Default constructor of the class.
49 | ///
50 | public ThreadPool()
51 | {
52 | }
53 |
54 | ///
55 | /// Constructor of the class that initialize the pool to a specific size.
56 | ///
57 | /// Size of the pool
58 | public ThreadPool(int poolSize)
59 | {
60 | this.poolSize = poolSize;
61 | this.pool = new ThreadPoolObject[poolSize];
62 | for (int i = 0; i < poolSize; i++)
63 | {
64 | this.pool[i] = new ThreadPoolObject();
65 | }
66 | }
67 |
68 | ///
69 | /// Get the first free thread in pool. If there are not free peers it returns a busy peer.
70 | ///
71 | /// The peer chosen
72 | public ThreadPoolObject GetNextThreadInPool()
73 | {
74 | return this.pool.AsParallel().Aggregate((l, r) => l.State == ThreadPoolObject.ThreadState.FREE ? l : r);
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/TransportService/ITransportProtocol.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Runtime.Serialization;
31 | using System.ServiceModel;
32 | using System.Text;
33 | using TransportService.Messages;
34 |
35 | namespace TransportService
36 | {
37 | ///
38 | /// Interface representing the contract of a TransportService.
39 | /// The transport service is used to move chunks from a node to another in the network and then, it
40 | /// exposes fundamentally two oneway methods, the first to request a chunk to a peer and the second
41 | /// to return chunks to requestors.
42 | ///
43 | [ServiceContract]
44 | public interface ITransportProtocol
45 | {
46 | ///
47 | /// This method is used to require a chunk to a peer. The method is a oneway method because is
48 | /// supposed to be in use a Udp Binding.
49 | ///
50 | ///
51 | /// Message passed to the method over the network. It contains details
52 | /// about the sender of the message and also to the chunk requested.
53 | ///
54 | ///
55 | ///
56 | [OperationContract(IsOneWay=true)]
57 | void GetChunk(ChunkRequest chkrq);
58 |
59 | ///
60 | /// This method is used to return a chunk to a requestor peer. The method is a oneway method because
61 | /// it is supposed to be in use a Udp Binding.
62 | ///
63 | ///
64 | /// Message passed to the method over the network. It contains the chunk
65 | /// to send to the requestor and information about the traffic.
66 | ///
67 | ///
68 | [OperationContract(IsOneWay = true)]
69 | void ReturnChunk(ChunkResponse chkrs);
70 | }
71 | }
--------------------------------------------------------------------------------
/Kademlia/Kademlia/Messages/StoreQuery.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Runtime.Serialization;
32 | using System.ServiceModel;
33 |
34 | namespace Kademlia.Messages
35 | {
36 | ///
37 | /// A message asking if another node will store data for us, and if we need to send the data.
38 | /// Maybe they already have it.
39 | /// We have to send the timestamp with it for people to republish stuff.
40 | ///
41 | [DataContract]
42 | public class StoreQuery : Message
43 | {
44 | private ID tagHash;
45 | private DateTime publication;
46 |
47 | ///
48 | /// Make a new STORE_QUERY message.
49 | ///
50 | /// The identificator of the sender
51 | /// A hash of the data value
52 | /// The time of publication
53 | /// The address of the sender
54 | public StoreQuery(ID nodeID, ID hash, DateTime originalPublication, Uri nodeEndpoint) : base(nodeID, nodeEndpoint)
55 | {
56 | tagHash = hash;
57 | publication = originalPublication;
58 | }
59 |
60 | ///
61 | /// The hash of the data value we're asking about.
62 | ///
63 | [DataMember]
64 | public ID TagHash
65 | {
66 | get { return tagHash; }
67 | set { this.tagHash = value; }
68 | }
69 |
70 | ///
71 | /// the data was originally published, in UTC.
72 | ///
73 | ///
74 | [DataMember]
75 | public DateTime PublicationTime
76 | {
77 | get { return publication.ToUniversalTime(); }
78 | set { this.publication = value; }
79 | }
80 |
81 | ///
82 | /// The default name of the message
83 | ///
84 | [DataMember]
85 | public override string Name
86 | {
87 | get { return "STORE_QUERY"; }
88 | set { }
89 | }
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/Metrics/Metrics.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {73003F98-4A4E-4D9F-A0A0-20CBEBB09631}
5 | Debug
6 | x86
7 | Library
8 | Metrics
9 | Metrics
10 | v4.0
11 | Properties
12 | C:\Documents and Settings\Dario\Dati applicazioni\ICSharpCode/SharpDevelop4.0\Settings.SourceAnalysis
13 | False
14 | False
15 | OnBuildSuccess
16 | False
17 | False
18 | 4
19 | false
20 | False
21 | False
22 |
23 |
24 | x86
25 | False
26 | Auto
27 | 4194304
28 | 4096
29 |
30 |
31 | bin\Debug\
32 | true
33 | Full
34 | False
35 | True
36 | DEBUG;TRACE
37 | Project
38 |
39 |
40 | bin\Release\
41 | False
42 | None
43 | True
44 | False
45 | TRACE
46 |
47 |
48 | bin\Release\Metrics.XML
49 |
50 |
51 |
52 |
53 | 3.5
54 |
55 |
56 |
57 | 3.5
58 |
59 |
60 | ..\lib\taglib-sharp.dll
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/p2p-player/ViewModels/AudioPlayerModel.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Text;
30 | using System.Windows.Data;
31 | using System.ComponentModel;
32 | using System.Windows.Controls;
33 | using System.IO;
34 | //using p2p_player.PeerPlayer;
35 | using System.Windows;
36 | using System.Net.Sockets;
37 |
38 | namespace p2p_player
39 | {
40 | public class AudioPlayerModel : INotifyPropertyChanged,IDisposable
41 | {
42 | public MediaElement media = new MediaElement();
43 | //public PeerClient peer= new PeerClient();
44 | public Socket sk= new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
45 | public AudioPlayerModel()
46 | {
47 | //peer.ConnectToStreamAsync();
48 | //peer.CloseAsync();
49 | //media.SetSource(s);
50 | }
51 | /*private void connectToStream_completed(object obj, ConnectToStreamCompletedEventArgs args)
52 | {
53 | if (args.Error != null)
54 | {
55 | MessageBox.Show(args.Error.Message, "Communication Error", MessageBoxButton.OK);
56 | return;
57 | }
58 | MessageBox.Show(args.Result.Length.ToString());
59 | }*/
60 | public void Stop()
61 | {
62 | media.Stop();
63 | }
64 | public void Play()
65 | {
66 | media.Play();
67 | }
68 | public void Pause()
69 | {
70 | media.Pause();
71 | }
72 | public void SetResource(Stream s)
73 | {
74 | media.SetSource(s);
75 | }
76 | #region INotifyPropertyChanged
77 | public event PropertyChangedEventHandler PropertyChanged;
78 |
79 | private void NotifyPropertyChanged(String info)
80 | {
81 | if (PropertyChanged != null)
82 | {
83 | PropertyChanged(this, new PropertyChangedEventArgs(info));
84 | }
85 | }
86 | #endregion
87 |
88 | #region IDisposable Membri di
89 |
90 | public void Dispose()
91 | {
92 | //peer.CloseAsync();
93 | }
94 |
95 | #endregion
96 | }
97 | }
--------------------------------------------------------------------------------
/Persistence/RepositoryConfiguration.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Reflection;
32 |
33 | namespace Persistence
34 | {
35 | ///
36 | /// Class that implements a generic container for configurations used by the repository
37 | ///
38 | public class RepositoryConfiguration: System.Collections.Generic.Dictionary
39 | {
40 | ///
41 | /// Default Constructor that initializes an empty configuration
42 | ///
43 | public RepositoryConfiguration(): base() {}
44 | ///
45 | /// Constructor that initializes the configuration dictionary using an anonymous object.
46 | ///
47 | /// Anonymous object used to build the configuration
48 | public RepositoryConfiguration(Object anon)
49 | : this()
50 | {
51 | PropertyInfo[] props = anon.GetType().GetProperties();
52 | for (int k = 0; k < props.Length; k++)
53 | {
54 | this.SetConfig(props[k].Name ,props[k].GetValue(anon, null).ToString());
55 | }
56 | }
57 | ///
58 | /// Gets the configuration associated with a key.
59 | ///
60 | /// Name of the configuration to get
61 | /// The value of the configuration if it is present, empty string otherwise
62 | public string GetConfig(string key)
63 | {
64 | if (this.ContainsKey(key))
65 | {
66 | return this[key];
67 | }
68 | else
69 | {
70 | return "";
71 | }
72 | }
73 | ///
74 | /// Sets the configuration
75 | ///
76 | /// Name of the configuration to set
77 | /// The new value of the configuration
78 | public void SetConfig(string key, string value)
79 | {
80 | this.Add(key, value);
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/wpf-player/BooleanInverter.cs:
--------------------------------------------------------------------------------
1 | /*****************************************************************************************
2 | * p2p-player
3 | * An audio player developed in C# based on a shared base to obtain the music from.
4 | *
5 | * Copyright (C) 2010-2011 Dario Mazza, Sebastiano Merlino
6 | *
7 | * This program is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | * This program is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | * GNU Affero General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Affero General Public License
18 | * along with this program. If not, see .
19 | *
20 | * Dario Mazza (dariomzz@gmail.com)
21 | * Sebastiano Merlino (etr@pensieroartificiale.com)
22 | * Full Source and Documentation available on Google Code Project "p2p-player",
23 | * see
24 | *
25 | ******************************************************************************************/
26 |
27 | using System;
28 | using System.Collections.Generic;
29 | using System.Linq;
30 | using System.Text;
31 | using System.Windows.Markup;
32 | using System.Windows.Data;
33 |
34 | namespace wpf_player
35 | {
36 | ///
37 | /// Converter class that inverts boolean state.
38 | ///
39 | class BooleanInverter : MarkupExtension, IValueConverter
40 | {
41 | #region IValueConverter Membri di
42 | ///
43 | /// Converts the boolean using the not operator
44 | ///
45 | /// Boolean to invert
46 | ///
47 | ///
48 | ///
49 | /// Inverted boolean
50 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
51 | {
52 | if ((value is bool) && (targetType == typeof(bool)))
53 | {
54 | bool v = (bool)value;
55 | return !v;
56 | }
57 | else
58 | {
59 | return false;
60 | }
61 | }
62 | ///
63 | /// Not implemented method
64 | ///
65 | ///
66 | ///
67 | ///
68 | ///
69 | ///
70 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
71 | {
72 | throw new NotImplementedException();
73 | }
74 |
75 | #endregion
76 | ///
77 | /// Method needed for the extension system. Return the current instance.
78 | ///
79 | ///
80 | /// The current instance of the converter
81 | public override object ProvideValue(IServiceProvider serviceProvider)
82 | {
83 | return this;
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | ==================================== Sambatyon ====================================
2 |
3 | When you see this tree, know that you've came across ZenCoders.org
4 |
5 |
6 | with open('ZenCoders.
7 | `num` in numbers synchronized
8 | datetime d glob. sys.argv[2] .
9 | def myclass `..` @@oscla org. . class {
10 | displ hooks( public static void ma functor:
11 | $myclass->method( impport sys, os.pipe ` @param name`
12 | fcl if(system(cmd) myc. /de ` $card( array("a" srand
13 | format lists: ++: conc ++ "my an WHERE for( == myi
14 | `sys: myvalue(myvalue) sys.t Console.W try{ rais using
15 | connec SELECT * FROM table mycnf acco desc and or selector::clas at
16 | openldap string sys. print "zenc der " { 'a': `ls -l` > appe &firs
17 | import Tkinter paste( $obh &a or it myval bro roll: :: [] require a
18 | case `` super. +y