1 // Copyright 2005, Google Inc.
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are met:
6 // 1. Redistributions of source code must retain the above copyright notice,
7 // this list of conditions and the following disclaimer.
8 // 2. Redistributions in binary form must reproduce the above copyright notice,
9 // this list of conditions and the following disclaimer in the documentation
10 // and/or other materials provided with the distribution.
11 // 3. Neither the name of Google Inc. nor the names of its contributors may be
12 // used to endorse or promote products derived from this software without
13 // specific prior written permission.
15 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
16 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
18 // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #include "gears/localserver/npapi/managed_resource_store_np.h"
28 #include "gears/base/common/url_utils.h"
29 #include "gears/base/npapi/module_wrapper.h"
31 DECLARE_GEARS_WRAPPER(GearsManagedResourceStore
);
34 void Dispatcher
<GearsManagedResourceStore
>::Init() {
35 RegisterProperty("name", &GearsManagedResourceStore::GetName
, NULL
);
36 RegisterProperty("requiredCookie",
37 &GearsManagedResourceStore::GetRequiredCookie
, NULL
);
38 RegisterProperty("enabled", &GearsManagedResourceStore::GetEnabled
,
39 &GearsManagedResourceStore::SetEnabled
);
40 RegisterProperty("manifestUrl", &GearsManagedResourceStore::GetManifestUrl
,
41 &GearsManagedResourceStore::SetManifestUrl
);
42 RegisterProperty("lastUpdateCheckTime",
43 &GearsManagedResourceStore::GetLastUpdateCheckTime
, NULL
);
44 RegisterProperty("updateStatus",
45 &GearsManagedResourceStore::GetUpdateStatus
, NULL
);
46 RegisterProperty("lastErrorMessage",
47 &GearsManagedResourceStore::GetLastErrorMessage
, NULL
);
48 RegisterProperty("currentVersion",
49 &GearsManagedResourceStore::GetCurrentVersion
, NULL
);
50 RegisterMethod("checkForUpdate",
51 &GearsManagedResourceStore::CheckForUpdate
);
54 //------------------------------------------------------------------------------
56 //------------------------------------------------------------------------------
57 void GearsManagedResourceStore::GetName(JsCallContext
*context
) {
58 context
->SetException(STRING16(L
"Not Implemented"));
61 //------------------------------------------------------------------------------
63 //------------------------------------------------------------------------------
64 void GearsManagedResourceStore::GetRequiredCookie(JsCallContext
*context
) {
65 context
->SetException(STRING16(L
"Not Implemented"));
68 //------------------------------------------------------------------------------
70 //------------------------------------------------------------------------------
71 void GearsManagedResourceStore::GetEnabled(JsCallContext
*context
) {
72 context
->SetException(STRING16(L
"Not Implemented"));
75 //------------------------------------------------------------------------------
77 //------------------------------------------------------------------------------
78 void GearsManagedResourceStore::SetEnabled(JsCallContext
*context
) {
79 context
->SetException(STRING16(L
"Not Implemented"));
82 //------------------------------------------------------------------------------
84 //------------------------------------------------------------------------------
85 void GearsManagedResourceStore::GetManifestUrl(JsCallContext
*context
) {
86 context
->SetException(STRING16(L
"Not Implemented"));
89 //------------------------------------------------------------------------------
91 //------------------------------------------------------------------------------
92 void GearsManagedResourceStore::SetManifestUrl(JsCallContext
*context
) {
93 context
->SetException(STRING16(L
"Not Implemented"));
96 //------------------------------------------------------------------------------
97 // GetLastUpdateCheckTime
98 //------------------------------------------------------------------------------
99 void GearsManagedResourceStore::GetLastUpdateCheckTime(JsCallContext
*context
) {
100 context
->SetException(STRING16(L
"Not Implemented"));
103 //------------------------------------------------------------------------------
105 //------------------------------------------------------------------------------
106 void GearsManagedResourceStore::GetUpdateStatus(JsCallContext
*context
) {
107 context
->SetException(STRING16(L
"Not Implemented"));
110 //------------------------------------------------------------------------------
111 // GetLastErrorMessage
112 //------------------------------------------------------------------------------
113 void GearsManagedResourceStore::GetLastErrorMessage(JsCallContext
*context
) {
114 context
->SetException(STRING16(L
"Not Implemented"));
117 //------------------------------------------------------------------------------
119 //------------------------------------------------------------------------------
120 void GearsManagedResourceStore::CheckForUpdate(JsCallContext
*context
) {
121 context
->SetException(STRING16(L
"Not Implemented"));
124 //------------------------------------------------------------------------------
126 //------------------------------------------------------------------------------
127 void GearsManagedResourceStore::GetCurrentVersion(JsCallContext
*context
) {
128 context
->SetException(STRING16(L
"Not Implemented"));