diff --git a/conversations/src/api.rs b/conversations/src/api.rs index 9588663..62d635c 100644 --- a/conversations/src/api.rs +++ b/conversations/src/api.rs @@ -54,10 +54,10 @@ pub fn create_context(name: repr_c::String) -> repr_c::Box { Box::new(ContextHandle(Context::new_with_name(&*name))).into() } -/// Returns the friendly name of the context's identity +/// Returns the friendly name of the contexts installation. #[ffi_export] -pub fn get_friendly_name(ctx: &ContextHandle) -> repr_c::String { - ctx.0.get_friendly_name().to_string().into() +pub fn installation_name(ctx: &ContextHandle) -> repr_c::String { + ctx.0.installation_name().to_string().into() } /// Destroys a conversation store and frees its memory diff --git a/conversations/src/context.rs b/conversations/src/context.rs index 0305b32..44dbce5 100644 --- a/conversations/src/context.rs +++ b/conversations/src/context.rs @@ -31,7 +31,7 @@ impl Context { } } - pub fn get_friendly_name(&self) -> &str { + pub fn installation_name(&self) -> &str { self._identity.get_name() } diff --git a/nim-bindings/src/bindings.nim b/nim-bindings/src/bindings.nim index e616708..cb64247 100644 --- a/nim-bindings/src/bindings.nim +++ b/nim-bindings/src/bindings.nim @@ -101,7 +101,7 @@ proc create_context*(name: ReprCString): ContextHandle {.importc, dynlib: CONVER ## Returns the friendly name of the context's identity ## The result must be freed by the caller (repr_c::String ownership transfers) -proc get_friendly_name*(ctx: ContextHandle): ReprCString {.importc, dynlib: CONVERSATIONS_LIB.} +proc installation_name*(ctx: ContextHandle): ReprCString {.importc, dynlib: CONVERSATIONS_LIB.} ## Destroys a context and frees its memory ## - handle must be a valid pointer from create_context() diff --git a/nim-bindings/src/libchat.nim b/nim-bindings/src/libchat.nim index 9836813..9b2cb0e 100644 --- a/nim-bindings/src/libchat.nim +++ b/nim-bindings/src/libchat.nim @@ -24,7 +24,7 @@ proc newConversationsContext*(name: string): LibChat = proc getInstallationName*(ctx: LibChat): string = if ctx.handle == nil: return "" - let name = get_friendly_name(ctx.handle) + let name = installation_name(ctx.handle) result = $name ## Destroy the context and free resources