Questions tagged [djinni]

djinni is a tool by the Dropbox team to simplify cross platform development for mobile devices. Typical usage is a c++ core library which interfaces with native Objective-C or Java code for iOS and Android devices.

38 questions
6
votes
1 answer

How to define const getters for djinni?

I define a C++ interface with djinni: member = interface +c { get_id(): string; get_name(): string; } My inherited implementation uses const getters, i.e. class MyMemeber: public Member { private: string id; string name; …
Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
5
votes
0 answers

Asio (non-boost) with Android NDK

I want to use the non-boost asio (http://think-async.com/) in my project. The project is written in C++, and I use dropbox/djinni to generate the wrappers to Android and iOS. In native C++ asio works fine without includeing boost. But I stucked at…
Horv
  • 154
  • 1
  • 9
4
votes
1 answer

djinni - pointers and circular references between C++ and swift/objective C/java

I have two djinni interfaces, one to be implemented in Swift/objective C/java SwiftObj and one to be implemented in C++ CPPObj. SwiftObj = interface +o +j { someSwiftMethod(); } CPPObj = interface +c { static create(swiftObj: SwiftObj):…
Martin Massera
  • 1,718
  • 1
  • 21
  • 47
4
votes
1 answer

Dropbox Djinni - Java Interface vs Class Extension

Is there a way to define a Java/Obj-C interface in djinni such that it can be implemented in Java instead of extended. I have run into issues with multiple extension limitations. Though there are work around I would like to know if this is possible.…
running-codebase
  • 998
  • 2
  • 12
  • 17
4
votes
1 answer

Dropbox Djinni - Interface Inheritance

Is there a way to inherit / extend interfaces in Djinni's DSL? For example: parent = interface +c { parentMethod(); } child1 = interface +c { childMethod1(); } child2 = interface +c { childMethod2(); } I want to inherit child1 and child2…
Benny
  • 133
  • 8
3
votes
1 answer

Djinni: how to deal with wannabe overloaded methods?

I've recently used djinni in a medium sized mobile project. It's really a useful tool that helped us easing and speeding up the development process. More than once it would have been helpful overloading a method. This is not possible in djinni (I…
skypjack
  • 49,335
  • 19
  • 95
  • 187
3
votes
1 answer

Djinni: can I define the interfaces as implementable in all the environments?

Consider the documentation of Djinni. It says that: # This interface will be implemented in C++ and can be called from any language. my_cpp_interface = interface +c { # ... } Also, it says that: # This interface will be implemented in Java and…
skypjack
  • 49,335
  • 19
  • 95
  • 187
2
votes
1 answer

Alternative to interface inheritance with Djinni

I am using Djinni to share some big c++ codebase among android and ios. One of the various components (let's call it Foo!!!) has a different implementation on android and ios. Foo is an interface, which the c++ code uses without the need of knowing…
athos
  • 1,281
  • 3
  • 14
  • 24
2
votes
1 answer

Java Inheritance in Djinni supported?

Does Djinni (dropbox) supports inheritance ? Following this description and example. I have tried to use inheritance but it gives a syntax error. I am not sure if that's all required or am i missing something. Parent Class: Explorer = interface +c…
Ajji
  • 3,068
  • 2
  • 30
  • 31
2
votes
1 answer

Library not found for -ljson11 but -lsqlite 3 is found

I'm trying to implement this tutorial with the addition that I want to include the json11 C++ library. I followed the same process for both, downloaded the repo from: https://github.com/libmx3/mx3, added them to the /deps/ folder of my project, and…
Mknsri
  • 87
  • 9
2
votes
2 answers

how to link libcurl in dropbox djinni project

i need libcurl to do something in dropbox djinni mx3 project; But when i create libmx3_android.so then show this error message: "undefined reference to 'curl_easy_init'"...... Because i can not link libcurl.a to this project. for android jni, i find…
ttycode
  • 21
  • 1
2
votes
1 answer

Android NDK linking OpenSSL

I want to use openssl to my android ndk project. But when I build it, I got these errors: Error:(38) undefined reference to SSL_library_init' Error:(39) undefined reference toSSL_load_error_strings' Error:(40) undefined reference to…
Horv
  • 154
  • 1
  • 9
1
vote
1 answer

Passing large buffers from C++ to Java on Android

I'm trying to figure out the best way to pass large amounts (20Kb - 2MB) of data from C++ to Java on Android. I'm using Djinni to generate as much of the bridge code as possible. The options I'm considering are: Use AHardwareBuffer - looks like an…
Josh A.
  • 374
  • 3
  • 15
1
vote
1 answer

How to get rid of Djinni generated unnecessary function - ToString (in Java)/Description (in Objc)?

I am trying to understand the impact of Djinni generated function on binary-size of my cross-platform project. My project does not have a need for these generated ToString/description functions. Is there a way to get rid of them?
1
vote
2 answers

Djinni call a javacallback from C++

I'm trying to call from C++ into java. I've understood the cux of this answer but I feel I'm not able to achieve the last mile. What classes and methods do I have to use to call Java from C++? Also not enough points to post comments on there. I…
rstr1112
  • 308
  • 4
  • 13
1
2 3