aboutsummaryrefslogtreecommitdiff
path: root/connector/connector.go
diff options
context:
space:
mode:
Diffstat (limited to 'connector/connector.go')
-rw-r--r--connector/connector.go19
1 files changed, 12 insertions, 7 deletions
diff --git a/connector/connector.go b/connector/connector.go
index 5df010a..d05f4a2 100644
--- a/connector/connector.go
+++ b/connector/connector.go
@@ -1,5 +1,9 @@
package connector
+import (
+ "io"
+)
+
/*
A generic connector framework for instant messaging protocols.
@@ -126,13 +130,14 @@ type RoomInfo struct {
}
type MediaObject interface {
- Size() int
- MimeType() string
+ Filename() string
+ Size() int64
+ Mimetype() string
- // AsBytes: must always be implemented
- AsBytes() ([]byte, error)
+ // Read: must always be implemented
+ Read() (io.ReadCloser, error)
- // AsString: not mandatory, may return an empty string
- // If so, AsBytes() is the only way to retrieve the object
- AsURL() string
+ // URL(): not mandatory, may return an empty string
+ // If so, Read() is the only way to retrieve the object
+ URL() string
}