sbLocalDatabaseMediaListViewState.h
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN SONGBIRD GPL
4 //
5 // This file is part of the Songbird web player.
6 //
7 // Copyright(c) 2005-2008 POTI, Inc.
8 // http://songbirdnest.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END SONGBIRD GPL
24 //
25 */
26 
27 #ifndef __SBLOCALDATABASEMEDIALISTVIEWSTATE_H__
28 #define __SBLOCALDATABASEMEDIALISTVIEWSTATE_H__
29 
30 #include "sbLocalDatabaseCID.h"
34 
35 #include <sbIMediaListView.h>
36 #include <sbILibraryConstraints.h>
37 
38 #include <nsAutoPtr.h>
39 #include <nsCOMPtr.h>
40 #include <nsCOMArray.h>
41 #include <nsTArray.h>
42 #include <nsStringGlue.h>
43 #include <nsIClassInfo.h>
44 #include <nsISerializable.h>
45 
46 #define SB_ILOCALDATABASEMEDIALISTVIEWSTATE_IID \
47 { 0xd04ebdd9, 0x9c9c, 0x4acc, \
48  { 0xb5, 0x4c, 0x7d, 0x30, 0x3b, 0x76, 0xee, 0xac } }
49 
51 {
52 public:
53  NS_DECLARE_STATIC_IID_ACCESSOR(SB_ILOCALDATABASEMEDIALISTVIEWSTATE_IID)
54 
55  NS_IMETHOD GetSort(sbIMutablePropertyArray** aSort) = 0;
56  NS_IMETHOD GetSearch(sbILibraryConstraint** aSearch) = 0;
57  NS_IMETHOD GetFilter(sbILibraryConstraint** aFilter) = 0;
59  NS_IMETHOD GetFilterSet(sbLocalDatabaseCascadeFilterSetState** aFilterSet) = 0;
60  NS_IMETHOD GetTreeViewState(sbLocalDatabaseTreeViewState** aTreeViewState) = 0;
61 };
62 
63 NS_DEFINE_STATIC_IID_ACCESSOR(sbILocalDatabaseMediaListViewState,
65 
67  public sbIMediaListViewState,
68  public nsISerializable,
69  public nsIClassInfo
70 {
71 
72 public:
74  NS_DECL_SBIMEDIALISTVIEWSTATE
75  NS_DECL_NSISERIALIZABLE
76  NS_DECL_NSICLASSINFO
77 
78  // sbILocalDatabaseMediaListViewState
79  NS_IMETHOD GetSort(sbIMutablePropertyArray** aSort);
80  NS_IMETHOD GetSearch(sbILibraryConstraint** aSearch);
81  NS_IMETHOD GetFilter(sbILibraryConstraint** aFilter);
83  NS_IMETHOD GetFilterSet(sbLocalDatabaseCascadeFilterSetState** aFilterSet);
84  NS_IMETHOD GetTreeViewState(sbLocalDatabaseTreeViewState** aTreeViewState);
85 
88  sbILibraryConstraint* aSearch,
89  sbILibraryConstraint* aFilter,
92  sbLocalDatabaseTreeViewState* aTreeViewState);
93 private:
94  PRBool mInitialized;
95  nsCOMPtr<sbIMutablePropertyArray> mSort;
96  nsCOMPtr<sbILibraryConstraint> mSearch;
97  nsCOMPtr<sbILibraryConstraint> mFilter;
98  nsRefPtr<sbLocalDatabaseMediaListViewSelectionState> mSelection;
99  nsRefPtr<sbLocalDatabaseCascadeFilterSetState> mFilterSet;
100  nsRefPtr<sbLocalDatabaseTreeViewState> mTreeViewState;
101 };
102 
103 #endif /* __SBLOCALDATABASEMEDIALISTVIEWSTATE_H__ */
nsRefPtr< sbLocalDatabaseMediaListViewSelectionState > mSelection
NS_IMETHOD GetFilterSet(sbLocalDatabaseCascadeFilterSetState **aFilterSet)
NS_IMETHOD GetFilterSet(sbLocalDatabaseCascadeFilterSetState **aFilterSet)=0
nsCOMPtr< sbILibraryConstraint > mFilter
nsCOMPtr< sbIMutablePropertyArray > mSort
nsRefPtr< sbLocalDatabaseCascadeFilterSetState > mFilterSet
NS_IMETHOD GetFilter(sbILibraryConstraint **aFilter)=0
An interface to carry around arrays of nsIProperty instances Note that implementations of the interfa...
Saved state of a media list view.
nsRefPtr< sbLocalDatabaseTreeViewState > mTreeViewState
NS_IMETHOD GetSearch(sbILibraryConstraint **aSearch)=0
NS_IMETHOD GetTreeViewState(sbLocalDatabaseTreeViewState **aTreeViewState)=0
#define SB_ILOCALDATABASEMEDIALISTVIEWSTATE_IID
nsISerializable
NS_IMETHOD GetSelection(sbLocalDatabaseMediaListViewSelectionState **aState)=0
NS_IMETHOD GetFilter(sbILibraryConstraint **aFilter)
NS_IMETHOD GetSelection(sbLocalDatabaseMediaListViewSelectionState **aState)
NS_DEFINE_STATIC_IID_ACCESSOR(sbILocalDatabaseMediaListViewState,{0xd04ebdd9, 0x9c9c, 0x4acc,{0xb5, 0x4c, 0x7d, 0x30, 0x3b, 0x76, 0xee, 0xac}}) class sbLocalDatabaseMediaListViewState NS_IMETHOD GetSearch(sbILibraryConstraint **aSearch)
nsCOMPtr< sbILibraryConstraint > mSearch
NS_IMETHOD GetTreeViewState(sbLocalDatabaseTreeViewState **aTreeViewState)
restoreWindow aState
NS_IMETHOD GetSort(sbIMutablePropertyArray **aSort)=0