[Author: mpcomplete]
[google-gears.git] / gears / localserver / npapi / managed_resource_store_np.cc
blob7bcac323e0c6e2a5f488aac2ec46f6805300224f
1 // Copyright 2005, Google Inc.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are met:
5 //
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);
33 // static
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 //------------------------------------------------------------------------------
55 // GetName
56 //------------------------------------------------------------------------------
57 void GearsManagedResourceStore::GetName(JsCallContext *context) {
58 context->SetException(STRING16(L"Not Implemented"));
61 //------------------------------------------------------------------------------
62 // GetRequiredCookie
63 //------------------------------------------------------------------------------
64 void GearsManagedResourceStore::GetRequiredCookie(JsCallContext *context) {
65 context->SetException(STRING16(L"Not Implemented"));
68 //------------------------------------------------------------------------------
69 // GetEnabled
70 //------------------------------------------------------------------------------
71 void GearsManagedResourceStore::GetEnabled(JsCallContext *context) {
72 context->SetException(STRING16(L"Not Implemented"));
75 //------------------------------------------------------------------------------
76 // SetEnabled
77 //------------------------------------------------------------------------------
78 void GearsManagedResourceStore::SetEnabled(JsCallContext *context) {
79 context->SetException(STRING16(L"Not Implemented"));
82 //------------------------------------------------------------------------------
83 // GetManifestUrl
84 //------------------------------------------------------------------------------
85 void GearsManagedResourceStore::GetManifestUrl(JsCallContext *context) {
86 context->SetException(STRING16(L"Not Implemented"));
89 //------------------------------------------------------------------------------
90 // SetManifestUrl
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 //------------------------------------------------------------------------------
104 // GetUpdateStatus
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 //------------------------------------------------------------------------------
118 // CheckForUpdate
119 //------------------------------------------------------------------------------
120 void GearsManagedResourceStore::CheckForUpdate(JsCallContext *context) {
121 context->SetException(STRING16(L"Not Implemented"));
124 //------------------------------------------------------------------------------
125 // GetCurrentVersion
126 //------------------------------------------------------------------------------
127 void GearsManagedResourceStore::GetCurrentVersion(JsCallContext *context) {
128 context->SetException(STRING16(L"Not Implemented"));