OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 |
| 5 #ifndef PPAPI_CPP_HELLO_H_ |
| 6 #define PPAPI_CPP_HELLO_H_ |
| 7 |
| 8 #include "ppapi/c/dev/ppb_hello_dev.h" |
| 9 #include "ppapi/cpp/completion_callback.h" |
| 10 #include "ppapi/cpp/instance.h" |
| 11 #include "ppapi/cpp/resource.h" |
| 12 |
| 13 /// @file |
| 14 /// This file defines the API to create a hello. |
| 15 |
| 16 namespace pp { |
| 17 |
| 18 /// The <code>Hello</code> class identifies the hello type. |
| 19 class Hello : public Resource { |
| 20 public: |
| 21 /// This constructor creates a hello. |
| 22 /// |
| 23 /// @param[in] instance A <code>Instance</code> identifying the instance. |
| 24 Hello(Instance* instance); |
| 25 |
| 26 /// Hello() says hello. |
| 27 /// |
| 28 /// @return Returns <code>PP_OK</code>. |
| 29 int32_t SayHello(); |
| 30 |
| 31 /// WhoAreYou returns who execute this function. |
| 32 /// |
| 33 /// @param[out] name A buffer to store the name who execute this function. |
| 34 /// @param[in] size The size of name buffer. |
| 35 /// @param[in] callback A callback which is invoked when asynchronous request |
| 36 /// is completed. |
| 37 void WhoAreYou(char *name, uint32_t size, CompletionCallback callback); |
| 38 }; |
| 39 |
| 40 } // namespace pp |
| 41 |
| 42 #endif // PPAPI_CPP_HELLO_H_ |
OLD | NEW |