Back to index

lightning-sunbird  0.9+nobinonly
action.cpp
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #include "action.h"
00039 
00040 char * FormatAction(int aAction)
00041 {
00042   static char string[64] = {'\0'};
00043   switch (aAction) {
00044     case action_invalid:
00045       strcpy(string, "invalid action");
00046       break;
00047     case action_npn_version:
00048       strcpy(string, "npn_version");
00049       break;
00050     case action_npn_get_url_notify:
00051       strcpy(string, "npn_get_url_notify");
00052       break;
00053     case action_npn_get_url:
00054       strcpy(string, "npn_get_url");
00055       break;
00056     case action_npn_post_url_notify:
00057       strcpy(string, "npn_post_url_notify");
00058       break;
00059     case action_npn_post_url:
00060       strcpy(string, "npn_post_url");
00061       break;
00062     case action_npn_request_read:
00063       strcpy(string, "npn_request_read");
00064       break;
00065     case action_npn_new_stream:
00066       strcpy(string, "npn_new_stream");
00067       break;
00068     case action_npn_write:
00069       strcpy(string, "npn_write");
00070       break;
00071     case action_npn_destroy_stream:
00072       strcpy(string, "npn_destroy_stream");
00073       break;
00074     case action_npn_status:
00075       strcpy(string, "npn_status");
00076       break;
00077     case action_npn_user_agent:
00078       strcpy(string, "npn_user_agent");
00079       break;
00080     case action_npn_mem_alloc:
00081       strcpy(string, "npn_mem_alloc");
00082       break;
00083     case action_npn_mem_free:
00084       strcpy(string, "npn_mem_free");
00085       break;
00086     case action_npn_mem_flush:
00087       strcpy(string, "npn_mem_flush");
00088       break;
00089     case action_npn_reload_plugins:
00090       strcpy(string, "npn_reload_plugins");
00091       break;
00092     case action_npn_get_java_env:
00093       strcpy(string, "npn_get_java_env");
00094       break;
00095     case action_npn_get_java_peer:
00096       strcpy(string, "npn_get_java_peer");
00097       break;
00098     case action_npn_get_value:
00099       strcpy(string, "npn_get_value");
00100       break;
00101     case action_npn_set_value:
00102       strcpy(string, "npn_set_value");
00103       break;
00104     case action_npn_invalidate_rect:
00105       strcpy(string, "npn_invalidate_rect");
00106       break;
00107     case action_npn_invalidate_region:
00108       strcpy(string, "npn_invalidate_region");
00109       break;
00110     case action_npn_force_redraw:
00111       strcpy(string, "npn_force_redraw");
00112       break;
00113  
00114     case action_npp_new:
00115       strcpy(string, "npp_new");
00116       break;
00117     case action_npp_destroy:
00118       strcpy(string, "npp_destroy");
00119       break;
00120     case action_npp_set_window:
00121       strcpy(string, "npp_set_window");
00122       break;
00123     case action_npp_new_stream:
00124       strcpy(string, "npp_new_stream");
00125       break;
00126     case action_npp_destroy_stream:
00127       strcpy(string, "npp_destroy_stream");
00128       break;
00129     case action_npp_stream_as_file:
00130       strcpy(string, "npp_stream_as_file");
00131       break;
00132     case action_npp_write_ready:
00133       strcpy(string, "npp_write_ready");
00134       break;
00135     case action_npp_write:
00136       strcpy(string, "npp_write");
00137       break;
00138     case action_npp_print:
00139       strcpy(string, "npp_print");
00140       break;
00141     case action_npp_handle_event:
00142       strcpy(string, "npp_handle_event");
00143       break;
00144     case action_npp_url_notify:
00145       strcpy(string, "npp_url_notify");
00146       break;
00147     case action_npp_get_java_class:
00148       strcpy(string, "npp_get_java_class");
00149       break;
00150     case action_npp_get_value:
00151       strcpy(string, "npp_get_value");
00152       break;
00153     case action_npp_set_value:
00154       strcpy(string, "npp_set_value");
00155       break;
00156     default:
00157       strcpy(string, "Unknown action!");
00158       break;
00159   }
00160   return string;
00161 }