diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:17 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:17 -0500 |
| commit | da78a9e329e272dedb2400b79a3bdeebff387d47 (patch) | |
| tree | e6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/ko/mozilla/add-ons/plugins/reference | |
| parent | 1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff) | |
| download | translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2 translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip | |
initial commit
Diffstat (limited to 'files/ko/mozilla/add-ons/plugins/reference')
3 files changed, 130 insertions, 0 deletions
diff --git a/files/ko/mozilla/add-ons/plugins/reference/index.html b/files/ko/mozilla/add-ons/plugins/reference/index.html new file mode 100644 index 0000000000..fcb2ba7232 --- /dev/null +++ b/files/ko/mozilla/add-ons/plugins/reference/index.html @@ -0,0 +1,16 @@ +--- +title: NPAPI plugin reference +slug: Mozilla/Add-ons/Plugins/Reference +tags: + - Deprecated + - Landing + - NPAPI + - NeedsTranslation + - Plugins + - Reference + - TopicStub +translation_of: Archive/Plugins/Reference +--- +<p>{{deprecated_header}}</p> +<p>The articles below describe each of the APIs related to NPAPI plugins.</p> +<p>{{LandingPageListSubpages}}</p> diff --git a/files/ko/mozilla/add-ons/plugins/reference/np_getmimedescription/index.html b/files/ko/mozilla/add-ons/plugins/reference/np_getmimedescription/index.html new file mode 100644 index 0000000000..ca0c233725 --- /dev/null +++ b/files/ko/mozilla/add-ons/plugins/reference/np_getmimedescription/index.html @@ -0,0 +1,38 @@ +--- +title: NP GetMIMEDescription +slug: Mozilla/Add-ons/Plugins/Reference/NP_GetMIMEDescription +translation_of: Archive/Plugins/Reference/NP_GetMIMEDescription +--- +<p>NP_GetMIMEDescription 플러그인이 지원하는 MIME Type 목록을 리턴합니다. Unix (Linux) 와 MacOS 에서 동작합니다. Windows에서는 지원하는 mimetype을 dll 리소스 파일에 정의하여야합니다.</p> +<p>각각의 MIME type에 대한 서술은 세미콜론(;)으로 구분되어야 합니다.<br> + 각각의 Mime type에 대한 서술은 Mime type, 확장목록 그리고 간략한 설명을 포함합니다.</p> +<h3 id="하나의_MIME_type_를_사용한_경우">하나의 MIME type 를 사용한 경우</h3> +<pre>// example inside http://mxr.mozilla.org/mozilla-central/source/modules/plugin/sdk/samples/basic/unix/plugin.cpp +#define MIME_TYPE_DESCRIPTION "application/basic-plugin:bsp:Basic Example Plug-in for Mozilla" +const char* NP_GetMIMEDescription(void) +{ + return(MIME_TYPES_DESCRIPTION); +}</pre> +<h3 id="둘의_MIME_type_를_사용한_경우">둘의 MIME type 를 사용한 경우</h3> +<pre>const char* NP_GetMIMEDescription(void) +{ + return "application/basic-example-plugin:xmp1:Example 1;application/basic-example2-plugin:xmp2, xm2p:Example 2"; +}</pre> +<h3 id="Gnome_Integration">Gnome Integration</h3> +<p>GNOME VFS (gnome-vfs-2.0)를 사용하는 경우라면, 아래 함수를 이용하여 MIME type description 을 얻을수 있습니다.</p> +<pre>#include <libgnomevfs/gnome-vfs-mime-handlers.h> +#include <libgnomevfs/gnome-vfs-mime-info.h> +#include <libgnomevfs/gnome-vfs-utils.h> + +// const char* gnome_vfs_mime_get_description (const char *mime_type); +const char* desc = gnome_vfs_mime_get_description ("audio/ogg");</pre> +<p>If you use GNOME GIO (gio-2.0), you can get the MIME type description too.</p> +<pre>#include <gio/gio.h> +const char* desc = g_content_type_get_description("audio/ogg");</pre> +<h3 id="JavaScript">JavaScript</h3> +<p>아래 코드를 이용하여 웹 페이지 내에서, MIME Type에 대한 정보를 얻을 수 있습니다.</p> +<pre>var mimetype = navigator.mimeTypes['application/basic-example-plugin']; +if (mimetype) { + alert(mimetype.type + ':' + mimetype.suffixes + ':' + mimetype.description); +} +</pre> diff --git a/files/ko/mozilla/add-ons/plugins/reference/npn_posturlnotify/index.html b/files/ko/mozilla/add-ons/plugins/reference/npn_posturlnotify/index.html new file mode 100644 index 0000000000..c60a613113 --- /dev/null +++ b/files/ko/mozilla/add-ons/plugins/reference/npn_posturlnotify/index.html @@ -0,0 +1,76 @@ +--- +title: NPN_PostURLNotify +slug: Mozilla/Add-ons/Plugins/Reference/NPN_PostURLNotify +translation_of: Archive/Plugins/Reference/NPN_PostURLNotify +--- +<p> « <a href="https://developer.mozilla.org/ko/docs/Gecko_Plugin_API_Reference">Gecko Plugin API Reference</a> « <a href="https://developer.mozilla.org/ko/docs/Gecko_Plugin_API_Reference/Plug-in_Side_Plug-in_API">Plug-in Side Plug-in API</a> + + +</p><h2 id="Summary" name="Summary">개요</h2> + +<p>지정한 URL로 POST 호출하고, 결과 알림을 받는다.</p> + +<h2 id="Syntax" name="Syntax">문법</h2> + +<pre class="syntaxbox">#include <npapi.h> + +NPError NPN_PostURLNotify(NPP instance, + const char* url, + const char* target, + uint32 len, + const char* buf, + NPBool file, + void* notifyData); +</pre> + +<h3 id="Parameters" name="Parameters">파라메터</h3> + +<p>함수는 다음과 같은 파라메터를 입력받는다:</p> + +<dl> + <dt>instance</dt> + <dd>현재 플러그인 인스턴스, specified by the plug-in.</dd> + <dt>url</dt> + <dd>POST 호출할 URL, 플러그인.</dd> + <dt>target</dt> + <dd>대상 윈도우, specified by the plug-in. 자세한 설명은 NPN_GetURL을 보라.</dd> + <dt>len</dt> + <dd>buf의 길이.</dd> + <dt>buf</dt> + <dd>로컬 임시 파일 경로, 또는 POST로 전송할 데이터 버퍼.</dd> + <dt>file</dt> + <dd>파일을 POST로 전송할지 여부: + <ul> + <li>true: buf에 지정된 로컬 파일을 전송하고, 완료되면 파일은 삭제한다.</li> + <li>false: buf에 있는 데이터를 직접 전송한다.</li> + </ul> + </dd> + <dt>notifydata</dt> + <dd>POST 요청을 식별하기 위한 값. <a href="/en-US/docs/NPP_URLNotify">NPP_URLNotify</a>의 호출에 의해 이 값이 전달된다. (<a href="#Description">아래 설명을 보라</a>).</dd> +</dl> + +<h3 id="Returns" name="Returns">반환값</h3> + +<ul> + <li>성공하면 NPERR_NO_ERROR을 리턴한다.</li> + <li>실패하면 플러그인은 로드되지 않고, 에러 코드를 리턴한다. 에러값은 <a href="/en-US/docs/NPAPI/Constants#Error_Codes">Error Codes</a> 를 보라.</li> +</ul> + +<h2 id="Description" name="Description">설명</h2> + +<p><code>NPN_PostURLNotify</code> 함수는 <a href="/en-US/docs/NPN_PostURL">NPN_PostURL</a>와 거의 같지만, 다음과 같은 차이가 있다:</p> + +<ul> + <li><code>NPN_PostURLNotify</code> 는 메모리 버퍼를 사용할 때 헤더를 지정할 수 있다.</li> + <li><code>NPN_PostURLNotify</code> 는 성공하든 실패하든 요청이 완료되면 <a href="/en-US/docs/NPP_URLNotify">NPP_URLNotify</a>를 호출한다. 더 자세한 설명을 보려면 <a href="/en-US/docs/NPN_PostURL">NPN_PostURL</a>을 보도록 한다.</li> +</ul> + +<p><code>NPN_PostURLNotify</code>는 비동기로 동작한다: 함수는 바로 리턴되고, 요청이 처리되면 <a href="/en-US/docs/NPP_URLNotify">NPP_URLNotify</a>를 호출한다.</p> + +<p>If this function is called with a target parameter value of _self or a parent to _self, this function should return an INVALID_PARAM NPError. This is the only way to notify the plug-in once it is deleted. See <a href="/en-US/docs/NPN_GetURL">NPN_GetURL</a> for information about this parameter.</p> + +<h2 id="See_also" name="See_also">참고</h2> + +<ul> + <li><a href="/en-US/docs/NPN_GetURL">NPN_GetURL</a>, <a href="/en-US/docs/NPP_URLNotify">NPP_URLNotify</a>, <a href="/en-US/docs/NPN_PostURL">NPN_PostURL</a></li> +</ul> |
