]> git.saurik.com Git - veency.git/commitdiff
iPhoneVNC was replaced by Veency, but I forgot to commit the D.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 28 Mar 2010 07:53:23 +0000 (07:53 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 28 Mar 2010 07:53:23 +0000 (07:53 +0000)
iphonevnc/LayerKit/LKPurpleServer.h [deleted file]
iphonevnc/iPhoneVNC.mm [deleted file]
iphonevnc/makefile [deleted file]

diff --git a/iphonevnc/LayerKit/LKPurpleServer.h b/iphonevnc/LayerKit/LKPurpleServer.h
deleted file mode 100644 (file)
index 0a24f93..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef LAYERKIT_LKPURPLESERVER_H_
-#define LAYERKIT_LKPURPLESERVER_H_
-
-#include <stdbool.h>
-#include <stdint.h>
-
-#import <CoreGraphics/CGImage.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-CGImageRef LKPurpleServerGetScreenImage(void *null);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif/*LAYERKIT_LKPURPLESERVER_H_*/
diff --git a/iphonevnc/iPhoneVNC.mm b/iphonevnc/iPhoneVNC.mm
deleted file mode 100644 (file)
index aef6fc9..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#import <CoreFoundation/CFData.h>
-#import <CoreGraphics/CGBitmapContext.h>
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <rfb/rfb.h>
-
-extern "C" CGImageRef UIGetScreenImage();
-
-static const size_t Width = 320;
-static const size_t Height = 480;
-static const size_t BytesPerPixel = 4;
-static const size_t BitsPerComponent = 8;
-
-static const size_t Stride = Width * BytesPerPixel;
-static const size_t Size32 = Width * Height;
-static const size_t Size8 = Size32 * BytesPerPixel;
-
-extern "C" void *NSPushAutoreleasePool(void *);
-extern "C" void NSPopAutoreleasePool(void *);
-
-CGContextRef CreateContext() {
-    uint8_t *buffer = (uint8_t *) malloc(Size8);
-    if (buffer == NULL)
-        return NULL;
-
-    CGColorSpaceRef space = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
-
-    CGContextRef context = CGBitmapContextCreate(buffer, Width, Height, BitsPerComponent, Stride, space, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
-    if (context == NULL)
-        free(buffer);
-
-    CGColorSpaceRelease(space);
-    return context;
-}
-
-int main(int argc, char *argv[]) {
-    CGContextRef context0 = CreateContext();
-    CGContextRef context1 = CreateContext();
-
-    CGRect rect = CGRectMake(0, 0, Width, Height);
-
-    rfbScreenInfoPtr screen = rfbGetScreen(&argc, argv, Width, Height, BitsPerComponent, 3, BytesPerPixel);
-
-    screen->desktopName = "iPhone";
-    screen->alwaysShared = TRUE;
-
-    rfbInitServer(screen);
-
-    for (;;) {
-        CGContextRef context = context1;
-        context1 = context0;
-        context0 = context;
-
-        uint8_t *buffer0 = (uint8_t *) CGBitmapContextGetData(context0);
-        uint8_t *buffer1 = (uint8_t *) CGBitmapContextGetData(context1);
-        screen->frameBuffer = (char *) buffer0;
-
-        void *pool = NSPushAutoreleasePool(0);
-
-        CGImageRef image = UIGetScreenImage();
-        CGContextDrawImage(context0, rect, image);
-        CFRelease(image);
-
-        NSPopAutoreleasePool(pool);
-
-        if (memcmp(buffer0, buffer1, Size8) != 0)
-            rfbMarkRectAsModified(screen, 0, 0, Width, Height);
-        rfbProcessEvents(screen, 100000);
-    }
-
-
-    rfbScreenCleanup(screen);
-
-    return 0;
-}
diff --git a/iphonevnc/makefile b/iphonevnc/makefile
deleted file mode 100644 (file)
index 77aa29e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-all: iPhoneVNC
-
-clean:
-       rm -f iPhoneVNC
-
-test: all
-       ./iPhoneVNC
-
-iPhoneVNC: iPhoneVNC.mm makefile
-       g++ -g0 -O3 -o $@ $< -I. \
-            -lvncserver -lz \
-           -framework CoreFoundation \
-           -framework CoreGraphics \
-           -framework UIKit \
-            -lobjc \
-            -framework Foundation
-       ldid -S iPhoneVNC
-
-.PHONY: all clean test