Symbian 和 OpenC 应用程序
我一直在研究试图找到开始开发应用程序的最佳方法,该应用程序旨在根据传出的短信分析用户的写作风格。 我已经安装了 Symbian 的 SDK 和 Carbide,并购买了一本关于其特定 C++ 风格的书来开始使用。 然而,我被告知要查看 Open C for Symbian,因为我以前有一些 C 经验。 我已经从 http://www.forum.nokia.com 安装了该插件/Resources_and_Information/Explore/Runtime_Platforms/Open_C_and_C++/ 并测试了一个简单的 Hello, World! 申请成功。
虽然最初的成功让我相信 Open C 对我来说是一个更好的选择,但我担心使用 Open C 的局限性。例如,我需要能够访问 Symbian 操作系统的本机功能来捕获击键,同时在短信编辑器中。 我还需要能够在后台运行我的应用程序并在系统启动时加载它,以免干扰用户的正常活动。
有人可以澄清 Open C 是否可以访问这些功能并满足我在开发这个特定应用程序方面的需求吗? 另外,与标准 Symbian C++ 相比,使用 Oepn C 有何限制?
I have been researching around trying to find the best way to begin developing an application which aims to analyse user's writing styles based on outgoing SMS messages. I have installed Symbian's SDK and Carbide and purchased a book on their specific style of C++ to get started. However, I was told to check out Open C for Symbian as I have some previous C experience. I have installed the plugin from http://www.forum.nokia.com/Resources_and_Information/Explore/Runtime_Platforms/Open_C_and_C++/ and tested a simple Hello, World! application with success.
Although, the initial success would lead me to believe Open C would be a better option for me, I am worried about limitations of using Open C. For example, I need to be able to access native functions of the Symbian OS to capture keystrokes while in the SMS composer. I also need to be able to run my application in the background and have it load on system startup as not to interfere with user's normal activities.
Can someone clarify if Open C can access such functions and fulfil my needs in terms of developing this specific application? Also, what are the limitations to using Oepn C in comparison to the standard Symbian C++?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我绝不是 Symbian 专家,但我们在这里使用了 Symbian 的 Open C/C++ 插件。 我的理解是,该插件只是一个扩展 - 它为您提供标准库并让您处理熟悉的函数(在我们的例子中,只是简单的 cstring.h 和 stdio.h 库就是我们正在寻找的)。
您仍然可以混合和匹配 Symbian 调用,并且可能必须处理一些痛苦的转换才能将您的
char*
转换为正确的“描述符"。 然而,您应该只需要在接触现有 Symbian 库的接口上执行这些操作(因为它们需要描述符,而不是char*
)。在我们的代码中,我们在某些地方使用
remove
调用来删除文件,并在同一个类中创建详细的 SymbianRFs
abdRFile< /代码> 对象。
所以,是的,虽然我们使用 C/C++ 库来执行一些低级操作和大量字符串操作,但我们还使用 Web 浏览器控件、按键输入监控等。
...是的,我们需要清理我们的代码。 :-)
I'm by no means a Symbian guru but we've used the Open C/C++ plugin for Symbian here. My understanding is that the plugin is simply an extension -- it gives you the standard libraries and lets you deal with familiar functions (in our case, just the simple cstring.h, and stdio.h libraries were what we were looking for).
You can still mix and match the Symbian calls and likely will have to deal with some painful conversions to get your
char*
into the proper "descriptor". However, you should only have to do these at the interfaces at which you're touching existing Symbian libraries (as they're going to expect descriptors, notchar*
s).In our code, we have some places where we're using a
remove
call to delete files and in the same class, creating the detailed SymbianRFs
abdRFile
objects.So yes, while we use C/C++ libraries to do some low-level stuff and a lot of string manipulation, we're also using the Web Browser Control, key input monitoring and all that.
...And yes, we need to clean up our code. :-)
Open C 为Symbian OS 程序提供了一组标准C 库,即它是一个库。
这意味着您可以在同一程序中自由调用 Open C 代码和 Symbian 本机代码,就像使用任何其他库一样,只要您尊重这些库所需的先决条件和假设。
这就是复杂性出现的地方,因为标准 Symbian API 通常需要诸如描述符和工作活动调度程序之类的东西,而 Open C 库则不需要。 但只要你小心,你就可以做你想做的事。
Open C provides a set of standard C libraries for Symbian OS programs i.e. it is a library.
This means you can call Open C code and Symbian native code freely in the same program, just as with any other library, provided you respect the preconditions and assumptions that the libraries require.
This is where the complexity comes in, because the standard Symbian APIs often require things like descriptors and a working active scheduler, whereas the Open C libraries don't. But provided you're careful you can do what you want.