Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update libpomelo #58

Merged
merged 2 commits into from
Jul 17, 2014
Merged

update libpomelo #58

merged 2 commits into from
Jul 17, 2014

Conversation

mrFranklin
Copy link
Contributor

some change for protobuf
@cynron
Copy link
Member

cynron commented Jul 17, 2014

@mrFranklin 非常感谢这个pull request,很棒。

可以做一下修改:

  • pc_event_cb 的参数,不建议使用const char*, 使用enum,在编程时可能会方便很多,也就是定义
    PC_PROTO_OP_READ, PC_PROTO_OP_WRITE, 对于具体的哪个文件,也可以使用enum,建议定义PC_PROTO_VERSION, PC_PROTO_CLIENT, PC_PROTO_SERVER.
  • 关于pc_proto_init, 没太弄明白proto_read_dir和proto_write_dir的区别,或者由用户来分别指定相应的本地存储文件位置?

Xy

Update some poroto define
issue NetEase#58
@mrFranklin
Copy link
Contributor Author

  1. ok,上面的建议我改一下再提交一下。确实是定义成常量好一些,我当时是看原来直接写的字符串就偷懒直接用了。。。~
  2. "proto_read_dir和proto_write_dir的区别"
    proto_read_dir和proto_write_dir在手机平台上还是有区别的,write的目录是平台上的一个允许写文件的目录,而read目录比较特殊:如果资源没有更新,就读的默认安装后资源存放的目录,这个目录和write目录不同;如果资源更新过(这时候会更新到可写目录),就读的是可读写目录了,这时候的目录和write目录相同。

"或者由用户来分别指定相应的本地存储文件位置?“
是的,这个需要应用自身根据不同平台分别获取读写目录传进来(cocos2dx上已经有函数做了跨平台封装)。原来的实现没有指定目录,会在手机上读写不成功的。

cynron added a commit that referenced this pull request Jul 17, 2014
client: fix a proto bug and do some optimization
@cynron cynron merged commit 83e6c9b into NetEase:master Jul 17, 2014
cynron referenced this pull request in jiangzhuo/libpomelo Sep 25, 2014
希望以後合併代碼的時候認真審核
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants