Roll src/third_party/WebKit ef7cfd7:80927b2 (svn 194570:194575)
[chromium-blink-merge.git] / ppapi / c / private / ppp_pexe_stream_handler.h
blob7ac92064a9886668192d960cb4c01d118c3aac7a
1 /* Copyright 2014 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
6 /* From private/ppp_pexe_stream_handler.idl,
7 * modified Wed Aug 6 13:11:06 2014.
8 */
10 #ifndef PPAPI_C_PRIVATE_PPP_PEXE_STREAM_HANDLER_H_
11 #define PPAPI_C_PRIVATE_PPP_PEXE_STREAM_HANDLER_H_
13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_stdint.h"
16 #define PPP_PEXESTREAMHANDLER_INTERFACE_1_0 "PPP_PexeStreamHandler;1.0"
17 #define PPP_PEXESTREAMHANDLER_INTERFACE PPP_PEXESTREAMHANDLER_INTERFACE_1_0
19 /**
20 * @file
21 * This file contains NaCl private interfaces. This interface is not versioned
22 * and is for internal Chrome use. It may change without notice. */
25 #include "ppapi/c/private/pp_file_handle.h"
27 /**
28 * @addtogroup Interfaces
29 * @{
31 struct PPP_PexeStreamHandler_1_0 {
32 /**
33 * Invoked as a result of a cache hit for a translated pexe.
35 void (*DidCacheHit)(void* user_data, PP_FileHandle nexe_file_handle);
36 /**
37 * Invoked as a result of a cache miss for a translated pexe.
38 * Provides the expected length of the pexe, as read from HTTP headers.
40 void (*DidCacheMiss)(void* user_data,
41 int64_t expected_total_length,
42 PP_FileHandle temp_nexe_file);
43 /**
44 * Invoked when a block of data has been downloaded.
45 * Only invoked after DidCacheMiss().
47 void (*DidStreamData)(void* user_data, const void* data, int32_t length);
48 /**
49 * Invoked when the stream has finished downloading, regardless of whether it
50 * succeeded. Not invoked if DidCacheHit() was called.
52 void (*DidFinishStream)(void* user_data, int32_t pp_error);
55 typedef struct PPP_PexeStreamHandler_1_0 PPP_PexeStreamHandler;
56 /**
57 * @}
60 #endif /* PPAPI_C_PRIVATE_PPP_PEXE_STREAM_HANDLER_H_ */