IOS-1340 PEPAttachment.description
authorDirk Zimmermann <dirk@pep-project.org>
Mon, 17 Sep 2018 09:15:28 +0200
changeset 654a3e47d6a5353
parent 653 96e86c16a23b
child 655 64ed647cf87b
IOS-1340 PEPAttachment.description
pEpObjCAdapter/PEPAttachment.m
     1.1 --- a/pEpObjCAdapter/PEPAttachment.m	Mon Sep 10 12:06:49 2018 +0200
     1.2 +++ b/pEpObjCAdapter/PEPAttachment.m	Mon Sep 17 09:15:28 2018 +0200
     1.3 @@ -18,4 +18,23 @@
     1.4      return self;
     1.5  }
     1.6  
     1.7 +- (NSString *)description
     1.8 +{
     1.9 +    NSMutableString *str =
    1.10 +    [NSMutableString
    1.11 +     stringWithFormat:@"<PEPAttachment 0x%u Part %ld bytes contentDisposition %d",
    1.12 +     (uint) self, (long) self.size, self.contentDisposition];
    1.13 +
    1.14 +    if (self.mimeType) {
    1.15 +        [str appendFormat:@", %@", self.mimeType];
    1.16 +    }
    1.17 +
    1.18 +    if (self.filename) {
    1.19 +        [str appendFormat:@", %@", self.filename];
    1.20 +    }
    1.21 +
    1.22 +    [str appendString:@">"];
    1.23 +    return str;
    1.24 +}
    1.25 +
    1.26  @end