From: <svn...@op...> - 2009-05-31 21:30:41
|
Author: dgollub Date: Sun May 31 23:30:32 2009 New Revision: 5656 URL: http://www.opensync.org/changeset/5656 Log: Adapt python wrapper to api changes Only dropped missing interface from wrapper. TODO: wrap new interfaces refs #1084 Modified: branches/opensync-ticket1084/wrapper/opensync-merger.i Modified: branches/opensync-ticket1084/wrapper/opensync-merger.i ============================================================================== --- branches/opensync-ticket1084/wrapper/opensync-merger.i Sun May 31 23:23:55 2009 (r5655) +++ branches/opensync-ticket1084/wrapper/opensync-merger.i Sun May 31 23:30:32 2009 (r5656) @@ -1,8 +1,8 @@ typedef struct {} Capability; %extend Capability { - Capability(Capabilities *capabilities, const char *objtype, const char *name) { + Capability(OSyncCapabilitiesObjType *capobjtype, const char *name) { Error *err = NULL; - Capability *cap = osync_capability_new(capabilities, objtype, name, &err); + Capability *cap = osync_capability_new(capobjtype, name, &err); if (raise_exception_on_error(err)) return NULL; else @@ -17,26 +17,6 @@ return osync_capability_get_name(self); } - Capability *get_next() { - return osync_capability_get_next(self); - } - - bool has_key() { - return osync_capability_has_key(self); - } - - int get_key_count() { - return osync_capability_get_key_count(self); - } - - const char *get_nth_key(int nth) { - return osync_capability_get_nth_key(self, nth); - } - - void add_key(const char *name) { - osync_capability_add_key(self, name); - } - %pythoncode %{ name = property(get_name) @@ -44,11 +24,9 @@ __oldinit = __init__ def __init__(self, *args): self.__oldinit(*args) - self.keys = _ListWrapper(self.get_key_count, self.get_nth_key) %} } - typedef struct {} Capabilities; %extend Capabilities { Capabilities() { |