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
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.
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 ***** */
40 char * FormatAction(int aAction
)
42 static char string
[64] = {'\0'};
45 strcpy(string
, "invalid action");
47 case action_npn_version
:
48 strcpy(string
, "npn_version");
50 case action_npn_get_url_notify
:
51 strcpy(string
, "npn_get_url_notify");
53 case action_npn_get_url
:
54 strcpy(string
, "npn_get_url");
56 case action_npn_post_url_notify
:
57 strcpy(string
, "npn_post_url_notify");
59 case action_npn_post_url
:
60 strcpy(string
, "npn_post_url");
62 case action_npn_request_read
:
63 strcpy(string
, "npn_request_read");
65 case action_npn_new_stream
:
66 strcpy(string
, "npn_new_stream");
68 case action_npn_write
:
69 strcpy(string
, "npn_write");
71 case action_npn_destroy_stream
:
72 strcpy(string
, "npn_destroy_stream");
74 case action_npn_status
:
75 strcpy(string
, "npn_status");
77 case action_npn_user_agent
:
78 strcpy(string
, "npn_user_agent");
80 case action_npn_mem_alloc
:
81 strcpy(string
, "npn_mem_alloc");
83 case action_npn_mem_free
:
84 strcpy(string
, "npn_mem_free");
86 case action_npn_mem_flush
:
87 strcpy(string
, "npn_mem_flush");
89 case action_npn_reload_plugins
:
90 strcpy(string
, "npn_reload_plugins");
92 case action_npn_get_java_env
:
93 strcpy(string
, "npn_get_java_env");
95 case action_npn_get_java_peer
:
96 strcpy(string
, "npn_get_java_peer");
98 case action_npn_get_value
:
99 strcpy(string
, "npn_get_value");
101 case action_npn_set_value
:
102 strcpy(string
, "npn_set_value");
104 case action_npn_invalidate_rect
:
105 strcpy(string
, "npn_invalidate_rect");
107 case action_npn_invalidate_region
:
108 strcpy(string
, "npn_invalidate_region");
110 case action_npn_force_redraw
:
111 strcpy(string
, "npn_force_redraw");
115 strcpy(string
, "npp_new");
117 case action_npp_destroy
:
118 strcpy(string
, "npp_destroy");
120 case action_npp_set_window
:
121 strcpy(string
, "npp_set_window");
123 case action_npp_new_stream
:
124 strcpy(string
, "npp_new_stream");
126 case action_npp_destroy_stream
:
127 strcpy(string
, "npp_destroy_stream");
129 case action_npp_stream_as_file
:
130 strcpy(string
, "npp_stream_as_file");
132 case action_npp_write_ready
:
133 strcpy(string
, "npp_write_ready");
135 case action_npp_write
:
136 strcpy(string
, "npp_write");
138 case action_npp_print
:
139 strcpy(string
, "npp_print");
141 case action_npp_handle_event
:
142 strcpy(string
, "npp_handle_event");
144 case action_npp_url_notify
:
145 strcpy(string
, "npp_url_notify");
147 case action_npp_get_java_class
:
148 strcpy(string
, "npp_get_java_class");
150 case action_npp_get_value
:
151 strcpy(string
, "npp_get_value");
153 case action_npp_set_value
:
154 strcpy(string
, "npp_set_value");
157 strcpy(string
, "Unknown action!");