~cszikszoy/docky/mmv3

« back to all changes in this revision

Viewing changes to Docky.StandardPlugins/Weather/IWeatherSource.cs

  • Committer: Chris S.
  • Date: 2009-10-22 03:23:13 UTC
  • mfrom: (284.1.7 testaddins)
  • Revision ID: chris@szikszoy.com-20091022032313-2s9kikljologdsyt
enable lazy loading of addins

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//  
2
 
//  Copyright (C) 2009 Robert Dyer
3
 
// 
4
 
//  This program is free software: you can redistribute it and/or modify
5
 
//  it under the terms of the GNU General Public License as published by
6
 
//  the Free Software Foundation, either version 3 of the License, or
7
 
//  (at your option) any later version.
8
 
// 
9
 
//  This program is distributed in the hope that it will be useful,
10
 
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
//  GNU General Public License for more details.
13
 
// 
14
 
//  You should have received a copy of the GNU General Public License
15
 
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
 
// 
17
 
 
18
 
using System;
19
 
using System.Collections.Generic;
20
 
 
21
 
namespace WeatherDocklet
22
 
{
23
 
        /// <summary>
24
 
        /// A weather source provides information about the weather data and
25
 
        /// allows requesting updates to that data.
26
 
        /// </summary>
27
 
        public interface IWeatherSource
28
 
        {
29
 
                /// <value>
30
 
                /// The number of days forecast available from this weather source.
31
 
                /// </value>
32
 
                int ForecastDays { get; }
33
 
                
34
 
                /// <value>
35
 
                /// The current city, obtained from the weather source.
36
 
                /// </value>
37
 
                string City { get; }
38
 
                
39
 
                /// <value>
40
 
                /// The Location's latitude.
41
 
                /// </value>
42
 
                double Latitude { get; }
43
 
                
44
 
                /// <value>
45
 
                /// The Location's longitude.
46
 
                /// </value>
47
 
                double Longitude { get; }
48
 
                
49
 
                /// <value>
50
 
                /// The Location's sunrise time.
51
 
                /// </value>
52
 
                DateTime SunRise { get; }
53
 
                
54
 
                /// <value>
55
 
                /// The Location's sunset time.
56
 
                /// </value>
57
 
                DateTime SunSet { get; }
58
 
                
59
 
                /// <value>
60
 
                /// The current temperature obtained from the weather source.
61
 
                /// </value>
62
 
                int Temp { get; }
63
 
                
64
 
                /// <value>
65
 
                /// The current 'feels like' temperature obtained from the weather source.
66
 
                /// </value>
67
 
                int FeelsLike { get; }
68
 
                
69
 
                /// <value>
70
 
                /// The current conditions obtained from the weather source.
71
 
                /// </value>
72
 
                string Condition { get; }
73
 
                
74
 
                /// <value>
75
 
                /// The current wind speed obtained from the weather source.
76
 
                /// </value>
77
 
                int Wind { get; }
78
 
                
79
 
                /// <value>
80
 
                /// The current wind direction obtained from the weather source.
81
 
                /// </value>
82
 
                string WindDirection { get; }
83
 
                
84
 
                /// <value>
85
 
                /// The current humidity obtained from the weather source.
86
 
                /// </value>
87
 
                string Humidity { get; }
88
 
                
89
 
                /// <value>
90
 
                /// An icon name for the current conditions obtained from the weather source.
91
 
                /// </value>
92
 
                string Image { get; }
93
 
                
94
 
                /// <value>
95
 
                /// An array of the current forecasts obtained from the weather source.
96
 
                /// </value>
97
 
                WeatherForecast[] Forecasts { get; }
98
 
                
99
 
                /// <value>
100
 
                /// The displayed name for this weather source.
101
 
                /// </value>
102
 
                string Name { get; }
103
 
                
104
 
                /// <value>
105
 
                /// A description for this weather source.
106
 
                /// </value>
107
 
                string About { get; }
108
 
                
109
 
                /// <value>
110
 
                /// Indicates if the source supports heat index/wind chill.
111
 
                /// </value>
112
 
                bool SupportsFeelsLike { get; }
113
 
                
114
 
                /// <summary>
115
 
                /// Indicates the weather source is currently reloading the weather data.
116
 
                /// </summary>
117
 
                event Action WeatherReloading;
118
 
                
119
 
                /// <summary>
120
 
                /// Indicates there was an error reloading the weather data.
121
 
                /// </summary>
122
 
                event EventHandler<WeatherErrorArgs> WeatherError;
123
 
                
124
 
                /// <summary>
125
 
                /// Indicates the weather was successfully updated.
126
 
                /// </summary>
127
 
                event Action WeatherUpdated;
128
 
                
129
 
                /// <summary>
130
 
                /// Reloads the weather data using the weather source.
131
 
                /// </summary>
132
 
                void ReloadWeatherData ();
133
 
                
134
 
                /// <summary>
135
 
                /// Displays the radar in the default browser using this weather source's specified URL.
136
 
                /// </summary>
137
 
                void ShowRadar ();
138
 
                
139
 
                /// <summary>
140
 
                /// Displays the forecast in the default browser using this weather source's specified URL.
141
 
                /// </summary>
142
 
                /// <param name="day">
143
 
                /// A <see cref="System.Int32"/> representing how many days away to show the forecast for.
144
 
                /// </param>
145
 
                void ShowForecast (int day);
146
 
                
147
 
                /// <summary>
148
 
                /// Returns if it is currently night.
149
 
                /// </summary>
150
 
                /// <returns>
151
 
                /// A <see cref="System.Boolean"/> indicating if it is night.
152
 
                /// </returns>
153
 
                bool IsNight ();
154
 
                
155
 
                /// <summary>
156
 
                /// Searches for a location code.
157
 
                /// </summary>
158
 
                /// <param name="location">
159
 
                /// A <see cref="System.String"/> location to search for.
160
 
                /// </param>
161
 
                /// <returns>
162
 
                /// A <see cref="IEnumerable"/> to iterate over pairs of strings, which represent
163
 
                /// a location name and location code.
164
 
                /// </returns>
165
 
                IEnumerable<string> SearchLocation (string location);
166
 
        }
167
 
}