aboutsummaryrefslogtreecommitdiff
path: root/files/ko/mozilla/add-ons/plugins/reference/npn_posturlnotify/index.html
blob: c60a613113f122bc6f4082c318bbd3211efb0b87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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 &lt;npapi.h&gt;

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>