Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / modules / plugin / sdk / samples / npthread / windows / action.cpp
blob884e45b04b731c8e46458e76856b680d07e87470
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include "action.h"
40 char * FormatAction(int aAction)
42 static char string[64] = {'\0'};
43 switch (aAction) {
44 case action_invalid:
45 strcpy(string, "invalid action");
46 break;
47 case action_npn_version:
48 strcpy(string, "npn_version");
49 break;
50 case action_npn_get_url_notify:
51 strcpy(string, "npn_get_url_notify");
52 break;
53 case action_npn_get_url:
54 strcpy(string, "npn_get_url");
55 break;
56 case action_npn_post_url_notify:
57 strcpy(string, "npn_post_url_notify");
58 break;
59 case action_npn_post_url:
60 strcpy(string, "npn_post_url");
61 break;
62 case action_npn_request_read:
63 strcpy(string, "npn_request_read");
64 break;
65 case action_npn_new_stream:
66 strcpy(string, "npn_new_stream");
67 break;
68 case action_npn_write:
69 strcpy(string, "npn_write");
70 break;
71 case action_npn_destroy_stream:
72 strcpy(string, "npn_destroy_stream");
73 break;
74 case action_npn_status:
75 strcpy(string, "npn_status");
76 break;
77 case action_npn_user_agent:
78 strcpy(string, "npn_user_agent");
79 break;
80 case action_npn_mem_alloc:
81 strcpy(string, "npn_mem_alloc");
82 break;
83 case action_npn_mem_free:
84 strcpy(string, "npn_mem_free");
85 break;
86 case action_npn_mem_flush:
87 strcpy(string, "npn_mem_flush");
88 break;
89 case action_npn_reload_plugins:
90 strcpy(string, "npn_reload_plugins");
91 break;
92 case action_npn_get_java_env:
93 strcpy(string, "npn_get_java_env");
94 break;
95 case action_npn_get_java_peer:
96 strcpy(string, "npn_get_java_peer");
97 break;
98 case action_npn_get_value:
99 strcpy(string, "npn_get_value");
100 break;
101 case action_npn_set_value:
102 strcpy(string, "npn_set_value");
103 break;
104 case action_npn_invalidate_rect:
105 strcpy(string, "npn_invalidate_rect");
106 break;
107 case action_npn_invalidate_region:
108 strcpy(string, "npn_invalidate_region");
109 break;
110 case action_npn_force_redraw:
111 strcpy(string, "npn_force_redraw");
112 break;
114 case action_npp_new:
115 strcpy(string, "npp_new");
116 break;
117 case action_npp_destroy:
118 strcpy(string, "npp_destroy");
119 break;
120 case action_npp_set_window:
121 strcpy(string, "npp_set_window");
122 break;
123 case action_npp_new_stream:
124 strcpy(string, "npp_new_stream");
125 break;
126 case action_npp_destroy_stream:
127 strcpy(string, "npp_destroy_stream");
128 break;
129 case action_npp_stream_as_file:
130 strcpy(string, "npp_stream_as_file");
131 break;
132 case action_npp_write_ready:
133 strcpy(string, "npp_write_ready");
134 break;
135 case action_npp_write:
136 strcpy(string, "npp_write");
137 break;
138 case action_npp_print:
139 strcpy(string, "npp_print");
140 break;
141 case action_npp_handle_event:
142 strcpy(string, "npp_handle_event");
143 break;
144 case action_npp_url_notify:
145 strcpy(string, "npp_url_notify");
146 break;
147 case action_npp_get_java_class:
148 strcpy(string, "npp_get_java_class");
149 break;
150 case action_npp_get_value:
151 strcpy(string, "npp_get_value");
152 break;
153 case action_npp_set_value:
154 strcpy(string, "npp_set_value");
155 break;
156 default:
157 strcpy(string, "Unknown action!");
158 break;
160 return string;